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

Rename arse_merkle_tree to sparse_merkle_tree #2095

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ark-bls12-381 = {version = "0.3"}
ark-serialize = {version = "0.3"}
ark-std = "0.3.0"
# branch = "bat/arse-merkle-tree"
arse-merkle-tree = {package = "sparse-merkle-tree", git = "https://github.com/heliaxdev/sparse-merkle-tree", rev = "df7ec062e7c40d5e76b136064e9aaf8bd2490750", default-features = false, features = ["std", "borsh"]}
sparse-merkle-tree = {package = "sparse-merkle-tree", git = "https://github.com/heliaxdev/sparse-merkle-tree", rev = "df7ec062e7c40d5e76b136064e9aaf8bd2490750", default-features = false, features = ["std", "borsh"]}
assert_cmd = "1.0.7"
assert_matches = "1.5.0"
async-trait = {version = "0.1.51"}
Expand Down
2 changes: 1 addition & 1 deletion apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namada_sdk = {path = "../sdk", default-features = false, features = ["wasm-runti
namada_test_utils = {path = "../test_utils", optional = true}
ark-serialize.workspace = true
ark-std.workspace = true
arse-merkle-tree = { workspace = true, features = ["blake2b"] }
sparse-merkle-tree = { workspace = true, features = ["blake2b"] }
assert_matches.workspace = true
async-trait.workspace = true
base64.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions apps/src/lib/node/ledger/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ mod rocksdb;

use std::fmt;

use arse_merkle_tree::blake2b::Blake2bHasher;
use arse_merkle_tree::traits::Hasher;
use arse_merkle_tree::H256;
use blake2b_rs::{Blake2b, Blake2bBuilder};
use namada::ledger::storage::traits::StorageHasher;
use namada::ledger::storage::Storage;
use sparse_merkle_tree::blake2b::Blake2bHasher;
use sparse_merkle_tree::traits::Hasher;
use sparse_merkle_tree::H256;

#[derive(Default)]
pub struct PersistentStorageHasher(Blake2bHasher);
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namada_macros = {path = "../macros"}
ark-bls12-381.workspace = true
ark-ec = {version = "0.3", optional = true}
ark-serialize.workspace = true
arse-merkle-tree.workspace = true
sparse-merkle-tree.workspace = true
bech32.workspace = true
borsh.workspace = true
borsh-ext.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions core/src/ledger/storage/ics23_specs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! A module that contains

use arse_merkle_tree::H256;
use ics23::{HashOp, LeafOp, LengthOp, ProofSpec};
use sparse_merkle_tree::H256;

use super::traits::StorageHasher;

Expand Down Expand Up @@ -47,7 +47,7 @@ pub fn ibc_leaf_spec<H: StorageHasher>() -> LeafOp {
/// Get the proof specs for ibc
#[allow(dead_code)]
pub fn ibc_proof_specs<H: StorageHasher>() -> Vec<ProofSpec> {
let spec = arse_merkle_tree::proof_ics23::get_spec(H::hash_op());
let spec = sparse_merkle_tree::proof_ics23::get_spec(H::hash_op());
let sub_tree_spec = ProofSpec {
leaf_spec: Some(ibc_leaf_spec::<H>()),
..spec.clone()
Expand All @@ -62,7 +62,7 @@ pub fn ibc_proof_specs<H: StorageHasher>() -> Vec<ProofSpec> {
/// Get the proof specs
#[allow(dead_code)]
pub fn proof_specs<H: StorageHasher>() -> Vec<ProofSpec> {
let spec = arse_merkle_tree::proof_ics23::get_spec(H::hash_op());
let spec = sparse_merkle_tree::proof_ics23::get_spec(H::hash_op());
let sub_tree_spec = ProofSpec {
leaf_spec: Some(leaf_spec::<H>()),
..spec.clone()
Expand Down
10 changes: 5 additions & 5 deletions core/src/ledger/storage/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
use std::fmt;
use std::str::FromStr;

use arse_merkle_tree::default_store::DefaultStore;
use arse_merkle_tree::error::Error as MtError;
use arse_merkle_tree::{
Hash as SmtHash, Key as TreeKey, SparseMerkleTree as ArseMerkleTree, H256,
};
use borsh::{BorshDeserialize, BorshSerialize};
use borsh_ext::BorshSerializeExt;
use ics23::commitment_proof::Proof as Ics23Proof;
use ics23::{CommitmentProof, ExistenceProof, NonExistenceProof};
use sparse_merkle_tree::default_store::DefaultStore;
use sparse_merkle_tree::error::Error as MtError;
use sparse_merkle_tree::{
Hash as SmtHash, Key as TreeKey, SparseMerkleTree as ArseMerkleTree, H256,
};
use thiserror::Error;

use super::traits::{StorageHasher, SubTreeRead, SubTreeWrite};
Expand Down
4 changes: 2 additions & 2 deletions core/src/ledger/storage/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use std::convert::TryInto;
use std::fmt;

use arse_merkle_tree::traits::{Hasher, Value};
use arse_merkle_tree::{Key as TreeKey, H256};
use borsh::BorshDeserialize;
use borsh_ext::BorshSerializeExt;
use ics23::commitment_proof::Proof as Ics23Proof;
use ics23::{CommitmentProof, ExistenceProof};
use sha2::{Digest, Sha256};
use sparse_merkle_tree::traits::{Hasher, Value};
use sparse_merkle_tree::{Key as TreeKey, H256};
use tiny_keccak::Hasher as KHasher;

use super::ics23_specs;
Expand Down
2 changes: 1 addition & 1 deletion core/src/types/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ use std::num::ParseIntError;
use std::ops::{Add, AddAssign, Deref, Div, Drop, Mul, Rem, Sub};
use std::str::FromStr;

use arse_merkle_tree::InternalKey;
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
use borsh_ext::BorshSerializeExt;
use data_encoding::{BASE32HEX_NOPAD, HEXUPPER};
use ics23::CommitmentProof;
use index_set::vec::VecIndexSet;
use serde::{Deserialize, Serialize};
use sparse_merkle_tree::InternalKey;
use thiserror::Error;

use super::key::common;
Expand Down
Loading