Inclusion proof
The RFC 9162 proof that one leaf belongs to a Merkle tree, the object {leaf_index, path, tree_size} with at most 32 path hashes; a Truestamp proof walks one from the subject's hash to its block's merkle_root and one per commitment from the block hash to its epoch's merkle_root.
Overview
An inclusion proof lets a verifier walk from one Merkle leaf up to its tree’s root without any of the other leaves. Truestamp’s is the object of RFC 9162, {"leaf_index", "path", "tree_size"}: the leaf’s position counted from 0, the audit path of sibling hashes from the leaf up to the root, at most 32 of them, and the number of leaves. Every proof of a leaf’s place in the tree above it is an inclusion_proof, at both levels of a Truestamp proof bundle: the subject’s walks its recomputed item_hash or observation_hash to the block record’s merkle_root, and each commitment entry’s walks the recomputed block_hash to its epoch record’s merkle_root. The walk alone does not fix the tree’s size, so a verifier also checks that tree_size equals the leaf_count of the record it walks into. Proofs and the APIs carry this JSON form, and Truestamp stores each proof in a fixed-width binary form of 16 + 32 x d bytes for a path of d hashes, the two converting losslessly. The walk is in Merkle inclusion proofs and the two encodings in Merkle proof encodings.