Skip to content
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

post-merge sync and peering fix #4116

Merged
merged 4 commits into from
Jul 18, 2022

Conversation

garyschulte
Copy link
Contributor

PR description

addresses two sources of problems when syncing a post-merge network:

  • adds a merge-specific 'best peer' comparator rather than the PoW heaviest chain comparator. This resolves a bug where besu would order its peers incorrectly and report that it did not have any peers with sufficient chain height: No sync target with sufficient chain height, waiting for peers: {}

  • ensures 'fast' syncs (snap, checkpoint, fast) set the syncState as having reached TTD to satisfy preconditions for backward sync capability. This fixes a 'stuck' issue where a fast sync would complete and catch up to a post-merge finalized block, but backward sync was not able to backfill from head back to the finalized block, and besu would just sit at its final fast sync pivot block.

Fixed Issue(s)

#3956
#3329

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte requested a review from jflo July 16, 2022 08:44
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte merged commit e48b73b into hyperledger:main Jul 18, 2022
@garyschulte garyschulte deleted the feature/bws-best-peer branch August 3, 2022 23:19
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* add a merge-specific definiton of bestPeer and the supporting plumbing

Signed-off-by: garyschulte <garyschulte@gmail.com>

* set reached TTD when finishing a fast sync if appropriate

Signed-off-by: garyschulte <garyschulte@gmail.com>

* spdx header

Signed-off-by: garyschulte <garyschulte@gmail.com>

* fix BetterSyncTargetEvaluatorTest tests

Signed-off-by: garyschulte <garyschulte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants