paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.99k stars 1.21k forks source link

Per-thread overlay provider #12688

Open Rjected opened 2 days ago

Rjected commented 2 days ago

When computing the state root in parallel, we currently use the ConsistentViewProvider. When the persistence task is running, this would result in lots of failures due to the db moving. This is now expected, and if we have the following flow:

We can then use the overlay to create a provider that has a consistent view of the trie, even if the db moves while the provider is being used. This should then be used in the parallel root instead of the ConsistentViewProvider