Fix pending miniblocks meta#7794
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/supernova-async-exec #7794 +/- ##
=============================================================
- Coverage 77.54% 77.52% -0.02%
=============================================================
Files 882 882
Lines 123683 123675 -8
=============================================================
- Hits 95908 95880 -28
- Misses 21429 21446 +17
- Partials 6346 6349 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates pending miniblock tracking for meta headers, especially for header v3, so that miniblock headers are derived from execution results (and shard-data proposals are no longer treated as a source of pending miniblocks).
Changes:
- Use
common.GetMiniBlockHeadersFromExecResult()when collecting meta miniblock headers (v3 reads from execution results; non-v3 remains unchanged). - Simplify shard-data miniblock extraction to always use
GetShardInfoHandlers()(removing v3 proposal+pool lookup path). - Update/extend tests for v3 behavior and make subtests parallel with isolated
pendingMiniBlocksinstances.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| process/block/pendingMb/pendingMiniBlocks.go | Switch meta miniblock header extraction to execution results (v3) via common helper; simplify shard-data extraction. |
| process/block/pendingMb/pendingMiniBlocks_test.go | Adjust expectations for v3 shard proposals vs execution results, add execution-results scenario, and parallelize subtests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| }, | ||
| } | ||
|
|
There was a problem hiding this comment.
errExpected is now declared but never used (the previous assertion that referenced it was removed). This will fail go test due to an unused global variable—please remove errExpected or reintroduce a usage where appropriate.
| _ = errExpected |
| for _, mbHeader := range metaBlock.GetMiniBlockHeaderHandlers() { | ||
| metaMiniBlockHeaders, err := common.GetMiniBlockHeadersFromExecResult(metaBlock) | ||
| if err != nil { | ||
| return nil, err |
There was a problem hiding this comment.
getMiniBlocksHashesReadyForCrossShardExecution now propagates errors from common.GetMiniBlockHeadersFromExecResult (new behavior vs. calling GetMiniBlockHeaderHandlers() directly). There should be a unit test exercising this error path (e.g., a v3 meta header whose execution result handler is nil or a wrong type) to ensure AddProcessedHeader returns the wrapped error as expected.
| return nil, err | |
| return nil, fmt.Errorf("pendingMiniBlocks: get meta miniblock headers from exec result: %w", err) |
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?