currently, pruning data and engine message handling are mutually exclusive because we can't handle them concurrently due to exclusive db lock.
rn we're dropping messages in edge cases, which is not ideal.
we expect the pruner to be active for at most a few 100ms, so we should be able to delay engine message processing by buffering them in a Vecdeque and popping them in poll loop:
we can change this to, draining the incoming messages and storing them in a vecque temporarily, and proceed to pop from the vecdque once we're ready to handle them
Describe the feature
currently, pruning data and engine message handling are mutually exclusive because we can't handle them concurrently due to exclusive db lock.
rn we're dropping messages in edge cases, which is not ideal. we expect the pruner to be active for at most a few 100ms, so we should be able to delay engine message processing by buffering them in a Vecdeque and popping them in poll loop:
https://github.com/paradigmxyz/reth/blob/a8bbab2470c08140f10d327989a1ac3122ca2211/crates/consensus/beacon/src/engine/mod.rs#L1870-L1870
we can change this to, draining the incoming messages and storing them in a vecque temporarily, and proceed to pop from the vecdque once we're ready to handle them
Additional context
No response