Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve APIs for Tries in Runtime #5756

Merged
merged 104 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
d50d5e4
initial ideas
shawntabrizi Mar 28, 2024
7f4422e
Update proving_trie.rs
shawntabrizi Mar 28, 2024
bdc0c84
create trait
shawntabrizi Mar 28, 2024
da385ab
use trait
shawntabrizi Mar 28, 2024
6ab4bfb
clean up trait and basic trie further
shawntabrizi Mar 28, 2024
1cfb29f
use trait in session historical
shawntabrizi Mar 28, 2024
3080c7b
fix api, add basic end to end test
shawntabrizi Mar 28, 2024
39b0fca
fix test
shawntabrizi Mar 28, 2024
599f576
Revert "use trait in session historical"
shawntabrizi Mar 28, 2024
a1c8886
Merge branch 'master' into shawntabrizi-proving-trie
shawntabrizi Mar 29, 2024
6bde2a3
Merge branch 'master' into shawntabrizi-proving-trie
Ank4n Apr 4, 2024
ead7951
Update substrate/primitives/runtime/src/proving_trie.rs
shawntabrizi Apr 4, 2024
0cac048
Merge branch 'master' into shawntabrizi-proving-trie
shawntabrizi Aug 15, 2024
acfe734
fix some feedback
shawntabrizi Aug 15, 2024
45f4287
update name
shawntabrizi Aug 15, 2024
efbe1c9
docs and multi value proof
shawntabrizi Aug 15, 2024
cfa62ce
improve test
shawntabrizi Aug 15, 2024
885fd94
add multi-value query test
shawntabrizi Aug 15, 2024
18a5c2e
Merge branch 'master' into shawntabrizi-proving-trie
shawntabrizi Aug 15, 2024
5e3e518
Create pr_3881.prdoc
shawntabrizi Aug 15, 2024
f35cacc
Merge branch 'shawntabrizi-proving-trie' of https://github.com/shawnt…
shawntabrizi Aug 15, 2024
e6c3759
use v1
shawntabrizi Aug 17, 2024
89679c3
Merge branch 'master' into shawntabrizi-proving-trie
shawntabrizi Aug 17, 2024
b40c96a
initial idea
shawntabrizi Aug 19, 2024
37052ee
some bs code to make things compile
shawntabrizi Aug 19, 2024
08f2b35
more stuff
shawntabrizi Aug 19, 2024
118a51c
complete logic
shawntabrizi Aug 19, 2024
44bc5bb
add verification check
shawntabrizi Aug 19, 2024
6e853ba
Merge branch 'master' into shawntabrizi-proving-trie
shawntabrizi Sep 2, 2024
89abcd0
initial idea
shawntabrizi Aug 19, 2024
8ad3381
some bs code to make things compile
shawntabrizi Aug 19, 2024
ae6fab7
more stuff
shawntabrizi Aug 19, 2024
115f89b
complete logic
shawntabrizi Aug 19, 2024
e5f0056
add verification check
shawntabrizi Aug 19, 2024
766790a
Merge branch 'shawntabrizi-assets-distribution' of https://github.com…
shawntabrizi Sep 2, 2024
b80589c
large refactor to proving trie
shawntabrizi Sep 3, 2024
83c66e7
fix tests
shawntabrizi Sep 3, 2024
5a4ff43
use basic proving trie
shawntabrizi Sep 3, 2024
394cc6f
Merge branch 'master' into shawntabrizi-assets-distribution
shawntabrizi Sep 3, 2024
84574e1
undo changes to binary merkle tree
shawntabrizi Sep 3, 2024
444b1f7
remove comment code
shawntabrizi Sep 3, 2024
f47b12e
make api more runtime friendly
shawntabrizi Sep 3, 2024
0305bc7
Merge remote-tracking branch 'upstream/master' into shawntabrizi-asse…
shawntabrizi Sep 4, 2024
ee90711
add basic test, and fix missing check for tracking distribution
shawntabrizi Sep 6, 2024
61162b6
introduce distribution info and active
shawntabrizi Sep 6, 2024
ae2ff18
introduce end_distribution
shawntabrizi Sep 6, 2024
fb63207
add clean distribution
shawntabrizi Sep 7, 2024
e713698
Merge branch 'master' into shawntabrizi-assets-distribution
shawntabrizi Sep 7, 2024
988b201
weight stuff
shawntabrizi Sep 7, 2024
233d339
temp fix for ui
shawntabrizi Sep 7, 2024
48fe9c6
Merge branch 'master' into pr/5400
shawntabrizi Sep 16, 2024
122f9cc
make work with binary tree
shawntabrizi Sep 17, 2024
59fdc63
initial stuff
shawntabrizi Sep 17, 2024
1f587ef
more
shawntabrizi Sep 17, 2024
dbb8368
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 17, 2024
f3a1af0
initial stuff
shawntabrizi Sep 17, 2024
daf8f50
more
shawntabrizi Sep 17, 2024
133a440
fix up binary tree
shawntabrizi Sep 17, 2024
813caae
refactor
shawntabrizi Sep 18, 2024
e270275
fixes
shawntabrizi Sep 18, 2024
a679bc9
update api for a single opaque blob
shawntabrizi Sep 18, 2024
be3e6c4
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 18, 2024
65d2b98
undo changes in assets
shawntabrizi Sep 18, 2024
ed30142
undo weight
shawntabrizi Sep 18, 2024
39e78d7
Update substrate/frame/support/src/traits/proving.rs
shawntabrizi Sep 18, 2024
aabaf76
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 19, 2024
450b6c6
consolidate apis
shawntabrizi Sep 19, 2024
d153c74
Merge branch 'shawntabrizi-binary-trie2' of https://github.com/parity…
shawntabrizi Sep 19, 2024
240a777
create a proving trie trait
shawntabrizi Sep 19, 2024
0f1e28b
implement trait for base2
shawntabrizi Sep 19, 2024
375dc12
fix tests
shawntabrizi Sep 19, 2024
99135e4
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 19, 2024
3ab4d94
update api to use references everywhere
shawntabrizi Sep 21, 2024
0c8d189
add `proof_size_to_hashes`
shawntabrizi Sep 21, 2024
cfa2a79
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 23, 2024
21a13c9
Create pr_5756.prdoc
shawntabrizi Sep 23, 2024
46ee7e0
undo changes to proving.rs
shawntabrizi Sep 23, 2024
d5bc012
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 24, 2024
39b666a
feedback
shawntabrizi Sep 24, 2024
5d05ef5
Merge branch 'shawntabrizi-binary-trie2' of https://github.com/parity…
shawntabrizi Sep 24, 2024
fd68b1b
create proof size to hashes trait
shawntabrizi Sep 24, 2024
2ad1bb2
use proof to hashes
shawntabrizi Sep 24, 2024
1b3db91
fix doc
shawntabrizi Sep 24, 2024
6e33438
Update pr_5756.prdoc
shawntabrizi Sep 24, 2024
245709e
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 25, 2024
74d9adf
Update base16.rs
shawntabrizi Sep 25, 2024
8135a69
Update prdoc/pr_5756.prdoc
shawntabrizi Sep 25, 2024
ae231f8
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 25, 2024
f1eb268
Update prdoc/pr_5756.prdoc
shawntabrizi Sep 26, 2024
02e396e
Update substrate/primitives/runtime/src/proving_trie/base2.rs
shawntabrizi Sep 26, 2024
18fb3d6
Update substrate/primitives/runtime/src/proving_trie/base2.rs
shawntabrizi Sep 26, 2024
a67c806
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 26, 2024
687f2b1
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 26, 2024
56cd568
fix test
shawntabrizi Sep 27, 2024
a25052c
Merge branch 'shawntabrizi-binary-trie2' of https://github.com/parity…
shawntabrizi Sep 27, 2024
43c93b6
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 27, 2024
fcb3714
fix docs
shawntabrizi Sep 27, 2024
fb90f63
Merge branch 'shawntabrizi-binary-trie2' of https://github.com/parity…
shawntabrizi Sep 27, 2024
fe68034
improve proof_to_hashes
shawntabrizi Sep 27, 2024
f40d0d0
impl prooftohashes for provers
shawntabrizi Sep 27, 2024
904fe42
Update pr_5756.prdoc
shawntabrizi Sep 27, 2024
bf128aa
Update Cargo.toml
shawntabrizi Sep 28, 2024
c8066ce
Merge branch 'shawntabrizi-binary-trie2' of https://github.com/parity…
shawntabrizi Sep 28, 2024
a4efeef
Merge branch 'master' into shawntabrizi-binary-trie2
shawntabrizi Sep 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions prdoc/pr_5756.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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
2 changes: 2 additions & 0 deletions substrate/primitives/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sp-trie = { workspace = true }
sp-weights = { workspace = true }
docify = { workspace = true }
tracing = { workspace = true, features = ["log"], default-features = false }
binary-merkle-tree = { workspace = true }

simple-mermaid = { version = "0.1.1", optional = true }

Expand Down Expand Up @@ -73,6 +74,7 @@ std = [
"sp-trie/std",
"sp-weights/std",
"tracing/std",
"binary-merkle-tree/std",
]

# Serde support without relying on std features.
Expand Down
Loading
Loading