[Merged by Bors] - Fix post-merge checkpoint sync#3065
Closed
paulhauner wants to merge 1 commit intosigp:unstablefrom
Closed
[Merged by Bors] - Fix post-merge checkpoint sync#3065paulhauner wants to merge 1 commit intosigp:unstablefrom
paulhauner wants to merge 1 commit intosigp:unstablefrom
Conversation
michaelsproul
approved these changes
Mar 10, 2022
Member
michaelsproul
left a comment
There was a problem hiding this comment.
Looks good from a code PoV, although I haven't actually tried to run it 😅
Happy to merge once someone vouches that checkpoint sync works now on merge-devnet-5
Member
Author
|
Proof! |
Member
Author
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2022
## Issue Addressed This address an issue which was preventing checkpoint-sync. When the node starts from checkpoint sync, the head block and the finalized block are the same value. We did not respect this when sending a `forkchoiceUpdated` (fcU) call to the EL and were expecting fork choice to hold the *finalized ancestor of the head* and returning an error when it didn't. This PR uses *only fork choice* for sending fcU updates. This is actually quite nice and avoids some atomicity issues between `chain.canonical_head` and `chain.fork_choice`. Now, whenever `chain.fork_choice.get_head` returns a value we also cache the values required for the next fcU call. ## TODO - [x] ~~Blocked on #3043~~ - [x] Ensure there isn't a warn message at startup.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue Addressed
This address an issue which was preventing checkpoint-sync.
When the node starts from checkpoint sync, the head block and the finalized block are the same value. We did not respect this when sending a
forkchoiceUpdated(fcU) call to the EL and were expecting fork choice to hold the finalized ancestor of the head and returning an error when it didn't.This PR uses only fork choice for sending fcU updates. This is actually quite nice and avoids some atomicity issues between
chain.canonical_headandchain.fork_choice. Now, wheneverchain.fork_choice.get_headreturns a value we also cache the values required for the next fcU call.TODO
Blocked on [Merged by Bors] - Prepare proposer #3043