You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add TrieNode trait and related functionality (#1363)
`TrieNode` is a generic trait that abstracts over the behavior of nodes
in a fixed-arity radix trie. This trait allows for different structures
to represent tries while enabling similar operations on them.
`TrieNode` is merkle-aware, meaning it can represent nodes that are a
mix of locally described children or children referenced by only their
hash. This is accomplished through `TrieEdgeState` and is used later in
proof verification.
The `HashedTrieNode` trait is for post-hashed nodes and is distinctly
different from the hash described on `TrieNode`. This trait is intended
to represent the computed hash of the node itself; whereas, the hash
accessed via `TrieNode` is the hash of a child node as seen from its
parent. While they are usually the same, they can differ during
intermediate states of a trie or during proof verification when some
information is incomplete.
`KeyValueTrieRoot` is an implementation of `TrieNode` that only
represents a key-value store and is not merkleized. This is really a
separate change and is a component of proof verification but is also
needed here as it is used to test and verify the iterator.
0 commit comments