Structs

A slot and the path to its bank snapshot

Enums

The different archive formats used for snapshots

Constants

Functions

Serialize a bank to a snapshot

Make a snapshot archive out of the snapshot package

Rebuild bank from snapshot archives. This function searches snapshot_archives_dir for the highest full snapshot and highest corresponding incremental snapshot, then rebuilds the bank.

Rebuild bank from snapshot archives. Handles either just a full snapshot, or both a full snapshot and an incremental snapshot.

Convenience function to create a full snapshot archive out of any Bank, regardless of state. The Bank will be frozen during the process.

Convenience function to create an incremental snapshot archive out of any Bank, regardless of state. The Bank will be frozen during the process.

Build the full snapshot archive path from its components: the snapshot archives directory, the snapshot slot, the accounts hash, and the archive format.

Build the incremental snapshot archive path from its components: the snapshot archives directory, the snapshot base slot, the snapshot slot, the accounts hash, and the archive format.

Get a list of bank snapshots in a directory

Get a list of the full snapshot archives in a directory

Get the bank snapshot with the highest slot in a directory

Get the path (and metadata) for the full snapshot archive with the highest slot in a directory

Get the highest slot of the full snapshot archives in a directory

Get the path for the incremental snapshot archive with the highest slot, for a given full snapshot slot, in a directory

Get the highest slot of the incremental snapshot archives in a directory, for a given full snapshot slot

Get a list of the incremental snapshot archives in a directory

Helper function to hold shared code to package, process, and archive full snapshots

Helper function to hold shared code to package, process, and archive incremental snapshots

Parse a full snapshot archive filename into its Slot, Hash, and Archive Format

Parse an incremental snapshot archive filename into its base Slot, actual Slot, Hash, and Archive Format

Get the &str from a &Path

Remove outdated bank snapshots

Remove the snapshot directory for this slot

If the validator halts in the middle of archive_snapshot_package(), the temporary staging directory won’t be cleaned up. Call this function to clean them up.

Gather the necessary elements for a snapshot of the given root_bank.

Type Definitions