pub struct SnapshotHeader {
pub format_version: u32,
pub bytecode_hash: String,
pub state_contract: Option<SnapshotContract>,
pub projection_contract: Option<SnapshotContract>,
pub program_ids: Vec<String>,
pub resume_watermark: u64,
pub observed_slot: u64,
pub created_at_epoch_ms: u64,
pub entry_counts: BTreeMap<String, u64>,
pub trigger: Option<SnapshotTrigger>,
}Expand description
Plain-JSON metadata used to validate a snapshot before decompressing it.
Fields§
§format_version: u32arete_interpreter::snapshot::SNAPSHOT_FORMAT_VERSION at write time.
bytecode_hash: StringFingerprint of the compiled MultiEntityBytecode. A mismatch means the
stack’s logic changed; the snapshot is discarded (cold start).
state_contract: Option<SnapshotContract>Durable entity structure, independent of handler opcode ordering. Absent on snapshots written before contract-aware restore.
projection_contract: Option<SnapshotContract>Runtime view/cache structure. Kept separate so a future migration can make an explicit decision about rebuilding projections.
program_ids: Vec<String>§resume_watermark: u64Highest slot among mutation batches the projector had applied when the
VM was dumped. Safe from_slot resume point.
observed_slot: u64Slot-subscription tip at dump time (diagnostics / staleness clamping).
created_at_epoch_ms: u64§entry_counts: BTreeMap<String, u64>Entity-name -> row count, for logging and debugging.
trigger: Option<SnapshotTrigger>What wrote this snapshot. A shutdown snapshot is taken at a consistency cut with nothing in flight, so its offsets are exactly what was published; a periodic one can be behind by up to the write interval. Absent in snapshots written before the distinction mattered, which are treated as the unclean case.