Skip to content

Fix pending miniblocks meta#7794

Open
ssd04 wants to merge 3 commits intofeat/supernova-async-execfrom
fix-pending-miniblocks-meta
Open

Fix pending miniblocks meta#7794
ssd04 wants to merge 3 commits intofeat/supernova-async-execfrom
fix-pending-miniblocks-meta

Conversation

@ssd04
Copy link
Contributor

@ssd04 ssd04 commented Mar 19, 2026

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:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Mar 19, 2026
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.52%. Comparing base (8eab550) to head (99b560d).

Files with missing lines Patch % Lines
process/block/pendingMb/pendingMiniBlocks.go 71.42% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a 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 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 pendingMiniBlocks instances.

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.

},
},
}

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
_ = errExpected

Copilot uses AI. Check for mistakes.
for _, mbHeader := range metaBlock.GetMiniBlockHeaderHandlers() {
metaMiniBlockHeaders, err := common.GetMiniBlockHeadersFromExecResult(metaBlock)
if err != nil {
return nil, err
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
return nil, err
return nil, fmt.Errorf("pendingMiniBlocks: get meta miniblock headers from exec result: %w", err)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants