From 9b10b988fd528699153dc03249b55b73eedaf3f1 Mon Sep 17 00:00:00 2001 From: wbnns Date: Tue, 22 Apr 2025 10:55:46 +0000 Subject: [PATCH 01/22] refactor(geth): Add prod configs and setup --- .env.mainnet | 28 ++++++++++++++++++++++++++-- geth/geth-entrypoint | 24 ++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index c9d6badcc..cdf8115a9 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -26,8 +26,6 @@ OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt OP_NODE_L2_ENGINE_RPC=ws://execution:8551 OP_NODE_LOG_LEVEL=info OP_NODE_METRICS_ADDR=0.0.0.0 -OP_NODE_METRICS_ENABLED=true -OP_NODE_METRICS_PORT=7300 OP_NODE_NETWORK=base-mainnet OP_NODE_P2P_AGENT=base OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG @@ -40,6 +38,32 @@ OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true +GETH_CACHE="51200" +GETH_CACHE_DATABASE="8" +GETH_CACHE_GC="0" +GETH_CACHE_SNAPSHOT="36" +GETH_CACHE_TRIE="56" +GETH_TXPOOL_GLOBALQUEUE="6144" #6x of the default 1024 +GETH_TXPOOL_GLOBALSLOTS="30072" #6x of the default 5012 +GETH_TXPOOL_LIFETIME="10m" #Time that non-executable tx can live in the queue before being dropped + + + + + + + +OP_GETH_NET_RESTRICT="10.0.0.0/8" +OP_GETH_OP_NETWORK="base-mainnet" + +OP_NODE_INTERNAL_IP="true" +OP_NODE_L1_RPC_KIND="debug_geth" +OP_NODE_L1_TRUST_RPC="false" +OP_NODE_LOG_FORMAT="json" +OP_NODE_METRICS_ENABLED="true" +OP_NODE_METRICS_PORT="7300" + + # OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node # is fully trusted. It also allows op-node to work with clients such as Erigon that do not # support storage proofs: diff --git a/geth/geth-entrypoint b/geth/geth-entrypoint index eb4512dd3..b6c90567d 100755 --- a/geth/geth-entrypoint +++ b/geth/geth-entrypoint @@ -13,6 +13,17 @@ ADDITIONAL_ARGS="" OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}" OP_GETH_SYNCMODE="${OP_GETH_SYNCMODE:-full}" +# Add cache and txpool optimizations with defaults +GETH_CACHE="${GETH_CACHE:-51200}" +GETH_CACHE_DATABASE="${GETH_CACHE_DATABASE:-8}" +GETH_CACHE_GC="${GETH_CACHE_GC:-0}" +GETH_CACHE_SNAPSHOT="${GETH_CACHE_SNAPSHOT:-36}" +GETH_CACHE_TRIE="${GETH_CACHE_TRIE:-56}" +GETH_TXPOOL_GLOBALQUEUE="${GETH_TXPOOL_GLOBALQUEUE:-6144}" +GETH_TXPOOL_GLOBALSLOTS="${GETH_TXPOOL_GLOBALSLOTS:-30072}" +GETH_TXPOOL_LIFETIME="${GETH_TXPOOL_LIFETIME:-10m}" +TXPOOL_PRICE_LIMIT="${TXPOOL_PRICE_LIMIT:-50}" + if [[ -z "$OP_NODE_NETWORK" ]]; then echo "expected OP_NODE_NETWORK to be set" 1>&2 exit 1 @@ -39,7 +50,7 @@ if [ "${OP_GETH_BOOTNODES+x}" = x ]; then fi if [ "${HOST_IP:+x}" = x ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --nat=extip:$HOST_IP" + ADDITIONAL_ARGS="$ADDITIONAL_ARGS --nat=extip:$HOST_IP" fi exec ./geth \ @@ -71,4 +82,13 @@ exec ./geth \ --op-network="$OP_NODE_NETWORK" \ --port="$P2P_PORT" \ --rollup.disabletxpoolgossip=true \ - $ADDITIONAL_ARGS # intentionally unquoted + --cache="$GETH_CACHE" \ + --cache.database="$GETH_CACHE_DATABASE" \ + --cache.gc="$GETH_CACHE_GC" \ + --cache.snapshot="$GETH_CACHE_SNAPSHOT" \ + --cache.trie="$GETH_CACHE_TRIE" \ + --txpool.globalqueue="$GETH_TXPOOL_GLOBALQUEUE" \ + --txpool.globalslots="$GETH_TXPOOL_GLOBALSLOTS" \ + --txpool.lifetime="$GETH_TXPOOL_LIFETIME" \ + --txpool.pricelimit="$TXPOOL_PRICE_LIMIT" \ + $ADDITIONAL_ARGS # intentionally unquoted \ No newline at end of file From c753a53793de0f76a2ce7be08ec137623a9b9b40 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 08:53:39 +0000 Subject: [PATCH 02/22] refactor(geth): Use EL sync --- .env.mainnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.mainnet b/.env.mainnet index cdf8115a9..64895f648 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -37,6 +37,7 @@ OP_NODE_RPC_PORT=8545 OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true +OP_NODE_SYNCMODE=execution-layer GETH_CACHE="51200" GETH_CACHE_DATABASE="8" @@ -72,7 +73,6 @@ OP_NODE_METRICS_PORT="7300" # SNAP SYNC # NOTE: This feature is experimental and may lead to syncing issues, delays or difficulties as a result of inability to find peers. We recommend running a full or archive node for production purposes. # 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 From 4a857600e3c71d3c75ad4d5fcc366ede2cedbe21 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 11:02:17 +0000 Subject: [PATCH 03/22] refactor(reth): Add prod configs and setup --- .env.mainnet | 25 ++++++++++++++++++++----- reth/reth-entrypoint | 14 ++++++++++---- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 64895f648..698176164 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -2,6 +2,15 @@ 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 +OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://mainnet.base.org/ +OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" +OP_NODE_L2_ENGINE_RPC=ws://execution:8551 +OP_NODE_L2_SKIP_SYNC_START_CHECK="true" +OP_RETH_DISABLE_DISCOVERY="false" +OP_RETH_DISABLE_TX_POOL_GOSSIP="true" +OP_RETH_OP_NETWORK="base" +OP_RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org +STATSD_ADDRESS="172.17.0.1" # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port @@ -10,20 +19,24 @@ OP_SEQUENCER_HTTP=https://mainnet-sequencer.base.org # 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 +OP_NODE_L1_ETH_RPC= # [optional] replace this with your preferred L2 engine kind (geth, reth, etc.) # For more info: https://docs.optimism.io/operators/node-operators/configuration/consensus-config#l2enginekind -# OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_L2_ENGINE_KIND=reth + +# [required] replace with your preferred L1 CL beacon endpoint: +OP_NODE_L1_BEACON= # [required] replace with your preferred L1 CL beacon endpoint: -OP_NODE_L1_BEACON=https://your.mainnet.beacon.node/endpoint-here +OP_NODE_L1_BEACON_ARCHIVER= + +OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" # auth secret used by op-geth engine API: OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt -OP_NODE_L2_ENGINE_RPC=ws://execution:8551 OP_NODE_LOG_LEVEL=info OP_NODE_METRICS_ADDR=0.0.0.0 OP_NODE_NETWORK=base-mainnet @@ -35,7 +48,7 @@ OP_NODE_P2P_LISTEN_UDP_PORT=9222 OP_NODE_RPC_ADDR=0.0.0.0 OP_NODE_RPC_PORT=8545 OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log -OP_NODE_VERIFIER_L1_CONFS=4 +OP_NODE_VERIFIER_L1_CONFS=0 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true OP_NODE_SYNCMODE=execution-layer @@ -76,3 +89,5 @@ OP_NODE_METRICS_PORT="7300" # 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/reth/reth-entrypoint b/reth/reth-entrypoint index ca546dfe2..7677a0dce 100755 --- a/reth/reth-entrypoint +++ b/reth/reth-entrypoint @@ -1,11 +1,13 @@ #!/bin/bash set -eu +IPC_PATH="/data/reth.ipc" RETH_DATA_DIR=/data RPC_PORT="${RPC_PORT:-8545}" WS_PORT="${WS_PORT:-8546}" AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" METRICS_PORT="${METRICS_PORT:-6060}" +ADDITIONAL_ARGS="" if [[ -z "$RETH_CHAIN" ]]; then 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" exec ./op-reth node \ -vvv \ --datadir="$RETH_DATA_DIR" \ - --log.stdout.format log-fmt \ + --log.stdout.format json \ --ws \ --ws.origins="*" \ --ws.addr=0.0.0.0 \ @@ -28,11 +30,15 @@ exec ./op-reth node \ --http.corsdomain="*" \ --http.addr=0.0.0.0 \ --http.port="$RPC_PORT" \ - --http.api=debug,eth,net,txpool \ + --http.api=debug,eth,net,txpool,miner \ + --ipcpath="$IPC_PATH" \ --authrpc.addr=0.0.0.0 \ --authrpc.port="$AUTHRPC_PORT" \ --authrpc.jwtsecret="$OP_NODE_L2_ENGINE_AUTH" \ --metrics=0.0.0.0:"$METRICS_PORT" \ + --max-outbound-peers=100 \ --chain "$RETH_CHAIN" \ - --rollup.sequencer-http=$RETH_SEQUENCER_HTTP \ - --rollup.disable-tx-pool-gossip + --rollup.sequencer-http=$OP_RETH_SEQUENCER_HTTP \ + --rollup.disable-tx-pool-gossip \ + $ADDITIONAL_ARGS # intentionally unquoted, so that arguments are split + $ADDITIONAL_ARGS # intentionally unquoted \ No newline at end of file From 7287152079f187faee8241a852d7101cbb288dbb Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 11:03:38 +0000 Subject: [PATCH 04/22] refactor(testnet): Update Sepolia ENV --- .env.sepolia | 67 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/.env.sepolia b/.env.sepolia index 37d0f4bc0..5ab9da955 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -2,6 +2,15 @@ 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 +OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://sepolia.base.org/ +OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" +OP_NODE_L2_ENGINE_RPC=ws://execution:8551 +OP_NODE_L2_SKIP_SYNC_START_CHECK="true" +OP_RETH_DISABLE_DISCOVERY="false" +OP_RETH_DISABLE_TX_POOL_GOSSIP="true" +OP_RETH_OP_NETWORK="base" +OP_RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org +STATSD_ADDRESS="172.17.0.1" # [optional] used to enable geth stats: # OP_GETH_ETH_STATS=nodename:secret@host:port @@ -10,31 +19,64 @@ OP_SEQUENCER_HTTP=https://sepolia-sequencer.base.org # 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 +OP_NODE_L1_ETH_RPC= + +# [optional] replace this with your preferred L2 engine kind (geth, reth, etc.) +# For more info: https://docs.optimism.io/operators/node-operators/configuration/consensus-config#l2enginekind +OP_NODE_L2_ENGINE_KIND=reth # [required] replace with your preferred L1 CL beacon endpoint: -OP_NODE_L1_BEACON=https://your.sepolia.beacon.node/endpoint-here +OP_NODE_L1_BEACON= + +# [required] replace with your preferred L1 CL beacon endpoint: +OP_NODE_L1_BEACON_ARCHIVER= + +OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" # auth secret used by op-geth engine API: OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt -OP_NODE_L2_ENGINE_RPC=ws://execution:8551 OP_NODE_LOG_LEVEL=info OP_NODE_METRICS_ADDR=0.0.0.0 -OP_NODE_METRICS_ENABLED=true -OP_NODE_METRICS_PORT=7300 -OP_NODE_NETWORK=base-sepolia +OP_NODE_NETWORK=base-mainnet OP_NODE_P2P_AGENT=base -OP_NODE_P2P_BOOTNODES=enr:-J64QBwRIWAco7lv6jImSOjPU_W266lHXzpAS5YOh7WmgTyBZkgLgOwo_mxKJq3wz2XRbsoBItbv1dCyjIoNq67mFguGAYrTxM42gmlkgnY0gmlwhBLSsHKHb3BzdGFja4S0lAUAiXNlY3AyNTZrMaEDmoWSi8hcsRpQf2eJsNUx-sqv6fH4btmo2HsAzZFAKnKDdGNwgiQGg3VkcIIkBg,enr:-J64QFa3qMsONLGphfjEkeYyF6Jkil_jCuJmm7_a42ckZeUQGLVzrzstZNb1dgBp1GGx9bzImq5VxJLP-BaptZThGiWGAYrTytOvgmlkgnY0gmlwhGsV-zeHb3BzdGFja4S0lAUAiXNlY3AyNTZrMaEDahfSECTIS_cXyZ8IyNf4leANlZnrsMEWTkEYxf4GMCmDdGNwgiQGg3VkcIIkBg +OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG OP_NODE_P2P_LISTEN_IP=0.0.0.0 OP_NODE_P2P_LISTEN_TCP_PORT=9222 OP_NODE_P2P_LISTEN_UDP_PORT=9222 OP_NODE_RPC_ADDR=0.0.0.0 OP_NODE_RPC_PORT=8545 OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log -OP_NODE_VERIFIER_L1_CONFS=4 +OP_NODE_VERIFIER_L1_CONFS=0 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true +OP_NODE_SYNCMODE=execution-layer + +GETH_CACHE="51200" +GETH_CACHE_DATABASE="8" +GETH_CACHE_GC="0" +GETH_CACHE_SNAPSHOT="36" +GETH_CACHE_TRIE="56" +GETH_TXPOOL_GLOBALQUEUE="6144" #6x of the default 1024 +GETH_TXPOOL_GLOBALSLOTS="30072" #6x of the default 5012 +GETH_TXPOOL_LIFETIME="10m" #Time that non-executable tx can live in the queue before being dropped + + + + + + + +OP_GETH_NET_RESTRICT="10.0.0.0/8" +OP_GETH_OP_NETWORK="base-sepolia" + +OP_NODE_INTERNAL_IP="true" +OP_NODE_L1_RPC_KIND="debug_geth" +OP_NODE_L1_TRUST_RPC="false" +OP_NODE_LOG_FORMAT="json" +OP_NODE_METRICS_ENABLED="true" +OP_NODE_METRICS_PORT="7300" + # OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node # is fully trusted. It also allows op-node to work with clients such as Erigon that do not @@ -43,8 +85,9 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # SNAP SYNC # NOTE: This feature is experimental and may lead to syncing issues, delays or difficulties as a result of inability to find peers. We recommend running a full or archive node for production purposes. -# 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 +# To enable snap sync, uncomment and set the env vars below: +# 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 + + From bd5f1571303ca9e5aaa86fe29fcb9b5dba494f01 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 11:23:13 +0000 Subject: [PATCH 05/22] refactor(configs): Archiver and Network --- .env.mainnet | 2 +- .env.sepolia | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 698176164..8eed75010 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -28,7 +28,7 @@ OP_NODE_L2_ENGINE_KIND=reth # [required] replace with your preferred L1 CL beacon endpoint: OP_NODE_L1_BEACON= -# [required] replace with your preferred L1 CL beacon endpoint: +# [required] replace with your preferred L1 CL beacon archiver: OP_NODE_L1_BEACON_ARCHIVER= OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" diff --git a/.env.sepolia b/.env.sepolia index 5ab9da955..5a8b44e55 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -28,7 +28,7 @@ OP_NODE_L2_ENGINE_KIND=reth # [required] replace with your preferred L1 CL beacon endpoint: OP_NODE_L1_BEACON= -# [required] replace with your preferred L1 CL beacon endpoint: +# [required] replace with your preferred L1 CL beacon archiver: OP_NODE_L1_BEACON_ARCHIVER= OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" @@ -39,7 +39,7 @@ OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de913 OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt OP_NODE_LOG_LEVEL=info OP_NODE_METRICS_ADDR=0.0.0.0 -OP_NODE_NETWORK=base-mainnet +OP_NODE_NETWORK=base-sepolia OP_NODE_P2P_AGENT=base OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG OP_NODE_P2P_LISTEN_IP=0.0.0.0 From 5f10f91f3edb70d3a54486460e147c59715c7e27 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 12:31:58 +0000 Subject: [PATCH 06/22] refactor(configs): Update format, default to Geth full node --- .env.mainnet | 122 ++++++++++++++++++---------------- .env.sepolia | 122 ++++++++++++++++++---------------- README.md | 162 +++++++++++++++++++-------------------------- docker-compose.yml | 30 ++++----- 4 files changed, 213 insertions(+), 223 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 8eed75010..6fc1a519d 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -1,93 +1,101 @@ +# BASE MAINNET NODE CONFIGURATION +# =========================== + +# NETWORK CONFIGURATION +# -------------------- RETH_CHAIN=base +OP_NODE_NETWORK=base-mainnet +OP_GETH_OP_NETWORK=base-mainnet + +# BASE SEQUENCER ENDPOINTS +# ----------------------- 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 +OP_GETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org +OP_RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org + +# SYNC CONFIGURATION +# ----------------- +OP_NODE_SYNCMODE=execution-layer OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://mainnet.base.org/ OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" -OP_NODE_L2_ENGINE_RPC=ws://execution:8551 OP_NODE_L2_SKIP_SYNC_START_CHECK="true" -OP_RETH_DISABLE_DISCOVERY="false" -OP_RETH_DISABLE_TX_POOL_GOSSIP="true" -OP_RETH_OP_NETWORK="base" -OP_RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org -STATSD_ADDRESS="172.17.0.1" - -# [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= - -# [optional] replace this with your preferred L2 engine kind (geth, reth, etc.) -# For more info: https://docs.optimism.io/operators/node-operators/configuration/consensus-config#l2enginekind -OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_VERIFIER_L1_CONFS=0 +OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true -# [required] replace with your preferred L1 CL beacon endpoint: +# [REQUIRED] L1 CONFIGURATION +# -------------------------- +# Replace these values with your L1 (Ethereum) node endpoints +OP_NODE_L1_ETH_RPC= OP_NODE_L1_BEACON= - -# [required] replace with your preferred L1 CL beacon archiver: OP_NODE_L1_BEACON_ARCHIVER= - OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" +OP_NODE_L1_RPC_KIND="debug_geth" +OP_NODE_L1_TRUST_RPC="false" -# auth secret used by op-geth engine API: +# ENGINE CONFIGURATION +# ------------------- +OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_L2_ENGINE_RPC=ws://execution:8551 +OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a -OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt -OP_NODE_LOG_LEVEL=info -OP_NODE_METRICS_ADDR=0.0.0.0 -OP_NODE_NETWORK=base-mainnet +# P2P CONFIGURATION +# --------------- OP_NODE_P2P_AGENT=base -OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG OP_NODE_P2P_LISTEN_IP=0.0.0.0 OP_NODE_P2P_LISTEN_TCP_PORT=9222 OP_NODE_P2P_LISTEN_UDP_PORT=9222 +OP_NODE_INTERNAL_IP="true" +OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG + +# RETH CONFIGURATION +# ---------------- +OP_RETH_DISABLE_DISCOVERY="false" +OP_RETH_DISABLE_TX_POOL_GOSSIP="true" +OP_RETH_OP_NETWORK="base" + +# RPC CONFIGURATION +# --------------- OP_NODE_RPC_ADDR=0.0.0.0 OP_NODE_RPC_PORT=8545 -OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log -OP_NODE_VERIFIER_L1_CONFS=0 -OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true -OP_NODE_SYNCMODE=execution-layer +# GETH CACHE SETTINGS +# ----------------- GETH_CACHE="51200" GETH_CACHE_DATABASE="8" GETH_CACHE_GC="0" GETH_CACHE_SNAPSHOT="36" GETH_CACHE_TRIE="56" -GETH_TXPOOL_GLOBALQUEUE="6144" #6x of the default 1024 -GETH_TXPOOL_GLOBALSLOTS="30072" #6x of the default 5012 -GETH_TXPOOL_LIFETIME="10m" #Time that non-executable tx can live in the queue before being dropped - - - - - - - +GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 +GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 +GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped OP_GETH_NET_RESTRICT="10.0.0.0/8" -OP_GETH_OP_NETWORK="base-mainnet" -OP_NODE_INTERNAL_IP="true" -OP_NODE_L1_RPC_KIND="debug_geth" -OP_NODE_L1_TRUST_RPC="false" +# LOGGING & MONITORING +# ------------------ +OP_NODE_LOG_LEVEL=info OP_NODE_LOG_FORMAT="json" +OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log OP_NODE_METRICS_ENABLED="true" +OP_NODE_METRICS_ADDR=0.0.0.0 OP_NODE_METRICS_PORT="7300" +STATSD_ADDRESS="172.17.0.1" + +# OPTIONAL SETTINGS +# =============== +# ETHSTATS MONITORING (OPTIONAL - UNCOMMENT TO ENABLE) +# 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 -# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node -# is fully trusted. It also allows op-node to work with clients such as Erigon that do not -# support storage proofs: +# TRUSTED RPC MODE (OPTIONAL - UNCOMMENT TO ENABLE) # OP_NODE_L1_TRUST_RPC=true -# SNAP SYNC -# NOTE: This feature is experimental and may lead to syncing issues, delays or difficulties as a result of inability to find peers. We recommend running a full or archive node for production purposes. -# To enable snap sync, uncomment and set the env vars below: +# SNAP SYNC (OPTIONAL EXPERIMENTAL FEATURE - UNCOMMENT TO ENABLE) +# NOTE: This feature is experimental and may lead to syncing issues # 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 - - +# OP_GETH_SYNCMODE=snap \ No newline at end of file diff --git a/.env.sepolia b/.env.sepolia index 5a8b44e55..607bc3acc 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -1,93 +1,101 @@ +# BASE SEPOLIA TESTNET NODE CONFIGURATION +# ================================== + +# NETWORK CONFIGURATION +# -------------------- RETH_CHAIN=base-sepolia +OP_NODE_NETWORK=base-sepolia +OP_GETH_OP_NETWORK=base-sepolia + +# BASE SEQUENCER ENDPOINTS +# ----------------------- 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 +OP_GETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org +OP_RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org + +# SYNC CONFIGURATION +# ----------------- +OP_NODE_SYNCMODE=execution-layer OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://sepolia.base.org/ OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" -OP_NODE_L2_ENGINE_RPC=ws://execution:8551 OP_NODE_L2_SKIP_SYNC_START_CHECK="true" -OP_RETH_DISABLE_DISCOVERY="false" -OP_RETH_DISABLE_TX_POOL_GOSSIP="true" -OP_RETH_OP_NETWORK="base" -OP_RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org -STATSD_ADDRESS="172.17.0.1" - -# [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= - -# [optional] replace this with your preferred L2 engine kind (geth, reth, etc.) -# For more info: https://docs.optimism.io/operators/node-operators/configuration/consensus-config#l2enginekind -OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_VERIFIER_L1_CONFS=0 +OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true -# [required] replace with your preferred L1 CL beacon endpoint: +# [REQUIRED] L1 CONFIGURATION +# -------------------------- +# Replace these values with your L1 (Ethereum) node endpoints +OP_NODE_L1_ETH_RPC= OP_NODE_L1_BEACON= - -# [required] replace with your preferred L1 CL beacon archiver: OP_NODE_L1_BEACON_ARCHIVER= - OP_NODE_L1_BEACON_FETCH_ALL_SIDECARS="true" +OP_NODE_L1_RPC_KIND="debug_geth" +OP_NODE_L1_TRUST_RPC="false" -# auth secret used by op-geth engine API: +# ENGINE CONFIGURATION +# ------------------- +OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_L2_ENGINE_RPC=ws://execution:8551 +OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a -OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt -OP_NODE_LOG_LEVEL=info -OP_NODE_METRICS_ADDR=0.0.0.0 -OP_NODE_NETWORK=base-sepolia +# P2P CONFIGURATION +# --------------- OP_NODE_P2P_AGENT=base -OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG OP_NODE_P2P_LISTEN_IP=0.0.0.0 OP_NODE_P2P_LISTEN_TCP_PORT=9222 OP_NODE_P2P_LISTEN_UDP_PORT=9222 +OP_NODE_INTERNAL_IP="true" +OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2gjufUROD6T3sOWDVDnFJRvqBBo62zuF-hYCohOGAYiOoEyEgmlkgnY0gmlwhAPniryHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQKNVFlCxh_B-716tTs-h1vMzZkSs1FTu_OYTNjgufplG4N0Y3CCJAaDdWRwgiQG,enr:-J24QH-f1wt99sfpHy4c0QJM-NfmsIfmlLAMMcgZCUEgKG_BBYFc6FwYgaMJMQN5dsRBJApIok0jFn-9CS842lGpLmqGAYiOoDRAgmlkgnY0gmlwhLhIgb2Hb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJ9FTIv8B9myn1MWaC_2lJ-sMoeCDkusCsk4BYHjjCq04N0Y3CCJAaDdWRwgiQG,enr:-J24QDXyyxvQYsd0yfsN0cRr1lZ1N11zGTplMNlW4xNEc7LkPXh0NAJ9iSOVdRO95GPYAIc6xmyoCCG6_0JxdL3a0zaGAYiOoAjFgmlkgnY0gmlwhAPckbGHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQJwoS7tzwxqXSyFL7g0JM-KWVbgvjfB8JA__T7yY_cYboN0Y3CCJAaDdWRwgiQG,enr:-J24QHmGyBwUZXIcsGYMaUqGGSl4CFdx9Tozu-vQCn5bHIQbR7On7dZbU61vYvfrJr30t0iahSqhc64J46MnUO2JvQaGAYiOoCKKgmlkgnY0gmlwhAPnCzSHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQINc4fSijfbNIiGhcgvwjsjxVFJHUstK9L1T8OTKUjgloN0Y3CCJAaDdWRwgiQG,enr:-J24QG3ypT4xSu0gjb5PABCmVxZqBjVw9ca7pvsI8jl4KATYAnxBmfkaIuEqy9sKvDHKuNCsy57WwK9wTt2aQgcaDDyGAYiOoGAXgmlkgnY0gmlwhDbGmZaHb3BzdGFja4OFQgCJc2VjcDI1NmsxoQIeAK_--tcLEiu7HvoUlbV52MspE0uCocsx1f_rYvRenIN0Y3CCJAaDdWRwgiQG + +# RETH CONFIGURATION +# ---------------- +OP_RETH_DISABLE_DISCOVERY="false" +OP_RETH_DISABLE_TX_POOL_GOSSIP="true" +OP_RETH_OP_NETWORK="base" + +# RPC CONFIGURATION +# --------------- OP_NODE_RPC_ADDR=0.0.0.0 OP_NODE_RPC_PORT=8545 -OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log -OP_NODE_VERIFIER_L1_CONFS=0 -OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true -OP_NODE_SYNCMODE=execution-layer +# GETH CACHE SETTINGS +# ----------------- GETH_CACHE="51200" GETH_CACHE_DATABASE="8" GETH_CACHE_GC="0" GETH_CACHE_SNAPSHOT="36" GETH_CACHE_TRIE="56" -GETH_TXPOOL_GLOBALQUEUE="6144" #6x of the default 1024 -GETH_TXPOOL_GLOBALSLOTS="30072" #6x of the default 5012 -GETH_TXPOOL_LIFETIME="10m" #Time that non-executable tx can live in the queue before being dropped - - - - - - - +GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 +GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 +GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped OP_GETH_NET_RESTRICT="10.0.0.0/8" -OP_GETH_OP_NETWORK="base-sepolia" -OP_NODE_INTERNAL_IP="true" -OP_NODE_L1_RPC_KIND="debug_geth" -OP_NODE_L1_TRUST_RPC="false" +# LOGGING & MONITORING +# ------------------ +OP_NODE_LOG_LEVEL=info OP_NODE_LOG_FORMAT="json" +OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log OP_NODE_METRICS_ENABLED="true" +OP_NODE_METRICS_ADDR=0.0.0.0 OP_NODE_METRICS_PORT="7300" +STATSD_ADDRESS="172.17.0.1" + +# OPTIONAL SETTINGS +# =============== +# ETHSTATS MONITORING (OPTIONAL - UNCOMMENT TO ENABLE) +# 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 -# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node -# is fully trusted. It also allows op-node to work with clients such as Erigon that do not -# support storage proofs: +# TRUSTED RPC MODE (OPTIONAL - UNCOMMENT TO ENABLE) # OP_NODE_L1_TRUST_RPC=true -# SNAP SYNC -# NOTE: This feature is experimental and may lead to syncing issues, delays or difficulties as a result of inability to find peers. We recommend running a full or archive node for production purposes. -# To enable snap sync, uncomment and set the env vars below: +# SNAP SYNC (OPTIONAL EXPERIMENTAL FEATURE - UNCOMMENT TO ENABLE) +# NOTE: This feature is experimental and may lead to syncing issues # 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 - - +# OP_GETH_SYNCMODE=snap \ No newline at end of file diff --git a/README.md b/README.md index 7bcb931f5..6c29dc00a 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,104 @@ ![Base](logo.webp) -# Base node +# Base Node -Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimism's open-source [OP Stack](https://stack.optimism.io/). - -This repository contains the relevant Docker builds to run your own node on the Base network. - - - -[![GitHub contributors](https://img.shields.io/github/contributors/base/node)](https://github.com/base/node/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base/node)](https://github.com/base/node/graphs/commit-activity) -[![GitHub Stars](https://img.shields.io/github/stars/base/node.svg)](https://github.com/base/node/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/base/node) -[![GitHub](https://img.shields.io/github/license/base/node?color=blue)](https://github.com/base/node/blob/main/LICENSE) - - +Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [OP Stack](https://stack.optimism.io/). This repository contains Docker builds to run your own node on the Base network. [![Website base.org](https://img.shields.io/website-up-down-green-red/https/base.org.svg)](https://base.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://base.mirror.xyz/) [![Docs](https://img.shields.io/badge/docs-up-green)](https://docs.base.org/) [![Discord](https://img.shields.io/discord/1067165013397213286?label=discord)](https://base.org/discord) [![Twitter Base](https://img.shields.io/twitter/follow/Base?style=social)](https://x.com/Base) - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/base/node)](https://github.com/base/node/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/base/node.svg)](https://github.com/base/node/issues) - -### Hardware requirements - -We recommend you have this hardware configuration to run a node: - -- a modern multi-core CPU with good single-core performance -- at least 16 GB RAM (32 GB recommended) -- a locally attached NVMe SSD drive -- adequate storage capacity to accommodate both the snapshot restoration process (if restoring from snapshot) and chain data, ensuring a minimum of (2 \* current_chain_size) + snapshot_size + 20%\_buffer - -**Note:** If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process; `io2 block express` is recommended. - -### Troubleshooting +## Quick Start -If you encounter problems with your node, please open a [GitHub issue](https://github.com/base/node/issues/new/choose) or reach out on our [Discord](https://discord.gg/buildonbase): +1. Ensure you have an Ethereum L1 full node RPC available +2. Choose your network: + - For mainnet: Use `.env.mainnet` + - For testnet: Use `.env.sepolia` +3. Configure your L1 endpoints in the appropriate `.env` file: + ```bash + OP_NODE_L1_ETH_RPC= + OP_NODE_L1_BEACON= + OP_NODE_L1_BEACON_ARCHIVER= + ``` +4. Start the node: -- Once you've joined, in the Discord app go to `server menu` > `Linked Roles` > `connect GitHub` and connect your GitHub account so you can gain access to our developer channels -- Report your issue in `#πŸ›Ÿ|developer-support` or `πŸ› ο½œnode-operators` + ```bash + # For mainnet (default): + docker compose up --build -### Supported networks + # For testnet: + cp .env.sepolia .env.mainnet + docker compose up --build -| Base Network | Status | -|-------------------| ------ | -| Testnet (Sepolia) | βœ… | -| Mainnet | βœ… | + # To use a specific client (optional): + CLIENT=reth docker compose up --build + ``` -### Usage +### Supported Clients -1. Ensure you have an Ethereum L1 full node RPC available (not Base), and set `OP_NODE_L1_ETH_RPC` (in the `.env.*` file if using docker-compose). If running your own L1 node, it needs to be synced before Base will be able to fully sync. -2. Set the `NETWORK_ENV` environment variable to specify your network: - ```bash - # For mainnet: - export NETWORK_ENV=.env.mainnet - # For testnet: - export NETWORK_ENV=.env.sepolia - ``` -3. Run: +- `geth` (default) +- `reth` +- `nethermind` -``` -docker compose up --build -``` +## Requirements -> [!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 +- Modern multi-core CPU +- 16 GB RAM (32 GB recommended) +- NVMe SSD drive +- Storage: (2 \* current_chain_size) + snapshot_size + 20% buffer +- Docker and Docker Compose -4. You should now be able to `curl` your Base node: +## Configuration -``` -curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \ - -H "Content-Type: application/json" http://localhost:8545 -``` +### Required Settings -Note: Some L1 nodes (e.g. Erigon) do not support fetching storage proofs. You can work around this by specifying `--l1.trustrpc` when starting op-node (add it in `op-node-entrypoint` and rebuild the docker image with `docker compose build`.) Do not do this unless you fully trust the L1 node provider. +- L1 Configuration: + - `OP_NODE_L1_ETH_RPC`: Your Ethereum L1 node RPC endpoint + - `OP_NODE_L1_BEACON`: Your L1 beacon node endpoint + - `OP_NODE_L1_BEACON_ARCHIVER`: Your L1 beacon archiver endpoint -#### Persisting Data +### Network Settings -By default, the data directory is stored in `${PROJECT_ROOT}/geth-data`. You can override this by modifying the value of -`GETH_HOST_DATA_DIR` variable in the [`.env`](./.env) file. +- Mainnet: + - `RETH_CHAIN=base` + - `OP_NODE_NETWORK=base-mainnet` + - Sequencer: `https://mainnet-sequencer.base.org` -To load a [snapshot](#snapshots) you can extract the snapshot into the `$GETH_HOST_DATA_DIR` folder. +### Performance Settings -#### Running in single container with `supervisord` +- Cache Settings: + - `GETH_CACHE=51200` + - `GETH_CACHE_DATABASE=8` + - `GETH_CACHE_GC=0` + - `GETH_CACHE_SNAPSHOT=36` + - `GETH_CACHE_TRIE=56` -If you'd like to run the node in a single container instead of `docker-compose`, you can use the `supervisord` entrypoint. -This is useful for running the node in a Kubernetes cluster, for example. +### Optional Features -Note that you'll need to override some of the default configuration that assumes a multi-container environment (`OP_NODE_L2_ENGINE_RPC`) and any port conflicts (`OP_NODE_RPC_PORT`). -Example: +- EthStats Monitoring (uncomment to enable) +- Trusted RPC Mode (uncomment to enable) +- Snap Sync (experimental) -``` -docker run --env-file .env.sepolia -e OP_NODE_L2_ENGINE_RPC=ws://localhost:8551 -e OP_NODE_RPC_PORT=7545 ghcr.io/base/node:latest -``` +For full configuration options, see the `.env.mainnet` file. -### Snapshots +## Supported Networks -You can fetch the latest snapshots via the URLs provided in the [Base docs](https://docs.base.org/guides/run-a-base-node/#snapshots). +| Network | Status | +| ------- | ------ | +| Mainnet | βœ… | +| Testnet | βœ… | -### Syncing +## Troubleshooting -Sync speed depends on your L1 node, as the majority of the chain is derived from data submitted to the L1. You can check your syncing status using the `optimism_syncStatus` RPC on the `op-node` container. Example: +For support: -``` -command -v jq &> /dev/null || { echo "jq is not installed" 1>&2 ; } -echo Latest synced block behind by: \ -$((($( date +%s )-\ -$( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Content-Type: application/json" http://localhost:7545 | - jq -r .result.unsafe_l2.timestamp))/60)) minutes -``` +1. Join our [Discord](https://discord.gg/buildonbase) +2. Connect your GitHub account via `server menu` > `Linked Roles` +3. Post in `#πŸ›Ÿ|developer-support` or `πŸ› ο½œnode-operators` ## Disclaimer -We're excited for you to build on Base πŸ”΅ β€” but we want to make sure that you understand the nature of the node software and smart contracts offered here. - -THE NODE SOFTWARE AND SMART CONTRACTS CONTAINED HEREIN ARE FURNISHED AS IS, WHERE IS, WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN PARTICULAR, THERE IS NO REPRESENTATION OR WARRANTY THAT THE NODE SOFTWARE AND SMART CONTRACTS WILL PROTECT YOUR ASSETS β€” OR THE ASSETS OF THE USERS OF YOUR APPLICATION β€” FROM THEFT, HACKING, CYBER ATTACK, OR OTHER FORM OF LOSS OR DEVALUATION. +THE NODE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. We make no guarantees about asset protection or security. Usage is subject to applicable laws and regulations. -You also understand that using the node software and smart contracts are subject to applicable law, including without limitation, any applicable anti-money laundering laws, anti-terrorism laws, export control laws, end user restrictions, privacy laws, or economic sanctions laws/regulations. +For more information, visit [docs.base.org](https://docs.base.org/). diff --git a/docker-compose.yml b/docker-compose.yml index 3c88d2c66..10855654b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,30 +2,30 @@ services: execution: build: context: . - dockerfile: ${CLIENT}/Dockerfile + dockerfile: ${CLIENT:-geth}/Dockerfile ports: - - "8545:8545" # RPC - - "8546:8546" # websocket - - "7301:6060" # metrics - - "30303:30303" # P2P TCP + - "8545:8545" # RPC + - "8546:8546" # websocket + - "7301:6060" # metrics + - "30303:30303" # P2P TCP - "30303:30303/udp" # P2P UDP - command: [ "bash", "./execution-entrypoint" ] + command: ["bash", "./execution-entrypoint"] volumes: - - ${HOST_DATA_DIR}:/data + - ${HOST_DATA_DIR}:/data env_file: - - ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet + - .env.mainnet # Default to mainnet, override with .env.sepolia for testnet node: build: context: . - dockerfile: ${CLIENT}/Dockerfile + dockerfile: ${CLIENT:-geth}/Dockerfile depends_on: - execution ports: - - "7545:8545" # RPC - - "9222:9222" # P2P TCP + - "7545:8545" # RPC + - "9222:9222" # P2P TCP - "9222:9222/udp" # P2P UDP - - "7300:7300" # metrics - - "6060:6060" # pprof - command: [ "bash", "./op-node-entrypoint" ] + - "7300:7300" # metrics + - "6060:6060" # pprof + command: ["bash", "./op-node-entrypoint"] env_file: - - ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet + - .env.mainnet # Default to mainnet, override with .env.sepolia for testnet From e49055e9336519c9dac9fd71cdb5d420db3f50df Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 12:40:40 +0000 Subject: [PATCH 07/22] docs(readme): Add our disk specs --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 6c29dc00a..47b14c6af 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,30 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ ## Requirements +### Minimum Requirements + - Modern multi-core CPU - 16 GB RAM (32 GB recommended) - NVMe SSD drive - Storage: (2 \* current_chain_size) + snapshot_size + 20% buffer - Docker and Docker Compose +### Production Hardware Specifications + +The following are the hardware specifications we use in production: + +#### Geth Full Node + +- **Instance**: AWS i4i.12xlarge +- **Storage**: RAID 0 of all local NVMe drives (`/dev/nvme*`) +- **Filesystem**: ext4 + +#### Reth Archive Node + +- **Instance**: AWS i7ie.6xlarge +- **Storage**: RAID 0 of all local NVMe drives (`/dev/nvme*`) +- **Filesystem**: ext4 + ## Configuration ### Required Settings From a9f3414924229c073bca2faa05e40cdf89183232 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 12:45:51 +0000 Subject: [PATCH 08/22] docs(readme): Clarify storage req --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47b14c6af..fe831e999 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ - Modern multi-core CPU - 16 GB RAM (32 GB recommended) - NVMe SSD drive -- Storage: (2 \* current_chain_size) + snapshot_size + 20% buffer +- Storage: (2 \* [current_chain_size](https://base.org/stats) + [snapshot_size]((https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) - Docker and Docker Compose ### Production Hardware Specifications From 825695c02e3d1d1cdda2e4a0a492a15ee0cc1ca3 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 12:46:50 +0000 Subject: [PATCH 09/22] fix(readme): Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe831e999..917ef9150 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ - Modern multi-core CPU - 16 GB RAM (32 GB recommended) - NVMe SSD drive -- Storage: (2 \* [current_chain_size](https://base.org/stats) + [snapshot_size]((https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) +- Storage: (2 \* [current_chain_size](https://base.org/stats) + [snapshot_size](https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) - Docker and Docker Compose ### Production Hardware Specifications From 20c92caea3961ca181e6cee05ae88857445e8227 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 12:51:21 +0000 Subject: [PATCH 10/22] docs(readme): Clarify support a testnet selection --- README.md | 11 +++-------- docker-compose.yml | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 917ef9150..10398d911 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ docker compose up --build # For testnet: - cp .env.sepolia .env.mainnet - docker compose up --build + NETWORK_ENV=.env.sepolia docker compose up --build # To use a specific client (optional): CLIENT=reth docker compose up --build @@ -48,7 +47,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ - Modern multi-core CPU - 16 GB RAM (32 GB recommended) - NVMe SSD drive -- Storage: (2 \* [current_chain_size](https://base.org/stats) + [snapshot_size](https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) +- Storage: (2 \* [current chain size](https://base.org/stats) + [snapshot size](https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) - Docker and Docker Compose ### Production Hardware Specifications @@ -109,11 +108,7 @@ For full configuration options, see the `.env.mainnet` file. ## Troubleshooting -For support: - -1. Join our [Discord](https://discord.gg/buildonbase) -2. Connect your GitHub account via `server menu` > `Linked Roles` -3. Post in `#πŸ›Ÿ|developer-support` or `πŸ› ο½œnode-operators` +For support please join our [Discord](https://discord.gg/buildonbase) post in `πŸ› ο½œnode-operators`. You can alternatively open a new GitHub issue. ## Disclaimer diff --git a/docker-compose.yml b/docker-compose.yml index 10855654b..72cb607db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: volumes: - ${HOST_DATA_DIR}:/data env_file: - - .env.mainnet # Default to mainnet, override with .env.sepolia for testnet + - ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet node: build: context: . @@ -28,4 +28,4 @@ services: - "6060:6060" # pprof command: ["bash", "./op-node-entrypoint"] env_file: - - .env.mainnet # Default to mainnet, override with .env.sepolia for testnet + - ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet From 9caf5ed887bfd138fd526f77293a4f67283b1dd7 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 13:05:58 +0000 Subject: [PATCH 11/22] docs(readme): Add client note for testnet + snapshot link --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 10398d911..c03fdddbb 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,9 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ # To use a specific client (optional): CLIENT=reth docker compose up --build + + # For testnet with a specific client: + NETWORK_ENV=.env.sepolia CLIENT=reth docker compose up --build ``` ### Supported Clients @@ -99,6 +102,10 @@ The following are the hardware specifications we use in production: For full configuration options, see the `.env.mainnet` file. +## Snapshots + +Snapshots are available to help you sync your node more quickly. See [docs.base.org](https://docs.base.org/chain/run-a-base-node#snapshots) for links and more details on how to restore from a snapshot. + ## Supported Networks | Network | Status | From 796fc6de149496ab5d1f5de37d9b938b2a204213 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 13:20:08 +0000 Subject: [PATCH 12/22] fix(geth): Set correct caching values --- .env.mainnet | 6 +++--- .env.sepolia | 6 +++--- README.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 6fc1a519d..61721d976 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -64,9 +64,9 @@ OP_NODE_RPC_PORT=8545 # ----------------- GETH_CACHE="51200" GETH_CACHE_DATABASE="8" -GETH_CACHE_GC="0" -GETH_CACHE_SNAPSHOT="36" -GETH_CACHE_TRIE="56" +GETH_CACHE_GC="16" +GETH_CACHE_SNAPSHOT="28" +GETH_CACHE_TRIE="48" GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped diff --git a/.env.sepolia b/.env.sepolia index 607bc3acc..3ad71df26 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -64,9 +64,9 @@ OP_NODE_RPC_PORT=8545 # ----------------- GETH_CACHE="51200" GETH_CACHE_DATABASE="8" -GETH_CACHE_GC="0" -GETH_CACHE_SNAPSHOT="36" -GETH_CACHE_TRIE="56" +GETH_CACHE_GC="16" +GETH_CACHE_SNAPSHOT="28" +GETH_CACHE_TRIE="48" GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped diff --git a/README.md b/README.md index c03fdddbb..3652ace30 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,9 @@ The following are the hardware specifications we use in production: - Cache Settings: - `GETH_CACHE=51200` - `GETH_CACHE_DATABASE=8` - - `GETH_CACHE_GC=0` - - `GETH_CACHE_SNAPSHOT=36` - - `GETH_CACHE_TRIE=56` + - `GETH_CACHE_GC=16` + - `GETH_CACHE_SNAPSHOT=28` + - `GETH_CACHE_TRIE=48` ### Optional Features From a4ebc72e1569772bbf0f8077dc871cffe31d9a95 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 15:08:58 +0000 Subject: [PATCH 13/22] fix(reth-entrypoint): Remove duplicate args parameter --- reth/reth-entrypoint | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reth/reth-entrypoint b/reth/reth-entrypoint index 7677a0dce..3bcc43153 100755 --- a/reth/reth-entrypoint +++ b/reth/reth-entrypoint @@ -40,5 +40,4 @@ exec ./op-reth node \ --chain "$RETH_CHAIN" \ --rollup.sequencer-http=$OP_RETH_SEQUENCER_HTTP \ --rollup.disable-tx-pool-gossip \ - $ADDITIONAL_ARGS # intentionally unquoted, so that arguments are split - $ADDITIONAL_ARGS # intentionally unquoted \ No newline at end of file + $ADDITIONAL_ARGS # intentionally unquoted \ No newline at end of file From 126edf6acf5214c4a9e7f839314a7de88d2330ae Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 16:09:07 +0000 Subject: [PATCH 14/22] refactor(env): Drop TXPOOL params b/c disabled --- .env.mainnet | 3 --- .env.sepolia | 3 --- 2 files changed, 6 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 61721d976..c17927a11 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -67,9 +67,6 @@ GETH_CACHE_DATABASE="8" GETH_CACHE_GC="16" GETH_CACHE_SNAPSHOT="28" GETH_CACHE_TRIE="48" -GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 -GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 -GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped OP_GETH_NET_RESTRICT="10.0.0.0/8" # LOGGING & MONITORING diff --git a/.env.sepolia b/.env.sepolia index 3ad71df26..0323e7437 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -67,9 +67,6 @@ GETH_CACHE_DATABASE="8" GETH_CACHE_GC="16" GETH_CACHE_SNAPSHOT="28" GETH_CACHE_TRIE="48" -GETH_TXPOOL_GLOBALQUEUE="6144" # 6x of the default 1024 -GETH_TXPOOL_GLOBALSLOTS="30072" # 6x of the default 5012 -GETH_TXPOOL_LIFETIME="10m" # Time that non-executable tx can live in the queue before being dropped OP_GETH_NET_RESTRICT="10.0.0.0/8" # LOGGING & MONITORING From 8cb0915bf75e90d60832a7e14e0d19ff1d8f1b85 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 16:21:28 +0000 Subject: [PATCH 15/22] docs(readme): Clarify accepted list of RPC values --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 3652ace30..f0f2724a2 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,17 @@ The following are the hardware specifications we use in production: - `OP_NODE_L1_ETH_RPC`: Your Ethereum L1 node RPC endpoint - `OP_NODE_L1_BEACON`: Your L1 beacon node endpoint - `OP_NODE_L1_BEACON_ARCHIVER`: Your L1 beacon archiver endpoint + - `OP_NODE_L1_RPC_KIND`: The type of RPC provider being used (default: "debug_geth"). Supported values: + - `alchemy`: Alchemy RPC provider + - `quicknode`: QuickNode RPC provider + - `infura`: Infura RPC provider + - `parity`: Parity RPC provider + - `nethermind`: Nethermind RPC provider + - `debug_geth`: Debug Geth RPC provider + - `erigon`: Erigon RPC provider + - `basic`: Basic RPC provider (standard receipt fetching only) + - `any`: Any available RPC method + - `standard`: Standard RPC methods including newer optimized methods ### Network Settings From 681ae1da221b5c60db0ebf4e5a1ac628d7819956 Mon Sep 17 00:00:00 2001 From: wbnns Date: Thu, 24 Apr 2025 16:35:08 +0000 Subject: [PATCH 16/22] docs(readme): Update recommended RAM --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0f2724a2..5cdf49a59 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ ### Minimum Requirements - Modern multi-core CPU -- 16 GB RAM (32 GB recommended) +- 64 GB RAM - NVMe SSD drive - Storage: (2 \* [current chain size](https://base.org/stats) + [snapshot size](https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) - Docker and Docker Compose From 2befde369f194a5e33da08c169ee81c9afa12d0b Mon Sep 17 00:00:00 2001 From: wbnns Date: Fri, 25 Apr 2025 13:12:29 +0000 Subject: [PATCH 17/22] refactor(env): Update L1 CONFs to 4 --- .env.mainnet | 4 ++-- .env.sepolia | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index c17927a11..cf978154f 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -20,7 +20,7 @@ OP_NODE_SYNCMODE=execution-layer OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://mainnet.base.org/ OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" OP_NODE_L2_SKIP_SYNC_START_CHECK="true" -OP_NODE_VERIFIER_L1_CONFS=0 +OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # [REQUIRED] L1 CONFIGURATION @@ -63,7 +63,7 @@ OP_NODE_RPC_PORT=8545 # GETH CACHE SETTINGS # ----------------- GETH_CACHE="51200" -GETH_CACHE_DATABASE="8" +GETH_CACHE_DATABASE="4" GETH_CACHE_GC="16" GETH_CACHE_SNAPSHOT="28" GETH_CACHE_TRIE="48" diff --git a/.env.sepolia b/.env.sepolia index 0323e7437..4b813cc58 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -20,7 +20,7 @@ OP_NODE_SYNCMODE=execution-layer OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://sepolia.base.org/ OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" OP_NODE_L2_SKIP_SYNC_START_CHECK="true" -OP_NODE_VERIFIER_L1_CONFS=0 +OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # [REQUIRED] L1 CONFIGURATION From eb71a827ae2e98a03d81b8f39e5d5ec1381f84a1 Mon Sep 17 00:00:00 2001 From: wbnns Date: Fri, 25 Apr 2025 15:20:40 +0000 Subject: [PATCH 18/22] refactor(geth): Update cache --- .env.mainnet | 10 +++++----- .env.sepolia | 10 +++++----- README.md | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index cf978154f..027937a5d 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -62,11 +62,11 @@ OP_NODE_RPC_PORT=8545 # GETH CACHE SETTINGS # ----------------- -GETH_CACHE="51200" -GETH_CACHE_DATABASE="4" -GETH_CACHE_GC="16" -GETH_CACHE_SNAPSHOT="28" -GETH_CACHE_TRIE="48" +GETH_CACHE="20480" # 20GB +GETH_CACHE_DATABASE="20" # 4GB +GETH_CACHE_GC="12" +GETH_CACHE_SNAPSHOT="24" +GETH_CACHE_TRIE="44" OP_GETH_NET_RESTRICT="10.0.0.0/8" # LOGGING & MONITORING diff --git a/.env.sepolia b/.env.sepolia index 4b813cc58..18a04ea6a 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -62,11 +62,11 @@ OP_NODE_RPC_PORT=8545 # GETH CACHE SETTINGS # ----------------- -GETH_CACHE="51200" -GETH_CACHE_DATABASE="8" -GETH_CACHE_GC="16" -GETH_CACHE_SNAPSHOT="28" -GETH_CACHE_TRIE="48" +GETH_CACHE="20480" # 20GB +GETH_CACHE_DATABASE="20" # 4GB +GETH_CACHE_GC="12" +GETH_CACHE_SNAPSHOT="24" +GETH_CACHE_TRIE="44" OP_GETH_NET_RESTRICT="10.0.0.0/8" # LOGGING & MONITORING diff --git a/README.md b/README.md index 5cdf49a59..1f4c08e82 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,11 @@ The following are the hardware specifications we use in production: ### Performance Settings - Cache Settings: - - `GETH_CACHE=51200` - - `GETH_CACHE_DATABASE=8` - - `GETH_CACHE_GC=16` - - `GETH_CACHE_SNAPSHOT=28` - - `GETH_CACHE_TRIE=48` + - `GETH_CACHE="20480"` (20GB) + - `GETH_CACHE_DATABASE="20"` (4GB) + - `GETH_CACHE_GC="12"` + - `GETH_CACHE_SNAPSHOT="24"` + - `GETH_CACHE_TRIE="44"` ### Optional Features From a6b2cb7b96e0705c4609fc1961ab1144e72ccd35 Mon Sep 17 00:00:00 2001 From: wbnns Date: Fri, 25 Apr 2025 15:22:36 +0000 Subject: [PATCH 19/22] refactor(geth): Drop unused txpool params --- geth/geth-entrypoint | 4 ---- 1 file changed, 4 deletions(-) diff --git a/geth/geth-entrypoint b/geth/geth-entrypoint index b6c90567d..c9d23533b 100755 --- a/geth/geth-entrypoint +++ b/geth/geth-entrypoint @@ -87,8 +87,4 @@ exec ./geth \ --cache.gc="$GETH_CACHE_GC" \ --cache.snapshot="$GETH_CACHE_SNAPSHOT" \ --cache.trie="$GETH_CACHE_TRIE" \ - --txpool.globalqueue="$GETH_TXPOOL_GLOBALQUEUE" \ - --txpool.globalslots="$GETH_TXPOOL_GLOBALSLOTS" \ - --txpool.lifetime="$GETH_TXPOOL_LIFETIME" \ - --txpool.pricelimit="$TXPOOL_PRICE_LIMIT" \ $ADDITIONAL_ARGS # intentionally unquoted \ No newline at end of file From 1422221dbe536b90284068b0b52de073d2ecf07c Mon Sep 17 00:00:00 2001 From: wbnns Date: Fri, 25 Apr 2025 15:25:41 +0000 Subject: [PATCH 20/22] refactor(geth-entrypoint): Add correct cache values --- geth/geth-entrypoint | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/geth/geth-entrypoint b/geth/geth-entrypoint index c9d23533b..4674c6738 100755 --- a/geth/geth-entrypoint +++ b/geth/geth-entrypoint @@ -14,11 +14,11 @@ OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}" OP_GETH_SYNCMODE="${OP_GETH_SYNCMODE:-full}" # Add cache and txpool optimizations with defaults -GETH_CACHE="${GETH_CACHE:-51200}" -GETH_CACHE_DATABASE="${GETH_CACHE_DATABASE:-8}" -GETH_CACHE_GC="${GETH_CACHE_GC:-0}" -GETH_CACHE_SNAPSHOT="${GETH_CACHE_SNAPSHOT:-36}" -GETH_CACHE_TRIE="${GETH_CACHE_TRIE:-56}" +GETH_CACHE="${GETH_CACHE:-20480}" +GETH_CACHE_DATABASE="${GETH_CACHE_DATABASE:-20}" +GETH_CACHE_GC="${GETH_CACHE_GC:-12}" +GETH_CACHE_SNAPSHOT="${GETH_CACHE_SNAPSHOT:-24}" +GETH_CACHE_TRIE="${GETH_CACHE_TRIE:-44}" GETH_TXPOOL_GLOBALQUEUE="${GETH_TXPOOL_GLOBALQUEUE:-6144}" GETH_TXPOOL_GLOBALSLOTS="${GETH_TXPOOL_GLOBALSLOTS:-30072}" GETH_TXPOOL_LIFETIME="${GETH_TXPOOL_LIFETIME:-10m}" From f1e1f97f8ff8d01271adcef789b8b88d68551884 Mon Sep 17 00:00:00 2001 From: wbnns Date: Fri, 25 Apr 2025 16:49:44 +0000 Subject: [PATCH 21/22] docs(readme): Update min specs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1f4c08e82..b17b539db 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ ### Minimum Requirements -- Modern multi-core CPU -- 64 GB RAM +- Modern Multicore CPU +- 32GB RAM (64GB Recommended) - NVMe SSD drive - Storage: (2 \* [current chain size](https://base.org/stats) + [snapshot size](https://basechaindata.vercel.app) + 20% buffer (to accomodate future growth) - Docker and Docker Compose From c5b10b8752bc280f36f6e283c3fbf094fa66026c Mon Sep 17 00:00:00 2001 From: wbnns Date: Mon, 28 Apr 2025 19:34:53 +0000 Subject: [PATCH 22/22] refactor(envs): Drop deprecated vars --- .env.mainnet | 3 --- .env.sepolia | 3 --- 2 files changed, 6 deletions(-) diff --git a/.env.mainnet b/.env.mainnet index 027937a5d..4e6407070 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -17,9 +17,6 @@ OP_RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org # SYNC CONFIGURATION # ----------------- OP_NODE_SYNCMODE=execution-layer -OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://mainnet.base.org/ -OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" -OP_NODE_L2_SKIP_SYNC_START_CHECK="true" OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true diff --git a/.env.sepolia b/.env.sepolia index 18a04ea6a..9b4c7ba9b 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -17,9 +17,6 @@ OP_RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org # SYNC CONFIGURATION # ----------------- OP_NODE_SYNCMODE=execution-layer -OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC=https://sepolia.base.org/ -OP_NODE_L2_BACKUP_UNSAFE_SYNC_RPC_TRUST_RPC="true" -OP_NODE_L2_SKIP_SYNC_START_CHECK="true" OP_NODE_VERIFIER_L1_CONFS=4 OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true