Skip to content

Incremental Snapshots

Brooks Prumo edited this page Feb 10, 2022 · 8 revisions

Incremental Snapshots have been released, starting with v1.9.0! (Release notes here)

Overview

Incremental Snapshots are a means to speedup validator startup when needing to bootstrap and download snapshots. If a validator already has a full snapshot, it can download a smaller incremental snapshot instead. For more details about the design and implementation, refer to the github issue.

How to Enable

For v1.9

To enable incremental snapshots, add --incremental-snapshots to your validator args.

For v1.10 and later

Incremental snapshots are enabled by default. To disable, use --no-incremental-snapshots.

Configuration

There are a few knobs to can be tweaked. NOTE: This assumes --incremental-snapshots is set!

--full-snapshot-interval-slots

Set how frequently full snapshots are taken. It is recommended to leave this as the default (or, what the known validators are configured with). Must be a multiple of the incremental snapshots interval.

--incremental-snapshot-interval-slots

Set how frequently incremental snapshots are taken. Must be a multiple of the accounts hash interval.

--maximum-full-snapshots-to-retain

Set how many full snapshots to retain. Older snapshots are automatically removed as new snapshots are taken. Note, the oldest full snapshot is never removed.

--maximum-incremental-snapshots-to-retain

Set how many incremental snapshots to retain. Older snapshots are automatically removed as new snapshots are taken. Note, incremental snapshots are only retained for the newest full snapshot; once a new full snapshot is taken, all incremental snapshots based on older full snapshots are removed.

Best Practices

Use the same full snapshot interval as your known validators

Since downloading snapshots during bootstrap relies on matching snapshots from known validators, it is recommended to use the same full snapshot interval.

For example, if the known validators have a full snapshot at slot 700,000 and an incremental snapshot at slot 789,600, then you would need to already have a full snapshot for slot 700,000 in order to match-and-download the incremental snapshot at 789,600. (Otherwise you may end up downloading the full snapshot as well, which is the same behavior from before incremental snapshots.)

Troubleshooting

Q: Why am I downloading full snapshots all the time?

  • A0: Ensure you have v1.9 or later, and have enabled incremental snapshots (see How to Enable)
  • A1: Your full snapshot interval is different from the known validators (see Best Practices)
  • A2: The known validators have not yet enabled incremental snapshots, so there are none to download