2021-07-01 08:55:26 -05:00
|
|
|
use crate::snapshot_utils::ArchiveFormat;
|
|
|
|
use crate::snapshot_utils::SnapshotVersion;
|
|
|
|
use solana_sdk::clock::Slot;
|
2021-08-31 22:03:19 -05:00
|
|
|
use std::path::PathBuf;
|
2021-07-01 08:55:26 -05:00
|
|
|
|
|
|
|
/// Snapshot configuration and runtime information
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub struct SnapshotConfig {
|
2021-08-04 14:40:20 -05:00
|
|
|
/// Generate a new full snapshot archive every this many slots
|
|
|
|
pub full_snapshot_archive_interval_slots: Slot,
|
2021-07-01 08:55:26 -05:00
|
|
|
|
2021-08-04 14:40:20 -05:00
|
|
|
/// Generate a new incremental snapshot archive every this many slots
|
|
|
|
pub incremental_snapshot_archive_interval_slots: Slot,
|
|
|
|
|
2021-08-21 15:41:03 -05:00
|
|
|
/// Path to the directory where snapshot archives are stored
|
|
|
|
pub snapshot_archives_dir: PathBuf,
|
2021-07-01 08:55:26 -05:00
|
|
|
|
2021-08-21 15:41:03 -05:00
|
|
|
/// Path to the directory where bank snapshots are stored
|
|
|
|
pub bank_snapshots_dir: PathBuf,
|
2021-07-01 08:55:26 -05:00
|
|
|
|
|
|
|
/// The archive format to use for snapshots
|
|
|
|
pub archive_format: ArchiveFormat,
|
|
|
|
|
|
|
|
/// Snapshot version to generate
|
|
|
|
pub snapshot_version: SnapshotVersion,
|
|
|
|
|
2021-08-04 14:40:20 -05:00
|
|
|
/// Maximum number of full snapshot archives to retain
|
2021-09-03 11:28:10 -05:00
|
|
|
pub maximum_full_snapshot_archives_to_retain: usize,
|
2021-09-03 15:21:32 -05:00
|
|
|
|
|
|
|
/// Maximum number of incremental snapshot archives to retain
|
|
|
|
/// NOTE: Incremental snapshots will only be kept for the latest full snapshot
|
|
|
|
pub maximum_incremental_snapshot_archives_to_retain: usize,
|
2021-07-01 08:55:26 -05:00
|
|
|
}
|