New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth/downloader: implement beacon sync #23982
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0f78c4f
eth/downloader: implement beacon sync
karalabe 0d22561
eth/downloader: fix a crash if the beacon chain is reduced in length
karalabe 786308d
eth/downloader: fix beacon sync start/stop thrashing data race
karalabe 49b7771
eth/downloader: use a non-nil pivot even in degenerate sync requests
karalabe 3f16180
eth/downloader: don't touch internal state on beacon Head retrieval
karalabe 1c5a698
eth/downloader: fix spelling mistakes
karalabe 344d81a
eth/downloader: fix some typos
karalabe 944e050
eth: integrate legacy/beacon sync switchover and UX
karalabe 0a50767
eth: handle UX wise being stuck on post-merge TTD
karalabe f6a427d
core, eth: integrate the beacon client with the beacon sync
karalabe ba9e91f
eth/catalyst: make some warning messages nicer
karalabe ef4d465
eth/downloader: remove Ethereum 1&2 notions in favor of merge
karalabe 92020c9
core/beacon, eth: clean up engine API returns a bit
karalabe 46c0e3f
eth/downloader: add skeleton extension tests
karalabe 336b5df
eth/catalyst: keep non-kiln spec, handle mining on ttd
karalabe 38114ad
eth/downloader: add beacon header retrieval tests
karalabe 71861e7
eth: fixed spelling, commented failing tests out
MariusVanDerWijden 7ac324b
eth/downloader: review fixes
karalabe 4f2c4e9
eth/downloader: drop peers failing to deliver beacon headers
karalabe 2cb92eb
core/rawdb: track beacon sync data in db inspect
karalabe bec4fd6
eth: fix review concerns
karalabe 7c12053
internal/web3ext: nit
karalabe File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's implemented here, the timeout is based on
ttl := s.peers.rates.TargetTimeout()
. So this might feasibly happen:5ms
.500ms
.100ms
for a delivery.Haven't checked if the numbers I made up make any sense, but you probably understand the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message rate tracker tries to track the median RTT across all peers. The timeout is the median RTT multiplied by some confidence number.
In your specific scenario, if you have one super fast peer and many laggy ones, the TTL will be the laggy value since that's the median. Even if your fast peer returns a bit slow once, it should still be fine.