Skip to content

Commit

Permalink
WEB3-148: Update alloy-trie requirement from 0.5 to 0.6 (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Sep 30, 2024
1 parent db93c1b commit cfeb381
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ alloy-sol-types = { version = "0.8" }

# Alloy host dependencies
alloy = { version = "0.3" }
alloy-trie = { version = "0.5" }
alloy-trie = { version = "0.6" }

# Beacon chain support
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus.git", rev = "cf3c404043230559660810bc0c9d6d5a8498d819" }
Expand Down
18 changes: 16 additions & 2 deletions steel/src/mpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,14 @@ mod tests {
let exp_hash = hasher.root();

// reconstruct the trie from the RLP encoded proofs and verify the root hash
let mpt = MerkleTrie::from_rlp_nodes(hasher.take_proofs().into_values()).unwrap();
let mpt = MerkleTrie::from_rlp_nodes(
hasher
.take_proof_nodes()
.into_nodes_sorted()
.into_iter()
.map(|node| node.1),
)
.unwrap();
assert!(mpt.0.rlp_encoded().len() < 32);
assert_eq!(mpt.hash_slow(), exp_hash);
}
Expand All @@ -534,7 +541,14 @@ mod tests {
let exp_hash = hasher.root();

// reconstruct the trie from the RLP encoded proofs and verify the root hash
let mpt = MerkleTrie::from_rlp_nodes(hasher.take_proofs().into_values()).unwrap();
let mpt = MerkleTrie::from_rlp_nodes(
hasher
.take_proof_nodes()
.into_nodes_sorted()
.into_iter()
.map(|node| node.1),
)
.unwrap();
assert_eq!(mpt.hash_slow(), exp_hash);
}

Expand Down

0 comments on commit cfeb381

Please sign in to comment.