Skip to content

Commit

Permalink
Creating sub-tries now never hashes leaves
Browse files Browse the repository at this point in the history
- Plonky2 expects (not sure if it's always) leaves to never be hashed
  that it traverses down to, even if there isn't a read/write on the
  leaf itself. Note however that it is fine to hash any nodes above the
  leaf
  • Loading branch information
BGluth committed Mar 1, 2024
1 parent 3fb99c7 commit a5a3a40
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mpt_trie/src/trie_subsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,7 @@ fn mark_nodes_that_are_needed<N: PartialTrie>(
}
}
TrackedNodeIntern::Leaf => {
let (k, _) = trie.info.get_leaf_nibbles_and_value_expected();
if k == curr_nibbles {
trie.info.touched = true;
}
trie.info.touched = true;
}
}

Expand Down

0 comments on commit a5a3a40

Please sign in to comment.