Improve APIs for Tries in Runtime (#5756)
This is a refactor and improvement from: https://github.com/paritytech/polkadot-sdk/pull/3881 - `sp_runtime::proving_trie` now exposes a `BasicProvingTrie` for both `base2` and `base16`. - APIs for `base16` are more focused on single value proofs, also aligning their APIs with the `base2` trie - A `ProvingTrie` trait is included which wraps both the `base2` and `base16` trie, and exposes all APIs needed for an end to end scenario. - A `ProofToHashes` trait is exposed which can allow us to write proper benchmarks for the merkle trie. --------- Co-authored-by:Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by:
Adrian Catangiu <adrian@parity.io>
Showing
- Cargo.lock 1 addition, 0 deletionsCargo.lock
- prdoc/pr_5756.prdoc 16 additions, 0 deletionsprdoc/pr_5756.prdoc
- substrate/frame/support/src/traits/proving.rs 109 additions, 15 deletionssubstrate/frame/support/src/traits/proving.rs
- substrate/primitives/runtime/Cargo.toml 2 additions, 0 deletionssubstrate/primitives/runtime/Cargo.toml
- substrate/primitives/runtime/src/proving_trie/base16.rs 327 additions, 0 deletionssubstrate/primitives/runtime/src/proving_trie/base16.rs
- substrate/primitives/runtime/src/proving_trie/base2.rs 288 additions, 0 deletionssubstrate/primitives/runtime/src/proving_trie/base2.rs
- substrate/primitives/runtime/src/proving_trie/mod.rs 187 additions, 0 deletionssubstrate/primitives/runtime/src/proving_trie/mod.rs
Please register or sign in to comment