Skip to main content

Module records

Module records 

Source
Expand description

Verifying what the server sends for a clone and a tail (SPEC-ENGINE §3.4.3, C0 2.0 section 6 records): the signed snapshot manifest, the segment record stream with its envelope Merkle root, and tail pages.

Nothing of a segment is imported unless its record count, seq run and envelope root all match the signed manifest. Inside a matching segment an event whose signature or body commitment fails is kept with sig_invalid and never folded.

Structs§

SegmentMeta
A manifest’s segment entry.
TailPage
One tail page (E4): verified events and where the next page starts.

Enums§

SegmentError
Why a segment is refused (refetched once, then segment_unavailable).

Constants§

SNAPSHOT_DOMAIN
Signature domain of a snapshot manifest.

Functions§

event_verifies
Check one received event: signature (by the caller’s signer rules, SPEC-ENGINE §3.3.5) and, when it carries a body, the body commitment keyed with the place key. true when it may fold.
import_segment
Verify a segment’s records against its manifest entry and turn them into events to store. Withheld stubs ({seq, withheld: true, leaf}) count for the root by their leaf and are not stored.
leaf
blake3(0x00 ‖ canonical_json(signed envelope)).
manifest_verifies
Whether manifest carries a valid signature of the Cloud snapshot key public_key whose key id it names.
root
The Merkle root over leaves in seq order: inner blake3(0x01 ‖ l ‖ r), an odd last node promoted unchanged.
segments
tail_page