From d1cfdf2a9df84bb286a17e0a738e6c4fad3527f9 Mon Sep 17 00:00:00 2001 From: Juan Gonzalez Date: Wed, 3 Jun 2026 12:08:03 +0200 Subject: [PATCH 1/4] Bump op-node to v1.19.0 and op-reth to v2.3.0 --- README.md | 6 +++--- geth/Dockerfile | 4 ++-- reth/Dockerfile | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d1a50718c..e6dd3f81e 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ cd lisk-node Please use the following client versions: -- **op-node**: [v1.18.2](https://github.com/ethereum-optimism/optimism/releases/tag/op-node/v1.18.2) +- **op-node**: [v1.19.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-node/v1.19.0) - **op-geth**: [v1.101702.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101702.2) -- **op-reth**: [v2.2.5](https://github.com/ethereum-optimism/optimism/releases/tag/op-reth/v2.2.5) +- **op-reth**: [v2.3.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-reth/v2.3.0) #### Build @@ -93,7 +93,7 @@ Please use the following client versions: git apply ``` -- To build `op-reth` from source, refer to the [`op-reth` source tree](https://github.com/ethereum-optimism/optimism/tree/op-reth%2Fv2.2.5/rust/op-reth) in the `ethereum-optimism/optimism` repository (pinned to the version above). +- To build `op-reth` from source, refer to the [`op-reth` source tree](https://github.com/ethereum-optimism/optimism/tree/op-reth%2Fv2.3.0/rust/op-reth) in the `ethereum-optimism/optimism` repository (pinned to the version above). #### Set environment variables diff --git a/geth/Dockerfile b/geth/Dockerfile index 0e50cebe1..01decdfe0 100644 --- a/geth/Dockerfile +++ b/geth/Dockerfile @@ -7,8 +7,8 @@ WORKDIR /app RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin ENV REPO=https://github.com/ethereum-optimism/optimism.git -ENV VERSION=v1.18.2 -ENV COMMIT=a5f807798b0896becd497d27b92afe911b088ad4 +ENV VERSION=v1.19.0 +ENV COMMIT=fffe406245952bbf9c6089bd127773e282e770f5 RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \ git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' diff --git a/reth/Dockerfile b/reth/Dockerfile index ff1bfc490..6daa0eb05 100644 --- a/reth/Dockerfile +++ b/reth/Dockerfile @@ -8,8 +8,8 @@ WORKDIR /app RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin ENV REPO=https://github.com/ethereum-optimism/optimism.git -ENV VERSION=v1.18.2 -ENV COMMIT=a5f807798b0896becd497d27b92afe911b088ad4 +ENV VERSION=v1.19.0 +ENV COMMIT=fffe406245952bbf9c6089bd127773e282e770f5 RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \ git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' @@ -27,8 +27,8 @@ WORKDIR /app RUN apt-get update && apt-get -y upgrade && apt-get install -y git libclang-dev pkg-config curl build-essential ENV REPO=https://github.com/ethereum-optimism/optimism.git -ENV VERSION=op-reth/v2.2.5 -ENV COMMIT=0f40873d56882b54e7448fdbe931aec8b23907ff +ENV VERSION=op-reth/v2.3.0 +ENV COMMIT=fffe406245952bbf9c6089bd127773e282e770f5 RUN git clone $REPO --branch $VERSION --single-branch . && \ git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' From b480f0b20c6b6dd43c1842f2f390145242ce1668 Mon Sep 17 00:00:00 2001 From: Juan Gonzalez Date: Wed, 3 Jun 2026 12:56:18 +0200 Subject: [PATCH 2/4] Drop op-geth support Remove the geth/ build, the CLIENT switch in .env and docker-compose, the geth hunk in the sepolia Dockerfile patch, the geth matrix entry from CI, and the corresponding sections from the README. op-reth is now the only supported execution client. Co-Authored-By: Claude Opus 4.7 (1M context) --- .env | 3 +- .env.mainnet | 9 +- .env.sepolia | 9 +- .github/workflows/pr.yml | 4 - README.md | 127 ++++--------------------- docker-compose.yml | 4 +- dockerfile-lisk-sepolia.patch | 17 ---- geth/Dockerfile | 48 ---------- geth/download-apply-snapshot.sh | 160 -------------------------------- geth/geth-entrypoint | 87 ----------------- reth/download-apply-snapshot.sh | 7 +- 11 files changed, 27 insertions(+), 448 deletions(-) delete mode 100644 geth/Dockerfile delete mode 100755 geth/download-apply-snapshot.sh delete mode 100755 geth/geth-entrypoint diff --git a/.env b/.env index 5c5414deb..060f7b4a6 100644 --- a/.env +++ b/.env @@ -1,2 +1 @@ -CLIENT=${CLIENT:-geth} -HOST_DATA_DIR=./${CLIENT}-data +HOST_DATA_DIR=./reth-data diff --git a/.env.mainnet b/.env.mainnet index fa8067d71..9eb35913a 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -2,20 +2,17 @@ SEQUENCER_HTTP=https://rpc.api.lisk.com RETH_CHAIN=lisk APPLY_SNAPSHOT=${APPLY_SNAPSHOT:-false} -SNAPSHOT_TYPE=${SNAPSHOT_TYPE:-export} +SNAPSHOT_TYPE=datadir SNAPSHOT_NETWORK=mainnet SNAPSHOT_URL=${SNAPSHOT_URL:-} -# [optional] used to enable geth stats: -# OP_GETH_ETH_STATS=nodename:secret@host:port - # [required] replace with your preferred L1 (Ethereum, not Lisk) node RPC URL: OP_NODE_L1_ETH_RPC=https://1rpc.io/eth # [required] replace with your preferred L1 CL beacon endpoint: OP_NODE_L1_BEACON=https://your.mainnet.beacon.node/endpoint-here -# auth secret used by op-geth engine API: +# auth secret used by the execution client engine API: OP_NODE_L2_ENGINE_AUTH_RAW=ddf7ee03c37e2b634fbbd7c121ff7a7c43c8aa1b4a4041184234d499f0d10605 OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt @@ -47,5 +44,3 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # To enable snap sync, uncomment and set the env vars below: # OP_NODE_SYNCMODE=execution-layer # OP_RETH_BOOTNODES=enode://c113be206722079300449e42382bb9d1e123362f2b63d954cba896a3e6741ebe446fdb46ed77a32da1b3288384d36ea17847954b56c36bb28a00f3a689fdf916@35.234.171.144:9003?discport=9004 -# OP_GETH_BOOTNODES=enode://c113be206722079300449e42382bb9d1e123362f2b63d954cba896a3e6741ebe446fdb46ed77a32da1b3288384d36ea17847954b56c36bb28a00f3a689fdf916@35.234.171.144:9003?discport=9004 -# OP_GETH_SYNCMODE=snap diff --git a/.env.sepolia b/.env.sepolia index ce82c77c9..7524fb448 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -2,20 +2,17 @@ SEQUENCER_HTTP=https://rpc.sepolia-api.lisk.com RETH_CHAIN=lisk-sepolia APPLY_SNAPSHOT=${APPLY_SNAPSHOT:-false} -SNAPSHOT_TYPE=${SNAPSHOT_TYPE:-export} +SNAPSHOT_TYPE=datadir SNAPSHOT_NETWORK=sepolia SNAPSHOT_URL=${SNAPSHOT_URL:-} -# [optional] used to enable geth stats: -# OP_GETH_ETH_STATS=nodename:secret@host:port - # [required] replace with your preferred L1 (Ethereum, not Lisk) node RPC URL: OP_NODE_L1_ETH_RPC=https://rpc.sepolia.org # [required] replace with your preferred L1 CL beacon endpoint: OP_NODE_L1_BEACON=https://your.sepolia.beacon.node/endpoint-here -# auth secret used by op-geth engine API: +# auth secret used by the execution client engine API: OP_NODE_L2_ENGINE_AUTH_RAW=ddf7ee03c37e2b634fbbd7c121ff7a7c43c8aa1b4a4041184234d499f0d10605 OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt @@ -49,5 +46,3 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # TODO: replace the placeholders below with valid Lisk Sepolia bootnodes once available. # Format: comma-separated enode URLs. # OP_RETH_BOOTNODES=enode://@:?discport= -# OP_GETH_BOOTNODES=enode://@:?discport= -# OP_GETH_SYNCMODE=snap diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1b4e3ce3d..367027823 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,8 +10,6 @@ jobs: strategy: matrix: include: - - file: geth/Dockerfile - features: - file: reth/Dockerfile features: jemalloc,asm-keccak steps: @@ -39,8 +37,6 @@ jobs: strategy: matrix: include: - - file: geth/Dockerfile - features: - file: reth/Dockerfile features: jemalloc steps: diff --git a/README.md b/README.md index e6dd3f81e..f53fe74a4 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ We recommend you the following hardware configuration to run a Lisk L2 node: ## Usage > **Note**: -> - It is now possible to run the Lisk nodes with the `--op-network` flag on the op-geth execution client and the `--chain` flag on the op-reth execution client. -> - Starting with Lisk Node [v0.3.0](https://github.com/LiskHQ/lisk-node/releases/tag/v0.3.0), we urge all users running op-reth client to update their `--chain` flag to specify the network name instead of the genesis block filepath. We've removed the genesis block and will not be maintaining it in the repository going forward. +> Starting with Lisk Node [v0.3.0](https://github.com/LiskHQ/lisk-node/releases/tag/v0.3.0), users running op-reth should set their `--chain` flag to the network name instead of a genesis block filepath. We've removed the genesis block and will not be maintaining it in the repository going forward. ### Clone the Repository @@ -47,26 +46,20 @@ cd lisk-node 1. Please ensure that the environment file relevant to your network (`.env.sepolia`, or `.env.mainnet`) is set for the `env_file` properties at two places within `docker-compose.yml`. By default, it is set to `.env.mainnet`. -1. We currently support running either the `op-geth` or the `op-reth` nodes alongside the `op-node`. By default, we run the `op-geth` node. If you would like to run the `op-reth` client, please set the `CLIENT` environment variable to `reth` before starting the node. +1. The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on [Optimizations](https://reth.rs/installation/source#optimizations). Set the `RETH_BUILD_PROFILE` environment variable accordingly. > **Note**: - > - The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on [Optimizations](https://reth.rs/installation/source#optimizations). Please set the `RETH_BUILD_PROFILE` environment variable accordingly. - > - Unless you are building the `op-reth` client in `release` profile, please ensure that you have a machine with 32 GB RAM. - > - Additionally, if you have the Docker Desktop installed on your system, please make sure to set `Memory limit` to a minimum of `16 GB`.
It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. + > - Unless you are building `op-reth` in `release` profile, please ensure that you have a machine with 32 GB RAM. + > - Additionally, if you have Docker Desktop installed on your system, please make sure to set `Memory limit` to a minimum of `16 GB`.
It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. 1. Run: -
**IMPORTANT**: To run the node on Lisk Sepolia, first patch the Dockerfile(s) with: +
**IMPORTANT**: To run the node on Lisk Sepolia, first patch the Dockerfile with: ```sh git apply dockerfile-lisk-sepolia.patch ``` -
with `op-geth` execution client: ```sh docker compose up --build --detach ``` - or, with `op-reth` execution client: - ```sh - CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach - ``` 1. You should now be able to `curl` your Lisk node: ```sh @@ -79,7 +72,6 @@ cd lisk-node Please use the following client versions: - **op-node**: [v1.19.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-node/v1.19.0) -- **op-geth**: [v1.101702.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101702.2) - **op-reth**: [v2.3.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-reth/v2.3.0) #### Build @@ -87,7 +79,7 @@ Please use the following client versions: - Before proceeding, please make sure to install the following dependency (**this information is missing in the OP documentations linked below**): - [jq](https://jqlang.github.io/jq/) -- To build `op-node` and `op-geth` from source, follow OP documentation on [Building a Node from Source](https://docs.optimism.io/node-operators/tutorials/node-from-source). +- To build `op-node` from source, follow OP documentation on [Building a Node from Source](https://docs.optimism.io/node-operators/tutorials/node-from-source). - Before building the `op-node`, please patch the code with [`op-node-lisk-sepolia.patch`](./op-node-lisk-sepolia.patch) for an unhandled `SystemConfig` event emitted on Lisk Sepolia, resulting in errors on the Lisk nodes. ```sh git apply @@ -100,12 +92,12 @@ Please use the following client versions: Set the following environment variable: ``` -export DATADIR_PATH=... # Path to the folder where the execution node (op-geth or op-reth) data will be stored +export DATADIR_PATH=... # Path to the folder where the op-reth data will be stored ``` #### Create a JWT Secret -The execution client (`op-geth` or `op-reth`) and `op-node` communicate over the engine API authrpc. This communication can be secured with a shared secret which can be provided to both when starting the applications. In this case, the secret takes the form of a random 32-byte hex string and can be generated with: +`op-reth` and `op-node` communicate over the engine API authrpc. This communication can be secured with a shared secret which can be provided to both when starting the applications. In this case, the secret takes the form of a random 32-byte hex string and can be generated with: ``` openssl rand -hex 32 > jwt.txt @@ -113,46 +105,6 @@ openssl rand -hex 32 > jwt.txt For more information refer to the OP [documentation](https://docs.optimism.io/node-operators/tutorials/run-node-from-source). -#### Run op-geth - -- Set `OP_NODE_NETWORK` to `lisk-mainnet` to run the node against Lisk Mainnet or `lisk-sepolia` to run it against Lisk Sepolia. -- Navigate to your `op-geth` directory and start service by running the command: - -```sh -./build/bin/geth \ - --op-network=$OP_NODE_NETWORK \ - --datadir="$DATADIR_PATH" \ - --verbosity=3 \ - --authrpc.addr=0.0.0.0 \ - --authrpc.port=8551 \ - --authrpc.vhosts="*" \ - --authrpc.jwtsecret=PATH_TO_JWT_TEXT_FILE \ - --ws \ - --ws.addr=0.0.0.0 \ - --ws.port=8546 \ - --ws.origins="*" \ - --ws.api=web3,debug,eth,net,engine \ - --http \ - --http.corsdomain="*" \ - --http.vhosts="*" \ - --http.addr=0.0.0.0 \ - --http.port=8545 \ - --http.api=web3,debug,eth,net,engine \ - --metrics \ - --metrics.addr=0.0.0.0 \ - --metrics.port=6060 \ - --syncmode=full \ - --gcmode=full \ - --port=30303 \ - --maxpeers=100 \ - --rollup.sequencerhttp=SEQUENCER_HTTP \ - --rollup.halt=major \ - --rollup.disabletxpoolgossip=true \ - --nat=extip:$HOST_IP # optional; set HOST_IP to your external IP address and open port 30303 to improve peer connectivity -``` - -Refer to the `op-geth` configuration [documentation](https://docs.optimism.io/node-operators/reference/op-geth-config) for detailed information about available options. - #### Run op-reth - Set `RETH_CHAIN` to `lisk` to run the node against Lisk Mainnet or `lisk-sepolia` to run it against Lisk Sepolia. @@ -198,7 +150,8 @@ Refer to the `reth` configuration [documentation](https://reth.rs/cli/reth/node) #### Run op-node -Navigate to your `op-node` directory and start service by running the command: +- Set `OP_NODE_NETWORK` to `lisk-mainnet` to run the node against Lisk Mainnet or `lisk-sepolia` to run it against Lisk Sepolia. +- Navigate to your `op-node` directory and start service by running the command: ```sh ./bin/op-node \ @@ -226,13 +179,8 @@ Refer to the `op-node` configuration [documentation](https://docs.optimism.io/no ## Snapshots > **Note**: -> - Snapshots are available for both `op-geth` and `op-reth` clients: -> - op-geth supports both export and datadir snapshots -> - op-reth only supports datadir snapshots -> - All snapshots are from archival nodes -> - Snapshot types: -> - `export`: small download size, slow to restore from, data is verified during restore (op-geth only) -> - `datadir`: large download size, fast to restore from, no data verification during restore +> - `op-reth` only supports datadir snapshots: large download, fast restore, no data verification. +> - All snapshots are from archival nodes. ### Docker @@ -241,49 +189,21 @@ To enable auto-snapshot download and application, set the `APPLY_SNAPSHOT` envir APPLY_SNAPSHOT=true docker compose up --build --detach ``` -To specify the client and snapshot type, set both the `CLIENT` and `SNAPSHOT_TYPE` environment variables: +You can also download and apply a snapshot from a custom URL by setting the `SNAPSHOT_URL` environment variable. Supported formats are `*.tar.gz`, `*.tar`, and `*.tar.lz4`. ```sh -# For op-geth with export snapshot (default) -APPLY_SNAPSHOT=true CLIENT=geth SNAPSHOT_TYPE=export docker compose up --build --detach - -# For op-geth with datadir snapshot -APPLY_SNAPSHOT=true CLIENT=geth SNAPSHOT_TYPE=datadir docker compose up --build --detach - -# For op-reth (only supports datadir) -APPLY_SNAPSHOT=true CLIENT=reth SNAPSHOT_TYPE=datadir docker compose up --build --detach +APPLY_SNAPSHOT=true SNAPSHOT_URL= docker compose up --build --detach ``` -You can also download and apply a snapshot from a custom URL by setting the `SNAPSHOT_URL` environment variable. Supported formats depend on the client: - -- **op-geth**: only `*.tar.gz`. The script picks `datadir` vs `export` import mode from the filename — make sure the basename contains `datadir` for a datadir snapshot (e.g. `lisk-geth-datadir-.tar.gz`); anything else is treated as an export and imported via `geth import`. - ```sh - APPLY_SNAPSHOT=true SNAPSHOT_URL= docker compose up --build --detach - ``` - -- **op-reth**: `*.tar.gz`, `*.tar`, or `*.tar.lz4`. `SNAPSHOT_TYPE=datadir` must be set explicitly. - ```sh - APPLY_SNAPSHOT=true CLIENT=reth SNAPSHOT_TYPE=datadir SNAPSHOT_URL= docker compose up --build --detach - ``` - > **Note**: > Alternative snapshot sources hosted by [Gelato](https://www.gelato.network/): > - **Lisk Mainnet**: https://lisk.snapshots.gelato.cloud/index.html > - **Lisk Sepolia**: https://lisk.t.snapshots.gelato.cloud/index.html -> -> Gelato publishes all snapshots as `.tar.lz4`, so they currently work only with `CLIENT=reth` (the docker geth flow expects `.tar.gz`). For manual `.tar.lz4` extraction, see the [Source snapshots](#source-1) section below. ### Source Please follow the steps below: -- Download the snapshot and the corresponding checksum. The latest snapshot names are listed in: - - For op-geth: - - `latest-geth-export` (smaller download, slower restore with verification) - - `latest-geth-datadir` (larger download, faster restore without verification) - - For op-reth: - - `latest-reth-datadir` (datadir snapshot only) - - Available at: +- Download the snapshot and the corresponding checksum. The latest snapshot name is listed at `latest-reth-datadir`, available at: - Sepolia: https://snapshots.lisk.com/sepolia - Mainnet: https://snapshots.lisk.com/mainnet @@ -297,16 +217,11 @@ Please follow the steps below: ``` - Import the snapshot: - - `export`: + - `.tar.gz`: ```sh - tar -xf - ./build/bin/geth import --datadir=$GETH_DATA_DIR + tar --directory $RETH_DATA_DIR -xf ``` - - `datadir` (`.tar.gz`): - ```sh - tar --directory $GETH_DATA_DIR -xf - ``` - - `datadir` (`.tar.lz4`): + - `.tar.lz4`: ```sh # requires `lz4` to be installed tar --directory $RETH_DATA_DIR -I lz4 -xf @@ -317,8 +232,7 @@ Please follow the steps below: By default, the Lisk node runs in full sync mode. To enable snap sync (faster initial sync by fetching state from peers), uncomment the snap-sync block in your `.env.*` file: - `OP_NODE_SYNCMODE=execution-layer` — instructs `op-node` to defer block sync to the execution client. -- `OP_GETH_SYNCMODE=snap` (op-geth only) — enables geth's snap sync. -- `OP_GETH_BOOTNODES` / `OP_RETH_BOOTNODES` — comma-separated enode URLs used to bootstrap peer discovery. Snap sync needs P2P connectivity beyond the sequencer, so at least one working bootnode is required. +- `OP_RETH_BOOTNODES` — comma-separated enode URLs used to bootstrap peer discovery. Snap sync needs P2P connectivity beyond the sequencer, so at least one working bootnode is required. > **Note**: > For `op-reth`, the docker entrypoint normally runs with `--disable-discovery`, which disables the discovery protocols (discv4/discv5/DNS) so the node won't automatically find peers. When `OP_RETH_BOOTNODES` is set, the entrypoint automatically drops `--disable-discovery` because reth's bootnodes only take effect via the discovery protocol — they are no-ops when discovery is turned off. If you build and run `op-reth` from source instead of via docker, remove `--disable-discovery` from your command line when passing `--bootnodes`. @@ -342,8 +256,5 @@ For developers and node operators who need to interact with the node programmati - `op-node`: Comprehensive JSON-RPC API documentation for the Optimism node - [Official Documentation](https://docs.optimism.io/node-operators/reference/op-node-json-rpc) -- `op-geth`: API documentation for the Optimism-modified Geth client - - [Programmatic Interface Guide](https://github.com/ethereum-optimism/op-geth?tab=readme-ov-file#programmatically-interfacing-geth-nodes) - - `op-reth`: Detailed JSON-RPC documentation for the Reth client - [JSON-RPC Documentation](https://reth.rs/jsonrpc/intro) diff --git a/docker-compose.yml b/docker-compose.yml index e80210de1..34437d205 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: platform: linux/amd64 build: context: . - dockerfile: ${CLIENT}/Dockerfile + dockerfile: reth/Dockerfile args: PROFILE: ${RETH_BUILD_PROFILE:-maxperf} ports: @@ -29,7 +29,7 @@ services: platform: linux/amd64 build: context: . - dockerfile: ${CLIENT}/Dockerfile + dockerfile: reth/Dockerfile args: PROFILE: ${RETH_BUILD_PROFILE:-maxperf} depends_on: diff --git a/dockerfile-lisk-sepolia.patch b/dockerfile-lisk-sepolia.patch index a5cce24cc..153b511ad 100644 --- a/dockerfile-lisk-sepolia.patch +++ b/dockerfile-lisk-sepolia.patch @@ -1,20 +1,3 @@ -diff --git a/geth/Dockerfile b/geth/Dockerfile -index 0bc9509..8a71f8e 100644 ---- a/geth/Dockerfile -+++ b/geth/Dockerfile -@@ -13,7 +13,11 @@ 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 && \ -+# Patch to handle the legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore -+# Emitted only on Lisk Sepolia from the SystemConfig contract -+COPY op-node-lisk-sepolia.patch . -+RUN git apply op-node-lisk-sepolia.patch && \ -+ cd op-node && \ - make VERSION=$VERSION op-node - - FROM golang:$GOLANG_VERSION AS geth diff --git a/reth/Dockerfile b/reth/Dockerfile index 12f758f..7422365 100644 --- a/reth/Dockerfile diff --git a/geth/Dockerfile b/geth/Dockerfile deleted file mode 100644 index 01decdfe0..000000000 --- a/geth/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -ARG GOLANG_VERSION=1.24 -ARG UBUNTU_VERSION=25.04 - -FROM golang:$GOLANG_VERSION AS op - -WORKDIR /app - -RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin -ENV REPO=https://github.com/ethereum-optimism/optimism.git -ENV VERSION=v1.19.0 -ENV COMMIT=fffe406245952bbf9c6089bd127773e282e770f5 -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 golang:$GOLANG_VERSION AS geth - -WORKDIR /app - -ENV REPO=https://github.com/ethereum-optimism/op-geth.git -ENV VERSION=v1.101702.2 -ENV COMMIT=e8800cffe53d459cde8a07c8e8f1de9d86e79e07 -RUN git clone $REPO --branch $VERSION --single-branch . && \ - git switch -c branch-$VERSION && \ - bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' - -RUN go run build/ci.go install -static ./cmd/geth - -FROM ubuntu:$UBUNTU_VERSION - -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=op /app/op-node/bin/op-node ./ -COPY --from=geth /app/build/bin/geth ./ -COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf -COPY geth/geth-entrypoint ./execution-entrypoint -COPY geth/download-apply-snapshot.sh . -COPY op-node-entrypoint . - -CMD ["/usr/bin/supervisord"] diff --git a/geth/download-apply-snapshot.sh b/geth/download-apply-snapshot.sh deleted file mode 100755 index a9c1e07da..000000000 --- a/geth/download-apply-snapshot.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/bin/bash -set +e -set -u - -# Set alias for echoBanner if unavailable - for local testing -[[ $(type -t echoBanner) == function ]] || alias echoBanner=echo - -# Translate APPLY_SNAPSHOT to uppercase; default to FALSE -readonly APPLY_SNAPSHOT=$(echo "${APPLY_SNAPSHOT:-false}" | tr "[:lower:]" "[:upper:]") - -if [[ "$APPLY_SNAPSHOT" != "TRUE" ]]; then - echo "Automatic snapshot application disabled; to enable, set 'APPLY_SNAPSHOT=true' and restart" - exit 0 -fi - -if [[ "${CLIENT}" != "geth" ]]; then - echo "Error: This script is only for op-geth" - exit 14 -fi - -if [[ "${GETH_DATA_DIR-x}" == x ]]; then - echo "Error: GETH_DATA_DIR is undefined" - exit 1 -fi - -# Snapshot base URLs -readonly SNAPSHOT_BASE_URL_DEFAULT="https://snapshots.lisk.com" -readonly SNAPSHOT_BASE_URL_ALTERNATE="https://s3.fr-par.scw.cloud/snapshots.lisk.com" - -# Automatically resolve SNAPSHOT_URL, if not specified -SNAPSHOT_URL="$SNAPSHOT_URL" -if [[ "${SNAPSHOT_URL-x}" == x || -z $SNAPSHOT_URL ]]; -then - readonly SNAPSHOT_URL_BASE="$SNAPSHOT_BASE_URL_DEFAULT/$SNAPSHOT_NETWORK" - - # Try client specific snapshot first, fallback to generic one - client_specific_code=$(curl -s -o /dev/null -w "%{http_code}" "$SNAPSHOT_URL_BASE/latest-${CLIENT}-${SNAPSHOT_TYPE}") - if [[ "$client_specific_code" == "200" ]]; then - readonly LATEST_SNAPSHOT_NAME=$(curl --silent --location "$SNAPSHOT_URL_BASE/latest-${CLIENT}-${SNAPSHOT_TYPE}") - else - readonly LATEST_SNAPSHOT_NAME=$(curl --silent --location "$SNAPSHOT_URL_BASE/latest-${SNAPSHOT_TYPE}") - fi - - if [[ -z "$LATEST_SNAPSHOT_NAME" ]]; then - echo "Error: Failed to fetch the latest snapshot name" - exit 3 - fi - - SNAPSHOT_URL="$SNAPSHOT_URL_BASE/$LATEST_SNAPSHOT_NAME" - echo "SNAPSHOT_URL not specified; automatically resolved to $SNAPSHOT_URL" -fi - -# Update SNAPSHOT_URL to alternate URL, if it uses the default base URL and it doesn't respond -readonly http_code=$(curl -o /dev/null --silent -Iw '%{http_code}' $SNAPSHOT_URL) -if [[ "$http_code" != "200" ]]; -then - echo "Unable to access $SNAPSHOT_URL" - if [[ $SNAPSHOT_URL =~ $SNAPSHOT_BASE_URL_DEFAULT ]]; - then - readonly SNAPSHOT_URL=$(echo "${SNAPSHOT_URL/$SNAPSHOT_BASE_URL_DEFAULT/$SNAPSHOT_BASE_URL_ALTERNATE}") - echo "Updating SNAPSHOT_URL to $SNAPSHOT_URL" - else - echo "Error: Try using the official URL instead. Exiting snapshot download & application..." - exit 2 - fi -fi - -readonly SNAPSHOT_DIR=./snapshot -readonly SNAPSHOT_REMOTE_FILENAME=$(basename ${SNAPSHOT_URL}) - -# Probe the checksum file; buckets may publish either .SHA256 or .sha256. -# Prefer uppercase; fall back to lowercase; fail fast if neither exists so we -# don't burn a snapshot download we can't verify. -sha256_upper_http_code=$(curl -o /dev/null --silent --location -Iw '%{http_code}' "${SNAPSHOT_URL}.SHA256") -if [[ "$sha256_upper_http_code" == "200" ]]; then - readonly SNAPSHOT_SHA256_URL="${SNAPSHOT_URL}.SHA256" - readonly SNAPSHOT_SHA256_FILENAME="${SNAPSHOT_REMOTE_FILENAME}.SHA256" -else - sha256_lower_http_code=$(curl -o /dev/null --silent --location -Iw '%{http_code}' "${SNAPSHOT_URL}.sha256") - if [[ "$sha256_lower_http_code" == "200" ]]; then - readonly SNAPSHOT_SHA256_URL="${SNAPSHOT_URL}.sha256" - readonly SNAPSHOT_SHA256_FILENAME="${SNAPSHOT_REMOTE_FILENAME}.sha256" - else - echo "Error: Checksum file not found (${SNAPSHOT_URL}.SHA256 or .sha256)." - exit 13 - fi -fi -readonly SNAPSHOT_DOWNLOAD_MAX_TRIES=3 - -# Clear any existing snapshots -rm -rf $SNAPSHOT_DIR - -# Download the snapshot & the checksum file -echoBanner "Downloading snapshot to '${SNAPSHOT_DIR}/${SNAPSHOT_REMOTE_FILENAME}' from '${SNAPSHOT_URL}'..." -num_tries_left=$SNAPSHOT_DOWNLOAD_MAX_TRIES -download_and_verify(){ - echo -e "Number of tries left: ${num_tries_left}" - : $((--num_tries_left)) # Reduce num_tries_left - - echo -e "\nDownloading snapshot..." - curl --create-dirs --output $SNAPSHOT_DIR/$SNAPSHOT_REMOTE_FILENAME --location $SNAPSHOT_URL - - echo -e "\nDownloading snapshot checksum..." - curl --create-dirs --output $SNAPSHOT_DIR/$SNAPSHOT_SHA256_FILENAME --location $SNAPSHOT_SHA256_URL - - echo -e "\nVerifying integrity of the downloaded snapshot..." - if command -v sha256sum &>/dev/null; then - (cd $SNAPSHOT_DIR && sha256sum --check $SNAPSHOT_SHA256_FILENAME &>/dev/null) - elif command -v shasum &>/dev/null; then - (cd $SNAPSHOT_DIR && shasum --algorithm 256 --check $SNAPSHOT_SHA256_FILENAME &>/dev/null) - else - echo "Neither sha256sum nor shasum available. Skipping..." - return 9 - fi - - if [[ "$?" != "0" ]]; then - echo "Snapshot is corrupted. Skipping snapshot application..." - return 10 - fi - - echo "Snapshot successfully downloaded and verified" -} -for i in $(seq 1 $SNAPSHOT_DOWNLOAD_MAX_TRIES); do download_and_verify && returncode=0 && break || returncode=$? && sleep 10; done; (exit $returncode) - -# Extract if the downloaded snapshot file is a tarball -if [[ $SNAPSHOT_REMOTE_FILENAME == *.tar.gz && $SNAPSHOT_REMOTE_FILENAME != *datadir* ]]; then - readonly SNAPSHOT_FILENAME=$(tar -tf ${SNAPSHOT_DIR}/${SNAPSHOT_REMOTE_FILENAME}) - - echo -e "\nExtracting the snapshot tarball to '${SNAPSHOT_DIR}/${SNAPSHOT_FILENAME}'" - tar --directory $SNAPSHOT_DIR -xf $SNAPSHOT_DIR/$SNAPSHOT_REMOTE_FILENAME - if [[ "$?" == "0" ]]; then - echo "Successfully extracted the snapshot tarball" - else - echo "Error: Tarball extraction failed. Skipping snapshot application..." - exit 11 - fi -else - readonly SNAPSHOT_FILENAME=${SNAPSHOT_REMOTE_FILENAME} -fi - -# Import snapshot -echoBanner "Importing snapshot..." -if [[ $SNAPSHOT_FILENAME == *datadir*.tar.gz ]]; then - echo "Extracting ${CLIENT} data directory snapshot to ${GETH_DATA_DIR}..." - tar --directory $GETH_DATA_DIR -xf $SNAPSHOT_DIR/$SNAPSHOT_FILENAME -else - echo "Importing geth export snapshot to ${GETH_DATA_DIR}..." - ./geth import --syncmode "${OP_GETH_SYNCMODE:-full}" --datadir=$GETH_DATA_DIR $SNAPSHOT_DIR/$SNAPSHOT_FILENAME -fi -readonly SNAPSHOT_IMPORT_EXIT_CODE=$? - -echo -e "\nRemoving the temporary snapshot download directory: '${SNAPSHOT_DIR}'" -rm -rf $SNAPSHOT_DIR - -if [[ "$SNAPSHOT_IMPORT_EXIT_CODE" == "0" ]]; then - echo "Snapshot successfully imported" -else - echo "Error: Snapshot import failed. Skipping snapshot application..." - exit 12 -fi diff --git a/geth/geth-entrypoint b/geth/geth-entrypoint deleted file mode 100755 index 130eb57b5..000000000 --- a/geth/geth-entrypoint +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -set -eu - -echoBanner() { - echo -e "\n------------------------------------------------------------------------------------------------------------" - echo -e "$@" - echo -e "------------------------------------------------------------------------------------------------------------\n" -} - -VERBOSITY=${GETH_VERBOSITY:-3} -GETH_DATA_DIR=/data -RPC_PORT="${RPC_PORT:-8545}" -WS_PORT="${WS_PORT:-8546}" -AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" -METRICS_PORT="${METRICS_PORT:-6060}" -HOST_IP="" # put your external IP address here and open port 30303 to improve peer connectivity -P2P_PORT="${P2P_PORT:-30303}" -ADDITIONAL_ARGS="" -OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}" -OP_GETH_SYNCMODE="${OP_GETH_SYNCMODE:-full}" - -if [[ -z "$OP_NODE_NETWORK" ]]; then - echo "expected OP_NODE_NETWORK to be set" 1>&2 - exit 1 -fi - -# Ensure data directory exists -mkdir -p $GETH_DATA_DIR - -# Download and apply snapshot, when configured -(. download-apply-snapshot.sh) || echo "Unable to download and apply snapshot. Skipping snapshot application..." - -# Set the start flags -echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH" - -if [ "${OP_GETH_ETH_STATS+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --ethstats=$OP_GETH_ETH_STATS" -fi - -if [ "${OP_GETH_ALLOW_UNPROTECTED_TXS+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --rpc.allow-unprotected-txs=$OP_GETH_ALLOW_UNPROTECTED_TXS" -fi - -if [ "${OP_GETH_STATE_SCHEME+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --state.scheme=$OP_GETH_STATE_SCHEME" -fi - -if [ "${OP_GETH_BOOTNODES+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --bootnodes=$OP_GETH_BOOTNODES" -fi - -if [ "${HOST_IP:+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --nat=extip:$HOST_IP" -fi - -# Start service -echoBanner "Starting op-geth execution node..." -exec ./geth \ - --op-network="$OP_NODE_NETWORK" \ - --datadir="$GETH_DATA_DIR" \ - --verbosity="$VERBOSITY" \ - --authrpc.addr=0.0.0.0 \ - --authrpc.port="$AUTHRPC_PORT" \ - --authrpc.vhosts="*" \ - --authrpc.jwtsecret="$OP_NODE_L2_ENGINE_AUTH" \ - --ws \ - --ws.addr=0.0.0.0 \ - --ws.port="$WS_PORT" \ - --ws.origins="*" \ - --ws.api=web3,debug,eth,net,engine \ - --http \ - --http.corsdomain="*" \ - --http.vhosts="*" \ - --http.addr=0.0.0.0 \ - --http.port="$RPC_PORT" \ - --http.api=web3,debug,eth,net,engine \ - --metrics \ - --metrics.addr=0.0.0.0 \ - --metrics.port="$METRICS_PORT" \ - --syncmode="$OP_GETH_SYNCMODE" \ - --gcmode="$OP_GETH_GCMODE" \ - --port="$P2P_PORT" \ - --maxpeers=100 \ - --rollup.sequencerhttp="$SEQUENCER_HTTP" \ - --rollup.halt=major \ - --rollup.disabletxpoolgossip=true \ - $ADDITIONAL_ARGS # intentionally unquoted diff --git a/reth/download-apply-snapshot.sh b/reth/download-apply-snapshot.sh index 2f15a5900..2d85cd669 100644 --- a/reth/download-apply-snapshot.sh +++ b/reth/download-apply-snapshot.sh @@ -13,11 +13,6 @@ if [[ "$APPLY_SNAPSHOT" != "TRUE" ]]; then exit 0 fi -if [[ "${CLIENT}" != "reth" ]]; then - echo "Error: This script is only for op-reth" - exit 14 -fi - if [[ "${SNAPSHOT_TYPE}" != "datadir" ]]; then echo "Error: Only datadir snapshots are supported on op-reth; to proceed, additionally set 'SNAPSHOT_TYPE=datadir' and restart" exit 15 @@ -37,7 +32,7 @@ SNAPSHOT_URL="$SNAPSHOT_URL" if [[ "${SNAPSHOT_URL-x}" == x || -z $SNAPSHOT_URL ]]; then readonly SNAPSHOT_URL_BASE="$SNAPSHOT_BASE_URL_DEFAULT/$SNAPSHOT_NETWORK" - readonly LATEST_SNAPSHOT_NAME=$(curl --silent --location $SNAPSHOT_URL_BASE/latest-${CLIENT}-${SNAPSHOT_TYPE}) + readonly LATEST_SNAPSHOT_NAME=$(curl --silent --location $SNAPSHOT_URL_BASE/latest-reth-${SNAPSHOT_TYPE}) SNAPSHOT_URL="$SNAPSHOT_URL_BASE/$LATEST_SNAPSHOT_NAME" echo "SNAPSHOT_URL not specified; automatically resolved to $SNAPSHOT_URL" fi From 57097cddf26502aa3e38210b0d1058983f3dd1bb Mon Sep 17 00:00:00 2001 From: Juan Gonzalez Date: Wed, 3 Jun 2026 14:24:20 +0200 Subject: [PATCH 3/4] reth: skip SNAPSHOT_TYPE check when SNAPSHOT_URL is set The type only feeds the latest-reth-${SNAPSHOT_TYPE} lookup against snapshots.lisk.com. When SNAPSHOT_URL is supplied explicitly (e.g. a Gelato URL), SNAPSHOT_TYPE is unused, so the validation just gets in the way. Move the check inside the auto-resolve branch. Co-Authored-By: Claude Opus 4.7 (1M context) --- reth/download-apply-snapshot.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reth/download-apply-snapshot.sh b/reth/download-apply-snapshot.sh index 2d85cd669..6b1ae66ee 100644 --- a/reth/download-apply-snapshot.sh +++ b/reth/download-apply-snapshot.sh @@ -13,11 +13,6 @@ if [[ "$APPLY_SNAPSHOT" != "TRUE" ]]; then exit 0 fi -if [[ "${SNAPSHOT_TYPE}" != "datadir" ]]; then - echo "Error: Only datadir snapshots are supported on op-reth; to proceed, additionally set 'SNAPSHOT_TYPE=datadir' and restart" - exit 15 -fi - if [[ "${RETH_DATA_DIR-x}" == x ]]; then echo "Error: RETH_DATA_DIR is undefined" exit 1 @@ -27,10 +22,15 @@ fi readonly SNAPSHOT_BASE_URL_DEFAULT="https://snapshots.lisk.com" readonly SNAPSHOT_BASE_URL_ALTERNATE="https://s3.fr-par.scw.cloud/snapshots.lisk.com" -# Automatically resolve SNAPSHOT_URL, if not specified +# Automatically resolve SNAPSHOT_URL, if not specified. When SNAPSHOT_URL is +# given explicitly (e.g. a Gelato URL), SNAPSHOT_TYPE is irrelevant. SNAPSHOT_URL="$SNAPSHOT_URL" if [[ "${SNAPSHOT_URL-x}" == x || -z $SNAPSHOT_URL ]]; then + if [[ "${SNAPSHOT_TYPE}" != "datadir" ]]; then + echo "Error: auto-resolution only supports SNAPSHOT_TYPE=datadir; set SNAPSHOT_URL explicitly to use another type" + exit 15 + fi readonly SNAPSHOT_URL_BASE="$SNAPSHOT_BASE_URL_DEFAULT/$SNAPSHOT_NETWORK" readonly LATEST_SNAPSHOT_NAME=$(curl --silent --location $SNAPSHOT_URL_BASE/latest-reth-${SNAPSHOT_TYPE}) SNAPSHOT_URL="$SNAPSHOT_URL_BASE/$LATEST_SNAPSHOT_NAME" From 74e17702e5d0823fd37cae447ab88f29ac50a8bc Mon Sep 17 00:00:00 2001 From: Sameer Kumar Subudhi Date: Wed, 3 Jun 2026 15:34:23 +0200 Subject: [PATCH 4/4] reth: guard SNAPSHOT_URL under set -u; document .tar snapshots Co-Authored-By: Claude Opus 4.7 --- README.md | 2 +- reth/download-apply-snapshot.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f53fe74a4..80dde9e60 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ Please follow the steps below: ``` - Import the snapshot: - - `.tar.gz`: + - `.tar` or `.tar.gz`: ```sh tar --directory $RETH_DATA_DIR -xf ``` diff --git a/reth/download-apply-snapshot.sh b/reth/download-apply-snapshot.sh index 6b1ae66ee..985403cf4 100644 --- a/reth/download-apply-snapshot.sh +++ b/reth/download-apply-snapshot.sh @@ -24,8 +24,8 @@ readonly SNAPSHOT_BASE_URL_ALTERNATE="https://s3.fr-par.scw.cloud/snapshots.lisk # Automatically resolve SNAPSHOT_URL, if not specified. When SNAPSHOT_URL is # given explicitly (e.g. a Gelato URL), SNAPSHOT_TYPE is irrelevant. -SNAPSHOT_URL="$SNAPSHOT_URL" -if [[ "${SNAPSHOT_URL-x}" == x || -z $SNAPSHOT_URL ]]; +SNAPSHOT_URL="${SNAPSHOT_URL:-}" +if [[ -z "$SNAPSHOT_URL" ]]; then if [[ "${SNAPSHOT_TYPE}" != "datadir" ]]; then echo "Error: auto-resolution only supports SNAPSHOT_TYPE=datadir; set SNAPSHOT_URL explicitly to use another type"