Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 4 additions & 6 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ jobs:
sleep 60

- name: Unit tests with coverage
run:
go test -race -coverpkg=./... -coverprofile=coverage.txt
run: go test -race -coverpkg=./... -coverprofile=coverage.txt
-covermode=atomic -v ./...

- name: Shutdown oasis-node
Expand Down Expand Up @@ -110,11 +109,11 @@ jobs:
OASIS_CORE_VERSION: "25.3"
OASIS_NODE_BINARY: ${{ github.workspace }}/oasis_core/oasis-node
OASIS_NET_RUNNER_BINARY: ${{ github.workspace }}/oasis_core/oasis-net-runner
SAPPHIRE_PARATIME_VERSION: 1.0.0-testnet
SAPPHIRE_PARATIME_VERSION: 1.1.2-testnet
GATEWAY__CHAIN_ID: 23293
GATEWAY__OASIS_RPCS: true
SAPPHIRE_PARATIME: ${{ github.workspace }}/oasis_core/sapphire-paratime
KEYMANAGER_ARTIFACT_URL: https://buildkite.com/organizations/oasisprotocol/pipelines/oasis-core-ci/builds/15683/jobs/019837cd-8499-4567-ab19-70a46601a3eb/artifacts/019837d5-6805-45b8-8fa1-9a951b85867d # Find this at https://buildkite.com/oasisprotocol/oasis-core-ci/builds?branch=stable%2F<...> under "Build runtimes": simple-keymanager.mocksgx.
KEYMANAGER_ARTIFACT_URL: https://oasisprotocol-tst-buildkite-artifacts-bucket.s3.eu-central-1.amazonaws.com/b23a5f01-84d4-4e58-aa57-385ffecfaef1/0199dc24-9572-436a-ad48-929c4c1fdd84/019a2725-f1f8-43a1-a7b0-615227854f17/simple-keymanager.mocksgx # Find this at https://buildkite.com/oasisprotocol/oasis-core-ci/builds?branch=stable%2F<...> under "Build runtimes": simple-keymanager.mocksgx.
KEYMANAGER_BINARY: ${{ github.workspace }}/oasis_core/simple-keymanager
OASIS_NODE_DATADIR: /tmp/eth-runtime-test
OASIS_DOCKER_START_EXPLORER: no
Expand Down Expand Up @@ -152,8 +151,7 @@ jobs:
sleep 60

- name: Unit tests with coverage
run:
go test -race -coverpkg=./... -coverprofile=coverage.txt
run: go test -race -coverpkg=./... -coverprofile=coverage.txt
-covermode=atomic -v ./...

- name: Shutdown oasis-node
Expand Down
158 changes: 79 additions & 79 deletions docker/sapphire-localnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PARATIME_VERSION=1.0.0-testnet
ARG PARATIME_VERSION=1.1.2-testnet
ARG PARATIME_NAME=sapphire

FROM ghcr.io/oasisprotocol/oasis-core-dev:stable-25.4.x AS oasis-core-dev
FROM ghcr.io/oasisprotocol/oasis-core-dev:stable-25.6.x AS oasis-core-dev

