-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve APIs for Tries in Runtime (#5756)
This is a refactor and improvement from: #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 <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
- Loading branch information
1 parent
df12fd3
commit 05b5fb2
Showing
8 changed files
with
930 additions
and
406 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Improve APIs for Tries in Runtime | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
This PR introduces a trait `ProvingTrie` which has all the function you need to use tries in the runtime. | ||
This trait includes the ability to create, query, and prove data in a trie. Another trait `ProofToHashes` | ||
allows developers to express the computational complexity of proof verification using the proof data. | ||
crates: | ||
- name: sp-runtime | ||
bump: major | ||
- name: frame-support | ||
bump: major |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.