Skip to main content

Module snapshot

Module snapshot 

Source

Structs§

Manifest
The sealed trailer: what the exporter stated about the rows, and what the receiver checks the spool against before applying any of them.
SnapshotHeader
The plain header line ahead of the sealed frames, so a receiver can name the epoch it needs before opening anything.
SnapshotKey
The snapshot subkey of one identity key epoch. Epoch 0 derives only the wire subkey, so its snapshot key is expanded from that one under a label of its own.
SnapshotWriter
Writes rows as sealed, compressed frames of up to FRAME_BYTES each.

Constants§

FRAME_BYTES
Uncompressed JSONL per frame: the exporter holds one frame and the channel’s few in memory, never the snapshot.
SNAPSHOT_FORMAT

Functions§

read_header
spool
Spools a snapshot stream to path, then checks it against its sealed manifest, so nothing is applied from a stream that was cut or altered and the exporter’s read transaction is pinned only for the transfer. The spool appears at path only once it checks out.
spool_rows
Every row of a verified spool, in order, one frame in memory at a time.
verify
Reads the spool’s header and manifest, checking every row frame’s hash and the frame count against the manifest; opens no row frame.
write_header