Expand description
cmt — the Canonical Mutable Tree, the single-algorithm mutable tree
over the spine structural core.
CMT is the mutable peer of the append-only cml log:
both are built on the spine and neither depends on the other (the structural
currency between them is spine::Seal). Where CML optimizes an append-only
frontier and proves consistency, CMT lets interior cells change — so it keeps
no frontier and no consistency proofs (the frontier’s left-subtrees-sealed
assumption is unsound under mutation). It is positional and dense, sharing the
spine’s proof-spine index space, and supports:
- construct,
Cmt::set/Cmt::get; - inclusion proofs and non-membership (inclusion of the spine null constant via collapse);
- per-node multi-hash — a cell addressable under many algorithms — with retroactive
per-node algorithm addition at
O(log n)(Cmt::add_algorithm_at), the structural materialization of N per-algorithm roots (D11); - a one-way
Cmt::sealinto the general structuralspine::Seal(nounseal).
Epoch-free (D13). The CMT carries no committed timeline and no binding /
combined root. The cross-tree binding of its per-algorithm member roots is the
polydigest combinator’s facet, added as a wrapper over the structural Seal
(polydigest(cmt)); the CMT exposes each algorithm’s raw root and
member_roots, never a binding root.
Verification stays in the spine: a proof generated here is checked with
spine::verify_inclusion against an authenticated (index, tree_size, arity, root).
Re-exports§
pub use shape::rebalanced_bag;pub use shape::rebalanced_skeleton;
Modules§
- shape
- The proof-spine shape, materialized as an explicit positional tree.
Structs§
- Cmt
- The Canonical Mutable Tree over the Merkle Spine.
- Config
- Configuration for a
Cmt. - Leaf
Proof - A self-contained leaf proof: a leaf hash bound to its position, ready to verify against a trusted root and the structure’s skeleton.
- Proof
Step - A single level in a Merkle proof path.
- Seal
- The general structural commitment lattice: a sealed, resumable frontier.
Enums§
- Error
- A CMT construction or mutation error.
Traits§
- Hasher
- Hash operations required by the Merkle Spine.
Functions§
- verify_
inclusion - Verify an inclusion proof against a consumer-supplied skeleton.
Type Aliases§
- Result
- A specialized
Resultfor the mutable tree.