pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

p2p state diff sync: validate state diff trie for latest block only

Open CHr15F0x opened this issue 11 months ago • 0 comments

Investigate the following, based on @Mirko-von-Leipzig comment:

What do you think of having a separate stage just for state trie operations? As in, this stage just writes the state updates to disk; but doesn't compute the state trie?

This would have several benefits:

Better db throughput since we aren't touching trie data and state update data. A downside is we have to re-read this data for state trie info. Simpler and less code. Enables an optimisation for the state trie mode where we only care about the latest block. Instead of calculating the state trie for every block, and updating with every state diff, we can grab the latest values for each, which should be much faster.

CHr15F0x avatar Mar 11 '24 10:03 CHr15F0x