Skip to content

Configuration

Prerequisites: Quick Start complete.

Basic Setup

Create config/app_conf.yml:

yaml
log_level: debug
gateway_cluster_id: optimum_hoodi_v0_3  # REQUIRED
gateway_id: "your_unique_identifier"

agent_lib_p2p_port: 33212
agent_opt_p2p_port: 43213
sidecar_listen_port: 33211
telemetry_port: 48123
identity_libp2p_dir: /tmp/libp2p
identity_optp2p_dir: /tmp/mump2p
telemetry_enable: true
enable_aggregation: true

# Chain: "mainnet" or "hoodi" (default: hoodi)
# chain: hoodi

# Topic names only
eth_topics_subscribe:
  - beacon_block

Lighthouse does not automatically reconnect to the gateway after a gateway restart. To fix this, configure direct_cl_peers in the gateway — this starts a dedicated goroutine that retries the connection until the CL peer is reachable again.

yaml
direct_cl_peers:
  - /ip4/192.168.1.2/tcp/9000/p2p/16Uiu2HAmGj6AoMKe7fNrghXwwRgivXLpji3Hkm4QEGVpsHZYKwPQ

Replace the IP, port, and peer ID with your CL node's libp2p multiaddr.

Why this matters: Prysm re-dials peers on its own, but Lighthouse does not. Without direct_cl_peers, a gateway restart means Lighthouse stays disconnected until the next manual intervention. For simplicity, we recommend all partners (Prysm and Lighthouse) add their CL nodes as direct peers.

To find your CL node's multiaddr:

  • Lighthouse: curl -s http://localhost:5052/eth/v1/node/identity | jq '.data.p2p_addresses[0]'
  • Prysm: curl -s http://localhost:3500/eth/v1/node/identity | jq '.data.p2p_addresses[0]'

Topic Configuration

Short topic names – Use topic names without the fork digest prefix; the gateway resolves the full topic path automatically.

yaml
eth_topics_subscribe:
  - beacon_block

Supported topics (RC11): beacon_block only.

Coming in RC12: Attestation subnet integration (beacon_attestation_0 through beacon_attestation_63), expanding coverage beyond beacon blocks.

Dynamic Configuration

Starting with RC7, the gateway receives automatic config updates.

  • Polls for updates periodically
  • Changes apply without restart

Config Reference

KeyEnv VariableDefaultDescription
gateway_cluster_idOPT_GATEWAY_CLUSTER_ID(required)Use optimum_hoodi_v0_3 for Hoodi
gateway_idOPT_GATEWAY_ID(required)Unique gateway identifier
agent_lib_p2p_portOPT_AGENT_LIB_P2P_PORT33212CL clients connect here
agent_opt_p2p_portOPT_AGENT_OPT_P2P_PORT43213mump2p agent port
sidecar_listen_portSIDECAR_PORT33211mump2p tracer (must be exposed)
telemetry_enableOPT_ENABLE_TELEMETRYfalseEnable metrics endpoint
telemetry_portOPT_TELEMETRY_PORT48123Metrics HTTP port
enable_aggregationOPT_ENABLE_AGGREGATIONtrueBatch non-beacon_block messages
direct_cl_peersOPT_DIRECT_CL_PEERS(empty)CL node multiaddrs for auto-reconnect
eth_topics_subscribeOPT_ETH_TOPICS_SUBSCRIBE(required)Short topic names only

Full reference: See Quick Start config block.

Validation

sh
curl http://localhost:48123/metrics | grep gateway_id
docker logs optimum-gateway | grep "successfully subscribed"

Common Issues

  • Missing gateway_cluster_id – Use optimum_hoodi_v0_3
  • Missing gateway_id – Required
  • Port conflicts – Ensure 33211, 33212, 43213, 48123 are free

See Troubleshooting for more.