Summary
The .env.mainnet file is missing BASE_NODE_RPC_PORT, causing the consensus RPC to be unreachable via the Docker Compose port mapping when USE_BASE_CONSENSUS=true.
Details
The Base v1 upgrade documentation states that OP_NODE_RPC_PORT maps to BASE_NODE_RPC_PORT, and says:
If you use base/node, most variables are already set in .env.mainnet and .env.sepolia.
However, .env.mainnet only contains the deprecated variable:
# RPC CONFIGURATION (deprecated)
OP_NODE_RPC_PORT=8545
The BASE_NODE_RPC_PORT equivalent is not set.
Since base-consensus defaults to port 9545 per crates/client/cli/src/rpc.rs, and docker-compose.yml maps 7545:8545, the consensus RPC becomes unreachable from the host.
Other BASE_NODE_* variables, such as BASE_NODE_L1_ETH_RPC and BASE_NODE_METRICS_PORT, are already present in .env.mainnet; this one appears to have been missed.
Impact
optimism_syncStatus returns empty when queried via localhost:7545.
- Monitoring or health checks relying on the consensus RPC get no response.
- The node itself is fine; RPC works on container port
9545, but it is not reachable through the mapped host port.
Reproduction
git pull origin main
# USE_BASE_CONSENSUS=true is default in .env
docker compose up -d
Querying through the mapped host port returns nothing:
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' \
http://localhost:7545
Querying from inside the container on port 9545 works:
docker exec base-node-node-1 curl -s -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' \
http://localhost:9545
Fix
Add the following to .env.mainnet and .env.sepolia:
This makes base-consensus bind to the port that the existing Docker Compose mapping expects.
Summary
The
.env.mainnetfile is missingBASE_NODE_RPC_PORT, causing the consensus RPC to be unreachable via the Docker Compose port mapping whenUSE_BASE_CONSENSUS=true.Details
The Base v1 upgrade documentation states that
OP_NODE_RPC_PORTmaps toBASE_NODE_RPC_PORT, and says:However,
.env.mainnetonly contains the deprecated variable:The
BASE_NODE_RPC_PORTequivalent is not set.Since
base-consensusdefaults to port9545percrates/client/cli/src/rpc.rs, anddocker-compose.ymlmaps7545:8545, the consensus RPC becomes unreachable from the host.Other
BASE_NODE_*variables, such asBASE_NODE_L1_ETH_RPCandBASE_NODE_METRICS_PORT, are already present in.env.mainnet; this one appears to have been missed.Impact
optimism_syncStatusreturns empty when queried vialocalhost:7545.9545, but it is not reachable through the mapped host port.Reproduction
git pull origin main # USE_BASE_CONSENSUS=true is default in .env docker compose up -dQuerying through the mapped host port returns nothing:
Querying from inside the container on port
9545works:Fix
Add the following to
.env.mainnetand.env.sepolia:This makes
base-consensusbind to the port that the existing Docker Compose mapping expects.