Expand description
An append-only Merkle log over the deeds a store has issued, hashed as
RFC 9162 (doi:10.17487/RFC9162): leaf SHA-256(0x00 || entry), node
SHA-256(0x01 || left || right). Inclusion proofs catch a dropped deed;
consistency proofs catch a rewritten log. Signatures alone bind neither.
Gossip lives outside this file. Two consistent logs shown to two readers
both verify here.
Structs§
- Entry
- One entry: the deed’s content address and the instant it was logged.
- Head
- What a store publishes: how many entries it has, and the root over them.
Functions§
- consistency_
proof - The consistency proof that a tree of
oldleaves is a prefix of these, RFC 9162 section 2.1.4. The nodes recompute both roots; a rewritten log cannot produce a set that yields both.Nonewhenoldis zero or wider than the tree. - from_
hex - A 32 byte hash from the lower-case hex
hexwrites. Any other text yields nothing. - hex
- Hex, lower case, fixed width.
- inclusion_
proof - The audit path for the leaf at
index, RFC 9162 section 2.1.3: sibling subtree roots, innermost first. - leaf_
hash - Leaf hash,
SHA-256(0x00 || entry). - node_
hash - Interior hash,
SHA-256(0x01 || left || right). - root
- The Merkle root over
leaves, RFC 9162 section 2.1: the tree splits at the largest power of two below the width, which is the shape the proofs below are sound over. - verify_
consistency - Whether the tree of
oldleaves withold_rootis a prefix of the tree ofnewleaves withnew_root; both roots are recomputed fromnodes. - verify_
inclusion - Whether
leafsits atindexof a tree ofsizeleaves with that root.