From 5df5250e45df39f87850952a80560753bc30581b Mon Sep 17 00:00:00 2001 From: vlad Date: Mon, 25 Nov 2024 16:39:33 +0000 Subject: [PATCH] removed tendermint-enclave from deb --- .github/workflows/ci.yaml | 2 -- .github/workflows/release.yaml | 6 ------ Makefile | 4 +--- README.md | 6 +----- deployment/dockerfiles/Dockerfile | 5 ----- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b110da5c..619746c6b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -126,7 +126,6 @@ jobs: docker run -v $PWD:/opt/mount --rm --entrypoint cp ghcr.io/scrtlabs/localsecret:v0.0.0 /usr/lib/libgo_cosmwasm.so /opt/mount/libgo_cosmwasm.so docker run -v $PWD:/opt/mount --rm --entrypoint cp ghcr.io/scrtlabs/localsecret:v0.0.0 /usr/lib/librust_cosmwasm_enclave.signed.so /opt/mount/librust_cosmwasm_enclave.signed.so docker run -v $PWD:/opt/mount --rm --entrypoint cp ghcr.io/scrtlabs/localsecret:v0.0.0 /usr/lib/librandom_api.so /opt/mount/librandom_api.so - docker run -v $PWD:/opt/mount --rm --entrypoint cp ghcr.io/scrtlabs/localsecret:v0.0.0 /usr/lib/tendermint_enclave.signed.so /opt/mount/tendermint_enclave.signed.so - uses: actions/download-artifact@v3 with: name: contract.wasm @@ -195,7 +194,6 @@ jobs: source "$HOME/.sgxsdk/sgxsdk/environment" export SGX_MODE=SW cp librust_cosmwasm_enclave.signed.so ./x/compute/internal/keeper - # cp tendermint_enclave.signed.so ./x/compute/internal/keeper mkdir -p ias_keys/develop mkdir -p /opt/secret/.sgx_secrets/ echo "not_a_key" > ias_keys/develop/spid.txt diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 99a3f4c07..a8d0e30a4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -267,12 +267,6 @@ jobs: name: Check Mitigation flags in Cosmwasm Enclave with: version: "v1.9.0" - - uses: ./.github/actions/check-objdump - name: Check Mitigation flags in TM Enclave - with: - filename: "tendermint_enclave.signed.so" - min-fence: "1000" - version: "v1.9.0" Release: needs: [ diff --git a/Makefile b/Makefile index 94fafc124..dfa60b98c 100644 --- a/Makefile +++ b/Makefile @@ -222,7 +222,7 @@ deb-no-compile: chmod +x /tmp/SecretNetwork/deb/$(DEB_BIN_DIR)/secretd /tmp/SecretNetwork/deb/$(DEB_BIN_DIR)/secretcli mkdir -p /tmp/SecretNetwork/deb/$(DEB_LIB_DIR) - cp -f ./go-cosmwasm/tendermint_enclave.signed.so ./go-cosmwasm/librandom_api.so ./go-cosmwasm/api/libgo_cosmwasm.so ./go-cosmwasm/librust_cosmwasm_enclave.signed.so /tmp/SecretNetwork/deb/$(DEB_LIB_DIR)/ + cp -f ./go-cosmwasm/librandom_api.so ./go-cosmwasm/api/libgo_cosmwasm.so ./go-cosmwasm/librust_cosmwasm_enclave.signed.so /tmp/SecretNetwork/deb/$(DEB_LIB_DIR)/ chmod +x /tmp/SecretNetwork/deb/$(DEB_LIB_DIR)/lib*.so mkdir -p /tmp/SecretNetwork/deb/DEBIAN @@ -505,7 +505,6 @@ prep-go-tests: build-test-contracts bin-data-sw go-tests: build-test-contracts bin-data-sw # SGX_MODE=SW $(MAKE) build-tm-secret-enclave - # cp /tmp/tm-secret-enclave/tendermint_enclave.signed.so ./x/compute/internal/keeper SGX_MODE=SW $(MAKE) build-linux cp ./$(EXECUTE_ENCLAVE_PATH)/librust_cosmwasm_enclave.signed.so ./x/compute/internal/keeper GOMAXPROCS=8 SGX_MODE=SW SCRT_SGX_STORAGE='./' SKIP_LIGHT_CLIENT_VALIDATION=TRUE go test -count 1 -failfast -timeout 90m -v ./x/compute/internal/... $(GO_TEST_ARGS) @@ -513,7 +512,6 @@ go-tests: build-test-contracts bin-data-sw go-tests-hw: build-test-contracts bin-data # empty BUILD_PROFILE means debug mode which compiles faster # SGX_MODE=HW $(MAKE) build-tm-secret-enclave - # cp /tmp/tm-secret-enclave/tendermint_enclave.signed.so ./x/compute/internal/keeper SGX_MODE=HW $(MAKE) build-linux cp ./$(EXECUTE_ENCLAVE_PATH)/librust_cosmwasm_enclave.signed.so ./x/compute/internal/keeper GOMAXPROCS=8 SGX_MODE=HW SCRT_SGX_STORAGE='./' SKIP_LIGHT_CLIENT_VALIDATION=TRUE go test -v ./x/compute/internal/... $(GO_TEST_ARGS) diff --git a/README.md b/README.md index 817f8b446..00bc8d568 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ Before you run your dev node, you need to point to the shared libraries needed b ``` export SCRT_ENCLAVE_DIR=~/SecretNetwork/go-cosmwasm ``` -In order to run __secretd__ you need to have built _librust_cosmwasm_enclave.signed.so_ and _tendermint_enclave.so_. +In order to run __secretd__ you need to have built _librust_cosmwasm_enclave.signed.so_. The latter can be built by cloning: ``` git clone git@github.com:scrtlabs/tm-secret-enclave.git ~/tm-secret-enclave @@ -212,12 +212,8 @@ This repo also uses submodules: cd tm-secret-enclave git submodule init git submodule update --remote -``` -and build _tendermint_enclave.so_: -``` make build-rust ``` -You may want to copy _tendermint_enclave.so_ to ~/SecretNetwork/go-cosmwasm Run `./scripts/start-node.sh` diff --git a/deployment/dockerfiles/Dockerfile b/deployment/dockerfiles/Dockerfile index 5f076731a..74975cbee 100644 --- a/deployment/dockerfiles/Dockerfile +++ b/deployment/dockerfiles/Dockerfile @@ -192,7 +192,6 @@ WORKDIR /root COPY --from=compile-secretd /go/src/github.com/scrtlabs/SecretNetwork/go-cosmwasm/target/release/libgo_cosmwasm.so /usr/lib/ COPY --from=compile-secretd /go/src/github.com/scrtlabs/SecretNetwork/go-cosmwasm/librust_cosmwasm_enclave.signed.so /usr/lib/ COPY --from=compile-secretd /go/src/github.com/scrtlabs/SecretNetwork/secretd /usr/bin/secretd -COPY --from=compile-tendermint-enclave /go/src/github.com/scrtlabs/SecretNetwork/tm-secret-enclave/tendermint_enclave.signed.so /usr/lib/tendermint_enclave.signed.so COPY --from=compile-tendermint-enclave /go/src/github.com/scrtlabs/SecretNetwork/tm-secret-enclave/api/librandom_api.so /usr/lib/librandom_api.so @@ -248,8 +247,6 @@ RUN STORAGE_PATH=$(echo ${VERSION} | awk -F'[.]' '{print $1 $2}') \ && wget -O /usr/lib/libgo_cosmwasm.so https://engfilestorage.blob.core.windows.net/v$STORAGE_PATH/libgo_cosmwasm.so RUN STORAGE_PATH=$(echo ${VERSION} | awk -F'[.]' '{print $1 $2}') \ && wget -O /usr/lib/librandom_api.so https://engfilestorage.blob.core.windows.net/v$STORAGE_PATH/librandom_api.so -RUN STORAGE_PATH=$(echo ${VERSION} | awk -F'[.]' '{print $1 $2}') \ - && wget -O /usr/lib/tendermint_enclave.signed.so https://engfilestorage.blob.core.windows.net/v$STORAGE_PATH/tendermint_enclave.signed.so COPY deployment/docker/mainnet/mainnet_node.sh . RUN chmod +x mainnet_node.sh @@ -277,7 +274,6 @@ COPY Makefile . # Copy over binaries from the build-env RUN cp /go/src/github.com/scrtlabs/SecretNetwork/go-cosmwasm/target/release/libgo_cosmwasm.so ./go-cosmwasm/api/ RUN cp /go/src/github.com/scrtlabs/SecretNetwork/go-cosmwasm/librust_cosmwasm_enclave.signed.so ./go-cosmwasm/ -COPY --from=compile-tendermint-enclave /go/src/github.com/scrtlabs/SecretNetwork/tm-secret-enclave/tendermint_enclave.signed.so ./go-cosmwasm/tendermint_enclave.signed.so COPY --from=compile-tendermint-enclave /go/src/github.com/scrtlabs/SecretNetwork/tm-secret-enclave/api/librandom_api.so ./go-cosmwasm/librandom_api.so RUN cp /go/src/github.com/scrtlabs/SecretNetwork/secretd secretd RUN cp /go/src/github.com/scrtlabs/SecretNetwork/secretcli secretcli @@ -295,7 +291,6 @@ CMD ["/bin/bash", "build_deb.sh"] FROM build-deb as build-deb-mainnet COPY --from=mainnet-release /usr/lib/librust_cosmwasm_enclave.signed.so ./go-cosmwasm/ -COPY --from=mainnet-release /usr/lib/tendermint_enclave.signed.so ./go-cosmwasm/ CMD ["/bin/bash", "build_deb.sh"]