Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sgx sdk 1.1.5, update sdk version #1221

Merged
merged 35 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f602f79
Fix CI tests
Cashmaney Oct 16, 2022
fea19a6
Fix CI tests
Cashmaney Oct 16, 2022
dd86df1
Got it to compile with newer sgx-sdk and updated rust.
Cashmaney Oct 19, 2022
34aab14
Build scripts almost work now
Cashmaney Oct 20, 2022
e6479ae
Build scripts almost work now
Cashmaney Oct 20, 2022
3ec7c79
Update base-rust.Dockerfile
Cashmaney Oct 20, 2022
4d66a88
Update base-rocksdb.Dockerfile
Cashmaney Oct 20, 2022
e0126e9
Update db-compile.Dockerfile
Cashmaney Oct 20, 2022
4e95e1e
Fix path
Cashmaney Oct 20, 2022
3da13b9
Update Makefile
Cashmaney Oct 20, 2022
8e3719e
CI fixes, change submodule to our repo
Cashmaney Oct 20, 2022
fe4d3fb
No more vendor
Cashmaney Oct 20, 2022
9d2aa0d
Remove build release profile
Cashmaney Oct 20, 2022
45c86d0
Remove build release profile
Cashmaney Oct 20, 2022
a84784d
Fix all the things that clippy wanted
Cashmaney Oct 20, 2022
18403f3
Fix ci recursive module import
Cashmaney Oct 20, 2022
bc50c87
Fix ci recursive module import
Cashmaney Oct 20, 2022
9f78cde
Merge branch 'sgx-sdk-1.1.5' of https://github.com/scrtlabs/SecretNet…
Cashmaney Oct 20, 2022
1de6552
Add rust-src
Cashmaney Oct 20, 2022
e9b17d0
Add install of correct xargo version
Cashmaney Oct 20, 2022
09d94e0
Update azure-pipelines.yml for Azure Pipelines
Cashmaney Oct 20, 2022
4f0b2ef
Update azure-pipelines.yml for Azure Pipelines
Cashmaney Oct 20, 2022
326381f
Update base.Dockerfile
Cashmaney Oct 20, 2022
fac677b
Add install of correct xargo version
Cashmaney Oct 20, 2022
f5083ca
Try to get submodule to work properly
Cashmaney Oct 20, 2022
f66beda
Try to get submodule to work properly
Cashmaney Oct 21, 2022
e045549
test commit please ignore
Cashmaney Oct 21, 2022
2bc1776
Localsecret should compile now
Cashmaney Oct 23, 2022
6d711ff
Merge branch 'master' into sgx-sdk-1.1.5
Cashmaney Oct 23, 2022
f0459df
Merge remote-tracking branch 'origin/master' into sgx-sdk-1.1.5
Cashmaney Oct 23, 2022
d5b6f2a
Fix localsecret compile outside of ci
Cashmaney Oct 23, 2022
a9ffb9d
Stupid azure
Cashmaney Oct 23, 2022
10ce806
Stupid azure
Cashmaney Oct 23, 2022
9170c46
Stupid azure
Cashmaney Oct 23, 2022
cc4dfef
Removed old sgx edl build deps
Cashmaney Oct 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_KEY=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
SPID=00000000000000000000000000000000
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ updates:
directory: "/cosmwasm"
schedule:
interval: daily


