Module smoldot::trie::prefix_proof
source · Expand description
Scanning, through trie proofs, the list of all keys that share a certain prefix.
This module is a helper whose objective is to find out the list of all keys that start with a certain prefix by performing storage proofs.
The total number of storage proofs required is equal to the maximum depth of the tree below
the requested prefix, plus one. For example, if a tree has the nodes [1, 5]
, [1, 5, 8, 9]
,
and [1, 5, 8, 9, 2]
, then four queries are necessary to find all the keys whose prefix
is [1]
.
Structs§
- Configuration to pass to
prefix_scan
. - Scan of a prefix in progress.
Enums§
- Possible error returned by
PrefixScan::resume_all_keys
orPrefixScan::resume_partial
. - Outcome of calling
PrefixScan::resume_all_keys
orPrefixScan::resume_partial
. - Storage value of a trie entry. See
ResumeOutcome::Success::entries
.
Functions§
- Start a new scanning process.