Conversation
4b1d9a7 to
33fe87b
Compare
| /// using the provided [`StateSource`]s. This avoids the tokio I/O | ||
| /// driver starvation deadlock that occurs when sync `DatabaseRef` calls | ||
| /// go through `block_in_place` + `Handle::block_on`. |
There was a problem hiding this comment.
Ohhh I see what the problem was. We were using sync db ops on an async backed db, leading to parked OS threads
There was a problem hiding this comment.
Yeah, that's it in a nutshell.
prestwich
left a comment
There was a problem hiding this comment.
our code is being colored in real time :/
| pub trait StateSource { | ||
| /// The error type for state lookups, usually a database error. | ||
| type Error: core::error::Error + 'static; | ||
| pub trait StateSource: Send + Sync { |
There was a problem hiding this comment.
this new bound is significant, as it prevents implementation for the signet-storage MDBX revm accessors
There was a problem hiding this comment.
Hmm - that's unfortunate indeed. I don't see a way round adding these bounds for now, since the crux of the fix here is to use async DBs for the preflight work.
I guess it's something we might need to revisit when we come to using signet-storage here?
dylanlott
left a comment
There was a problem hiding this comment.
Approving to unblock testing and debugging in the builder.
Let's make follow-up tickets to investigate possible solutions for the Async / Sync DB duplication and the function-coloring issues presented by new trait bounds.

Description
This updates
sim_roundto use async DB functions for the preflight checks.Without this, the tokio runtime would become deadlocked due to many calls to
block_in_place(|| handle.block_on(f)). See the related ticket for further info.Related Issue
Main fix for ENG-1944.
Testing