Skip to main content

Crate spine

Crate spine 

Source
Expand description

spine — the Merkle Spine: the structural core.

The structural engine shared by every tree built above it, epoch-free and topology-agnostic: canonicalization (collapse + promotion, in mr), the perfect-subtree decomposition and grouping combinator (topology), the Hasher seam, the abstract inclusion verifier (proof pinned against a consumer-supplied skeleton, in proof), the LeafProof, the general structural Seal (peak storage), and the opaque metadata channel (Meta). It depends on nothing.

The spine carries no commitment topology: how perfect subtrees are bagged into one root, and what an inclusion proof points at, are owned by each consumer (the append-only log’s mountain range; the mutable tree’s rebalanced fold). The seam between them is the SkeletonStep interface — the consumer computes its concrete skeleton, the spine verifier pins a proof against it.

Activation, the committed epoch timeline, the null-run-extents, the binding root, and coupling are not here — they are the polydigest combinator’s facet, which lifts this structural engine across N algorithms over one shared data substrate. The spine names no epoch concept.

Re-exports§

pub use hasher::Hasher;
pub use mr::count_leaves;
pub use mr::evaluate;
pub use mr::nary_mr;
pub use mr::within_subtree_path;
pub use proof::InclusionProof;
pub use proof::ProofStep;
pub use proof::constant_time_eq;
pub use proof::reconstruct_inclusion_root;
pub use proof::verify_inclusion;
pub use proof::verify_inclusion_path_structure;
pub use subtree::Subtree;
pub use topology::ARITY_RANGE;
pub use topology::BagFn;
pub use topology::SkeletonFn;
pub use topology::SkeletonStep;
pub use topology::fold_frontier;
pub use topology::frontier_for_size;

Modules§

hasher
The Hasher seam — the multihash interface of the kernel.
mr
Merkle root and evaluation over the n-ary subtree, with canonicalization.
proof
Inclusion proof structures and the abstract verifier.
subtree
Subtree descriptor for structured appends.
topology
Shared k-ary structural primitives — the perfect-subtree decomposition and the generic grouping fold.

Structs§

LeafProof
A self-contained leaf proof: a leaf hash bound to its position, ready to verify against a trusted root and the structure’s skeleton.
Meta
Opaque, application-defined byte payload attached to a Merkle commitment.
RunExtent
One committed canonicalization run-extent: a contiguous collapse of arity^height consecutive leaves into a single subtree, beginning at leaf index left.
Seal
The general structural commitment lattice: a sealed, resumable frontier.

Enums§

Error
A spine construction error.

Functions§

null_digest
Dynamically generate a null digest constant using the hasher.

Type Aliases§

Result
A specialized Result alias for the spine.