From 16c66684757004d22d1eba40f41f4ca355a157f6 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Wed, 20 May 2026 12:49:15 -0500 Subject: [PATCH 1/2] chore: remove non base clients for azul --- .dockerignore | 2 - .env | 4 +- .env.mainnet | 87 ++--------- .env.sepolia | 87 ++--------- .github/workflows/docker.yml | 239 +------------------------------ .github/workflows/pr.yml | 64 +-------- .gitignore | 2 - README.md | 95 ++++-------- base-consensus-entrypoint | 52 ------- consensus-entrypoint | 100 +++++++++++-- docker-compose.yml | 18 +-- geth/Dockerfile | 44 ------ geth/geth-entrypoint | 88 ------------ nethermind/Dockerfile | 51 ------- nethermind/nethermind-entrypoint | 63 -------- op-node-entrypoint | 49 ------- reth/Dockerfile | 20 +-- reth/README.md | 2 +- supervisord.conf | 2 +- versions.env | 9 -- 20 files changed, 152 insertions(+), 926 deletions(-) delete mode 100755 base-consensus-entrypoint delete mode 100644 geth/Dockerfile delete mode 100755 geth/geth-entrypoint delete mode 100644 nethermind/Dockerfile delete mode 100755 nethermind/nethermind-entrypoint delete mode 100755 op-node-entrypoint diff --git a/.dockerignore b/.dockerignore index 927362b59..034a5c2d3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1 @@ -geth-data/ reth-data/ -nethermind-data/ diff --git a/.env b/.env index f4ea7b66a..060f7b4a6 100644 --- a/.env +++ b/.env @@ -1,3 +1 @@ -CLIENT=${CLIENT:-reth} -HOST_DATA_DIR=./${CLIENT}-data -USE_BASE_CONSENSUS=true +HOST_DATA_DIR=./reth-data diff --git a/.env.mainnet b/.env.mainnet index c5bd040b5..ac9e52b66 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -1,92 +1,37 @@ # BASE MAINNET NODE CONFIGURATION -# =========================== +# ============================== # NETWORK CONFIGURATION -# -------------------- +# --------------------- RETH_CHAIN=base BASE_NODE_NETWORK=base -OP_NODE_NETWORK=base-mainnet -OP_GETH_OP_NETWORK=base-mainnet # BASE SEQUENCER ENDPOINTS -# ----------------------- +# ------------------------ RETH_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 (deprecated) -# ----------------- -OP_NODE_SYNCMODE=execution-layer -OP_NODE_VERIFIER_L1_CONFS=4 -OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # [REQUIRED] L1 CONFIGURATION -# -------------------------- +# --------------------------- # Replace these values with your L1 (Ethereum) node endpoints -OP_NODE_L1_ETH_RPC= -OP_NODE_L1_BEACON= -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" - BASE_NODE_L1_ETH_RPC= BASE_NODE_L1_BEACON= BASE_NODE_L1_TRUST_RPC="false" # ENGINE CONFIGURATION -# ------------------- -OP_NODE_L2_ENGINE_KIND=reth -OP_NODE_L2_ENGINE_RPC=http://execution:8551 - +# -------------------- BASE_NODE_L2_ENGINE_RPC=ws://execution:8551 BASE_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt BASE_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a # P2P CONFIGURATION -# --------------- -OP_NODE_P2P_AGENT=base -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 - +# ----------------- BASE_NODE_P2P_LISTEN_IP=0.0.0.0 BASE_NODE_P2P_ADVERTISE_TCP_PORT=9222 BASE_NODE_P2P_ADVERTISE_UDP_PORT=9222 BASE_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 (deprecated) -# --------------- -OP_NODE_RPC_ADDR=0.0.0.0 -OP_NODE_RPC_PORT=8545 - -# GETH CACHE SETTINGS -# ----------------- -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 -# ------------------ -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" - +# -------------------- BASE_NODE_LOG_VERBOSITY=3 BASE_NODE_LOG_FORMAT="json" BASE_NODE_METRICS_ENABLED="true" @@ -95,22 +40,10 @@ BASE_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 - -# TRUSTED RPC MODE (OPTIONAL - UNCOMMENT TO ENABLE) (deprecated) -# OP_NODE_L1_TRUST_RPC=true +# ================= -# 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 +# FOLLOW MODE (OPTIONAL - UNCOMMENT TO ENABLE) +# BASE_NODE_SOURCE_L2_RPC= # FLASHBLOCKS (OPTIONAL - UNCOMMENT TO ENABLE) # RETH_FB_WEBSOCKET_URL=wss://mainnet.flashblocks.base.org/ws diff --git a/.env.sepolia b/.env.sepolia index cb9a8b545..e518129fb 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -1,92 +1,37 @@ # BASE SEPOLIA TESTNET NODE CONFIGURATION -# ================================== +# ====================================== # NETWORK CONFIGURATION -# -------------------- +# --------------------- RETH_CHAIN=base-sepolia -OP_NODE_NETWORK=base-sepolia BASE_NODE_NETWORK=base-sepolia -OP_GETH_OP_NETWORK=base-sepolia # BASE SEQUENCER ENDPOINTS -# ----------------------- +# ------------------------ RETH_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 (deprecated) -# ----------------- -OP_NODE_SYNCMODE=execution-layer -OP_NODE_VERIFIER_L1_CONFS=4 -OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true # [REQUIRED] L1 CONFIGURATION -# -------------------------- +# --------------------------- # Replace these values with your L1 (Ethereum) node endpoints -OP_NODE_L1_ETH_RPC= -OP_NODE_L1_BEACON= -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" - BASE_NODE_L1_ETH_RPC= BASE_NODE_L1_BEACON= BASE_NODE_L1_TRUST_RPC="false" # ENGINE CONFIGURATION -# ------------------- -OP_NODE_L2_ENGINE_KIND=reth -OP_NODE_L2_ENGINE_RPC=ws://execution:8551 - +# -------------------- BASE_NODE_L2_ENGINE_RPC=http://execution:8551 BASE_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt BASE_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a # P2P CONFIGURATION -# --------------- -OP_NODE_P2P_AGENT=base -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 - +# ----------------- BASE_NODE_P2P_LISTEN_IP=0.0.0.0 BASE_NODE_P2P_ADVERTISE_TCP_PORT=9222 BASE_NODE_P2P_ADVERTISE_UDP_PORT=9222 BASE_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-sepolia" - -# RPC CONFIGURATION (deprecated) -# --------------- -OP_NODE_RPC_ADDR=0.0.0.0 -OP_NODE_RPC_PORT=8545 - -# GETH CACHE SETTINGS -# ----------------- -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 -# ------------------ -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" - +# -------------------- BASE_NODE_LOG_VERBOSITY=3 BASE_NODE_LOG_FORMAT="json" BASE_NODE_METRICS_ENABLED="true" @@ -95,22 +40,10 @@ BASE_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 - -# TRUSTED RPC MODE (OPTIONAL - UNCOMMENT TO ENABLE) (deprecated) -# OP_NODE_L1_TRUST_RPC=true +# ================= -# 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 +# FOLLOW MODE (OPTIONAL - UNCOMMENT TO ENABLE) +# BASE_NODE_SOURCE_L2_RPC= # FLASHBLOCKS (OPTIONAL - UNCOMMENT TO ENABLE) # RETH_FB_WEBSOCKET_URL=wss://sepolia.flashblocks.base.org/ws diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0c4df219b..adf5443ef 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,91 +11,21 @@ on: env: REGISTRY: ghcr.io NAMESPACE: ghcr.io/base - GETH_DEPRECATED_IMAGE_NAME: node - GETH_IMAGE_NAME: node-geth RETH_IMAGE_NAME: node-reth - NETHERMIND_IMAGE_NAME: node-nethermind permissions: contents: read packages: write jobs: - geth: - strategy: - matrix: - settings: - - arch: linux/amd64 - runs-on: ubuntu-24.04 - - arch: linux/arm64 - runs-on: ubuntu-24.04-arm - runs-on: ${{ matrix.settings.runs-on }} - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - name: Log into the Container registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata for the Docker image - id: meta - uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 - with: - images: | - ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }} - ${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - - name: Build and push the Docker image - id: build - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 - with: - context: . - file: geth/Dockerfile - tags: ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }},${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }} - labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ matrix.settings.arch }} - outputs: type=image,push-by-digest=true,name-canonical=true,push=true - - - name: Export digest - run: | - mkdir -p ${{ runner.temp }}/digests - digest="${{ steps.build.outputs.digest }}" - touch "${{ runner.temp }}/digests/${digest#sha256:}" - - - name: Prepare - run: | - platform=${{ matrix.settings.arch }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - - name: Upload digest - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: digests-geth-${{ env.PLATFORM_PAIR }} - path: ${{ runner.temp }}/digests/* - if-no-files-found: error - retention-days: 1 reth: strategy: matrix: settings: - arch: linux/amd64 runs-on: ubuntu-24.04 - features: jemalloc,asm-keccak,optimism - arch: linux/arm64 runs-on: ubuntu-24.04-arm - features: jemalloc,optimism runs-on: ${{ matrix.settings.runs-on }} steps: - name: Harden the runner (Audit all outbound calls) @@ -104,7 +34,7 @@ jobs: egress-policy: audit - name: Checkout - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - name: Log into the Container registry uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 @@ -131,8 +61,6 @@ jobs: file: reth/Dockerfile tags: ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }} labels: ${{ steps.meta.outputs.labels }} - build-args: | - FEATURES=${{ matrix.settings.features }} platforms: ${{ matrix.settings.arch }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true @@ -155,123 +83,6 @@ jobs: if-no-files-found: error retention-days: 1 - nethermind: - strategy: - matrix: - settings: - - arch: linux/amd64 - runs-on: ubuntu-24.04 - - arch: linux/arm64 - runs-on: ubuntu-24.04-arm - runs-on: ${{ matrix.settings.runs-on }} - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - - - name: Log into the Container registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - - name: Extract metadata for the Docker image - id: meta - uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 - with: - images: | - ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - - - name: Build and push the Docker image - id: build - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 - with: - context: . - file: nethermind/Dockerfile - tags: ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ matrix.settings.arch }} - outputs: type=image,push-by-digest=true,name-canonical=true,push=true - - - name: Export digest - run: | - mkdir -p ${{ runner.temp }}/digests - digest="${{ steps.build.outputs.digest }}" - touch "${{ runner.temp }}/digests/${digest#sha256:}" - - - name: Prepare - run: | - platform=${{ matrix.settings.arch }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - - name: Upload digest - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: digests-nethermind-${{ env.PLATFORM_PAIR }} - path: ${{ runner.temp }}/digests/* - if-no-files-found: error - retention-days: 1 - - merge-geth: - runs-on: ubuntu-latest - needs: - - geth - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Download digests - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - path: ${{ runner.temp }}/digests - pattern: digests-geth-* - merge-multiple: true - - - name: Log into the Container registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - - name: Extract metadata for the Docker image - id: meta - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 - with: - images: | - ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }} - ${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }} - tags: | - type=ref,event=branch - type=ref,event=tag - type=sha,format=long - - - name: Create manifest list and push - working-directory: ${{ runner.temp }}/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}@sha256:%s ' *) - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}@sha256:%s ' *) - - - name: Inspect image - run: | - docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}:${{ steps.meta.outputs.version }} - docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}:${{ steps.meta.outputs.version }} - merge-reth: runs-on: ubuntu-latest needs: @@ -319,51 +130,3 @@ jobs: - name: Inspect image run: | docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}:${{ steps.meta.outputs.version }} - - merge-nethermind: - runs-on: ubuntu-latest - needs: - - nethermind - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Download digests - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - path: ${{ runner.temp }}/digests - pattern: digests-nethermind-* - merge-multiple: true - - - name: Log into the Container registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - - name: Extract metadata for the Docker image - id: meta - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 - with: - images: | - ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - tags: | - type=ref,event=branch - type=ref,event=tag - type=sha,format=long - - - name: Create manifest list and push - working-directory: ${{ runner.temp }}/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}@sha256:%s ' *) - - - name: Inspect image - run: | - docker buildx imagetools inspect ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 237faa4c5..93d5c2410 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ permissions: contents: read jobs: - geth: + reth: strategy: matrix: settings: @@ -31,72 +31,10 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - name: Build the Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 - with: - context: . - file: geth/Dockerfile - push: false - platforms: ${{ matrix.settings.arch }} - - reth: - strategy: - matrix: - settings: - - arch: linux/amd64 - runs-on: ubuntu-24.04 - features: jemalloc,asm-keccak,optimism - - arch: linux/arm64 - runs-on: ubuntu-24.04-arm - features: jemalloc,optimism - runs-on: ${{ matrix.settings.runs-on}} - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - name: Build the Docker image uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 with: context: . file: reth/Dockerfile push: false - build-args: | - FEATURES=${{ matrix.settings.features }} - platforms: ${{ matrix.settings.arch }} - - nethermind: - strategy: - matrix: - settings: - - arch: linux/amd64 - runs-on: ubuntu-24.04 - - arch: linux/arm64 - runs-on: ubuntu-24.04-arm - runs-on: ${{ matrix.settings.runs-on}} - steps: - - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 - - name: Build the Docker image - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 - with: - context: . - file: nethermind/Dockerfile - push: false platforms: ${{ matrix.settings.arch }} diff --git a/.gitignore b/.gitignore index 7bb8e3f91..1dc513860 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ /.idea/ -/geth-data/ /reth-data/ -/nethermind-data/ /dependency_updater/dependency_updater .DS_Store diff --git a/README.md b/README.md index 1cbaad17d..95f5f3b1a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Base Node -Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [OP Stack](https://docs.optimism.io/). This repository contains Docker builds to run your own node on the Base network. +Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [OP Stack](https://docs.optimism.io/). This repository contains a Docker build for running a Base node with `base-reth-node` and `base-consensus`. [![Website base.org](https://img.shields.io/website-up-down-green-red/https/base.org.svg)](https://base.org) [![Docs](https://img.shields.io/badge/docs-up-green)](https://docs.base.org/) @@ -12,15 +12,14 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ ## Quick Start -1. Ensure you have an Ethereum L1 full node RPC available +1. Ensure you have an Ethereum L1 full node RPC and beacon endpoint available. 2. Choose your network: - - For mainnet: Use `.env.mainnet` - - For testnet: Use `.env.sepolia` + - 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= + BASE_NODE_L1_ETH_RPC= + BASE_NODE_L1_BEACON= ``` 4. Start the node: @@ -30,28 +29,21 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ # For testnet: NETWORK_ENV=.env.sepolia docker compose up --build - - # 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 +## Supported Clients -- `reth` (default) -- `geth` -- `nethermind` +- Execution: `base-reth-node` +- Consensus: `base-consensus` ## Requirements ### Minimum Requirements -- Modern Multicore CPU -- 32GB RAM (64GB Recommended) +- 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 accommodate future growth) +- Storage: (2 * [current chain size](https://base.org/stats) + [snapshot size](https://basechaindata.vercel.app) + 20% buffer) to accommodate future growth - Docker and Docker Compose ### Production Hardware Specifications @@ -64,64 +56,33 @@ The following are the hardware specifications we use in production: - **Storage**: RAID 0 of all local NVMe drives (`/dev/nvme*`) - **Filesystem**: ext4 -#### Geth Full Node - -- **Instance**: AWS i7i.12xlarge -- **Storage**: RAID 0 of all local NVMe drives (`/dev/nvme*`) -- **Filesystem**: ext4 - -> [!NOTE] -To run the node using a supported client, you can use the following command: -`CLIENT=supported_client docker compose up --build` - -Supported clients: - - reth (runs vanilla node by default, Flashblocks mode enabled by providing RETH_FB_WEBSOCKET_URL, see [Reth Node README](./reth/README.md)) - - geth - - nethermind - ## Configuration ### Required Settings -- 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 - - `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 +- `BASE_NODE_L1_ETH_RPC`: your Ethereum L1 node RPC endpoint +- `BASE_NODE_L1_BEACON`: your L1 beacon node endpoint +- `BASE_NODE_NETWORK`: `base` or `base-sepolia` +- `RETH_CHAIN`: `base` or `base-sepolia` ### Network Settings - Mainnet: - `RETH_CHAIN=base` - - `OP_NODE_NETWORK=base-mainnet` + - `BASE_NODE_NETWORK=base` - Sequencer: `https://mainnet-sequencer.base.org` - -### Performance Settings - -- Cache Settings: - - `GETH_CACHE="20480"` (20GB) - - `GETH_CACHE_DATABASE="20"` (4GB) - - `GETH_CACHE_GC="12"` - - `GETH_CACHE_SNAPSHOT="24"` - - `GETH_CACHE_TRIE="44"` +- Sepolia: + - `RETH_CHAIN=base-sepolia` + - `BASE_NODE_NETWORK=base-sepolia` + - Sequencer: `https://sepolia-sequencer.base.org` ### Optional Features -- EthStats Monitoring (uncomment to enable) -- Trusted RPC Mode (uncomment to enable) -- Snap Sync (experimental) +- Flashblocks: set `RETH_FB_WEBSOCKET_URL` +- Follow mode: set `BASE_NODE_SOURCE_L2_RPC` +- Pruning: set `RETH_PRUNING_ARGS` -For full configuration options, see the `.env.mainnet` file. +For full configuration options, see `.env.mainnet` or `.env.sepolia`. ## Snapshots @@ -131,12 +92,12 @@ Snapshots are available to help you sync your node more quickly. See [docs.base. | Network | Status | | ------- | ------ | -| Mainnet | ✅ | -| Testnet | ✅ | +| Mainnet | Supported | +| Testnet | Supported | ## Troubleshooting -For support please join our [Discord](https://discord.gg/buildonbase) post in `🛠|node-operators`. You can alternatively open a new GitHub issue. +For support please join our [Discord](https://discord.gg/buildonbase) and post in `node-operators`. You can alternatively open a new GitHub issue. ## Disclaimer diff --git a/base-consensus-entrypoint b/base-consensus-entrypoint deleted file mode 100755 index cd2801fce..000000000 --- a/base-consensus-entrypoint +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -set -eu - -get_public_ip() { - # Define a list of HTTP-based providers - local PROVIDERS=( - "http://ifconfig.me" - "http://api.ipify.org" - "http://ipecho.net/plain" - "http://v4.ident.me" - ) - # Iterate through the providers until an IP is found or the list is exhausted - for provider in "${PROVIDERS[@]}"; do - local IP - IP=$(curl -s --max-time 10 --connect-timeout 5 "$provider") - # Check if IP contains a valid format (simple regex for an IPv4 address) - if [[ $IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "$IP" - return 0 - fi - done - return 1 -} - -if [[ -z "${BASE_NODE_NETWORK:-}" ]]; then - echo "expected BASE_NODE_NETWORK to be set" 1>&2 - exit 1 -fi - -# wait until local execution client comes up (authed so will return 401 without token) -until [ "$(curl -s --max-time 10 --connect-timeout 5 -w '%{http_code}' -o /dev/null "${BASE_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do - echo "waiting for execution client to be ready" - sleep 5 -done - -# public-facing P2P node, advertise public IP address -if PUBLIC_IP=$(get_public_ip); then - echo "fetched public IP is: $PUBLIC_IP" -else - echo "Could not retrieve public IP." - exit 8 -fi -export BASE_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP - -echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH" - -if [[ -n "${BASE_NODE_SOURCE_L2_RPC:-}" ]]; then - echo "Running base-consensus in follow mode because BASE_NODE_SOURCE_L2_RPC is set" - exec ./base-consensus follow -else - exec ./base-consensus node -fi diff --git a/consensus-entrypoint b/consensus-entrypoint index be95aa3c5..6e8f3d692 100755 --- a/consensus-entrypoint +++ b/consensus-entrypoint @@ -1,15 +1,97 @@ #!/bin/bash set -eu -if [ "${USE_BASE_CONSENSUS:-false}" = "true" ]; then - if [ -f ./base-consensus-entrypoint ]; then - echo "Using Base Client" - exec ./base-consensus-entrypoint - else - echo "Base client is not supported for this node type" - exit 1 +get_public_ip() { + local PROVIDERS=( + "http://ifconfig.me" + "http://api.ipify.org" + "http://ipecho.net/plain" + "http://v4.ident.me" + ) + + for provider in "${PROVIDERS[@]}"; do + local IP + IP=$(curl -s --max-time 10 --connect-timeout 5 "$provider") + if [[ $IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "$IP" + return 0 fi + done + + return 1 +} + +fallback_env() { + local target="$1" + local source="$2" + + if [[ -z "${!target:-}" && -n "${!source:-}" ]]; then + export "$target=${!source}" + fi +} + +if [[ -z "${BASE_NODE_NETWORK:-}" && -n "${OP_NODE_NETWORK:-}" ]]; then + case "$OP_NODE_NETWORK" in + base-mainnet) + export BASE_NODE_NETWORK=base + ;; + *) + export BASE_NODE_NETWORK="$OP_NODE_NETWORK" + ;; + esac +fi + +fallback_env BASE_NODE_L1_ETH_RPC OP_NODE_L1_ETH_RPC +fallback_env BASE_NODE_L1_BEACON OP_NODE_L1_BEACON +fallback_env BASE_NODE_L1_TRUST_RPC OP_NODE_L1_TRUST_RPC +fallback_env BASE_NODE_L2_ENGINE_RPC OP_NODE_L2_ENGINE_RPC +fallback_env BASE_NODE_P2P_LISTEN_IP OP_NODE_P2P_LISTEN_IP +fallback_env BASE_NODE_P2P_ADVERTISE_TCP_PORT OP_NODE_P2P_LISTEN_TCP_PORT +fallback_env BASE_NODE_P2P_ADVERTISE_UDP_PORT OP_NODE_P2P_LISTEN_UDP_PORT +fallback_env BASE_NODE_P2P_BOOTNODES OP_NODE_P2P_BOOTNODES +fallback_env BASE_NODE_LOG_FORMAT OP_NODE_LOG_FORMAT +fallback_env BASE_NODE_METRICS_ENABLED OP_NODE_METRICS_ENABLED +fallback_env BASE_NODE_METRICS_ADDR OP_NODE_METRICS_ADDR +fallback_env BASE_NODE_METRICS_PORT OP_NODE_METRICS_PORT + +if [[ -z "${BASE_NODE_NETWORK:-}" ]]; then + echo "expected BASE_NODE_NETWORK to be set" 1>&2 + exit 1 +fi + +if [[ -z "${BASE_NODE_L2_ENGINE_RPC:-}" ]]; then + echo "expected BASE_NODE_L2_ENGINE_RPC to be set" 1>&2 + exit 1 +fi + +if [[ -z "${BASE_NODE_L2_ENGINE_AUTH:-}" ]]; then + echo "expected BASE_NODE_L2_ENGINE_AUTH to be set" 1>&2 + exit 1 +fi + +if [[ -z "${BASE_NODE_L2_ENGINE_AUTH_RAW:-}" ]]; then + echo "expected BASE_NODE_L2_ENGINE_AUTH_RAW to be set" 1>&2 + exit 1 +fi + +until [ "$(curl -s --max-time 10 --connect-timeout 5 -w '%{http_code}' -o /dev/null "${BASE_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do + echo "waiting for execution client to be ready" + sleep 5 +done + +if PUBLIC_IP=$(get_public_ip); then + echo "fetched public IP is: $PUBLIC_IP" +else + echo "Could not retrieve public IP." + exit 8 +fi +export BASE_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP + +echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH" + +if [[ -n "${BASE_NODE_SOURCE_L2_RPC:-}" ]]; then + echo "Running base-consensus in follow mode because BASE_NODE_SOURCE_L2_RPC is set" + exec ./base-consensus follow else - echo "Using OP Node" - exec ./op-node-entrypoint + exec ./base-consensus node fi diff --git a/docker-compose.yml b/docker-compose.yml index 9eda33173..12769efc1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,10 @@ +x-node-build: &node-build + context: . + dockerfile: reth/Dockerfile + services: execution: - build: - context: . - dockerfile: ${CLIENT:-reth}/Dockerfile + build: *node-build restart: unless-stopped ports: - "8545:8545" # RPC @@ -12,15 +14,11 @@ services: - "30303:30303/udp" # P2P UDP command: ["bash", "./execution-entrypoint"] volumes: - - ${HOST_DATA_DIR}:/data - environment: - - USE_BASE_CONSENSUS=${USE_BASE_CONSENSUS:-false} + - ${HOST_DATA_DIR:-./reth-data}:/data env_file: - ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet node: - build: - context: . - dockerfile: ${CLIENT:-reth}/Dockerfile + build: *node-build restart: unless-stopped depends_on: - execution @@ -31,7 +29,5 @@ services: - "7300:7300" # metrics - "6060:6060" # pprof command: ["bash", "./consensus-entrypoint"] - environment: - - USE_BASE_CONSENSUS=${USE_BASE_CONSENSUS:-false} env_file: - ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet diff --git a/geth/Dockerfile b/geth/Dockerfile deleted file mode 100644 index c32881405..000000000 --- a/geth/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM golang:1.24 AS op - -RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin - -WORKDIR /app - -COPY versions.env /tmp/versions.env - -RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \ - git switch -c branch-$OP_NODE_TAG && \ - bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]' - -RUN . /tmp/versions.env && cd op-node && \ - make VERSION=$OP_NODE_TAG op-node - -FROM golang:1.24 AS geth - -WORKDIR /app - -COPY versions.env /tmp/versions.env - -RUN . /tmp/versions.env && git clone $OP_GETH_REPO --branch $OP_GETH_TAG --single-branch . && \ - git switch -c branch-$OP_GETH_TAG && \ - bash -c '[ "$(git rev-parse HEAD)" = "$OP_GETH_COMMIT" ]' - -RUN go run build/ci.go install -static ./cmd/geth - -FROM ubuntu:24.04 - -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 op-node-entrypoint . -COPY consensus-entrypoint . - -CMD ["/usr/bin/supervisord"] diff --git a/geth/geth-entrypoint b/geth/geth-entrypoint deleted file mode 100755 index b598cb3f4..000000000 --- a/geth/geth-entrypoint +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -set -eu - -VERBOSITY=${GETH_VERBOSITY:-3} -GETH_DATA_DIR=${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}" -DISCOVERY_PORT="${DISCOVERY_PORT:-30303}" -ADDITIONAL_ARGS="" -OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}" -OP_GETH_SYNCMODE="${OP_GETH_SYNCMODE:-full}" - -# Add cache optimizations with defaults -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}" - -if [[ -z "$OP_NODE_NETWORK" ]]; then - echo "expected OP_NODE_NETWORK to be set" 1>&2 - exit 1 -fi - -mkdir -p $GETH_DATA_DIR - -echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_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 - -exec ./geth \ - --datadir="$GETH_DATA_DIR" \ - --verbosity="$VERBOSITY" \ - --http \ - --http.corsdomain="*" \ - --http.vhosts="*" \ - --http.addr=0.0.0.0 \ - --http.port="$RPC_PORT" \ - --http.api=web3,debug,eth,net,engine \ - --authrpc.addr=0.0.0.0 \ - --authrpc.port="$AUTHRPC_PORT" \ - --authrpc.vhosts="*" \ - --authrpc.jwtsecret="$BASE_NODE_L2_ENGINE_AUTH" \ - --ws \ - --ws.addr=0.0.0.0 \ - --ws.port="$WS_PORT" \ - --ws.origins="*" \ - --ws.api=debug,eth,net,engine \ - --metrics \ - --metrics.addr=0.0.0.0 \ - --metrics.port="$METRICS_PORT" \ - --syncmode="$OP_GETH_SYNCMODE" \ - --gcmode="$OP_GETH_GCMODE" \ - --maxpeers=100 \ - --rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP" \ - --rollup.halt=major \ - --op-network="$OP_NODE_NETWORK" \ - --discovery.port="$DISCOVERY_PORT" \ - --port="$P2P_PORT" \ - --rollup.disabletxpoolgossip=true \ - --cache="$GETH_CACHE" \ - --cache.database="$GETH_CACHE_DATABASE" \ - --cache.gc="$GETH_CACHE_GC" \ - --cache.snapshot="$GETH_CACHE_SNAPSHOT" \ - --cache.trie="$GETH_CACHE_TRIE" \ - $ADDITIONAL_ARGS # intentionally unquoted diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile deleted file mode 100644 index 4c2df2a0e..000000000 --- a/nethermind/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -FROM golang:1.24 AS op - -RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin - -WORKDIR /app - -COPY versions.env /tmp/versions.env - -RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \ - git switch -c branch-$OP_NODE_TAG && \ - bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]' - -RUN . /tmp/versions.env && cd op-node && \ - just VERSION=$OP_NODE_TAG op-node - -FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build - -ARG BUILD_CONFIG=release -ARG TARGETARCH - -WORKDIR /app - -COPY versions.env /tmp/versions.env - -RUN . /tmp/versions.env && git clone $NETHERMIND_REPO --branch $NETHERMIND_TAG --single-branch . && \ - git switch -c $NETHERMIND_TAG && \ - bash -c '[ "$(git rev-parse HEAD)" = "$NETHERMIND_COMMIT" ]' - -RUN TARGETARCH=${TARGETARCH#linux/} && \ - arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ - echo "Using architecture: $arch" && \ - dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false -p:NuGetAudit=false - -FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble - -RUN apt-get update && \ - apt-get install -y jq curl supervisor && \ - rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /var/log/supervisor - -WORKDIR /app - -COPY --from=build /publish ./ -COPY --from=op /app/op-node/bin/op-node ./ -COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf -COPY nethermind/nethermind-entrypoint ./execution-entrypoint -COPY op-node-entrypoint . -COPY consensus-entrypoint . - -CMD ["/usr/bin/supervisord"] diff --git a/nethermind/nethermind-entrypoint b/nethermind/nethermind-entrypoint deleted file mode 100755 index 66367b22c..000000000 --- a/nethermind/nethermind-entrypoint +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -eu - -# Default configurations -NETHERMIND_DATA_DIR=${NETHERMIND_DATA_DIR:-/data} -NETHERMIND_LOG_LEVEL=${NETHERMIND_LOG_LEVEL:-Info} - -RPC_PORT="${RPC_PORT:-8545}" -WS_PORT="${WS_PORT:-8546}" -AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" -METRICS_PORT="${METRICS_PORT:-6060}" -DISCOVERY_PORT="${DISCOVERY_PORT:-30303}" -P2P_PORT="${P2P_PORT:-30303}" -ADDITIONAL_ARGS="" - -# Check if required variables are set -if [[ -z "$OP_NODE_NETWORK" ]]; then - echo "Expected OP_NODE_NETWORK to be set" 1>&2 - exit 1 -fi - -# Create necessary directories -mkdir -p "$NETHERMIND_DATA_DIR" - -# Write the JWT secret -if [[ -z "$BASE_NODE_L2_ENGINE_AUTH_RAW" ]]; then - echo "Expected BASE_NODE_L2_ENGINE_AUTH_RAW to be set" 1>&2 - exit 1 -fi -echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH" - -# Additional arguments based on environment variables -if [[ -n "${OP_NETHERMIND_BOOTNODES:-}" ]]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --Network.Bootnodes=$OP_NETHERMIND_BOOTNODES" -fi - -if [[ -n "${OP_NETHERMIND_ETHSTATS_ENABLED:-}" ]]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Enabled=$OP_NETHERMIND_ETHSTATS_ENABLED" -fi - -if [[ -n "${OP_NETHERMIND_ETHSTATS_ENDPOINT:-}" ]]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.NodeName=${OP_NETHERMIND_ETHSTATS_NODE_NAME:-NethermindNode} --EthStats.Endpoint=$OP_NETHERMIND_ETHSTATS_ENDPOINT" -fi - -# Execute Nethermind -exec ./nethermind \ - --config="$OP_NODE_NETWORK" \ - --datadir="$NETHERMIND_DATA_DIR" \ - --Optimism.SequencerUrl=$OP_SEQUENCER_HTTP \ - --log="$NETHERMIND_LOG_LEVEL" \ - --JsonRpc.Enabled=true \ - --JsonRpc.Host=0.0.0.0 \ - --JsonRpc.WebSocketsPort="$WS_PORT" \ - --JsonRpc.Port="$RPC_PORT" \ - --JsonRpc.JwtSecretFile="$BASE_NODE_L2_ENGINE_AUTH" \ - --JsonRpc.EngineHost=0.0.0.0 \ - --JsonRpc.EnginePort="$AUTHRPC_PORT" \ - --HealthChecks.Enabled=true \ - --Metrics.Enabled=true \ - --Metrics.ExposePort="$METRICS_PORT" \ - --Network.P2PPort="$P2P_PORT" \ - --Network.DiscoveryPort="$DISCOVERY_PORT" \ - $ADDITIONAL_ARGS diff --git a/op-node-entrypoint b/op-node-entrypoint deleted file mode 100755 index 893015882..000000000 --- a/op-node-entrypoint +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -eu - -get_public_ip() { - # Define a list of HTTP-based providers - local PROVIDERS=( - "http://ifconfig.me" - "http://api.ipify.org" - "http://ipecho.net/plain" - "http://v4.ident.me" - ) - # Iterate through the providers until an IP is found or the list is exhausted - for provider in "${PROVIDERS[@]}"; do - local IP - IP=$(curl -s --max-time 10 --connect-timeout 5 "$provider") - # Check if IP contains a valid format (simple regex for an IPv4 address) - if [[ $IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "$IP" - return 0 - fi - done - return 1 -} - -if [[ -z "$OP_NODE_NETWORK" && -z "$OP_NODE_ROLLUP_CONFIG" ]]; then - echo "expected OP_NODE_NETWORK to be set" 1>&2 - exit 1 -fi - -# wait until local execution client comes up (authed so will return 401 without token) -until [ "$(curl -s --max-time 10 --connect-timeout 5 -w '%{http_code}' -o /dev/null "${OP_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do - echo "waiting for execution client to be ready" - sleep 5 -done - -# public-facing P2P node, advertise public IP address -if PUBLIC_IP=$(get_public_ip); then - echo "fetched public IP is: $PUBLIC_IP" -else - echo "Could not retrieve public IP." - exit 8 -fi -export OP_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP - - -echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH" -export OP_NODE_L2_ENGINE_AUTH=$BASE_NODE_L2_ENGINE_AUTH - -exec ./op-node diff --git a/reth/Dockerfile b/reth/Dockerfile index 2c9eec55f..45a3ded79 100644 --- a/reth/Dockerfile +++ b/reth/Dockerfile @@ -1,20 +1,5 @@ ARG RUST_VERSION=1.93 -FROM golang:1.24 AS op - -RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin - -WORKDIR /app - -COPY versions.env /tmp/versions.env - -RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \ - git switch -c branch-$OP_NODE_TAG && \ - bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]' - -RUN . /tmp/versions.env && cd op-node && \ - make VERSION=$OP_NODE_TAG op-node - FROM public.ecr.aws/docker/library/rust:${RUST_VERSION}-trixie AS rust-builder-base WORKDIR /app @@ -57,19 +42,16 @@ RUN cargo build --bin base-reth-node --bin base-consensus --profile maxperf FROM ubuntu:24.04 RUN apt-get update && \ - apt-get install -y jq curl supervisor && \ + apt-get install -y 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=reth-base /app/target/maxperf/base-consensus ./ COPY --from=reth-base /app/target/maxperf/base-reth-node ./ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ./reth/reth-entrypoint ./execution-entrypoint -COPY op-node-entrypoint . -COPY base-consensus-entrypoint . COPY consensus-entrypoint . CMD ["/usr/bin/supervisord"] diff --git a/reth/README.md b/reth/README.md index 485a0458a..e044abe32 100644 --- a/reth/README.md +++ b/reth/README.md @@ -21,7 +21,7 @@ The node follows the standard `docker compose` workflow in the master README. ```bash # To run Reth node with Flashblocks support, set RETH_FB_WEBSOCKET_URL in your .env file -CLIENT=reth docker compose up +docker compose up ``` ## Testing Flashblocks RPC Methods diff --git a/supervisord.conf b/supervisord.conf index aa634ed35..77d11a461 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -10,7 +10,7 @@ stdout_logfile_maxbytes=0 redirect_stderr=true stopwaitsecs=300 -[program:op-execution] +[program:execution] command=/app/execution-entrypoint stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 diff --git a/versions.env b/versions.env index 0a4b06314..c7cedb941 100644 --- a/versions.env +++ b/versions.env @@ -1,12 +1,3 @@ export BASE_RETH_NODE_COMMIT=3049ce2e3a5132f2ef74b4ba14a1a952ea6abdfb export BASE_RETH_NODE_REPO=https://github.com/base/base.git export BASE_RETH_NODE_TAG=v0.8.0 -export NETHERMIND_COMMIT=f5507dec1c9c7f5e31dadae445c08622be166054 -export NETHERMIND_REPO=https://github.com/NethermindEth/nethermind.git -export NETHERMIND_TAG=1.36.2 -export OP_GETH_COMMIT=d0734fd5f44234cde3b0a7c4beb1256fc6feedef -export OP_GETH_REPO=https://github.com/ethereum-optimism/op-geth.git -export OP_GETH_TAG=v1.101702.0 -export OP_NODE_COMMIT=cba7aba0c98aae22720b21c3a023990a486cb6e0 -export OP_NODE_REPO=https://github.com/ethereum-optimism/optimism.git -export OP_NODE_TAG=op-node/v1.16.11 From 7598c07ac7ad94e090ec2f5a85b5233967861074 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Wed, 20 May 2026 12:56:35 -0500 Subject: [PATCH 2/2] Flatten node runtime files --- .github/workflows/docker.yml | 6 ++- .github/workflows/pr.yml | 6 ++- reth/Dockerfile => Dockerfile | 2 +- README.md | 18 +++++++-- consensus-entrypoint | 33 --------------- docker-compose.yml | 12 +++--- reth/reth-entrypoint => execution-entrypoint | 0 reth/README.md | 42 -------------------- 8 files changed, 31 insertions(+), 88 deletions(-) rename reth/Dockerfile => Dockerfile (97%) rename reth/reth-entrypoint => execution-entrypoint (100%) delete mode 100644 reth/README.md diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index adf5443ef..7a3d299c1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,8 +24,10 @@ jobs: settings: - arch: linux/amd64 runs-on: ubuntu-24.04 + features: jemalloc,asm-keccak,optimism - arch: linux/arm64 runs-on: ubuntu-24.04-arm + features: jemalloc,optimism runs-on: ${{ matrix.settings.runs-on }} steps: - name: Harden the runner (Audit all outbound calls) @@ -58,9 +60,11 @@ jobs: uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 with: context: . - file: reth/Dockerfile + file: Dockerfile tags: ${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + FEATURES=${{ matrix.settings.features }} platforms: ${{ matrix.settings.arch }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 93d5c2410..8ddfbfc4a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,8 +14,10 @@ jobs: settings: - arch: linux/amd64 runs-on: ubuntu-24.04 + features: jemalloc,asm-keccak,optimism - arch: linux/arm64 runs-on: ubuntu-24.04-arm + features: jemalloc,optimism runs-on: ${{ matrix.settings.runs-on }} steps: - name: Harden the runner (Audit all outbound calls) @@ -35,6 +37,8 @@ jobs: uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 with: context: . - file: reth/Dockerfile + file: Dockerfile push: false + build-args: | + FEATURES=${{ matrix.settings.features }} platforms: ${{ matrix.settings.arch }} diff --git a/reth/Dockerfile b/Dockerfile similarity index 97% rename from reth/Dockerfile rename to Dockerfile index 45a3ded79..46fd2dfa1 100644 --- a/reth/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ WORKDIR /app COPY --from=reth-base /app/target/maxperf/base-consensus ./ COPY --from=reth-base /app/target/maxperf/base-reth-node ./ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf -COPY ./reth/reth-entrypoint ./execution-entrypoint +COPY execution-entrypoint . COPY consensus-entrypoint . CMD ["/usr/bin/supervisord"] diff --git a/README.md b/README.md index 95f5f3b1a..2e0b62998 100644 --- a/README.md +++ b/README.md @@ -78,12 +78,22 @@ The following are the hardware specifications we use in production: ### Optional Features -- Flashblocks: set `RETH_FB_WEBSOCKET_URL` +- Flashblocks: set `RETH_FB_WEBSOCKET_URL`. When set, the execution client runs in Flashblocks mode; otherwise it runs in vanilla mode. - Follow mode: set `BASE_NODE_SOURCE_L2_RPC` - Pruning: set `RETH_PRUNING_ARGS` For full configuration options, see `.env.mainnet` or `.env.sepolia`. +### Testing Flashblocks RPC Methods + +When running in Flashblocks mode, you can query a pending block using the Flashblocks RPC: + +```bash +curl -X POST \ + --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending", false],"id":1}' \ + http://localhost:8545 +``` + ## 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. @@ -92,12 +102,12 @@ Snapshots are available to help you sync your node more quickly. See [docs.base. | Network | Status | | ------- | ------ | -| Mainnet | Supported | -| Testnet | Supported | +| Mainnet | ✅ | +| Testnet | ✅ | ## Troubleshooting -For support please join our [Discord](https://discord.gg/buildonbase) and post in `node-operators`. You can alternatively open a new GitHub issue. +For support please join our [Discord](https://discord.gg/buildonbase) and post in `🛠|node-operators`. You can alternatively open a new GitHub issue. ## Disclaimer diff --git a/consensus-entrypoint b/consensus-entrypoint index 6e8f3d692..05b89467a 100755 --- a/consensus-entrypoint +++ b/consensus-entrypoint @@ -21,39 +21,6 @@ get_public_ip() { return 1 } -fallback_env() { - local target="$1" - local source="$2" - - if [[ -z "${!target:-}" && -n "${!source:-}" ]]; then - export "$target=${!source}" - fi -} - -if [[ -z "${BASE_NODE_NETWORK:-}" && -n "${OP_NODE_NETWORK:-}" ]]; then - case "$OP_NODE_NETWORK" in - base-mainnet) - export BASE_NODE_NETWORK=base - ;; - *) - export BASE_NODE_NETWORK="$OP_NODE_NETWORK" - ;; - esac -fi - -fallback_env BASE_NODE_L1_ETH_RPC OP_NODE_L1_ETH_RPC -fallback_env BASE_NODE_L1_BEACON OP_NODE_L1_BEACON -fallback_env BASE_NODE_L1_TRUST_RPC OP_NODE_L1_TRUST_RPC -fallback_env BASE_NODE_L2_ENGINE_RPC OP_NODE_L2_ENGINE_RPC -fallback_env BASE_NODE_P2P_LISTEN_IP OP_NODE_P2P_LISTEN_IP -fallback_env BASE_NODE_P2P_ADVERTISE_TCP_PORT OP_NODE_P2P_LISTEN_TCP_PORT -fallback_env BASE_NODE_P2P_ADVERTISE_UDP_PORT OP_NODE_P2P_LISTEN_UDP_PORT -fallback_env BASE_NODE_P2P_BOOTNODES OP_NODE_P2P_BOOTNODES -fallback_env BASE_NODE_LOG_FORMAT OP_NODE_LOG_FORMAT -fallback_env BASE_NODE_METRICS_ENABLED OP_NODE_METRICS_ENABLED -fallback_env BASE_NODE_METRICS_ADDR OP_NODE_METRICS_ADDR -fallback_env BASE_NODE_METRICS_PORT OP_NODE_METRICS_PORT - if [[ -z "${BASE_NODE_NETWORK:-}" ]]; then echo "expected BASE_NODE_NETWORK to be set" 1>&2 exit 1 diff --git a/docker-compose.yml b/docker-compose.yml index 12769efc1..c88064344 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,8 @@ -x-node-build: &node-build - context: . - dockerfile: reth/Dockerfile - services: execution: - build: *node-build + build: + context: . + dockerfile: Dockerfile restart: unless-stopped ports: - "8545:8545" # RPC @@ -18,7 +16,9 @@ services: env_file: - ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet node: - build: *node-build + build: + context: . + dockerfile: Dockerfile restart: unless-stopped depends_on: - execution diff --git a/reth/reth-entrypoint b/execution-entrypoint similarity index 100% rename from reth/reth-entrypoint rename to execution-entrypoint diff --git a/reth/README.md b/reth/README.md deleted file mode 100644 index e044abe32..000000000 --- a/reth/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Running a Reth Node - -This is an implementation of the Reth node setup that supports Flashblocks mode based on configuration. - -## Setup - -- See hardware requirements mentioned in the master README -- For Flashblocks mode: Access to a Flashblocks websocket endpoint (for `RETH_FB_WEBSOCKET_URL`) - - We provide public websocket endpoints for mainnet and devnet, included in `.env.mainnet` and `.env.sepolia` - -## Node Type Selection - -The node determines its mode based on the presence of the `RETH_FB_WEBSOCKET_URL` environment variable: - -- **Vanilla Mode** (default): When no `RETH_FB_WEBSOCKET_URL` is provided. -- **Flashblocks Mode**: When `RETH_FB_WEBSOCKET_URL` is provided. - -## Running the Node - -The node follows the standard `docker compose` workflow in the master README. - -```bash -# To run Reth node with Flashblocks support, set RETH_FB_WEBSOCKET_URL in your .env file -docker compose up -``` - -## Testing Flashblocks RPC Methods - -When running in Flashblocks mode (with `RETH_FB_WEBSOCKET_URL` configured), you can query a pending block using the Flashblocks RPC: - -```bash -curl -X POST \ - --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending", false],"id":1}' \ - http://localhost:8545 -``` - -## Additional RPC Methods - -For a complete list of supported RPC methods, refer to: - -- [Standard Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/) -- [Flashblocks RPC Methods](https://docs.base.org/chain/flashblocks#rpc-api) (Flashblocks mode only)