Skip to content

.env.mainnet missing BASE_NODE_RPC_PORT — consensus RPC unreachable via docker-compose port mapping #1088

@racket2000

Description

@racket2000

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:

BASE_NODE_RPC_PORT=8545

This makes base-consensus bind to the port that the existing Docker Compose mapping expects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions