Expand description
Memory-first persistence of network-learned state.
The engine’s tables are the truth; a host flushes sealed snapshots of them to a PersistedStore and seeds the tables from it at the next boot; destination identities deliberately retain RNS’s historical known_destinations filename and their existing Prns region tag.
Config-derived state (held identities, registered destinations, group keys) is never snapshotted — the identity vault and the host recipe re-supply it at boot.
Modules§
- envelope
- The sealed frame every snapshot travels in: magic, version, region tag, payload length, payload, CRC-32. A load is untrusted input, so truncation, cross-region mixups, and bit rot each refuse by name before any payload parse.
- reticulum_
directory
Structs§
- File
Store - Persisted
Destination Identity Rows - Persisted
Route Rows - Yields rows in stored order; the first malformed row poisons the iterator, and payload bytes past the declared row count are refused rather than ignored.
- Persisted
Self Ratchets - Fixed-size secrets let the whole payload validate at open, so the secret iterator is infallible.
- Persisted
Tunnel Rows - Fixed-size rows let the whole payload validate at open, so iteration is infallible: a truncated row and bytes past the declared count are both refused before the first row is yielded.
- Snapshot
Fingerprint - The checksum a sealed snapshot already carries, reborrowed as its change fingerprint: two seals of identical payloads carry identical fingerprints, so a flusher can skip rewriting a region whose fingerprint matches its last flush — no second hash pass. A changed payload whose CRC-32 collides with the previous one (odds 2^-32 per flush) skips one write; the next real change heals it.
Enums§
- Destination
Identities Snapshot Write Error - File
Store Error - Removal
- Routing
Table Snapshot Write Error - Snapshot
Open Error - Snapshot
Read Error - Snapshot
Region SelfRatchetsblobs carry secrets, so they ride the identity vault rather than aPersistedStore— the region tag still seals them against cross-region mixups.- Snapshot
Seal Error
Constants§
Traits§
- Persisted
Store - Where snapshots sleep between boots. The engine’s tables stay the truth: a host flushes sealed snapshots here and reads them back at the next boot to seed the tables.
Functions§
- destination_
identities_ snapshot_ len - maximum_
persisted_ route_ row_ wire_ len - maximum_
route_ upsert_ payload_ len - open_
snapshot - persisted_
destination_ identity_ wire_ len - persisted_
route_ row_ wire_ len - read_
destination_ identities_ snapshot - read_
routing_ table_ snapshot - read_
self_ ratchets_ snapshot - read_
timebase_ snapshot - read_
tunnels_ snapshot - routing_
table_ snapshot_ len - seal_
snapshot - seal_
snapshot_ in_ place - Seals a payload the caller already wrote at
out[SNAPSHOT_HEADER_LEN..SNAPSHOT_HEADER_LEN + payload_len], sparing a large payload the staging copyseal_snapshottakes. - self_
ratchets_ snapshot_ len - snapshot_
fingerprint - tunnels_
snapshot_ len - write_
destination_ identities_ snapshot - write_
routing_ table_ snapshot - write_
self_ ratchets_ snapshot - write_
timebase_ snapshot - write_
tunnels_ snapshot