reth icon indicating copy to clipboard operation
reth copied to clipboard

Support queuing multi-block downloads and executing ranges of blocks after a forkchoice update

Open Rjected opened this issue 2 years ago • 1 comments

Describe the feature

Currently we only support queuing single block downloads via the FullBlockDownloader. With #3059 we will have a heuristic for the number of blocks that need to be downloaded and executed to validate a forkchoice update. This is done by first fetching the head or safe block hash, and comparing the block number with the latest valid finalized block.

Instead of downloading the missing blocks one-by-one, we should support requesting ranges of blocks, since #3059 will already use the block number range to determine whether or not we should run the pipeline. This is more efficient than traversing the missing parents one-by-one.

Additional context

No response

Rjected avatar Jun 13 '23 00:06 Rjected

we definitely need to do this, ideally if range is larger than x blocks, perhaps even as low as 4, but really depends on how fast we can execute them.

the responses need to be yielded with increasing block number so they can be appended to the chain. somewhat related: https://github.com/paradigmxyz/reth/pull/3276

mattsse avatar Jun 20 '23 15:06 mattsse

Closed in #3416

onbjerg avatar Jul 09 '23 17:07 onbjerg