besu
besu copied to clipboard
fix chain download halt
PR description
In some cases a syncing Besu node stopped downloading the chain data. The reason for that was that sometimes peers that were selected to download headers that are needed to allow the parallel download of the next batch of headers only returned one header instead of 200 headers. There was a mechanism that restarted the pipeline for the chain download, but if the same peer was selected to do that initial download the same would happen again. In some cases that happened for a long time, making it noticeable, but it turned out that this happens for short periods of time as well (still slowing down the chain download process). This PR adds a check that disconnects the peer only returning one block to make sure that a different peer is selected for the next restart of the pipeline.
Fixed Issue(s)
#6884
great find. We recently discovered that the geth snap sync pipeline does something very similar.
closing since this got merged into a different PR (already in)