Skip to content

Commit 4a85760

Browse files
author
wbnns
committed
refactor(reth): Add prod configs and setup
1 parent c753a53 commit 4a85760

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

.env.mainnet

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ RETH_CHAIN=base
22
RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
33
OP_GETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
44
OP_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
5+
OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://mainnet.base.org/
6+
OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true"
7+
OP_NODE_L2_ENGINE_RPC=ws://execution:8551
8+
OP_NODE_L2_SKIP_SYNC_START_CHECK="true"
9+
OP_RETH_DISABLE_DISCOVERY="false"
10+
OP_RETH_DISABLE_TX_POOL_GOSSIP="true"
11+
OP_RETH_OP_NETWORK="base"
12+
OP_RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
13+
STATSD_ADDRESS="172.17.0.1"
514

615
# [optional] used to enable geth stats:
716
# OP_GETH_ETH_STATS=nodename:secret@host:port
@@ -10,20 +19,24 @@ OP_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
1019
# OP_NETHERMIND_ETHSTATS_ENDPOINT=ethstats_endpoint
1120

1221
# [required] replace with your preferred L1 (Ethereum, not Base) node RPC URL:
13-
OP_NODE_L1_ETH_RPC=https://1rpc.io/eth
22+
OP_NODE_L1_ETH_RPC=<your-preferred-l1-rpc>
1423

1524
# [optional] replace this with your preferred L2 engine kind (geth, reth, etc.)
1625
# For more info: https://docs.optimism.io/operators/node-operators/configuration/consensus-config#l2enginekind
17-
# OP_NODE_L2_ENGINE_KIND=reth
26+
OP_NODE_L2_ENGINE_KIND=reth
27+
28+
# [required] replace with your preferred L1 CL beacon endpoint:
29+
OP_NODE_L1_BEACON=<your-preferred-l1-beacon>
1830

1931
# [required] replace with your preferred L1 CL beacon endpoint:
20-
OP_NODE_L1_BEACON=https://your.mainnet.beacon.node/endpoint-here
32+
OP_NODE_L1_BEACON_ARCHIVER=<your-preferred-l1-beacon-archiver>
33+
34+
OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true"
2135

2236
# auth secret used by op-geth engine API:
2337
OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a
2438

2539
OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
26-
OP_NODE_L2_ENGINE_RPC=ws://execution:8551
2740
OP_NODE_LOG_LEVEL=info
2841
OP_NODE_METRICS_ADDR=0.0.0.0
2942
OP_NODE_NETWORK=base-mainnet
@@ -35,7 +48,7 @@ OP_NODE_P2P_LISTEN_UDP_PORT=9222
3548
OP_NODE_RPC_ADDR=0.0.0.0
3649
OP_NODE_RPC_PORT=8545
3750
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
38-
OP_NODE_VERIFIER_L1_CONFS=4
51+
OP_NODE_VERIFIER_L1_CONFS=0
3952
OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true
4053
OP_NODE_SYNCMODE=execution-layer
4154

@@ -76,3 +89,5 @@ OP_NODE_METRICS_PORT="7300"
7689
# 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
7790
# 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
7891
# OP_GETH_SYNCMODE=snap
92+
93+

reth/reth-entrypoint

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/bin/bash
22
set -eu
33

4+
IPC_PATH="/data/reth.ipc"
45
RETH_DATA_DIR=/data
56
RPC_PORT="${RPC_PORT:-8545}"
67
WS_PORT="${WS_PORT:-8546}"
78
AUTHRPC_PORT="${AUTHRPC_PORT:-8551}"
89
METRICS_PORT="${METRICS_PORT:-6060}"
10+
ADDITIONAL_ARGS=""
911

1012
if [[ -z "$RETH_CHAIN" ]]; then
1113
echo "expected RETH_CHAIN to be set" 1>&2
@@ -18,7 +20,7 @@ echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
1820
exec ./op-reth node \
1921
-vvv \
2022
--datadir="$RETH_DATA_DIR" \
21-
--log.stdout.format log-fmt \
23+
--log.stdout.format json \
2224
--ws \
2325
--ws.origins="*" \
2426
--ws.addr=0.0.0.0 \
@@ -28,11 +30,15 @@ exec ./op-reth node \
2830
--http.corsdomain="*" \
2931
--http.addr=0.0.0.0 \
3032
--http.port="$RPC_PORT" \
31-
--http.api=debug,eth,net,txpool \
33+
--http.api=debug,eth,net,txpool,miner \
34+
--ipcpath="$IPC_PATH" \
3235
--authrpc.addr=0.0.0.0 \
3336
--authrpc.port="$AUTHRPC_PORT" \
3437
--authrpc.jwtsecret="$OP_NODE_L2_ENGINE_AUTH" \
3538
--metrics=0.0.0.0:"$METRICS_PORT" \
39+
--max-outbound-peers=100 \
3640
--chain "$RETH_CHAIN" \
37-
--rollup.sequencer-http=$RETH_SEQUENCER_HTTP \
38-
--rollup.disable-tx-pool-gossip
41+
--rollup.sequencer-http=$OP_RETH_SEQUENCER_HTTP \
42+
--rollup.disable-tx-pool-gossip \
43+
$ADDITIONAL_ARGS # intentionally unquoted, so that arguments are split
44+
$ADDITIONAL_ARGS # intentionally unquoted

0 commit comments

Comments
 (0)