Beacon sync reorg headers download processing#3359
Merged
Conversation
why With slow peer management, the last remaining sync peer is never zombified if it is *slow* but delivers some data. This was implemented for the blocks download only, now extended to headers download.
why Headers download and stashing on header chain cache is now updated after how it is done for blocks (which was originally re-modelled somehow after the headers download in PR #3306.) Apart from a code cleanup, the main change is that each queued record will now hold only a single sync peer response (previously this was a list of several concatenated responses.)
why
This restriction is a legacy construct which was used for
+ allowing to run on a single peer for testing
+ implicitly restrict the header and block queues when the size
was restricted by a high-water-mark rather than a strict upper
bound.
why This reduces some some need for in-memory cache space. When downloading 22.6m headers from `mainnet` with download request size 1024 one can make it in just under a hour on a well exposed site (so that enough peers are available.) Reducing the request size to 800 one gets just some minutes over an hour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.