- package-ecosystem: gitsubmodule
schedule:
interval: "daily"
directory: "/"
31 changes: 23 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
name: Pull git submodules
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
cd "$HOME/.sgxsdk"
SDK_BIN=sgx_linux_x64_sdk_2.9.101.2.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.9.1/distro/ubuntu18.04-server/"$SDK_BIN"
SDK_BIN=sgx_linux_x64_sdk_2.17.101.1.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu20.04-server/"$SDK_BIN"
chmod +x "$SDK_BIN"
echo yes | ./"$SDK_BIN"
- name: Cache cargo registry
Expand Down Expand Up @@ -48,7 +51,6 @@ jobs:
- name: Test enclave
run: |
source "$HOME/.sgxsdk/sgxsdk/environment"
make vendor
export SGX_MODE=SW
RUSTC_WRAPPER="$HOME/sccache" make enclave-tests
make clean-enclave
Expand Down Expand Up @@ -105,15 +107,17 @@ jobs:
needs: [Build-Contracts, Build-LocalSecret]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
cd "$HOME/.sgxsdk"
SDK_BIN=sgx_linux_x64_sdk_2.9.101.2.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.9.1/distro/ubuntu18.04-server/"$SDK_BIN"
SDK_BIN=sgx_linux_x64_sdk_2.17.101.1.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu20.04-server/"$SDK_BIN"
chmod +x "$SDK_BIN"
echo yes | ./"$SDK_BIN"
- name: Download LocalSecret
Expand Down Expand Up @@ -178,12 +182,14 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
cd "$HOME/.sgxsdk"
SDK_BIN=sgx_linux_x64_sdk_2.9.101.2.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.9.1/distro/ubuntu18.04-server/"$SDK_BIN"
SDK_BIN=sgx_linux_x64_sdk_2.17.101.1.bin
wget https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu20.04-server/"$SDK_BIN"
chmod +x "$SDK_BIN"
echo yes | ./"$SDK_BIN"
- name: Cache cargo registry
Expand Down Expand Up @@ -220,7 +226,6 @@ jobs:
- name: Clippy
run: |
source "$HOME/.sgxsdk/sgxsdk/environment"
make vendor
cd cosmwasm/enclaves/execute/
SGX_MODE=SW make clippy
SGX_MODE=HW make clippy
Expand All @@ -229,6 +234,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
Expand All @@ -252,6 +259,8 @@ jobs:
with:
driver-opts: network=host
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build LocalSecret Base
uses: docker/build-push-action@v3
with:
Expand Down Expand Up @@ -322,6 +331,8 @@ jobs:
needs: [Build-LocalSecret, Build-Hermes]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Download Hermes
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -353,6 +364,10 @@ jobs:
yarn
yarn test
docker rm -f localsecret # next step needs the localsecret ports
- name: Install Requirements
run: |
chmod +x ./scripts/install-wasm-tools.sh
./scripts/install-wasm-tools.sh
- name: Run cw20-ics20 tests
run: |
git clone --depth 1 --branch secret https://github.com/scrtlabs/cw-plus
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- run: |
echo ${{ secrets.SPID_MAINNET }} > spid.txt; echo ${{ secrets.API_KEY_MAINNET }} > api_key.txt
name: "Save api keys"
- name: Build testnet
run: |
source "$HOME/.sgxsdk/sgxsdk/environment"
Expand All @@ -61,9 +64,9 @@ jobs:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- uses: actions/setup-go@v3
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
- run: |
echo ${{ secrets.SPID_MAINNET }} > spid.txt; echo ${{ secrets.API_KEY_MAINNET }} > api_key.txt
name: "Save api keys"
- name: Build
run: |
VERSION=${{ steps.get_version.outputs.VERSION }} DB_BACKEND=${{ matrix.db_backend }} FEATURES=production FEATURES_U=production, make build-mainnet-upgrade
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
sgx_sk.pem
*.a
*.deb
Expand All @@ -11,7 +12,6 @@ Enclave_u.o
/enigmacli*
/enigmad*
secretcli*
incubator-teaclave-sgx-sdk
libenclave.a
libEnclave_u.a
librust_cosmwasm_enclave.signed.so
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "third_party/incubator-teaclave-sgx-sdk"]
path = third_party/incubator-teaclave-sgx-sdk
url = https://github.com/scrtlabs/incubator-teaclave-sgx-sdk
branch = secret-1.1.5
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ COMMIT := $(shell git log -1 --format='%H')
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf

