reth
reth copied to clipboard
Do not de-allocate space used by accounts sparse trie
trafficstars
Describe the feature
Currently, every time we have a new block, we create an empty SparseTrie for the accounts trie to reveal new proofs and apply updates in there.
After https://github.com/paradigmxyz/reth/pull/15637, still at least half of the time in reveal_account_proof is spent reserving the space for new nodes to insert
This can be optimized by not de-allocating the accounts trie https://github.com/paradigmxyz/reth/blob/ab85300ac35a57ca2d1f8fbc23aa29d6baee1376/crates/trie/sparse/src/state.rs#L28-L29 and instead just clear it and carry over to the next state root task invocation.
Additional context
No response