Serialize a bank to a snapshot
Make a snapshot archive out of the snapshot package
Utility for parsing out bank specific information from a snapshot archive. This utility can be used
to parse out bank specific information like the leader schedule, epoch schedule, etc.
Rebuild bank from snapshot archives. This function searches full_snapshot_archives_dir
and incremental_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.
This is only called from ledger-tool or tests. Warping is a special case as well.
Convenience function to create an incremental snapshot archive out of any Bank, regardless of
state. The Bank will be frozen during the process.
This is only called from ledger-tool or tests. Warping is a special case as well.
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 the bank snapshots in a directory
Get the bank snapshots in a directory
Get the bank snapshots in a directory
Get a list of the full snapshot archives from a directory
Get the bank snapshot with the highest slot 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 from 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
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
.