Using and uploading snapshots
Overview
All nodes on the Aztec network must download and synchronize the blockchain state before they can operate. This guide covers different sync modes, including how to use snapshots for faster synchronization and how to create your own snapshots.
Understanding sync modes
Nodes can synchronize state in two ways:
- L1 sync: Queries the rollup and data availability layer for historical state directly from Layer 1
- Snapshot sync: Downloads pre-built state snapshots from a storage location for faster synchronization
Since Aztec uses blobs, syncing from L1 requires an archive node that stores complete blob history from Aztec's deployment. Snapshot sync is significantly faster, doesn't require archive nodes, and reduces load on L1 infrastructure, making it the recommended approach for most deployments.
Prerequisites
Before proceeding, you should:
- Have the Aztec node software installed
- Understand basic node operation
- For uploading snapshots: Have access to Google Cloud Storage with appropriate permissions
Using snapshots to sync your node
Configuring sync mode
Control how your node synchronizes using the --sync-mode
flag:
aztec start --node --sync-mode [MODE]
Available sync modes:
snapshot
: Downloads and uses a snapshot only if no local data exists (default behavior)force-snapshot
: Downloads and uses a snapshot even if local data exists, overwriting itl1
: Syncs directly from Layer 1 without using snapshots
Setting the snapshot source
By default, nodes use Aztec's official snapshot storage. To specify a custom snapshot location, use the --snapshots-url
flag:
aztec start --node --sync-mode snapshot --snapshots-url [BASE_URL]
The node searches for the snapshot index at:
[BASE_URL]/aztec-[L1_CHAIN_ID]-[VERSION]-[ROLLUP_ADDRESS]/index.json
Note: Currently, only Google Cloud Storage is supported for snapshots. URLs follow this format:
https://storage.googleapis.com/aztec-testnet/snapshots/