reth
reth copied to clipboard
Keep revealed sparse trie paths on trie level
Originally posted by @rkrasiuk in https://github.com/paradigmxyz/reth/pull/14370#discussion_r1949548483
Instead of keeping a list of revealed paths for account and storage tries separately in the SparseStateTrie struct https://github.com/paradigmxyz/reth/blob/477b747ef4e602af642d64ee778c5b4970685c16/crates/trie/sparse/src/state.rs#L29-L32 we can add a revealed field to the RevealedSparseTrie struct and check + track the revealed nodes in reveal_node https://github.com/paradigmxyz/reth/blob/477b747ef4e602af642d64ee778c5b4970685c16/crates/trie/sparse/src/trie.rs#L307