ARG PARATIME_VERSION
ARG PARATIME_NAME
Expand All @@ -11,8 +11,8 @@ ARG PARATIME_NAME
# variant.
# Note that the simple keymanager is always freshly built because we need to
# specify different build options from what is in the release version.
ARG OASIS_CORE_SIMPLE_KM_BRANCH=stable/25.4.x
ARG OASIS_CORE_VERSION=25.4
ARG OASIS_CORE_SIMPLE_KM_BRANCH=stable/25.6.x
ARG OASIS_CORE_VERSION=25.6
#ARG OASIS_CORE_BRANCH=stable/24.3.x
ARG OASIS_CLI_VERSION=0.14.2
#ARG OASIS_CLI_BRANCH=master
Expand All @@ -39,102 +39,102 @@ RUN set -e; \
\
&& cd / \
&& if [ "x${OASIS_CORE_BRANCH}" != "x" ]; then \
git clone https://github.com/oasisprotocol/oasis-core.git --depth 1 \
&& cd /oasis-core \
&& git fetch origin ${OASIS_CORE_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make -C go oasis-node oasis-net-runner \
&& strip -s /oasis-core/go/oasis-net-runner/oasis-net-runner /oasis-core/go/oasis-node/oasis-node \
&& mv /oasis-core/go/oasis-net-runner/oasis-net-runner /oasis-core/go/oasis-node/oasis-node /out \
&& rm -rf /oasis-core; \
git clone https://github.com/oasisprotocol/oasis-core.git --depth 1 \
&& cd /oasis-core \
&& git fetch origin ${OASIS_CORE_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make -C go oasis-node oasis-net-runner \
&& strip -s /oasis-core/go/oasis-net-runner/oasis-net-runner /oasis-core/go/oasis-node/oasis-node \
&& mv /oasis-core/go/oasis-net-runner/oasis-net-runner /oasis-core/go/oasis-node/oasis-node /out \
&& rm -rf /oasis-core; \
else \
wget https://github.com/oasisprotocol/oasis-core/releases/download/v${OASIS_CORE_VERSION}/oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz \
&& strip -s oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-node oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-net-runner \
&& mv oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-node oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-net-runner /out \
&& rm -rf /oasis_core_${OASIS_CORE_VERSION}_linux_amd64*; \
wget https://github.com/oasisprotocol/oasis-core/releases/download/v${OASIS_CORE_VERSION}/oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz \
&& strip -s oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-node oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-net-runner \
&& mv oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-node oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-net-runner /out \
&& rm -rf /oasis_core_${OASIS_CORE_VERSION}_linux_amd64*; \
fi \
\
&& cd / \
&& if [ "x${OASIS_CLI_BRANCH}" != "x" ]; then \
git clone https://github.com/oasisprotocol/cli.git --depth 1 \
&& cd /cli \
&& git fetch origin ${OASIS_CLI_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make CGO_ENABLED=0 \
&& strip -s oasis \
&& mv oasis /out \
&& rm -rf /cli; \
git clone https://github.com/oasisprotocol/cli.git --depth 1 \
&& cd /cli \
&& git fetch origin ${OASIS_CLI_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make CGO_ENABLED=0 \
&& strip -s oasis \
&& mv oasis /out \
&& rm -rf /cli; \
else \
wget https://github.com/oasisprotocol/cli/releases/download/v${OASIS_CLI_VERSION}/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/oasis \
&& mv /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/oasis /out \
&& rm -rf /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64*; \
wget https://github.com/oasisprotocol/cli/releases/download/v${OASIS_CLI_VERSION}/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/oasis \
&& mv /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/oasis /out \
&& rm -rf /oasis_cli_${OASIS_CLI_VERSION}_linux_amd64*; \
fi \
\
&& cd / \
&& if [ "x${OASIS_WEB3_GATEWAY_BRANCH}" != "x" ]; then \
git clone https://github.com/oasisprotocol/oasis-web3-gateway.git oasis-web3-gateway-git --depth 1 \
&& cd /oasis-web3-gateway-git \
&& git fetch origin ${OASIS_WEB3_GATEWAY_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make \
&& strip -s oasis-web3-gateway \
&& mv oasis-web3-gateway /out \
&& rm -rf /oasis-web3-gateway-git; \
git clone https://github.com/oasisprotocol/oasis-web3-gateway.git oasis-web3-gateway-git --depth 1 \
&& cd /oasis-web3-gateway-git \
&& git fetch origin ${OASIS_WEB3_GATEWAY_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& make \
&& strip -s oasis-web3-gateway \
&& mv oasis-web3-gateway /out \
&& rm -rf /oasis-web3-gateway-git; \
else \
wget https://github.com/oasisprotocol/oasis-web3-gateway/releases/download/v${OASIS_WEB3_GATEWAY_VERSION}/oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64/oasis-web3-gateway \
&& mv /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64/oasis-web3-gateway /out \
&& rm -rf /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64*; \
wget https://github.com/oasisprotocol/oasis-web3-gateway/releases/download/v${OASIS_WEB3_GATEWAY_VERSION}/oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64/oasis-web3-gateway \
&& mv /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64/oasis-web3-gateway /out \
&& rm -rf /oasis_web3_gateway_${OASIS_WEB3_GATEWAY_VERSION}_linux_amd64*; \
fi \
\
&& cd / \
&& if [ "x${OASIS_SAPPHIRE_PARATIME_BRANCH}" != "x" ]; then \
git clone https://github.com/oasisprotocol/sapphire-paratime.git sapphire-paratime-git --depth 1 \
&& cd /sapphire-paratime-git \
&& git fetch origin ${OASIS_SAPPHIRE_PARATIME_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& cd runtime \
&& OASIS_UNSAFE_SKIP_AVR_VERIFY=1 OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=1 OASIS_UNSAFE_USE_LOCALNET_CHAINID=1 \
cargo build --release --locked --features debug-mock-sgx \
&& strip -s /sapphire-paratime-git/runtime/target/release/sapphire-paratime \
&& mv /sapphire-paratime-git/runtime/target/release/sapphire-paratime /out/ronl.elf \
&& rm -rf sapphire-paratime-git; \
git clone https://github.com/oasisprotocol/sapphire-paratime.git sapphire-paratime-git --depth 1 \
&& cd /sapphire-paratime-git \
&& git fetch origin ${OASIS_SAPPHIRE_PARATIME_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& cd runtime \
&& OASIS_UNSAFE_SKIP_AVR_VERIFY=1 OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=1 OASIS_UNSAFE_USE_LOCALNET_CHAINID=1 \
cargo build --release --locked --features debug-mock-sgx \
&& strip -s /sapphire-paratime-git/runtime/target/release/sapphire-paratime \
&& mv /sapphire-paratime-git/runtime/target/release/sapphire-paratime /out/ronl.elf \
&& rm -rf sapphire-paratime-git; \
else \
wget https://github.com/oasisprotocol/${PARATIME_NAME}-paratime/releases/download/v${PARATIME_VERSION}/localnet-${PARATIME_NAME}-paratime.orc \
&& unzip "localnet-${PARATIME_NAME}-paratime.orc" ronl.elf \
&& chmod a+x ronl.elf \
&& strip -s ronl.elf \
&& mv ronl.elf /out \
&& rm "localnet-${PARATIME_NAME}-paratime.orc"; \
wget https://github.com/oasisprotocol/${PARATIME_NAME}-paratime/releases/download/v${PARATIME_VERSION}/localnet-${PARATIME_NAME}-paratime.orc \
&& unzip "localnet-${PARATIME_NAME}-paratime.orc" ronl.elf \
&& chmod a+x ronl.elf \
&& strip -s ronl.elf \
&& mv ronl.elf /out \
&& rm "localnet-${PARATIME_NAME}-paratime.orc"; \
fi \
\
&& cd / \
&& if [ "x${NEXUS_BRANCH}" != "x" ]; then \
git clone https://github.com/oasisprotocol/nexus.git nexus-git --depth 1 \
&& cd nexus-git \
&& git fetch origin ${NEXUS_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12 \
&& make codegen-go \
&& go build \
&& strip -s /nexus-git/nexus \
&& mv /nexus-git/nexus /out \
&& mv /nexus-git/storage/migrations /out/nexus-migrations \
&& rm -rf /nexus-git; \
git clone https://github.com/oasisprotocol/nexus.git nexus-git --depth 1 \
&& cd nexus-git \
&& git fetch origin ${NEXUS_BRANCH} --depth 1 \
&& git checkout FETCH_HEAD \
&& go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12 \
&& make codegen-go \
&& go build \
&& strip -s /nexus-git/nexus \
&& mv /nexus-git/nexus /out \
&& mv /nexus-git/storage/migrations /out/nexus-migrations \
&& rm -rf /nexus-git; \
else \
wget https://github.com/oasisprotocol/nexus/releases/download/v${NEXUS_VERSION}/oasis_nexus_${NEXUS_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_nexus_${NEXUS_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_nexus_${NEXUS_VERSION}_linux_amd64/nexus \
&& mv /oasis_nexus_${NEXUS_VERSION}_linux_amd64/nexus /out \
&& rm -rf /oasis_nexus_${NEXUS_VERSION}_linux_amd64* && \
# We also need to fetch the storage migrations.
git clone https://github.com/oasisprotocol/nexus.git nexus-git --branch v${NEXUS_VERSION} --depth 1 \
&& mv /nexus-git/storage/migrations /out/nexus-migrations \
&& rm -rf nexus-git; \
wget https://github.com/oasisprotocol/nexus/releases/download/v${NEXUS_VERSION}/oasis_nexus_${NEXUS_VERSION}_linux_amd64.tar.gz \
&& tar -zxvf oasis_nexus_${NEXUS_VERSION}_linux_amd64.tar.gz \
&& strip -s /oasis_nexus_${NEXUS_VERSION}_linux_amd64/nexus \
&& mv /oasis_nexus_${NEXUS_VERSION}_linux_amd64/nexus /out \
&& rm -rf /oasis_nexus_${NEXUS_VERSION}_linux_amd64* && \
# We also need to fetch the storage migrations.
git clone https://github.com/oasisprotocol/nexus.git nexus-git --branch v${NEXUS_VERSION} --depth 1 \
&& mv /nexus-git/storage/migrations /out/nexus-migrations \
&& rm -rf nexus-git; \
fi \
\
&& cd / \
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
github.com/knadh/koanf v1.5.0
github.com/oasisprotocol/oasis-core/go v0.2504.0
github.com/oasisprotocol/oasis-core/go v0.2506.0
github.com/oasisprotocol/oasis-sdk/client-sdk/go v0.16.0
github.com/prometheus/client_golang v1.23.2
github.com/rs/cors v1.11.1
Expand Down Expand Up @@ -57,7 +57,7 @@ require (
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/dgraph-io/badger/v4 v4.5.1 // indirect
github.com/dgraph-io/ristretto/v2 v2.1.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand Down Expand Up @@ -92,11 +92,11 @@ require (
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/go-cid v0.5.0 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/ipfs/go-log/v2 v2.6.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -111,7 +111,7 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr v0.14.0 // indirect
github.com/multiformats/go-multiaddr v0.16.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
Expand Down Expand Up @@ -162,7 +162,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 // indirect
golang.org/x/net v0.45.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
Expand All @@ -173,6 +173,6 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
lukechampine.com/blake3 v1.4.1 // indirect
mellium.im/sasl v0.3.2 // indirect
)
Loading
Loading