Enable snap sync for your node
For snap sync, all
op-geth nodes should expose port 30303 TCP and 30303 UDP to easily find other op-geth nodes to sync from.- If you set the port with
--discovery.port, then you must open the port specified for UDP. - If you set
--port, then you must open the port specified for TCP. - The only exception is for sequencers and transaction ingress nodes.
op-node tells the execution client to snap sync, and then the execution client downloads the state at tip and once complete switches to inserting blocks one by one.
Configuration for op-node
The
--syncmode=execution-layer flag is not the default setting and must be explicitly configured.Configuration for op-geth
The
--syncmode=snap flag is the default setting for op-geth.Configuration for Nethermind
Enabling execution layer sync for alternative clients
In addition toop-geth and Nethermind, you can enable execution-layer syncing with alternative execution clients such as reth and op-erigon.
Unlike op-geth and Nethermind, reth and op-erigon are designed as archive nodes, which means they require the complete history of the chain.
However, these clients can still retrieve block headers and data through the P2P network instead of deriving each individual block, resulting in a faster initial sync.
For OP Mainnet, the bedrock datadir is required. For other OP Stack networks, no datadir is required.
Configuration for op-node with reth
Set the following flags onop-node:
Both flags are not the default setting and must be explicitly configured on
op-node.Configuration for op-node with op-erigon
Set the following flags onop-node:
Both flags are not the default setting and must be explicitly configured on
op-node.Alternative sync modes
Snap sync is the recommended sync mode for most node operators, but other sync modes are available depending on your needs:- Archive nodes: If you need to maintain complete historical state, see the Archive Node guide
- Consensus-layer sync: For independent L1-based verification without P2P networking, see the Consensus-Layer Sync reference
Next steps
- See the Snap Sync feature page for an overview of how snap sync works and its benefits.
- See the Node Configuration guide for additional explanation or customization.
- To enable snap sync for your chain, see Using Snap Sync for Chain Operators.
- If you experience difficulty at any stage of this process, please reach out to developer support.