From fb6630c10affd53aad94a2f5969cb80841f78036 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 27 Sep 2024 10:59:10 +0400 Subject: [PATCH 01/27] feat: add nethermind to base --- .dockerignore | 1 + .env.mainnet | 3 ++ .env.sepolia | 3 ++ .github/workflows/docker.yml | 33 ++++++++++++++++++ .github/workflows/pr.yml | 20 +++++++++++ .gitignore | 1 + nethermind/Dockerfile | 46 +++++++++++++++++++++++++ nethermind/nethermind-entrypoint | 58 ++++++++++++++++++++++++++++++++ 8 files changed, 165 insertions(+) create mode 100644 nethermind/Dockerfile create mode 100644 nethermind/nethermind-entrypoint diff --git a/.dockerignore b/.dockerignore index 5628ed5..927362b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ geth-data/ reth-data/ +nethermind-data/ diff --git a/.env.mainnet b/.env.mainnet index c114869..4b64eaf 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -4,6 +4,9 @@ OP_GETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port +# OP_NETHERMIND_ETHSTATS_ENABLED=true +# OP_NETHERMIND_ETHSTATS_NODE_NAME=NethermindNode +# OP_NETHERMIND_ETHSTATS_ENDPOINT=ethstats_endpoint # [required] replace with your preferred L1 (Ethereum, not Base) node RPC URL: OP_NODE_L1_ETH_RPC=https://1rpc.io/eth diff --git a/.env.sepolia b/.env.sepolia index 00e5351..c864cb1 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -4,6 +4,9 @@ OP_GETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port +# OP_NETHERMIND_ETHSTATS_ENABLED=true +# OP_NETHERMIND_ETHSTATS_NODE_NAME=NethermindNode +# OP_NETHERMIND_ETHSTATS_ENDPOINT=ethstats_endpoint # [required] replace with your preferred L1 (Ethereum, not Base) node RPC URL: OP_NODE_L1_ETH_RPC=https://rpc.sepolia.org diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d7d4bf5..3cb22ca 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,6 +13,7 @@ env: GETH_DEPRECATED_IMAGE_NAME: node GETH_IMAGE_NAME: node-geth RETH_IMAGE_NAME: node-reth + NETHERMIND_IMAGE_NAME: node-nethermind jobs: geth: @@ -87,3 +88,35 @@ jobs: build-args: | FEATURES=${{ matrix.features }} platforms: ${{ matrix.arch }} + nethermind: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Log into the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for the Docker image + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push the Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: nethermind/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3b2fc9f..0cc659a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -48,3 +48,23 @@ jobs: build-args: | FEATURES=${{ matrix.features }} platforms: ${{ matrix.arch }} + nethermind: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [ linux/amd64, linux/arm64 ] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build the Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: nethermind/Dockerfile + push: false + platforms: ${{ matrix.arch }} + diff --git a/.gitignore b/.gitignore index b2f231e..27ac158 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea/ /geth-data/ /reth-data/ +/nethermind-data/ .DS_Store diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile new file mode 100644 index 0000000..e4fbd29 --- /dev/null +++ b/nethermind/Dockerfile @@ -0,0 +1,46 @@ +FROM golang:1.21 AS op + +WORKDIR /app + +ENV REPO=https://github.com/ethereum-optimism/optimism.git +ENV VERSION=v1.9.1 +ENV COMMIT=4797ddb70e05d4952685bad53e608cb5606284e6 +RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \ + git switch -c branch-$VERSION && \ + bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' + +RUN cd op-node && \ + make VERSION=$VERSION op-node + +FROM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build + +ARG BUILD_CONFIG=release +ARG TARGETARCH + +WORKDIR /app + +ENV REPO=https://github.com/nethermindeth/nethermind +ENV VERSION=1.28.0 +RUN git clone $REPO . && git checkout $VERSION + +RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ + dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false + + +FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble + +RUN apt-get update && \ + apt-get install -y jq curl supervisor && \ + rm -rf /var/lib/apt/lists + +RUN mkdir -p /var/log/supervisor + +WORKDIR /app + +COPY --from=build /publish ./ +COPY --from=op /app/op-node/bin/op-node ./ +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY nethermind/nethermind-entrypoint ./execution-entrypoint +COPY op-node-entrypoint . + +CMD ["/usr/bin/supervisord"] \ No newline at end of file diff --git a/nethermind/nethermind-entrypoint b/nethermind/nethermind-entrypoint new file mode 100644 index 0000000..b226c95 --- /dev/null +++ b/nethermind/nethermind-entrypoint @@ -0,0 +1,58 @@ +#!/bin/bash +set -eu + +# Default configurations +NETHERMIND_DATA_DIR=${NETHERMIND_DATA_DIR:-/data} +NETHERMIND_LOG_LEVEL=${NETHERMIND_LOG_LEVEL:-Info} +NETWORK=${NETWORK:-mainnet} + +RPC_PORT="${RPC_PORT:-8545}" +WS_PORT="${WS_PORT:-8546}" +AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" +METRICS_PORT="${METRICS_PORT:-6060}" +DISCOVERY_PORT="${DISCOVERY_PORT:-30303}" + +JWT_SECRET_FILE=${JWT_SECRET_FILE:-/tmp/jwt/jwtsecret} +ADDITIONAL_ARGS="" + +# Check if required variables are set +if [[ -z "$NETWORK" ]]; then + echo "Expected NETWORK to be set" 1>&2 + exit 1 +fi + +# Create necessary directories +mkdir -p "$NETHERMIND_DATA_DIR" + +# Write the JWT secret +if [[ -z "${OP_NODE_L2_ENGINE_AUTH_RAW:-}" ]]; then + echo "Expected OP_NODE_L2_ENGINE_AUTH_RAW to be set" 1>&2 + exit 1 +fi +echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH" + +# Additional arguments based on environment variables +if [[ -n "${OP_NETHERMIND_ETHSTATS_ENABLED:-}" ]]; then + ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Enabled=$OP_NETHERMIND_ETHSTATS_ENABLED" +fi + +if [[ -n "${OP_NETHERMIND_ETHSTATS_ENDPOINT:-}" ]]; then + ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.NodeName=${OP_NETHERMIND_ETHSTATS_NODE_NAME:-NethermindNode} --EthStats.Endpoint=$OP_NETHERMIND_ETHSTATS_ENDPOINT" +fi + +# Execute Nethermind +exec ./nethermind \ + --config="$OP_NODE_NETWORK" \ + --datadir="$NETHERMIND_DATA_DIR" \ + --log="$NETHERMIND_LOG_LEVEL" \ + --JsonRpc.Enabled=true \ + --JsonRpc.Host=0.0.0.0 \ + --JsonRpc.WebSocketsPort="$WS_PORT" \ + --JsonRpc.Port="$RPC_PORT" \ + --JsonRpc.JwtSecretFile="$OP_NODE_L2_ENGINE_AUTH" \ + --JsonRpc.EngineHost=0.0.0.0 \ + --JsonRpc.EnginePort="$AUTHRPC_PORT" \ + --HealthChecks.Enabled=true \ + --Metrics.Enabled=true \ + --Metrics.ExposePort="$METRICS_PORT" \ + $ADDITIONAL_ARGS From 28058149887e264be9422ba3c88f8a749960af7e Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 27 Sep 2024 11:10:49 +0400 Subject: [PATCH 02/27] feat: add supported clients to readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index eb0d01e..1f6aff0 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,15 @@ If you encounter problems with your node, please open a [GitHub issue](https://g docker compose up --build ``` +> [!NOTE] +> To run the node using a supported client, you can use the following command: +> `CLIENT=supported_client docker compose up --build` +> +> Supported clients: +> - geth +> - reth +> - nethermind + 4. You should now be able to `curl` your Base node: ``` From 6d69a82eb373b88b1594d2506f10cda50bceabf5 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 27 Sep 2024 14:00:02 +0400 Subject: [PATCH 03/27] fix: add missing flags on nethermind config --- .env.mainnet | 2 ++ .env.sepolia | 2 ++ nethermind/nethermind-entrypoint | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/.env.mainnet b/.env.mainnet index 4b64eaf..522f019 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -1,6 +1,7 @@ RETH_CHAIN=base RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org OP_GETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org +OP_SEQUENCER_HTTP=https://mainnet-sequencer.base.org # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port @@ -45,4 +46,5 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # To enable snap sync, uncomment and set the env vars below: # OP_NODE_SYNCMODE=execution-layer # OP_GETH_BOOTNODES=enode://87a32fd13bd596b2ffca97020e31aef4ddcc1bbd4b95bb633d16c1329f654f34049ed240a36b449fda5e5225d70fe40bc667f53c304b71f8e68fc9d448690b51@3.231.138.188:30301,enode://ca21ea8f176adb2e229ce2d700830c844af0ea941a1d8152a9513b966fe525e809c3a6c73a2c18a12b74ed6ec4380edf91662778fe0b79f6a591236e49e176f9@184.72.129.189:30301,enode://acf4507a211ba7c1e52cdf4eef62cdc3c32e7c9c47998954f7ba024026f9a6b2150cd3f0b734d9c78e507ab70d59ba61dfe5c45e1078c7ad0775fb251d7735a2@3.220.145.177:30301,enode://8a5a5006159bf079d06a04e5eceab2a1ce6e0f721875b2a9c96905336219dbe14203d38f70f3754686a6324f786c2f9852d8c0dd3adac2d080f4db35efc678c5@3.231.11.52:30301,enode://cdadbe835308ad3557f9a1de8db411da1a260a98f8421d62da90e71da66e55e98aaa8e90aa7ce01b408a54e4bd2253d701218081ded3dbe5efbbc7b41d7cef79@54.198.153.150:30301 +# OP_NETHERMIND_BOOTNODES=enode://87a32fd13bd596b2ffca97020e31aef4ddcc1bbd4b95bb633d16c1329f654f34049ed240a36b449fda5e5225d70fe40bc667f53c304b71f8e68fc9d448690b51@3.231.138.188:30301,enode://ca21ea8f176adb2e229ce2d700830c844af0ea941a1d8152a9513b966fe525e809c3a6c73a2c18a12b74ed6ec4380edf91662778fe0b79f6a591236e49e176f9@184.72.129.189:30301,enode://acf4507a211ba7c1e52cdf4eef62cdc3c32e7c9c47998954f7ba024026f9a6b2150cd3f0b734d9c78e507ab70d59ba61dfe5c45e1078c7ad0775fb251d7735a2@3.220.145.177:30301,enode://8a5a5006159bf079d06a04e5eceab2a1ce6e0f721875b2a9c96905336219dbe14203d38f70f3754686a6324f786c2f9852d8c0dd3adac2d080f4db35efc678c5@3.231.11.52:30301,enode://cdadbe835308ad3557f9a1de8db411da1a260a98f8421d62da90e71da66e55e98aaa8e90aa7ce01b408a54e4bd2253d701218081ded3dbe5efbbc7b41d7cef79@54.198.153.150:30301 # OP_GETH_SYNCMODE=snap diff --git a/.env.sepolia b/.env.sepolia index c864cb1..37d0f4b 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -1,6 +1,7 @@ RETH_CHAIN=base-sepolia RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org OP_GETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org +OP_SEQUENCER_HTTP=https://sepolia-sequencer.base.org # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port @@ -45,4 +46,5 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # To enable snap sync, set env vars below: # OP_NODE_SYNCMODE=execution-layer # OP_GETH_BOOTNODES=enode://548f715f3fc388a7c917ba644a2f16270f1ede48a5d88a4d14ea287cc916068363f3092e39936f1a3e7885198bef0e5af951f1d7b1041ce8ba4010917777e71f@18.210.176.114:30301,enode://6f10052847a966a725c9f4adf6716f9141155b99a0fb487fea3f51498f4c2a2cb8d534e680ee678f9447db85b93ff7c74562762c3714783a7233ac448603b25f@107.21.251.55:30301 +# OP_NETHERMIND_BOOTNODES=enode://548f715f3fc388a7c917ba644a2f16270f1ede48a5d88a4d14ea287cc916068363f3092e39936f1a3e7885198bef0e5af951f1d7b1041ce8ba4010917777e71f@18.210.176.114:30301,enode://6f10052847a966a725c9f4adf6716f9141155b99a0fb487fea3f51498f4c2a2cb8d534e680ee678f9447db85b93ff7c74562762c3714783a7233ac448603b25f@107.21.251.55:30301 # OP_GETH_SYNCMODE=snap diff --git a/nethermind/nethermind-entrypoint b/nethermind/nethermind-entrypoint index b226c95..1a33768 100644 --- a/nethermind/nethermind-entrypoint +++ b/nethermind/nethermind-entrypoint @@ -32,6 +32,10 @@ fi echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH" # Additional arguments based on environment variables +if [ "${OP_NETHERMIND_BOOTNODES+x}" = x ]; then + ADDITIONAL_ARGS="$ADDITIONAL_ARGS --Network.Bootnodes=$OP_NETHERMIND_BOOTNODES" +fi + if [[ -n "${OP_NETHERMIND_ETHSTATS_ENABLED:-}" ]]; then ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Enabled=$OP_NETHERMIND_ETHSTATS_ENABLED" fi @@ -44,6 +48,7 @@ fi exec ./nethermind \ --config="$OP_NODE_NETWORK" \ --datadir="$NETHERMIND_DATA_DIR" \ + --Optimism.SequencerUrl=$OP_SEQUENCER_HTTP \ --log="$NETHERMIND_LOG_LEVEL" \ --JsonRpc.Enabled=true \ --JsonRpc.Host=0.0.0.0 \ From 0c9c0d0d5504425e22c6d9c2797b0860aac763f1 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Fri, 27 Sep 2024 14:47:25 +0100 Subject: [PATCH 04/27] Update version --- nethermind/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index e4fbd29..46d3583 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -19,9 +19,12 @@ ARG TARGETARCH WORKDIR /app -ENV REPO=https://github.com/nethermindeth/nethermind -ENV VERSION=1.28.0 -RUN git clone $REPO . && git checkout $VERSION +ENV REPO=https://github.com/NethermindEth/nethermind.git +ENV VERSION=1.29.0 +ENV COMMIT=b8a5f1eb26fdee6e1ac8a952a574daac7667c13e +RUN git clone $REPO --branch release/$VERSION --single-branch . && \ + git switch -c release/$VERSION && \ + bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false From a66f08f1c575fdaec4a587d06d16a552cf65558d Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sat, 28 Sep 2024 21:24:37 +0100 Subject: [PATCH 05/27] Update commit --- nethermind/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 46d3583..1588eb6 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 -ENV COMMIT=b8a5f1eb26fdee6e1ac8a952a574daac7667c13e +ENV COMMIT=e324dae2a92e23f2cd351d81e9e46554591b2cef RUN git clone $REPO --branch release/$VERSION --single-branch . && \ git switch -c release/$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' From d03608dc077f6ed78e70f7350011ce5fae30f0eb Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sun, 29 Sep 2024 03:14:35 +0100 Subject: [PATCH 06/27] Update commit --- nethermind/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 1588eb6..993c4c7 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 -ENV COMMIT=e324dae2a92e23f2cd351d81e9e46554591b2cef +ENV COMMIT=917f5349517118bf5c73c362c3902d61e68e5b40 RUN git clone $REPO --branch release/$VERSION --single-branch . && \ git switch -c release/$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' From 1018327c2c15839edf7935bda8d36ed54425579a Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sun, 29 Sep 2024 04:36:37 +0100 Subject: [PATCH 07/27] Update nethermind/Dockerfile Co-authored-by: Michael de Hoog --- nethermind/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 993c4c7..d5fab80 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -23,7 +23,7 @@ ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 ENV COMMIT=917f5349517118bf5c73c362c3902d61e68e5b40 RUN git clone $REPO --branch release/$VERSION --single-branch . && \ - git switch -c release/$VERSION && \ + git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ From bbab7816ca47678c1ba95bb906b72a4c93b189fb Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:02:40 +0400 Subject: [PATCH 08/27] feat: add qemu to nethermind docker build --- .github/workflows/docker.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3cb22ca..459781a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -101,6 +101,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 @@ -120,3 +125,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 + build-args: | + BUILD_CONFIG=release + TARGETARCH=${{ matrix.platform }} From 7188de14e56312c2218d5fa9bc33e6d4169dfda5 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:14:21 +0400 Subject: [PATCH 09/27] fix: update release/1.29.0 commit --- nethermind/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index d5fab80..2576646 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -21,10 +21,10 @@ WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 -ENV COMMIT=917f5349517118bf5c73c362c3902d61e68e5b40 +ENV COMMIT=7320938e5fe74ad6ac1782ce723ddb7bb7d3d78a RUN git clone $REPO --branch release/$VERSION --single-branch . && \ - git switch -c branch-$VERSION && \ - bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' + git switch -c branch-$VERSION +RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false @@ -46,4 +46,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY nethermind/nethermind-entrypoint ./execution-entrypoint COPY op-node-entrypoint . -CMD ["/usr/bin/supervisord"] \ No newline at end of file +CMD ["/usr/bin/supervisord"] From 85c9f6b0ed9f53cb70eca397dc82760bcc1af392 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:34:46 +0400 Subject: [PATCH 10/27] fix: build on nethermind --- .github/workflows/docker.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 459781a..532ee4d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -106,6 +106,9 @@ jobs: with: platforms: linux/amd64,linux/arm64 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 @@ -113,18 +116,14 @@ jobs: images: | ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push the Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: nethermind/Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - build-args: | - BUILD_CONFIG=release - TARGETARCH=${{ matrix.platform }} + - name: Build and push the Docker image using buildx + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --file nethermind/Dockerfile \ + --tag ${{ steps.meta.outputs.tags }} \ + --label ${{ steps.meta.outputs.labels }} \ + --build-arg BUILD_CONFIG=release \ + --build-arg TARGETARCH=${{ matrix.platform }} \ + --push \ + . From 51405519485e0546e73ef75dbb98dc5a5031ed4d Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:42:47 +0400 Subject: [PATCH 11/27] fix: build on nethermind, buildx command --- .github/workflows/docker.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 532ee4d..4520a81 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -103,8 +103,6 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 - with: - platforms: linux/amd64,linux/arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -125,5 +123,4 @@ jobs: --label ${{ steps.meta.outputs.labels }} \ --build-arg BUILD_CONFIG=release \ --build-arg TARGETARCH=${{ matrix.platform }} \ - --push \ - . + . --push From f2feba63021e96d020091452db316c5b461bc15b Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:49:28 +0400 Subject: [PATCH 12/27] fix: build on nethermind, labels breaking buildx --- .github/workflows/docker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4520a81..e76612a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -116,11 +116,15 @@ jobs: - name: Build and push the Docker image using buildx run: | + # Convert labels to individual --label flags + labels=$(echo "${{ steps.meta.outputs.labels }}" | sed 's/^/--label "/; s/$/"/') + + # Run the docker buildx build command docker buildx build \ --platform linux/amd64,linux/arm64 \ --file nethermind/Dockerfile \ - --tag ${{ steps.meta.outputs.tags }} \ - --label ${{ steps.meta.outputs.labels }} \ + --tag ghcr.io/base-org/node-nethermind:main \ + $labels \ --build-arg BUILD_CONFIG=release \ --build-arg TARGETARCH=${{ matrix.platform }} \ . --push From fa24cec54a39317b994a78712fb556ba43f64157 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:52:30 +0400 Subject: [PATCH 13/27] fix: build on nethermind, labels breaking buildx again --- .github/workflows/docker.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e76612a..51a3d62 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -117,7 +117,10 @@ jobs: - name: Build and push the Docker image using buildx run: | # Convert labels to individual --label flags - labels=$(echo "${{ steps.meta.outputs.labels }}" | sed 's/^/--label "/; s/$/"/') + labels="" + while IFS= read -r line; do + labels="$labels --label \"$line\"" + done <<< "${{ steps.meta.outputs.labels }}" # Run the docker buildx build command docker buildx build \ From 52f7c0797d4d6a40707b78e644b2bdca6858f615 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 19:58:20 +0400 Subject: [PATCH 14/27] fix: build on nethermind, buildx --- .github/workflows/docker.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 51a3d62..5684010 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -90,44 +90,53 @@ jobs: platforms: ${{ matrix.arch }} nethermind: runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/arm64] steps: - name: Checkout uses: actions/checkout@v2 - + - name: Log into the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Set up QEMU uses: docker/setup-qemu-action@v2 - + with: + platforms: linux/amd64,linux/arm64 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 with: images: | ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - + - name: Build and push the Docker image using buildx run: | # Convert labels to individual --label flags labels="" while IFS= read -r line; do - labels="$labels --label \"$line\"" + labels="$labels --label $line" done <<< "${{ steps.meta.outputs.labels }}" - + + # Debug: Print the constructed docker buildx build command + echo "docker buildx build --platform ${{ matrix.platform }} --file nethermind/Dockerfile --tag ${{ steps.meta.outputs.tags }} $labels --build-arg BUILD_CONFIG=release --build-arg TARGETARCH=${{ matrix.platform }} . --push" + # Run the docker buildx build command docker buildx build \ - --platform linux/amd64,linux/arm64 \ + --platform ${{ matrix.platform }} \ --file nethermind/Dockerfile \ - --tag ghcr.io/base-org/node-nethermind:main \ + --tag ${{ steps.meta.outputs.tags }} \ $labels \ --build-arg BUILD_CONFIG=release \ --build-arg TARGETARCH=${{ matrix.platform }} \ . --push + From 4acf6e1cb614393817c9dac8e3f660c34c2b5311 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 20:02:23 +0400 Subject: [PATCH 15/27] fix: build on nethermind, buildx labels --- .github/workflows/docker.yml | 9 ++++----- docker-compose.yml | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5684010..1c39444 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -121,15 +121,15 @@ jobs: - name: Build and push the Docker image using buildx run: | - # Convert labels to individual --label flags + # Convert labels to individual --label flags with proper quoting labels="" while IFS= read -r line; do - labels="$labels --label $line" + labels="$labels --label \"${line}\"" done <<< "${{ steps.meta.outputs.labels }}" - + # Debug: Print the constructed docker buildx build command echo "docker buildx build --platform ${{ matrix.platform }} --file nethermind/Dockerfile --tag ${{ steps.meta.outputs.tags }} $labels --build-arg BUILD_CONFIG=release --build-arg TARGETARCH=${{ matrix.platform }} . --push" - + # Run the docker buildx build command docker buildx build \ --platform ${{ matrix.platform }} \ @@ -139,4 +139,3 @@ jobs: --build-arg BUILD_CONFIG=release \ --build-arg TARGETARCH=${{ matrix.platform }} \ . --push - diff --git a/docker-compose.yml b/docker-compose.yml index 9068905..fd39f1b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,7 @@ services: volumes: - ${HOST_DATA_DIR}:/data env_file: - # select your network here: -# - .env.sepolia + - .env.sepolia # - .env.mainnet node: build: @@ -28,6 +27,5 @@ services: - "6060:6060" # pprof command: [ "bash", "./op-node-entrypoint" ] env_file: - # select your network here: -# - .env.sepolia + - .env.sepolia # - .env.mainnet From 313cc0af25b41aca3e31b2dbb9b964f1cde621ae Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 20:08:40 +0400 Subject: [PATCH 16/27] fix: build on nethermind, buildx labels, now as cmd --- .github/workflows/docker.yml | 24 +++++++++--------------- docker-compose.yml | 8 ++++++-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c39444..e058eb6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -121,21 +121,15 @@ jobs: - name: Build and push the Docker image using buildx run: | - # Convert labels to individual --label flags with proper quoting - labels="" + cmd=("docker" "buildx" "build" "--platform" "${{ matrix.platform }}" "--file" "nethermind/Dockerfile" "--tag" "${{ steps.meta.outputs.tags }}") + while IFS= read -r line; do - labels="$labels --label \"${line}\"" + cmd+=("--label" "$line") done <<< "${{ steps.meta.outputs.labels }}" - # Debug: Print the constructed docker buildx build command - echo "docker buildx build --platform ${{ matrix.platform }} --file nethermind/Dockerfile --tag ${{ steps.meta.outputs.tags }} $labels --build-arg BUILD_CONFIG=release --build-arg TARGETARCH=${{ matrix.platform }} . --push" - - # Run the docker buildx build command - docker buildx build \ - --platform ${{ matrix.platform }} \ - --file nethermind/Dockerfile \ - --tag ${{ steps.meta.outputs.tags }} \ - $labels \ - --build-arg BUILD_CONFIG=release \ - --build-arg TARGETARCH=${{ matrix.platform }} \ - . --push + cmd+=("--build-arg" "BUILD_CONFIG=release") + cmd+=("--build-arg" "TARGETARCH=${{ matrix.platform }}") + cmd+=(".") + cmd+=("--push") + echo "${cmd[@]}" + "${cmd[@]}" diff --git a/docker-compose.yml b/docker-compose.yml index fd39f1b..2f29bc7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,11 +7,14 @@ services: - "8545:8545" # RPC - "8546:8546" # websocket - "7301:6060" # metrics + - "30303:30303" # P2P TCP + - "30303:30303/udp" # P2P UDP command: [ "bash", "./execution-entrypoint" ] volumes: - ${HOST_DATA_DIR}:/data env_file: - - .env.sepolia + # select your network here: +# - .env.sepolia # - .env.mainnet node: build: @@ -27,5 +30,6 @@ services: - "6060:6060" # pprof command: [ "bash", "./op-node-entrypoint" ] env_file: - - .env.sepolia + # select your network here: +# - .env.sepolia # - .env.mainnet From d5528dd7e2a841efd3fd5110b1f8396ad0484c2d Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 23:43:47 +0400 Subject: [PATCH 17/27] fix: build on nethermind, buildx labels --- .github/workflows/docker.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e058eb6..12292db 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -121,15 +121,19 @@ jobs: - name: Build and push the Docker image using buildx run: | - cmd=("docker" "buildx" "build" "--platform" "${{ matrix.platform }}" "--file" "nethermind/Dockerfile" "--tag" "${{ steps.meta.outputs.tags }}") - + TARGETARCH="${{ matrix.platform##linux/ }}" + + # Convert labels to individual --label flags with proper quoting + labels="" while IFS= read -r line; do - cmd+=("--label" "$line") + labels="$labels --label \"$line\"" done <<< "${{ steps.meta.outputs.labels }}" - cmd+=("--build-arg" "BUILD_CONFIG=release") - cmd+=("--build-arg" "TARGETARCH=${{ matrix.platform }}") - cmd+=(".") - cmd+=("--push") - echo "${cmd[@]}" - "${cmd[@]}" + docker buildx build \ + --platform "${{ matrix.platform }}" \ + --file nethermind/Dockerfile \ + --tag "${{ steps.meta.outputs.tags }}" \ + $labels \ + --build-arg BUILD_CONFIG=release \ + --build-arg TARGETARCH="$TARGETARCH" \ + . --push From b277f17e379508dece27123d1593972edc96453f Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Wed, 2 Oct 2024 23:49:53 +0400 Subject: [PATCH 18/27] fix: update with sed targetarch --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 12292db..4cece5c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -121,7 +121,7 @@ jobs: - name: Build and push the Docker image using buildx run: | - TARGETARCH="${{ matrix.platform##linux/ }}" + TARGETARCH=$(echo "${MATRIX_PLATFORM}" | sed 's/linux\///') # Convert labels to individual --label flags with proper quoting labels="" From 531d0e03d396ee5b7f676da21a176f370e22d0ee Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 4 Oct 2024 11:27:49 +0400 Subject: [PATCH 19/27] fix: upgrade build action on nethermind to use buildx --- .github/workflows/docker.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4cece5c..c0ef2d7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -119,21 +119,12 @@ jobs: images: | ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - - name: Build and push the Docker image using buildx - run: | - TARGETARCH=$(echo "${MATRIX_PLATFORM}" | sed 's/linux\///') - - # Convert labels to individual --label flags with proper quoting - labels="" - while IFS= read -r line; do - labels="$labels --label \"$line\"" - done <<< "${{ steps.meta.outputs.labels }}" - - docker buildx build \ - --platform "${{ matrix.platform }}" \ - --file nethermind/Dockerfile \ - --tag "${{ steps.meta.outputs.tags }}" \ - $labels \ - --build-arg BUILD_CONFIG=release \ - --build-arg TARGETARCH="$TARGETARCH" \ - . --push + - name: Build and push the Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: nethermind/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 From 8a051cd3a1e1eaf787c0e448badc2c50e99c4a20 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 4 Oct 2024 11:33:41 +0400 Subject: [PATCH 20/27] fix: update dockerfile --- nethermind/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 2576646..6b7175b 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -25,9 +25,10 @@ ENV COMMIT=7320938e5fe74ad6ac1782ce723ddb7bb7d3d78a RUN git clone $REPO --branch release/$VERSION --single-branch . && \ git switch -c branch-$VERSION RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' - -RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ - dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false +RUN TARGETARCH=${TARGETARCH#linux/} && \ + arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ + echo "Using architecture: $arch" && \ + dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble From 937e2068c124992f4682c5403c74044a603e94dd Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 4 Oct 2024 11:39:30 +0400 Subject: [PATCH 21/27] fix: update commit release 1.29.0 --- nethermind/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 6b7175b..11c45cd 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 -ENV COMMIT=7320938e5fe74ad6ac1782ce723ddb7bb7d3d78a +ENV COMMIT=10412d1c3b502591db7d4bb80d26caf6045f165a RUN git clone $REPO --branch release/$VERSION --single-branch . && \ git switch -c branch-$VERSION RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' From 0eaafdf1e8abad3dfd08fb118ca39500a547ac1f Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Fri, 27 Sep 2024 14:47:25 +0100 Subject: [PATCH 22/27] fix: update commit release 1.29.0 and solve docker build issues --- .github/workflows/docker.yml | 22 +++++++++++++++------- docker-compose.yml | 2 ++ nethermind/Dockerfile | 18 +++++++++++------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3cb22ca..c0ef2d7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -90,29 +90,37 @@ jobs: platforms: ${{ matrix.arch }} nethermind: runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/arm64] steps: - name: Checkout uses: actions/checkout@v2 - + - name: Log into the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 with: images: | ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - + - name: Build and push the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: nethermind/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 9068905..2f29bc7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: - "8545:8545" # RPC - "8546:8546" # websocket - "7301:6060" # metrics + - "30303:30303" # P2P TCP + - "30303:30303/udp" # P2P UDP command: [ "bash", "./execution-entrypoint" ] volumes: - ${HOST_DATA_DIR}:/data diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index e4fbd29..11c45cd 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -19,12 +19,16 @@ ARG TARGETARCH WORKDIR /app -ENV REPO=https://github.com/nethermindeth/nethermind -ENV VERSION=1.28.0 -RUN git clone $REPO . && git checkout $VERSION - -RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ - dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false +ENV REPO=https://github.com/NethermindEth/nethermind.git +ENV VERSION=1.29.0 +ENV COMMIT=10412d1c3b502591db7d4bb80d26caf6045f165a +RUN git clone $REPO --branch release/$VERSION --single-branch . && \ + git switch -c branch-$VERSION +RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' +RUN TARGETARCH=${TARGETARCH#linux/} && \ + arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ + echo "Using architecture: $arch" && \ + dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble @@ -43,4 +47,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY nethermind/nethermind-entrypoint ./execution-entrypoint COPY op-node-entrypoint . -CMD ["/usr/bin/supervisord"] \ No newline at end of file +CMD ["/usr/bin/supervisord"] From 7f028a0cd2b351238f9e7edaeeb391ed0a8c43b5 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 4 Oct 2024 11:50:45 +0400 Subject: [PATCH 23/27] fix: update pr action --- .github/workflows/pr.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0cc659a..dd8aef8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -58,10 +58,14 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: nethermind/Dockerfile From db7b3f4316c88f7ce2cbfbadce01ed7de1d99438 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Thu, 10 Oct 2024 12:05:46 +0400 Subject: [PATCH 24/27] feat: add workflow dispatch --- .github/workflows/docker.yml | 1 + .github/workflows/pr.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c0ef2d7..ef1eaf3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,7 @@ name: Tag Docker image on: + workflow_dispatch: push: branches: - 'main' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0cc659a..8a25737 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,6 +2,7 @@ name: Pull Request on: pull_request: + workflow_dispatch: jobs: geth: From 7f99fbe806de207d717761567b99512ae3002a7a Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Thu, 10 Oct 2024 12:06:37 +0400 Subject: [PATCH 25/27] feat: update nethermind to latest version --- nethermind/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 11c45cd..514d1db 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -22,8 +22,8 @@ WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git ENV VERSION=1.29.0 ENV COMMIT=10412d1c3b502591db7d4bb80d26caf6045f165a -RUN git clone $REPO --branch release/$VERSION --single-branch . && \ - git switch -c branch-$VERSION +RUN git clone $REPO --branch $VERSION --single-branch . && \ + git switch -c $VERSION RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' RUN TARGETARCH=${TARGETARCH#linux/} && \ arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ From 96193f3d01c59c790f93fd1254f2a850623bde63 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Thu, 17 Oct 2024 15:21:09 +0100 Subject: [PATCH 26/27] Update docker.yml --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ef1eaf3..28ea740 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - platform: [linux/amd64, linux/arm64] + platform: [linux/amd64] steps: - name: Checkout uses: actions/checkout@v2 @@ -128,4 +128,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 From bf30ffc107280090c9cd5eda654e54285e65a6db Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Thu, 17 Oct 2024 15:25:38 +0100 Subject: [PATCH 27/27] Update Nethermind version --- nethermind/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index 514d1db..7277504 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -20,8 +20,8 @@ ARG TARGETARCH WORKDIR /app ENV REPO=https://github.com/NethermindEth/nethermind.git -ENV VERSION=1.29.0 -ENV COMMIT=10412d1c3b502591db7d4bb80d26caf6045f165a +ENV VERSION=1.29.1 +ENV COMMIT=dfea52404006c6ce1b133b98f324dbfcb62773e1 RUN git clone $REPO --branch $VERSION --single-branch . && \ git switch -c $VERSION RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'