title | lang | description |
---|---|---|
Using Snap Sync for Node Operators |
en-US |
Learn how to use and enable snap sync on your node. |
import { Callout, Steps } from 'nextra/components' import { Tabs } from 'nextra/components'
This guide reviews the optional feature of Snap Sync for node operators, including benefits and how to enable the feature.
Snap Sync significantly improves the experience of syncing an OP Stack node. Snap Sync is a native feature of go-ethereum that is now optionally enabled on op-node
& op-geth
.
Snap Sync works by downloading a snapshot of the state from other nodes on the network and is then able to start executing blocks from the completed state rather than having to re-execute every single block.
This means that performing a Snap Sync is significantly faster than performing a full sync.
- For OP Mainnet, node operators will be able to sync without having to download the bedrock datadir.
- This also enables nodes to join the network after Ecotone activates without requiring a blob archiver.
- Archive nodes are also fully supported.
Choose one of the following options to enable snap sync:
- Option 1: Snap sync, no required datadir on OP Mainnet. This is the recommended option because
op-node
tellsop-geth
to snap sync and thenop-geth
downloads the state at tip and once complete switches to inserting blocks one by one.
<Tabs items={['op-node', 'op-geth']}>
<Tabs.Tab>
shell --syncmode=execution-layer (not default)
</Tabs.Tab>
<Tabs.Tab>
shell --syncmode=snap (default)
</Tabs.Tab>
- Option 2: Archive sync with required datadir for OP Mainnet, but no required datadir for other OP Stack networks.
This option is faster for archive nodes than other options because
--syncmode=full
meansop-geth
executes every block in the chain.
<Tabs items={['op-node', 'op-geth']}>
<Tabs.Tab>
shell --syncmode=execution-layer (not default)
</Tabs.Tab>
<Tabs.Tab>
shell --syncmode=full (not default) --gcmode=archive (not default)
</Tabs.Tab>
- Option 3: Continue using current sync approach (before Ecotone) where
op-node
reads from L1 and inserts blocks intoop-geth
. This option might be preferred for decentralized developer groups who need to confirm everything on the chain.
<Tabs items={['op-node', 'op-geth']}>
<Tabs.Tab>
shell --syncmode=consensus-layer (default)
</Tabs.Tab>
<Tabs.Tab>
shell --syncmode=full (not default)
</Tabs.Tab>
- 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.