Skip to main content
This guide shows you how to enable and configure Snap Sync for your node. For an overview of how snap sync works and its benefits, see the Snap Sync feature page.

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.
Snap sync requires no datadir on OP Mainnet. With snap sync, 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

--syncmode=execution-layer
The --syncmode=execution-layer flag is not the default setting and must be explicitly configured.

Configuration for op-geth

--syncmode=snap
The --syncmode=snap flag is the default setting for op-geth.

Configuration for Nethermind

--config op-mainnet
--Sync.SnapSync=true
A single restart of Nethermind during Snap Sync may extend the sync time by up to 2 hours because Nethermind has to rebuild the caches by reading millions of values from the database.

Enabling execution layer sync for alternative clients

In addition to op-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 on op-node:
--syncmode=execution-layer
--l2.enginekind=reth
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 on op-node:
--syncmode=execution-layer
--l2.enginekind=erigon
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:

Next steps