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§
- Segment
Meta - A manifest’s segment entry.
- Tail
Page - One tail page (E4): verified events and where the next page starts.
Enums§
- Segment
Error - 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.
truewhen 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
manifestcarries a valid signature of the Cloud snapshot keypublic_keywhose 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