Expand description
The single-algorithm canonical-log engine over the spine.
A AlgView is one algorithm’s continuation state — its hasher, its
committed epoch intervals, and its frontier stack — and the free functions
here are the structural operations over it: the base-k frontier carry, the
member-root fold, inclusion/consistency proof generation, and the historical
root reconstructions. Every operation that touches stored bytes reads them
through a borrowed NodeReader; the engine never owns the store, so the
polydigest combinator can drive N views over one shared substrate
without duplicating leaf data (D14). The engine names no epoch concept: a
view’s epoch intervals are read locally only to project a coordinate’s
null/active value, never to bind a cross-tree timeline.
Structs§
- AlgView
- One algorithm’s single-tree continuation state: its hasher, committed epoch intervals, and frontier stack. This is the per-algorithm frontier only (D14) — the shared leaf data lives once in the combinator’s store, never here.
Enums§
- LogKind
- Whether log-level appends are flat leaf appends or subtree appends.
Traits§
- Node
Reader - A borrowed read substrate the single-algorithm engine folds over.
Functions§
- carry
- One step of the base-k frontier carry for a single algorithm view.
- compute_
root - Compute the member root from an algorithm’s in-memory frontier — the MMR backward-bag of its frontier peaks under its own hash.
- consistency_
proof - Generate a consistency proof between
old_sizeandnew_sizefor the algorithmview. ReturnsNonewhen the request is out of range. - frontier_
peaks - Gather an algorithm’s frontier peaks at
size— the digests of the perfect k-ary subtreesfrontier_for_sizenames, the structural snapshot facet aspine::Sealfreezes. Each peak is the algorithm’s null constant for a coordinate whose range carries no active leaf. - get_
node_ hash - Retrieve a node hash from the read substrate, or return the algorithm’s null constant if the coordinate’s range carries no active leaf.
- inclusion_
proof - Generate an inclusion proof for
indexin a tree of sizetree_sizefor the algorithmview, reading nodes throughreader. ReturnsNonewhen out of range ortree_sizeexceeds the algorithm’s committed size. - leaf_
proof - Produce a self-contained
spine::LeafProofforindexin a tree of sizetree_size. ReturnsNonewhen no inclusion proof exists. - peak_at
- The materialized digest of the frontier peak at coordinate
(left, height)— one perfect k-ary subtree root of the frontier. Returns the algorithm’s null constant for a coordinate whose range carries no active leaf. - reconstruct_
subtree_ root - Recursively resolve a subtree root over the read substrate and collect the
mixed boundary nodes that must be persisted (used when reopening a frozen
algorithm’s frontier). Returns
(root, mixed_nodes)wheremixed_nodesare(left, height, hash)triples. - reconstruct_
view - Reconstruct an algorithm’s frontier view from the read substrate at
global_size. The hasher and committedepochsare supplied by the combinator (which owns the timeline); the frontier peaks are read back. - root_
for_ at - Retrieve the raw member root for the algorithm at a historical tree size.
- validate_
epochs - Validate an algorithm’s committed epoch intervals against the global size.
Type Aliases§
- Read
Result - The
ResultaNodeReaderread yields: a valueTor the backend’s own error. Aliased so the trait’simpl Futurereturn types stay readable.