diff --git a/Cargo.toml b/Cargo.toml index eb1d5880f1..7418f2d5af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -762,7 +762,7 @@ alloy-sol-types = { git = "https://github.com/SeismicSystems/seismic-alloy-core. alloy-sol-type-parser = { git = "https://github.com/SeismicSystems/seismic-alloy-core.git", rev = "bc4b5ed" } alloy-dyn-abi = { git = "https://github.com/SeismicSystems/seismic-alloy-core.git", rev = "bc4b5ed" } -alloy-trie = { git = "https://github.com/SeismicSystems/seismic-trie.git", rev = "417644c" } +alloy-trie = { git = "https://github.com/SeismicSystems/seismic-trie.git", rev = "3f094397e43290c077b6faaa35cfccd31cd38191" } # revm revm = { git = "https://github.com/SeismicSystems/seismic-revm.git", rev = "e7fa9fab"} diff --git a/crates/trie/sparse/src/trie.rs b/crates/trie/sparse/src/trie.rs index fed9093057..09aeeb570c 100644 --- a/crates/trie/sparse/src/trie.rs +++ b/crates/trie/sparse/src/trie.rs @@ -1512,7 +1512,14 @@ impl RevealedSparseTrie

{ self.prefix_set.insert(path.clone()); let existing = self.values.insert(path.clone(), value); if existing.is_some() { - // trie structure unchanged, return immediately + // Check if is_private flag changed and invalidate hash if so + if let Some(SparseNode::Leaf { is_private: ref mut existing_is_private, hash: ref mut existing_hash, .. }) = + self.nodes.values_mut().find(|node| matches!(node, SparseNode::Leaf { .. })) { + if *existing_is_private != is_private { + *existing_is_private = is_private; + *existing_hash = None; // Force hash recomputation + } + } return Ok(()); }