-
Notifications
You must be signed in to change notification settings - Fork 221
allow deferred revert current block to work #7585
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
allow deferred revert current block to work #7585
Conversation
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 fixes a critical issue where deferred revert operations for the current block would fail in headerV3 processing. The fix ensures that execution results are collected and stored in the header before committing state, allowing the deferred RevertCurrentBlock mechanism to properly access execution results when errors occur.
Key Changes
- Reordered operations to call
collectExecutionResultsbeforecommitStatein meta block proposal processing - Fixed error variable handling to ensure the deferred revert function can properly detect errors
- Added
ClearFields()call for transaction syncer to match the pattern used for miniblock syncer
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| process/sync/baseSync.go | Added ClearFields() call before syncing transactions, ensuring state is cleared consistently with miniblock syncing |
| process/block/shardblockProposal.go | Changed error variable from errCutoff to err to enable deferred revert detection, and refactored variable declarations to explicitly avoid shadowing |
| process/block/metablockProposal.go | Moved commitState after collectExecutionResults in both regular and epoch start proposal processing, ensuring execution results are available for deferred revert; refactored variable declarations for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix missing tx at bootstrap
…x/mx-chain-go into fix-restore-after-process-fail
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/supernova-async-exec #7585 +/- ##
=============================================================
- Coverage 77.70% 77.69% -0.01%
=============================================================
Files 875 875
Lines 120927 120898 -29
=============================================================
- Hits 93963 93931 -32
- Misses 20763 20774 +11
+ Partials 6201 6193 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?