Skip to content

refactor metablock reference checks to ensure budget not exceeded - #7957

Merged
AdoAdoAdo merged 1 commit into
feat/recon-by-metafrom
adapt-supernova-checks
Aug 12, 2026
Merged

refactor metablock reference checks to ensure budget not exceeded#7957
AdoAdoAdo merged 1 commit into
feat/recon-by-metafrom
adapt-supernova-checks

Conversation

@AdoAdoAdo

Copy link
Copy Markdown
Contributor

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?

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.83673% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.71%. Comparing base (6f84b59) to head (a396267).

Files with missing lines Patch % Lines
process/block/shardblockProposal.go 91.30% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat/recon-by-meta    #7957   +/-   ##
===================================================
  Coverage               77.70%   77.71%           
===================================================
  Files                     892      892           
  Lines                  128984   129025   +41     
===================================================
+ Hits                   100232   100267   +35     
- Misses                  22204    22209    +5     
- Partials                 6548     6549    +1     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 shard-block metablock reference handling to enforce the maximum referenced metaheaders budget, correctly revert gas for dropped pending incoming miniblocks, and ensure V3 metablock processing returns a contiguous “fully processed” prefix (trimming fully-processed metablocks that appear above a partial one).

Changes:

  • Refined pending incoming miniblock appending to stop at reference budget / partial-header boundaries and revert gas for any dropped miniblocks.
  • Adjusted V3 ordered-processed metablock gating to trim fully-processed metablocks above the first partially processed metablock.
  • Improved V3-specific validation/consumption logic and added/updated targeted tests for the new behaviors.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
process/block/shardblockProposal.go Enforces referenced metablock budget while appending pending miniblocks; trims fully-processed V3 metablocks above partial ones.
process/block/shardblockProposal_test.go Updates existing V3 ordered-processing test and adds new tests for pending miniblock appending/budget behavior.
process/block/shardblock.go Adjusts referenced metablock consumption rules for V3 headers (treat proposed miniblocks as consumed) and clarifies comments.
process/block/shardblock_test.go Adds V3 tests for canonical metablock hash ordering and referenced metablock consumption behavior.
process/block/gasConsumption.go Fixes pending incoming miniblock consumption to not drop the first non-fitting pending miniblock.
process/block/gasConsumption_test.go Adds regression test ensuring the first non-fitting pending miniblock remains pending.
process/block/export_test.go Exposes small helpers/wrappers for tests (header accessor + pending miniblock helpers).
node/node_test.go Minor local refactor in test helper variable initialization.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@AdoAdoAdo
AdoAdoAdo merged commit cf9a835 into feat/recon-by-meta Aug 12, 2026
13 checks passed
@AdoAdoAdo
AdoAdoAdo deleted the adapt-supernova-checks branch August 12, 2026 09:07
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.

5 participants