-
Notifications
You must be signed in to change notification settings - Fork 883
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
confirm pivot block - removed disconnect based on chain height estimate #6889
confirm pivot block - removed disconnect based on chain height estimate #6889
Conversation
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
|
|
@@ -74,7 +74,8 @@ public SyncTargetManager( | |||
protected CompletableFuture<Optional<EthPeer>> selectBestAvailableSyncTarget() { | |||
final BlockHeader pivotBlockHeader = fastSyncState.getPivotBlockHeader().get(); | |||
final EthPeers ethPeers = ethContext.getEthPeers(); | |||
final Optional<EthPeer> maybeBestPeer = ethPeers.bestPeerWithHeightEstimate(); | |||
// just use the default (merge) comparator | |||
final Optional<EthPeer> maybeBestPeer = ethPeers.bestPeer(); |
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.
I think this might be a step back thinking about PoS networks, no much use for the comparison using TTD since this is basically a constant after chain switches to PoS.
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.
I think it actually evaluates to the same thing in the end so I'm reverting this line change.
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
@@ -163,7 +163,7 @@ public void deleteFastSyncState() { | |||
protected FastSyncState updateMaxTrailingPeers(final FastSyncState state) { | |||
if (state.getPivotBlockNumber().isPresent()) { | |||
trailingPeerRequirements = | |||
Optional.of(new TrailingPeerRequirements(state.getPivotBlockNumber().getAsLong(), 0)); | |||
Optional.of(new TrailingPeerRequirements(state.getPivotBlockNumber().getAsLong(), 5)); |
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.
My suggestion is, we should probably eliminate this TrailingPeer validation (since there's no garantee that peers are going to have their chain height estimate up-to-date) but for test purpose we can easily skip the trailing validation by assigning Long.MAX_VALUE to the second param of the TrailingPeerRequirements constructor
…ectly disconnecting good peers Signed-off-by: Gabriel Fukushima <[email protected]>
…/besu into chain-height-estimate-tolerance
this has been incorporated into #6968 |
PR description
When choosing the "best" peer to try to confirm the pivot block
use the default comparator (TTD then chain height)effectively the sameFixed Issue(s)
Fixes #6887
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests