Open
Conversation
…t in FinalizeBlock
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2847 +/- ##
==========================================
+ Coverage 62.69% 62.85% +0.16%
==========================================
Files 353 353
Lines 17135 17091 -44
==========================================
+ Hits 10742 10743 +1
+ Misses 5537 5494 -43
+ Partials 856 854 -2
🚀 New features to boost your workflow:
|
Contributor
…cing-finalize-block
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors how NewPayload retries on SYNCING status to differentiate between FinalizeBlock and ProcessProposal execution paths. The change allows NewPayload to skip retrying on SYNCING errors during FinalizeBlock while maintaining retry behavior during ProcessProposal, eliminating the need for the forceSyncUponFinalize function.
Key Changes:
- Added
inFinalizeBlockboolean parameter throughout the state transition chain to distinguish execution contexts - Removed
forceSyncUponFinalizefunction and its invocation from FinalizeBlock - Changed
forceStartupSyncOncefrom pointer to value type in Service struct
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| state-transition/core/state_processor_payload.go | Threaded inFinalizeBlock parameter through payload processing functions to conditionally control NewPayload retry behavior |
| state-transition/core/state_processor.go | Introduced inFinalizeBlock variable and passed it to ProcessBlock to enable context-aware execution |
| beacon/blockchain/service.go | Changed forceStartupSyncOnce from pointer to value type and removed initialization |
| beacon/blockchain/payload.go | Removed forceSyncUponFinalize function entirely along with related imports |
| beacon/blockchain/finalize_block.go | Removed forceSyncUponFinalize call and setup from FinalizeBlock, cleaned up unused import |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Remnant of the past #2490:
Before:
Now:
Effectively this allows us not to stall on the first FInalizeBlock. If a node's EL needs to catchup it will still do so but now it will stall when the CL is caught up to tip, i.e. on the first ProcessProposal. Since we already have this mechanism handled in ProcessProposal, we can remove it from FinalizeBlock.