Use Latest state provider if possible in block_state_provider
#13848
Labels
A-db
Related to the database
A-execution
Related to the Execution and EVM
C-perf
A change motivated by improving speed, memory usage or disk footprint
Currently
block_state_provider
does the following, constructing a historical state provider based on the anchor hash:reth/crates/storage/provider/src/providers/blockchain_provider.rs
Line 141 in c1918d2
This means, that if there is an overlap of in-memory blocks and the DB, even if we could use the latest state provider for state, a historical state provider may be constructed.
This leads to some redundant I/O, a 25-35% hit on all storage reads whenever we've constructed a historical state provider. Specifically this is redundant
history_info
calls, that always hit theInPlainState | MaybeInPlainState
branch.We could instead:
BlockState
is a direct extension of the DB stateThe text was updated successfully, but these errors were encountered: