subtree

package
v0.20260720.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsistencyProof

func ConsistencyProof(start, end, treeSize int64, reader tlog.HashReader) ([]tlog.Hash, error)

ConsistencyProof returns SUBTREE_PROOF(start, end, D_n) for the tree of size treeSize, reading stored hashes through the provided reader, per the MTC draft section 4.4.1 Generating a Subtree Consistency Proof, detailed further in the draft's Appendix B.4. [start, end) must be a valid subtree with end <= treeSize.

func VerifyConsistency

func VerifyConsistency(start, end, n int64, proof []tlog.Hash, nodeHash, rootHash tlog.Hash) bool

VerifyConsistency reports whether proof shows that the subtree [start, end), whose hash is nodeHash, sits at those positions in the tree of size n with root rootHash. It follows the procedure in MTC draft section 4.4.3, detailed further in the draft's Appendix B.5.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL