-
Notifications
You must be signed in to change notification settings - Fork 259
chore(engine): remove forceSyncUponFinalize #2847
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
base: main
Are you sure you want to change the base?
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:
|
…cing-finalize-block
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.
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.
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.