From e1bfa5afcfd9c2ae9207ea846c96183403277ba4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 04:05:45 +0000 Subject: [PATCH 1/2] Update alloy-trie requirement from 0.5 to 0.6 Updates the requirements on [alloy-trie](https://github.com/alloy-rs/trie) to permit the latest version. - [Changelog](https://github.com/alloy-rs/trie/blob/main/CHANGELOG.md) - [Commits](https://github.com/alloy-rs/trie/compare/v0.5.0...v0.5.3) --- updated-dependencies: - dependency-name: alloy-trie dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cbbdf7db..37deac0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } From 13d53b0538bd6d747276ff56dd4a50646776a0d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Mon, 30 Sep 2024 22:17:18 +0200 Subject: [PATCH 2/2] update alloy-trie --- steel/src/mpt.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/steel/src/mpt.rs b/steel/src/mpt.rs index c7868176..9a6021c4 100644 --- a/steel/src/mpt.rs +++ b/steel/src/mpt.rs @@ -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); } @@ -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); }