SPID ?= 00000000000000000000000000000000
API_KEY ?= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin
BUILD_PROFILE ?= release
Expand Down Expand Up @@ -228,7 +231,7 @@ clean:
$(MAKE) -C cosmwasm/enclaves/test clean

build-rocksdb-image:
docker build --build-arg BUILD_VERSION=${VERSION} -f deployment/dockerfiles/db-compile.Dockerfile -t enigmampc/rocksdb:${VERSION} .
docker build --build-arg BUILD_VERSION=${VERSION} -f deployment/dockerfiles/db-compile.Dockerfile -t enigmampc/rocksdb:${VERSION}-1.1.5 .

localsecret: _localsecret-compile
docker build --build-arg SGX_MODE=SW --build-arg SECRET_NODE_TYPE=BOOTSTRAP --build-arg CHAIN_ID=secretdev-1 -f deployment/dockerfiles/release.Dockerfile -t build-release .
Expand All @@ -239,6 +242,8 @@ _localsecret-compile:
--build-arg BUILD_VERSION=${VERSION} \
--build-arg FEATURES="${FEATURES},debug-print" \
--build-arg FEATURES_U=${FEATURES_U} \
--secret id=API_KEY,src=.env.local \
--secret id=SPID,src=.env.local \
--build-arg SGX_MODE=SW \
-f deployment/dockerfiles/base.Dockerfile \
-t rust-go-base-image \
Expand All @@ -258,7 +263,7 @@ build-custom-dev-image:

build-testnet: _docker_base
@mkdir build 2>&3 || true
docker build --secret API_KEY=${API_KEY} --secret SPID=${SPID} --build-arg BUILD_VERSION=${VERSION} --build-arg SGX_MODE=HW --build-arg SECRET_NODE_TYPE=BOOTSTRAP -f deployment/dockerfiles/release.Dockerfile -t enigmampc/secret-network-bootstrap:v$(VERSION)-testnet .
docker build --build-arg BUILD_VERSION=${VERSION} --build-arg SGX_MODE=HW --build-arg SECRET_NODE_TYPE=BOOTSTRAP -f deployment/dockerfiles/release.Dockerfile -t enigmampc/secret-network-bootstrap:v$(VERSION)-testnet .
docker build --build-arg BUILD_VERSION=${VERSION} --build-arg SGX_MODE=HW --build-arg SECRET_NODE_TYPE=NODE -f deployment/dockerfiles/release.Dockerfile -t enigmampc/secret-network-node:v$(VERSION)-testnet .
docker build --build-arg SGX_MODE=HW -f deployment/dockerfiles/build-deb.Dockerfile -t deb_build .
docker run -e VERSION=${VERSION} -v $(CUR_DIR)/build:/build deb_build
Expand Down Expand Up @@ -296,6 +301,8 @@ _docker_base:
--build-arg FEATURES=${FEATURES} \
--build-arg FEATURES_U=${FEATURES_U} \
--build-arg SGX_MODE=${SGX_MODE} \
--secret id=API_KEY,src=api_key.txt \
--secret id=SPID,src=spid.txt \
-f deployment/dockerfiles/base.Dockerfile \
-t rust-go-base-image \
.
Expand Down
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ variables:
DOCKER_BUILDKIT: 1

steps:
- checkout: "self"
submodules: true
displayName: "Checkout Repository and Submodules"
- script: echo $(spid) > spid.txt; echo $(api-key-dev) > api_key.txt
displayName: "Save api keys"

Expand Down Expand Up @@ -64,7 +67,7 @@ steps:
repository: rust-enclave-test
tags: latest
buildContext: .
arguments: --build-arg SGX_MODE=HW
arguments: --secret id=API_KEY,src=api_key.txt --secret id=SPID,src=spid.txt --build-arg SGX_MODE=HW
Dockerfile: deployment/dockerfiles/enclave-test.Dockerfile

- task: Docker@2
Expand Down
6 changes: 2 additions & 4 deletions cosmwasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading