-
Notifications
You must be signed in to change notification settings - Fork 844
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
Fix ws halt #6981
Fix ws halt #6981
Conversation
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
…uilder as it's no longer needed Signed-off-by: Jason Frame <[email protected]>
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.
changes make sense. few nits on comments. could use a changelog entry.
...reum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/CompleteTaskStep.java
Outdated
Show resolved
Hide resolved
@@ -111,7 +110,9 @@ public SnapWorldDownloadState( | |||
this.blockchain = blockchain; | |||
this.snapSyncState = snapSyncState; | |||
this.metricsManager = metricsManager; | |||
this.blockObserverId = OptionalLong.empty(); | |||
this.blockObserverId = blockchain.observeBlockAdded(createBlockchainObserver()); |
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.
nit - can the comment below go before this line
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.
or delete - it's not really adding anything, the line of code says the same thing
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.
Done. Removed it. Don't think it was adding anything
@@ -441,8 +437,7 @@ public BlockAddedObserver createBlockchainObserver() { | |||
final boolean isBlockchainCaughtUp = | |||
snapSyncState.isWaitingBlockchain() && !pivotBlockSelector.isBlockchainBehind(); | |||
|
|||
if (isNewPivotBlockFound | |||
|| isBlockchainCaughtUp) { // restart heal if we found a new pivot block or if close to | |||
if (snapSyncState.isHealTrieInProgress() && (isNewPivotBlockFound || isBlockchainCaughtUp)) { | |||
// head again |
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 rest of this comment has been deleted - doesn't make sense by itself
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.
Done. Removed it, don't think we need the comment
…ync/snapsync/CompleteTaskStep.java Co-authored-by: Sally MacFarlane <[email protected]> Signed-off-by: Jason Frame <[email protected]>
Signed-off-by: Jason Frame <[email protected]>
Signed-off-by: Jason Frame <[email protected]>
) Signed-off-by: Karim Taam <[email protected]> Signed-off-by: Jason Frame <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]> Signed-off-by: Justin Florentine <[email protected]>
) Signed-off-by: Karim Taam <[email protected]> Signed-off-by: Jason Frame <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]>
) Signed-off-by: Karim Taam <[email protected]> Signed-off-by: Jason Frame <[email protected]> Co-authored-by: Sally MacFarlane <[email protected]> Signed-off-by: Justin Florentine <[email protected]>
PR description
PR created on behalf of @matkt https://github.com/matkt/besu/tree/feature/try-fix-ws-halt branch.
It fixes a possible halting of the worldstate download during the initial sync.
Testing
Fixed Issue(s)
Fixes #6908
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