-
Notifications
You must be signed in to change notification settings - Fork 863
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
Restore updating chain head and finalized block during backward sync #4718
Conversation
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
# Conflicts: # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncStep.java # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/ForwardSyncStep.java
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
…into bwsync-retry-switching-peer
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
…s set" This reverts commit f05d1fb. Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[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.
looks ok to me - I'm assuming you have tested it out on a mainnet node?
Tested on testnets, mainnet node testing is ongoing since it takes longer, and will only merge after I get all the results |
It could happens that CL sends new payload out of order, creating a temporary gap in the chain, this could cause to redownload some block headers that are already present, and create glitches in the progession log. This changes, just check if the headers are already present before trying to download them. Signed-off-by: Fabio Di Fabio <[email protected]>
Tests on mainnet went fine, just found and commited an optimization for some edge cases |
Signed-off-by: Fabio Di Fabio <[email protected]>
…yperledger#4718) Signed-off-by: Fabio Di Fabio <[email protected]> Signed-off-by: Sally MacFarlane <[email protected]>
…yperledger#4718) Signed-off-by: Fabio Di Fabio <[email protected]>
PR description
Updating chain head and updating the finalized block during backward sync was wrongly removed during the removal of the finalized block rule, this PR restore it and also complete the removal of the remaining dead code that was meant to manage the finalized rule, plus some renaming to improve semantic and log improvements.
The update of the finalized block, is now done by the
MergeCoordinator
after the backward sync is done, because it has access to correctly set it into theMergeContext
, while before it was only setting the finalized in the blockchain store. This means that the hashs of the finalized blocks are seen during the sync are kept in memory until the backwards is done, but given the small size of the hashes, this is not a concern in terms of memory usage, while setting the finalized block is a huge benefit in terms of perfomance since the check that a block is descendant of finalized is quicker when we have a fresh finalized block set instead of an old one.Fixed Issue(s)
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog