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:
collect in-memory trie updates and anchor block
open database tx
make reverts with tx up to anchor block
construct overlay with reverts + in-memory updates
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
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