Expand description
Trie proofs and proof verification.
The Merkle Trie defined in NOMT is an authenticated data structure, which means that it permits efficient proving against the root. This module exposes types and functions necessary for handling these kinds of proofs.
Using the types and functions exposed from this module, you can verify the value of a single
key within the trie (PathProof), the values of multiple keys (MultiProof), or the result
of updating a trie with a set of changes (verify_update).
Structs§
- KeyOut
OfScope - An error type indicating that a key is out of scope of a path proof.
- Multi
Path Proof - This struct includes the terminal node and its depth
- Multi
Proof - A proof of multiple paths through the trie.
- Path
Proof - A proof of some particular path through the trie.
- Path
Update - An update to the node at some path.
- Verified
Multi Proof - A verified multi-proof.
- Verified
Path Proof - A verified path through the trie.
Enums§
- Multi
Proof Verification Error - Errors in multi-proof verification.
- Path
Proof Terminal - Wrapper for a terminal node, it will store the LeafData if it is a leaf node, and just the KeyPath to that terminal if it is a terminator node
- Path
Proof Verification Error - Errors in path proof verification.
- Verify
Update Error - Errors that can occur when verifying an update proof.
Functions§
- verify_
multi_ proof - Verify a multi-proof against an expected root. This ONLY checks the consistency of the trie.
- verify_
multi_ proof_ update - Verify an update operation against a verified multi-proof. This follows a similar algorithm to the multi-item update, but without altering any backing storage.
- verify_
update - Verify an update operation against the root node. This follows a similar algorithm to the multi-item update, but without altering any backing storage.