From 9bd41167d5f4b9535f6855cd399287f4ea096722 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 30 Jul 2024 16:12:03 +0400 Subject: [PATCH] Change version to 1.0.4 everywhere --- .github/workflows/build-deb.yml | 2 +- .github/workflows/build-tar.yml | 2 +- Makefile | 2 +- deb/postinst | 4 ++-- deb/postrm | 6 +++--- docker/deb.Dockerfile | 4 ++-- docker/node.Dockerfile | 4 ++-- docker/tar.Dockerfile | 4 ++-- go-sgxvm/Makefile | 6 +++--- go-sgxvm/internal/api/link_glibclinux_aarch64.go | 2 +- .../internal/api/link_glibclinux_x86_64.attestation.go | 2 +- go-sgxvm/internal/api/link_glibclinux_x86_64.go | 2 +- go-sgxvm/internal/api/link_mac.go | 2 +- go-sgxvm/internal/api/link_muslc.go | 2 +- go-sgxvm/internal/api/link_system.go | 2 +- go-sgxvm/internal/api/link_windows.go | 2 +- go-sgxvm/src/enclave/doorbell.rs | 10 +++++----- sgxvm/Makefile | 2 +- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 257ee6b9..ba00e849 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 env: SGX_MODE: HW - VERSION: "1.0.3" + VERSION: "1.0.4" PRODUCTION_MODE: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build-tar.yml b/.github/workflows/build-tar.yml index 21df05d3..a911bf01 100644 --- a/.github/workflows/build-tar.yml +++ b/.github/workflows/build-tar.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 env: SGX_MODE: HW - VERSION: "1.0.3" + VERSION: "1.0.4" PRODUCTION_MODE: true steps: - uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 0063dc23..f69dc75e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := v1.0.3 +VERSION := v1.0.4 COMMIT := $(shell git log -1 --format='%H') ENCLAVE_HOME ?= $(HOME)/.swisstronik-enclave PRODUCTION_MODE ?= false diff --git a/deb/postinst b/deb/postinst index 1d9d492e..4cd7fc9b 100644 --- a/deb/postinst +++ b/deb/postinst @@ -8,7 +8,7 @@ then export SUDO_USER=root fi -cat < /etc/systemd/system/swisstronik-node-v1.0.3.service +cat < /etc/systemd/system/swisstronik-node-v1.0.4.service [Unit] Description=Swisstronik node service After=network.target @@ -16,7 +16,7 @@ After=network.target [Service] Type=simple WorkingDirectory=$(eval echo ~"$SUDO_USER") -ExecStart=/usr/local/bin/swisstronikd_v1.0.3 start --rpc.laddr "tcp://0.0.0.0:26657" --json-rpc.address 0.0.0.0:8545 --json-rpc.ws-address 0.0.0.0:8546 --home /opt/swisstronik/.swisstronik +ExecStart=/usr/local/bin/swisstronikd_v1.0.4 start --rpc.laddr "tcp://0.0.0.0:26657" --json-rpc.address 0.0.0.0:8545 --json-rpc.ws-address 0.0.0.0:8546 --home /opt/swisstronik/.swisstronik User=$SUDO_USER Restart=on-failure StartLimitInterval=0 diff --git a/deb/postrm b/deb/postrm index 3821ee5e..4b46d14c 100644 --- a/deb/postrm +++ b/deb/postrm @@ -3,8 +3,8 @@ set -e -systemctl stop swisstronik-node-v1.0.3 || true -systemctl disable swisstronik-node-v1.0.3 || true -rm -f /etc/systemd/system/swisstronik-node-v1.0.3.service || true +systemctl stop swisstronik-node-v1.0.4 || true +systemctl disable swisstronik-node-v1.0.4 || true +rm -f /etc/systemd/system/swisstronik-node-v1.0.4.service || true rm -r /opt/swisstronik/ || true systemctl daemon-reload || true diff --git a/docker/deb.Dockerfile b/docker/deb.Dockerfile index 5e2e2cf1..70d0d564 100644 --- a/docker/deb.Dockerfile +++ b/docker/deb.Dockerfile @@ -47,7 +47,7 @@ RUN make build ############ Node binary for deb package FROM compile-base as build-deb -ARG BUILD_VERSION="v1.0.3" +ARG BUILD_VERSION="v1.0.4" ENV VERSION=${BUILD_VERSION} ARG DEB_BIN_DIR=/usr/local/bin ENV DEB_BIN_DIR=${DEB_BIN_DIR} @@ -61,7 +61,7 @@ WORKDIR /root # Copy over binaries from the build-env COPY --from=compile-chain /root/chain/build/swisstronikd swisstronikd COPY --from=compile-chain /root/.swisstronik-enclave /usr/lib/.swisstronik-enclave -COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.3.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.3.x86_64.so +COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.4.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.4.x86_64.so COPY ./deb ./deb COPY ./scripts/build_deb.sh . diff --git a/docker/node.Dockerfile b/docker/node.Dockerfile index 57ae94ae..ada17694 100644 --- a/docker/node.Dockerfile +++ b/docker/node.Dockerfile @@ -46,7 +46,7 @@ FROM base as hw-node COPY --from=compile-chain /root/chain/build/swisstronikd /usr/local/bin/swisstronikd COPY --from=compile-chain /root/.swisstronik-enclave /root/.swisstronik-enclave -COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.3.x86_64.so /lib/x86_64-linux-gnu/libsgx_wrapper_v1.0.3.x86_64.so +COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.4.x86_64.so /lib/x86_64-linux-gnu/libsgx_wrapper_v1.0.4.x86_64.so COPY --from=compile-chain /opt/intel /opt/intel EXPOSE 26656 26657 1317 9090 8545 8546 8999 @@ -62,7 +62,7 @@ RUN rm -rf /var/lib/apt/lists/* COPY --from=compile-chain /root/chain/build/swisstronikd /usr/bin/swisstronikd COPY --from=compile-chain /root/.swisstronik-enclave /root/.swisstronik-enclave -COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.3.x86_64.so /lib/x86_64-linux-gnu/libsgx_wrapper_v1.0.3.x86_64.so +COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.4.x86_64.so /lib/x86_64-linux-gnu/libsgx_wrapper_v1.0.4.x86_64.so COPY --from=compile-chain /opt/intel/sgxsdk/sdk_libs/* /lib/x86_64-linux-gnu/ COPY --from=compile-chain /root/chain/scripts/local-node.sh /root/local-node.sh diff --git a/docker/tar.Dockerfile b/docker/tar.Dockerfile index 677ea0dc..254e767b 100644 --- a/docker/tar.Dockerfile +++ b/docker/tar.Dockerfile @@ -47,7 +47,7 @@ RUN make build ############ Node binary for deb package FROM compile-base as build-tar -ARG BUILD_VERSION="v1.0.3" +ARG BUILD_VERSION="v1.0.4" ENV VERSION=${BUILD_VERSION} WORKDIR /root @@ -55,7 +55,7 @@ WORKDIR /root # Copy over binaries from the build-env COPY --from=compile-chain /root/chain/build/swisstronikd swisstronikd COPY --from=compile-chain /root/.swisstronik-enclave /usr/lib/.swisstronik-enclave -COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.3.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.3.x86_64.so +COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.4.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.4.x86_64.so COPY ./deb ./deb COPY ./scripts/build_tar.sh . diff --git a/go-sgxvm/Makefile b/go-sgxvm/Makefile index f8cebee1..74c0e3b8 100644 --- a/go-sgxvm/Makefile +++ b/go-sgxvm/Makefile @@ -8,8 +8,8 @@ CXX=clang++ SGX_MODE ?= HW ENCLAVE_HOME ?= $(HOME)/.swisstronik-enclave PRODUCTION_MODE ?= false -AS_MODE ?= false -VERSION := v1.0.3 +AS_MODE ?= false +VERSION := v1.0.4 Wrapper_build_feature := "" Wrapper_lib := libsgx_wrapper_$(VERSION).x86_64.so @@ -40,4 +40,4 @@ build_AS: build go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation build_AS_d: build_d - go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation \ No newline at end of file + go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation diff --git a/go-sgxvm/internal/api/link_glibclinux_aarch64.go b/go-sgxvm/internal/api/link_glibclinux_aarch64.go index 2e765e50..fa240ce7 100644 --- a/go-sgxvm/internal/api/link_glibclinux_aarch64.go +++ b/go-sgxvm/internal/api/link_glibclinux_aarch64.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3.aarch64 +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.4.aarch64 import "C" diff --git a/go-sgxvm/internal/api/link_glibclinux_x86_64.attestation.go b/go-sgxvm/internal/api/link_glibclinux_x86_64.attestation.go index 7102f77a..3122c921 100644 --- a/go-sgxvm/internal/api/link_glibclinux_x86_64.attestation.go +++ b/go-sgxvm/internal/api/link_glibclinux_x86_64.attestation.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_attestation_wrapper_v1.0.3.x86_64 +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_attestation_wrapper_v1.0.4.x86_64 import "C" diff --git a/go-sgxvm/internal/api/link_glibclinux_x86_64.go b/go-sgxvm/internal/api/link_glibclinux_x86_64.go index 2d3f30e9..a862cbbe 100644 --- a/go-sgxvm/internal/api/link_glibclinux_x86_64.go +++ b/go-sgxvm/internal/api/link_glibclinux_x86_64.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3.x86_64 +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.4.x86_64 import "C" diff --git a/go-sgxvm/internal/api/link_mac.go b/go-sgxvm/internal/api/link_mac.go index 9b1492aa..0caae62d 100644 --- a/go-sgxvm/internal/api/link_mac.go +++ b/go-sgxvm/internal/api/link_mac.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3 +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.4 import "C" diff --git a/go-sgxvm/internal/api/link_muslc.go b/go-sgxvm/internal/api/link_muslc.go index de53c6ca..0b688dbc 100644 --- a/go-sgxvm/internal/api/link_muslc.go +++ b/go-sgxvm/internal/api/link_muslc.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3_muslc +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.4_muslc import "C" diff --git a/go-sgxvm/internal/api/link_system.go b/go-sgxvm/internal/api/link_system.go index 36752d35..5f133430 100644 --- a/go-sgxvm/internal/api/link_system.go +++ b/go-sgxvm/internal/api/link_system.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -lsgx_wrapper_v1.0.3 +// #cgo LDFLAGS: -lsgx_wrapper_v1.0.4 import "C" diff --git a/go-sgxvm/internal/api/link_windows.go b/go-sgxvm/internal/api/link_windows.go index f74dbd7d..042a15da 100644 --- a/go-sgxvm/internal/api/link_windows.go +++ b/go-sgxvm/internal/api/link_windows.go @@ -2,5 +2,5 @@ package api -// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3 +// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.4 import "C" diff --git a/go-sgxvm/src/enclave/doorbell.rs b/go-sgxvm/src/enclave/doorbell.rs index 5c48fe8e..a0fa6379 100644 --- a/go-sgxvm/src/enclave/doorbell.rs +++ b/go-sgxvm/src/enclave/doorbell.rs @@ -6,10 +6,10 @@ use std::ops::Deref; use std::time::Duration; #[cfg(not(feature = "attestation_server"))] -static ENCLAVE_FILE: &'static str = "v1.0.3_enclave.signed.so"; +static ENCLAVE_FILE: &'static str = "v1.0.4_enclave.signed.so"; #[cfg(feature = "attestation_server")] -static ENCLAVE_FILE: &'static str = "v1.0.3_attestation_enclave.signed.so"; +static ENCLAVE_FILE: &'static str = "v1.0.4_attestation_enclave.signed.so"; #[cfg(feature = "attestation_server")] const ENCLAVE_LOCK_TIMEOUT: u64 = 6 * 50; @@ -35,7 +35,7 @@ impl EnclaveDoorbell { secs_attr: sgx_attributes_t { flags: 0, xfrm: 0 }, misc_select: 0, }; - + let enclave_home = env::var("ENCLAVE_HOME").unwrap_or_else(|_| { let dir_path = String::from( std::env::home_dir() @@ -46,12 +46,12 @@ impl EnclaveDoorbell { format!("{}/.swisstronik-enclave", dir_path) }); let enclave_path = format!("{}/{}", enclave_home, ENCLAVE_FILE); - + println!( "[Enclave Doorbell] Creating enclave. Enclave location: {:?}", enclave_path ); - + let enclave = SgxEnclave::create( enclave_path, debug, diff --git a/sgxvm/Makefile b/sgxvm/Makefile index 07b201b6..312717ad 100644 --- a/sgxvm/Makefile +++ b/sgxvm/Makefile @@ -17,7 +17,7 @@ Enclave_Security_Link_Flags := -Wl,-z,relro,-z,now,-z,noexecstack Enclave_config_file ?= Enclave.config.development.xml Enclave_signing_key ?= Enclave_dev_private.pem Enclave_signed_file ?= enclave.signed.so -VERSION ?= v1.0.3 +VERSION ?= v1.0.4 # ENCLAVE SETTINGS ifneq ($(SGX_MODE), HW)