pub struct SnapshotConfig {
pub enabled: bool,
pub url: Option<String>,
pub interval: Duration,
pub keep: usize,
pub snapshot_on_shutdown: bool,
pub min_mutations: u64,
pub max_resume_age_slots: u64,
pub ready_max_lag_slots: u64,
pub ready_max_hold: Duration,
pub legacy_bytecode_hashes: BTreeSet<String>,
}Expand description
Configuration for state snapshots. Disabled by default; enable via
ServerBuilder::snapshots(...) or ARETE_SNAPSHOT_* env vars.
Fields§
§enabled: boolMaster opt-in.
url: Option<String>Where blobs live: file:///var/lib/arete/snapshots, a plain path, or
(with the snapshot-object-store feature) s3:///gs:///az://.
interval: DurationPeriodic snapshot cadence.
keep: usizeRetained snapshots; older ones are pruned after each write.
snapshot_on_shutdown: boolTake a final snapshot on SIGTERM/SIGINT before exit.
min_mutations: u64Skip a periodic cycle when fewer batches were applied since the last snapshot (quiet stacks snapshot rarely).
max_resume_age_slots: u64If the watermark’s estimated lag is greater than this many slots, including lag at snapshot time plus file age, hydrate state but start the stream live instead of resuming from the watermark.
ready_max_lag_slots: u64/ready stays 503 after a watermark resume until the projector is
within this many slots of the observed tip…
ready_max_hold: Duration…or until this much time has passed (guards quiet stacks, where the watermark never advances because nothing happens on-chain).
legacy_bytecode_hashes: BTreeSet<String>Bytecode hashes from pre-contract snapshots that an operator has explicitly approved for one state-only migration. These snapshots are hydrated after structural state-id remapping and always start live.