penumbra_sdk_tct

Module validate

Source
Expand description

Validation checks to ensure that Trees are well-formed.

Structs§

IndexMalformed
The index for the tree contained at least one error.
InvalidCachedHash
An mismatch between a cached hash and the hash it ought to have been.
InvalidCachedHashes
The tree contained at least one internal cached hash that was incorrect.
InvalidForgotten
The tree contained at least one discrepancy in the internal forgotten versions of its nodes.
InvalidForgottenVersion
A mismatch between the expected maximum forgotten version and the actual one.
InvalidWitnesses
At least one proof generated by the tree failed to verify against the root.

Enums§

IndexError
An error occurred when verifying the tree’s index.
WitnessError
An error occurred when verifying the tree’s contained witnesses.

Functions§

all_proofs
Verify that every witnessed commitment can be used to generate a proof of inclusion which is valid with respect to the current root.
cached_hashes
Verify that every internally cached hash matches what it should be, by re-hashing all of them.
forgotten
Verify that the internal forgotten versions are consistent throughout the tree.
index
Verify that the inner index of the tree is correct with respect to the tree structure itself.