Skip to content

Commit a61f347

Browse files
author
wbnns
authored
Merge branch 'main' into wbnns/update-client-configs
2 parents c5b10b8 + a06efe9 commit a61f347

9 files changed

Lines changed: 110 additions & 14 deletions

File tree

.env.mainnet

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,7 @@ STATSD_ADDRESS="172.17.0.1"
9292
# NOTE: This feature is experimental and may lead to syncing issues
9393
# 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
9494
# 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
95-
# OP_GETH_SYNCMODE=snap
95+
# OP_GETH_SYNCMODE=snap
96+
97+
# FLASHBLOCKS (OPTIONAL - UNCOMMENT TO ENABLE)
98+
# RETH_FB_WEBSOCKET_URL=wss://mainnet.flashblocks.base.org/ws

.env.sepolia

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,7 @@ STATSD_ADDRESS="172.17.0.1"
9292
# NOTE: This feature is experimental and may lead to syncing issues
9393
# 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
9494
# 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
95-
# OP_GETH_SYNCMODE=snap
95+
# OP_GETH_SYNCMODE=snap
96+
97+
# FLASHBLOCKS (OPTIONAL - UNCOMMENT TO ENABLE)
98+
# RETH_FB_WEBSOCKET_URL=wss://sepolia.flashblocks.base.org/ws

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/geth-data/
33
/reth-data/
44
/nethermind-data/
5-
.DS_Store
5+
.DS_Store

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ The following are the hardware specifications we use in production:
6969
- **Storage**: RAID 0 of all local NVMe drives (`/dev/nvme*`)
7070
- **Filesystem**: ext4
7171

72+
[!NOTE]
73+
To run the node using a supported client, you can use the following command:
74+
`CLIENT=supported_client docker compose up --build`
75+
76+
Supported clients:
77+
- geth
78+
- reth (with Flashblocks support option, see [Reth Node README](./reth/README.md))
79+
- nethermind
80+
7281
## Configuration
7382

7483
### Required Settings

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ services:
1212
command: ["bash", "./execution-entrypoint"]
1313
volumes:
1414
- ${HOST_DATA_DIR}:/data
15+
environment:
16+
- NODE_TYPE=${NODE_TYPE:-vanilla}
1517
env_file:
1618
- ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet
1719
node:

geth/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM golang:1.22 AS op
33
WORKDIR /app
44

55
ENV REPO=https://github.com/ethereum-optimism/optimism.git
6-
ENV VERSION=v1.13.0
7-
ENV COMMIT=5f003211aed7469eed7df666291a62c025d1c46c
6+
ENV VERSION=v1.13.2
7+
ENV COMMIT=c8b9f62736a7dad7e569719a84c406605f4472e6
88
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
99
git switch -c branch-$VERSION && \
1010
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
@@ -24,8 +24,8 @@ RUN apt-get update && \
2424
build-essential
2525

2626
ENV REPO=https://github.com/ethereum-optimism/op-geth.git
27-
ENV VERSION=v1.101503.2
28-
ENV COMMIT=37be9e05e9d6843619c9bbaabc96abc0ce653f55
27+
ENV VERSION=v1.101503.4
28+
ENV COMMIT=2b9abb39077cb88f6e8a513f09a5ea2c2569dfed
2929
RUN git clone $REPO --branch $VERSION --single-branch . && \
3030
git switch -c branch-$VERSION && \
3131
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

reth/Dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM golang:1.22 AS op
33
WORKDIR /app
44

55
ENV REPO=https://github.com/ethereum-optimism/optimism.git
6-
ENV VERSION=v1.13.0
7-
ENV COMMIT=5f003211aed7469eed7df666291a62c025d1c46c
6+
ENV VERSION=v1.13.2
7+
ENV COMMIT=c8b9f62736a7dad7e569719a84c406605f4472e6
88
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
99
git switch -c branch-$VERSION && \
1010
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
@@ -22,14 +22,31 @@ WORKDIR /app
2222
RUN apt-get update && apt-get -y upgrade && apt-get install -y git libclang-dev pkg-config curl build-essential
2323

2424
ENV REPO=https://github.com/paradigmxyz/reth.git
25-
ENV VERSION=v1.3.11
26-
ENV COMMIT=e0e85aa10b98fa92d32c3e820c7ed2cee0b02931
25+
ENV VERSION=v1.3.12
26+
ENV COMMIT=6f8e7258f4733279080e4bd8345ce50538a40d6e
2727
RUN git clone $REPO --branch $VERSION --single-branch . && \
2828
git switch -c branch-$VERSION && \
2929
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
3030

3131
RUN cargo build --bin op-reth --profile maxperf --manifest-path crates/optimism/bin/Cargo.toml
3232

33+
FROM rust:1.85 AS reth-base
34+
35+
WORKDIR /app
36+
37+
RUN apt-get update && apt-get -y upgrade && \
38+
apt-get install -y git libclang-dev pkg-config curl build-essential && \
39+
rm -rf /var/lib/apt/lists/*
40+
41+
ENV REPO=https://github.com/base/node-reth.git
42+
ENV VERSION=main
43+
ENV COMMIT=3f3d84634cb3fccd429a9df6ea039a77be2b907b
44+
RUN git clone $REPO --branch $VERSION --single-branch . && \
45+
git switch -c branch-$VERSION && \
46+
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' || (echo "Commit hash verification failed" && exit 1)
47+
48+
RUN cargo build --bin base-reth-node --release
49+
3350
FROM ubuntu:22.04
3451

3552
RUN apt-get update && \
@@ -41,6 +58,7 @@ WORKDIR /app
4158

4259
COPY --from=op /app/op-node/bin/op-node ./
4360
COPY --from=reth /app/target/maxperf/op-reth ./
61+
COPY --from=reth-base /app/target/release/base-reth-node ./
4462
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
4563
COPY ./reth/reth-entrypoint ./execution-entrypoint
4664
COPY op-node-entrypoint .

reth/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Running a Reth Node
2+
3+
This is a unified implementation of the Reth node set up that supports running both standard Reth or Base Reth with Flashblocks support.
4+
5+
## Setup
6+
7+
- See hardware requirements mentioned in the master README
8+
- For Base Reth mode: Access to a Flashblocks websocket endpoint (for `RETH_FB_WEBSOCKET_URL`)
9+
- We provide public websocket endpoints for mainnet and devnet, included in `.env.mainnet` and `.env.sepolia`
10+
11+
## Node Type Selection
12+
13+
Use the `NODE_TYPE` environment variable to select the implementation:
14+
15+
- `NODE_TYPE=vanilla` - Standard Reth implementation (default)
16+
- `NODE_TYPE=base` - Base L2 Reth implementation with Flashblocks support
17+
18+
## Running the Node
19+
20+
The node follows the standard `docker-compose` workflow in the master README.
21+
22+
```bash
23+
# Run standard Reth node
24+
CLIENT=reth docker-compose up
25+
26+
# Run Base L2 Reth node with Flashblocks support
27+
NODE_TYPE=base CLIENT=reth docker-compose up
28+
```
29+
30+
## Testing Flashblocks RPC Methods
31+
32+
When running in Base mode (`NODE_TYPE=base`), you can query a pending block using the Flashblocks RPC:
33+
34+
```bash
35+
curl -X POST \
36+
--data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending", false],"id":1}' \
37+
http://localhost:8545
38+
```
39+
40+
## Additional RPC Methods
41+
42+
For a complete list of supported RPC methods, refer to:
43+
44+
- [Standard Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/)
45+
- [Flashblocks RPC Methods](https://docs.base.org/chain/flashblocks#rpc-api) (Base mode only)

reth/reth-entrypoint

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,32 @@ WS_PORT="${WS_PORT:-8546}"
88
AUTHRPC_PORT="${AUTHRPC_PORT:-8551}"
99
METRICS_PORT="${METRICS_PORT:-6060}"
1010
ADDITIONAL_ARGS=""
11+
NODE_TYPE="${NODE_TYPE:-vanilla}"
1112

1213
if [[ -z "$RETH_CHAIN" ]]; then
1314
echo "expected RETH_CHAIN to be set" 1>&2
1415
exit 1
1516
fi
1617

18+
# Add Flashblocks support for base mode
19+
if [[ "$NODE_TYPE" == "base" && -n "$RETH_FB_WEBSOCKET_URL" ]]; then
20+
ADDITIONAL_ARGS="--websocket-url=$RETH_FB_WEBSOCKET_URL"
21+
echo "Enabling Flashblocks support with endpoint: $RETH_FB_WEBSOCKET_URL"
22+
fi
23+
24+
# Select binary based on NODE_TYPE
25+
if [[ "$NODE_TYPE" == "base" ]]; then
26+
echo "Starting Base Reth node"
27+
BINARY="./base-reth-node"
28+
else
29+
echo "Starting vanilla Reth node"
30+
BINARY="./op-reth"
31+
fi
32+
1733
mkdir -p $RETH_DATA_DIR
1834
echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
1935

20-
exec ./op-reth node \
36+
exec $BINARY node \
2137
-vvv \
2238
--datadir="$RETH_DATA_DIR" \
2339
--log.stdout.format json \
@@ -38,6 +54,6 @@ exec ./op-reth node \
3854
--metrics=0.0.0.0:"$METRICS_PORT" \
3955
--max-outbound-peers=100 \
4056
--chain "$RETH_CHAIN" \
41-
--rollup.sequencer-http=$OP_RETH_SEQUENCER_HTTP \
57+
--rollup.sequencer-http=$RETH_SEQUENCER_HTTP \
4258
--rollup.disable-tx-pool-gossip \
43-
$ADDITIONAL_ARGS # intentionally unquoted
59+
$ADDITIONAL_ARGS

0 commit comments

Comments
 (0)