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

feat(rpc): storage proofs for snos and v0.8.0 #292

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
historical
  • Loading branch information
cchudant committed Oct 23, 2024
commit 52a92078e234783ee5e69a8fb82bf404db20e7ab
15 changes: 8 additions & 7 deletions Cargo.lock

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

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ license = "Apache-2.0"
[workspace.dependencies]
rocksdb = { version = "0.22", features = [
# "multi-threaded-cf",
] }
# ] }
], git = "https://github.com/madara-alliance/rust-rocksdb", branch = "read-options-set-raw-snapshot" }
librocksdb-sys = { version = "0.17.0+9.0.0", git = "https://github.com/madara-alliance/rust-rocksdb", branch = "read-options-set-raw-snapshot" }

# Bonsai trie dependencies
bonsai-trie = { default-features = false, path = "../bonsai-trie", features = [
Expand Down Expand Up @@ -165,6 +167,10 @@ rand = "0.8"
reqwest = { version = "0.12", features = ["json"] }
rstest = "0.18"
serde = { version = "1.0", default-features = false, features = ["std"] }
serde_with = { version = "2.3.2", default-features = false, features = [
"alloc",
"macros",
] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
serde_yaml = { version = "0.9.34" }
thiserror = "1.0"
Expand Down
3 changes: 1 addition & 2 deletions crates/client/block_import/src/pre_validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@ fn compute_merkle_root<H: StarkHash + Send + Sync>(values: &[Felt]) -> Felt {
let config = bonsai_trie::BonsaiStorageConfig::default();
let bonsai_db = bonsai_trie::databases::HashMapDb::<bonsai_trie::id::BasicId>::default();
let mut bonsai_storage =
bonsai_trie::BonsaiStorage::<_, _, H>::new(bonsai_db, config, /* max tree height */ 64)
.expect("Failed to create bonsai storage");
bonsai_trie::BonsaiStorage::<_, _, H>::new(bonsai_db, config, /* max tree height */ 64);

values.iter().enumerate().for_each(|(id, value)| {
let key = BitVec::from_vec(id.to_be_bytes().to_vec());
Expand Down
1 change: 1 addition & 0 deletions crates/client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ starknet_api = { workspace = true }
# Other
anyhow.workspace = true
bincode = { workspace = true }
librocksdb-sys = { workspace = true }
log = { workspace = true, default-features = true }
rayon = { workspace = true }
rocksdb.workspace = true
Expand Down
Loading