Consensus layer configuration options (op-node)
You can configure your node using the command line options below (also called flags).
There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export.
op-node. op-node implements most rollup-specific functionality as the Consensus-Layer, similar to an L1 beacon-node.
The following options are from the --help in v1.10.2.
Recommended configuration
For most node operators, the following configuration provides a good starting point for running op-node.Essential flags for a replica node
These are the minimum required flags to run op-node as a replica (non-sequencer):Recommended flags for production
For production deployments, add these flags for better reliability and observability:Sequencer configuration
If you’re running a sequencer node, use these additional flags:Keep your sequencer private key secure and never commit it to version control.
Use environment variables or secure key management systems in production.
Important configuration files
When running op-node, you’ll work with several important files:JWT secret (--l2.jwt-secret)
A hex-encoded 32-byte secret used for authenticated communication between op-node (consensus layer) and op-geth (execution layer).
This file must be identical to the one used by op-geth.
Example of generating a JWT secret:
Rollup configuration (--rollup.config)
The rollup configuration file defines the chain parameters, including:
- Genesis block information
- L1 contract addresses
- Fork activation timestamps
- Block time and sequence window
--network flag instead.
Custom chains require a rollup.json file.
P2P private key (--p2p.priv.path)
The P2P private key file maintains your node’s network identity across restarts.
Default location: opnode_p2p_priv.txt
This file is automatically generated if it doesn’t exist. Keep it persistent to maintain peer connections across restarts.
Peerstore database (--p2p.peerstore.path)
The peerstore persists discovered peer information to speed up P2P bootstrapping after restarts.
Default location: opnode_peerstore_db
Set to memory to disable persistence (peers must be rediscovered on every restart).
Configuration options reference
The following sections provide detailed documentation for all available op-node configuration options, organized by functionality.L1 and L2 connection settings
Configure how op-node connects to L1 (Ethereum) and L2 (execution layer) endpoints.l1
Address of L1 User JSON-RPC endpoint to use (eth namespace required). The default value is"http://127.0.0.1:8545".
l1.beacon
Address of L1 Beacon-node HTTP endpoint to use.l1.beacon-fallbacks
Addresses of L1 Beacon-API compatible HTTP fallback endpoints. Used to fetch blob sidecars not available at the l1.beacon (e.g. expired blobs).l1.beacon-header
Optional HTTP header to add to all requests to the L1 Beacon endpoint. Format: ‘X-Key: Value’l1.beacon.fetch-all-sidecars
If true, all sidecars are fetched and filtered locally. Workaround for buggy Beacon nodes. The default value isfalse.
l1.beacon.ignore
When false, haltsop-node startup if the healthcheck to the Beacon-node endpoint fails. The default value is false.
l1.cache-size
Cache size for blocks, receipts and transactions. If this flag is set to 0, 3/2 of the sequencing window size is used (usually 2400). The default value of 900 (~3h of L1 blocks) is good for (high-throughput) networks that see frequent safe head increments. On (low-throughput) networks with infrequent safe head increments, it is recommended to set this value to 0, or a value that well covers the typical span between safe head increments. Note that higher values will cause significantly increased memory usage. The default value is900.
l1.epoch-poll-interval
Poll interval for retrieving new L1 epoch updates such as safe and finalized block changes. Disabled if 0 or negative. The default value is6m24s.
l1.http-poll-interval
Polling interval for latest-block subscription when using an HTTP RPC provider. Ignored for other types of RPC endpoints. The default value is12s.
l1.max-concurrency
Maximum number of concurrent RPC requests to make to the L1 RPC provider. The default value is10.
l1.rpc-max-batch-size
Maximum number of RPC requests to bundle, e.g., during L1 blocks receipt fetching. The L1 RPC rate limit counts this as N items, but allows it to burst at once. The default value is20.
l1.rpc-rate-limit
Optional self-imposed global rate-limit on L1 RPC requests, specified in requests / second. Disabled if set to 0. The default value is0.
l1.rpckind
The kind of RPC provider, used to inform optimal transactions receipts fetching, and thus reduce costs. Valid options: alchemy, quicknode, infura, parity,nethermind, debug_geth, erigon, basic, any, standard. The default value is standard.
For details on additional values, see RPC Receipts.
l1.runtime-config-reload-interval
Poll interval for reloading the runtime config, useful when config events are not being picked up. Disabled if 0 or negative. The default value is10m0s.
l1.trustrpc
Trust the L1 RPC, sync faster at risk of malicious/buggy RPC providing bad or inconsistent L1 data. The default value isfalse.
If you’re running an Erigon Ethereum execution client for your L1 provider you will need to include
--l1.trustrpc. At the time of writing,
Erigon doesn’t support the eth_getProof that we prefer to use to load L1 data for some processing in op-node. The trustrpc flag makes it
use something else that erigon supports, but the op-node can’t verify for correctness.l2
Address of L2 Engine JSON-RPC endpoints to use (engine and eth namespace required). This is referred to asauthrpc by Geth and Reth.
l2.engine-rpc-timeout
L2 engine client rpc timeout. The default value is10s.
l2.jwt-secret
Path to JWT secret key. Keys are 32 bytes, hex encoded in a file. A new key will be generated if left empty.l2.enginekind
The kind of engine client, used to control the behavior of optimism in respect to different types of engine clients. Valid options:geth, reth, erigon. The default value is geth.
Network selection and rollup configuration
Configure which OP Stack network to connect to and manage rollup-specific settings.network
Predefined network selection. Available networks: arena-z-mainnet, arena-z-sepolia, automata-mainnet, base-devnet-0-sepolia-dev-0, base-mainnet, base-sepolia, bob-mainnet, camp-sepolia, creator-chain-testnet-sepolia, cyber-mainnet, cyber-sepolia, ethernity-mainnet, ethernity-sepolia, fraxtal-mainnet, funki-mainnet, funki-sepolia, hashkeychain-mainnet, ink-mainnet, ink-sepolia, lisk-mainnet, lisk-sepolia, lyra-mainnet, metal-mainnet, metal-sepolia, mint-mainnet, mode-mainnet, mode-sepolia, op-mainnet, op-sepolia, oplabs-devnet-0-sepolia-dev-0, orderly-mainnet, ozean-sepolia, pivotal-sepolia, polynomial-mainnet, race-mainnet, race-sepolia, radius_testnet-sepolia, redstone-mainnet, rehearsal-0-bn-0-rehearsal-0-bn, rehearsal-0-bn-1-rehearsal-0-bn, settlus-mainnet-mainnet, settlus-sepolia-sepolia, shape-mainnet, shape-sepolia, silent-data-mainnet-mainnet, snax-mainnet, soneium-mainnet, soneium-minato-sepolia, sseed-mainnet, swan-mainnet, swell-mainnet, tbn-mainnet, tbn-sepolia, unichain-mainnet, unichain-sepolia, worldchain-mainnet, worldchain-sepolia, xterio-eth-mainnet, zora-mainnet, zora-sepolia.rollup.config
Rollup chain parameters.rollup.halt
Opt-in option to halt on incompatible protocol version requirements of the given level (major/minor/patch/none), as signaled onchain in L1.rollup.l1-chain-config
Path to .json file with the chain configuration for the L1, either in the direct format or genesis.json format (i.e. embedded under the .config property). Not necessary / will be ignored if using Ethereum mainnet or Sepolia as an L1.rollup.load-protocol-versions
Load protocol versions from the superchain L1 ProtocolVersions contract (if available), and report in logs and metrics. Default isfalse.
syncmode
Blockchain sync mode. Options are “consensus-layer” or “execution-layer”. The default value isconsensus-layer.
Fork overrides
Manually override fork activation timestamps for testing or custom deployments.override.canyon
Manually specify the Canyon fork timestamp, overriding the bundled setting. The default value is0.
override.delta
Manually specify the Delta fork timestamp, overriding the bundled setting. The default value is0.
override.ecotone
Manually specify the ecotone fork timestamp, overriding the bundled setting. The default value is0.
override.fjord
Manually specify the fjord fork timestamp, overriding the bundled setting. The default value is0.
override.granite
Manually specify the granite fork timestamp, overriding the bundled setting. The default value is0.
override.holocene
Manually specify the holocene fork timestamp, overriding the bundled setting. The default value is0.
override.isthmus
Manually specify the isthmus fork timestamp, overriding the bundled setting. The default value is0.
override.interop
Manually specify the Interop fork timestamp, overriding the bundled setting. The default value is0.
override.jovian
Manually specify the Jovian fork timestamp, overriding the bundled setting. The default value is0.
override.pectrablobschedule
Manually specify the PectraBlobSchedule fork timestamp, overriding the bundled setting. The default value is0.
Logging configuration
Control log output format, level, and color.log.color
Color the log output if in terminal mode. The default value isfalse.
log.format
Format the log output. Supported formats: ‘text’, ‘terminal’, ‘logfmt’, ‘json’, ‘json-pretty’. The default value istext.
log.level
The lowest log level that will be output. The default value isinfo.
log.pid
Show pid in the log. The default value isfalse.
Logging and RPC
Configure RPC API endpoints and admin functionality.rpc.addr
RPC listening address. Default is"0.0.0.0".
rpc.admin-state
File path used to persist state changes made via the admin API so they persist across restarts. Disabled if not set.rpc.enable-admin
Enable the admin API (experimental). Default isfalse.
rpc.port
RPC listening port. Default is9545.
Metrics and profiling
Enable observability through metrics and performance profiling.metrics.addr
Metrics listening address. The default value is"0.0.0.0".
metrics.enabled
Enable the metrics server. The default value isfalse.
metrics.port
Metrics listening port. The default value is7300.
pprof.addr
pprof listening address. Default is"0.0.0.0".
pprof.enabled
Enable the pprof server. Default isfalse.
pprof.path
pprof file path. If it is a directory, the path is {dir}/{profileType}.profpprof.port
pprof listening port. Default is6060.
pprof.type
pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, allocsP2P networking
Configure peer-to-peer networking, discovery, and connection management.p2p.advertise.ip
The IP address to advertise in Discv5, put into the ENR of the node. This may also be a hostname/domain name to resolve to an IP.p2p.advertise.tcp
The TCP port to advertise in Discv5, put into the ENR of the node. Set to p2p.listen.tcp value if 0. The default value is0.
p2p.advertise.udp
The UDP port to advertise in Discv5 as a fallback if not determined by Discv5, put into the ENR of the node. Set to p2p.listen.udp value if 0. The default value is0.
p2p.ban.duration
The duration that peers are banned for. The default value is1h0m0s.
p2p.ban.peers
Enables peer banning. The default value istrue.
p2p.ban.threshold
The minimum score below which peers are disconnected and banned. The default value is-100.
p2p.bootnodes
Comma-separated base64-format ENR list. Bootnodes to start discovering other node records from.p2p.disable
Completely disable the P2P stack. The default value isfalse.
p2p.discovery.path
Enables persistent storage of discovered ENRs in a database to recover from a restart without bootstrapping the discovery process again. Set to ‘memory’ to never persist the peerstore. The default value isopnode_discovery_db.
p2p.gossip.timestamp.threshold
Threshold for rejecting gossip messages with payload timestamps older than this duration. The default value is1m0s.
p2p.listen.ip
Specifies the IP to bind LibP2P and Discv5 to. The default value is0.0.0.0.
p2p.listen.tcp
Defines the TCP port to bind LibP2P to. Any available system port if set to 0. The default value is9222.
p2p.listen.udp
Sets the UDP port to bind Discv5 to. It will be the same as the TCP port if left at 0. The default value is0.
p2p.nat
Enables NAT traversal with PMP/UPNP devices to learn external IP. The default value isfalse.
p2p.netrestrict
Specifies a comma-separated list of CIDR masks. P2P will only try to connect on these networks.p2p.no-discovery
Disables Discv5 (node discovery). The default value isfalse.
p2p.peers.grace
Determines the grace period to keep a newly connected peer around, if it is not misbehaving. The default value is30s.
p2p.peers.hi
Sets the high-tide peer count. The node starts pruning peer connections slowly after reaching this number. The default value is30.
p2p.peers.lo
Determines the low-tide peer count. The node actively searches for new peer connections if below this amount. The default value is20.
p2p.peerstore.path
Specifies the Peerstore database location. Persisted peerstores help recover peers after restarts. Set to ‘memory’ to never persist the peerstore. Warning: a copy of the priv network key of the local peer will be persisted here. The default value is"opnode_peerstore_db".
p2p.priv.path
Defines the file path for reading the hex-encoded 32-byte private key for the peer ID. Created if not already exists. Important for maintaining the same network identity after restarting. The default value is"opnode_p2p_priv.txt".
p2p.scoring
Sets the peer scoring strategy for the P2P stack. Options include ‘none’ or ‘light’. The default value is"light".
p2p.sequencer.key
Hex-encoded private key for signing off on p2p application messages as sequencer.p2p.static
Comma-separated multiaddr-format(an unsigned address, containing: IP, TCP port, PeerID) peer list. Static connections to make and maintain, these peers will be regarded as trusted. Addresses of the local peer are ignored. Duplicate/Alternative addresses for the same peer all apply, but only a single connection per peer is maintained.p2p.sync.onlyreqtostatic
RestrictsRequestL2Range sync requests to static peers only. Useful for enforcing trusted peer sync. When enabled, non-static peers are skipped during sync. Default is false.
p2p.sync.req-resp
Enables P2P req-resp alternative sync method, on both server and client side. Default istrue.
Sequencer options
Configuration for running op-node as a sequencer.sequencer.enabled
Enable sequencing of new L2 blocks. A separate batch submitter has to be deployed to publish the data for verifiers. Default isfalse.
sequencer.l1-confs
Number of L1 blocks to keep distance from the L1 head as a sequencer for picking an L1 origin. Default is4.
The maximum value for
sequencer.l1-confs cannot exceed the sequencer drift, currently set to 30 minutes (1800 seconds or 150 blocks). Setting a value higher than this limit will prevent the sequencer from producing blocks within the sequence window.sequencer.max-safe-lag
Maximum number of L2 blocks for restricting the distance between L2 safe and unsafe. Disabled if 0. Default is0.
sequencer.recover
Forces the sequencer to strictly prepare the next L1 origin and create empty L2 blocks. Default isfalse.
sequencer.stopped
Initialize the sequencer in a stopped state. The sequencer can be started using the admin_startSequencer RPC. Default isfalse.
Verifier options
Configuration for running op-node as a verifier (replica node).verifier.l1-confs
Number of L1 blocks to keep distance from the L1 head before deriving L2 data from. Reorgs are supported, but may be slow to perform. Default is0.
While
verifier.l1-confs has no strict limit, it’s recommended to keep this value within 12-13 minutes (typically 10-20 blocks) for optimal performance. Exceeding this range may impact the verifier’s data processing efficiency.Conductor mode
Options for running op-node in conductor mode (for conductor-enabled chains).conductor.enabled
Enable the conductor service. The default value isfalse.
conductor.rpc
Conductor service rpc endpoint. The default value ishttp://127.0.0.1:8547.
conductor.rpc-timeout
Conductor service rpc timeout. The default value is1s.
Database and state persistence
Configure persistent storage for node state and snapshot data.safedb.path
File path used to persist safe head update data. Disabled if not set.snapshotlog.file
Path to the snapshot log file.Signer configuration
Options for configuring an external signer for P2P messages.signer.address
Address the signer is signing requests for.signer.endpoint
Signer endpoint the client will connect to.signer.header
Headers to pass to the remote signer. Formatkey=value. Value can contain any character allowed in a HTTP header. When using env vars, split with commas. When using flags one key value pair per flag.
signer.tls.ca
TLS ca cert path. The default value is"tls/ca.crt".
signer.tls.cert
TLS cert path. The default value is"tls/tls.crt".
signer.tls.enabled
Enable or disable TLS client authentication for the signer. The default value istrue.
signer.tls.key
TLS key path. The default value is"tls/tls.key".
Alt-DA (Experimental)
Alt-DA Mode is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing, and may have bugs or other issues.
altda.enabled
Enable Alt-DA mode. The default value isfalse.
altda.da-server
HTTP address of a DA Server.altda.da-service
Use DA service type where commitments are generated by Alt-DA server. The default value isfalse.
altda.get-timeout
Timeout for get requests. 0 means no timeout. The default value is0s.
altda.max-concurrent-da-requests
Maximum number of concurrent requests to the DA server. The default value is1.
altda.put-timeout
Timeout for put requests. 0 means no timeout. The default value is0s.
altda.verify-on-read
Verify input data matches the commitments from the DA storage service. The default value istrue.
Interop (Super Experimental)
Interop is a highly experimental feature. Use with caution in production environments.
interop.dependency-set
Dependency-set configuration, point at JSON file.interop.jwt-secret
Interop RPC server authentication. Path to JWT secret key. Keys are 32 bytes, hex encoded in a file. A new key will be generated if the file is empty. Applies only to Interop-enabled networks.interop.rpc.addr
Interop Websocket-only RPC listening address, for supervisor service to manage syncing of the op-node. Applies only to Interop-enabled networks. Optional, disabled if left empty. Do not enable if you do not run a supervisor service.interop.rpc.port
Interop RPC listening port, to serve supervisor syncing. Applies only to Interop-enabled networks. The default value is9645.
Experimental and miscellaneous
Additional experimental features and utility flags.experimental.sequencer-api
Enables experimental test sequencer RPC functionality. The default value isfalse.
fetch-withdrawal-root-from-state
Read withdrawal_storage_root (aka message passer storage root) from state trie (via execution layer) instead of the block header. Restores pre-Isthmus behavior, requires an archive EL client. The default value isfalse.
General options
Help and version information.—help, -h
Show help. The default value isfalse.
—version, -v
Nodes built from source do not output the correct version numbers that are reported on
the GitHub release page.
false.
Node log levels
Node log levels determine the verbosity of log messages, allowing operators to filter messages based on importance and detail. The log levels for theop-node (used in Optimism)
are as follows:
- Silent (0): No log messages are displayed. This level is rarely used as it provides no feedback on the node’s status.
- Error (1): Only error messages are displayed. Use this level to focus on critical issues that need immediate attention.
- Warn (2): Displays error messages and warnings. This level helps to identify potential problems that might not be immediately critical but require attention.
- Info (3): Displays error messages, warnings, and normal activity logs. This is the default level and provides a balanced view of the node’s operations without being too verbose.
- Debug (4): All info-level messages plus additional debugging information. Use this level when troubleshooting issues or developing the node software.
- Detail (5): The most verbose level, including detailed debugging information and low-level system operations. This level generates a large amount of log data and is typically used only for in-depth troubleshooting.
--log.level flag when running the op-node command. For
example, to set the log level to debug: