Skip to content

Commit

Permalink
removed tendermint-enclave from deb
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad committed Nov 25, 2024
1 parent 0ebf9b8 commit 5df5250
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -505,15 +505,13 @@ 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)

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)
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`

Expand Down
5 changes: 0 additions & 5 deletions deployment/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"]

Expand Down

0 comments on commit 5df5250

Please sign in to comment.