Skip to content

Improve APIs for Tries in Runtime#5756

Merged
shawntabrizi merged 104 commits intomasterfrom
shawntabrizi-binary-trie2
Sep 30, 2024
Merged

Improve APIs for Tries in Runtime#5756
shawntabrizi merged 104 commits intomasterfrom
shawntabrizi-binary-trie2

Conversation

@shawntabrizi
Copy link
Copy Markdown
Member

@shawntabrizi shawntabrizi commented Sep 18, 2024

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.

@shawntabrizi shawntabrizi added this pull request to the merge queue Sep 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 29, 2024
@shawntabrizi shawntabrizi added this pull request to the merge queue Sep 29, 2024
Merged via the queue into master with commit 05b5fb2 Sep 30, 2024
@shawntabrizi shawntabrizi deleted the shawntabrizi-binary-trie2 branch September 30, 2024 00:13
paritytech-ci pushed a commit that referenced this pull request Oct 1, 2024
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 <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T1-FRAME This PR/Issue is related to core FRAME, the framework.

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants