Skip to content

use checkMiniBlock in verifyBlockProposal#7869

Merged
BeniaminDrasovean merged 4 commits into
feat/testnet-fixesfrom
add-miniblock-check-to-verify-block-proposal
Jun 16, 2026
Merged

use checkMiniBlock in verifyBlockProposal#7869
BeniaminDrasovean merged 4 commits into
feat/testnet-fixesfrom
add-miniblock-check-to-verify-block-proposal

Conversation

@BeniaminDrasovean

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?

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 centralizes miniblock shard-ID validation into a reusable process.CheckMiniBlock helper and wires that validation into proposal verification and transaction coordinator miniblock processing.

Changes:

  • Introduces process.CheckMiniBlock(miniBlock, selfId) in process/common.go and removes the coordinator-local checkMiniBlock implementation.
  • Updates the transaction coordinator miniblock processing paths to call process.CheckMiniBlock.
  • Extends proposal header/body correlation validation to include process.CheckMiniBlock, and relocates the associated unit tests accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
process/coordinator/process.go Replaces coordinator method calls with process.CheckMiniBlock during miniblock processing.
process/coordinator/process_test.go Removes tests for the deleted coordinator-local checkMiniBlock.
process/common.go Adds exported CheckMiniBlock shard-ID validation helper.
process/common_test.go Adds tests for process.CheckMiniBlock in the process-level test suite.
process/block/baseProcess.go Adds process.CheckMiniBlock validation while checking header/body correlation for proposals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread process/coordinator/process.go
Comment thread process/coordinator/process.go Outdated
Comment thread process/common_test.go Outdated
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.58%. Comparing base (5ddf1b8) to head (8e5cbef).

Files with missing lines Patch % Lines
process/coordinator/process.go 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/testnet-fixes    #7869      +/-   ##
======================================================
+ Coverage               77.57%   77.58%   +0.01%     
======================================================
  Files                     884      884              
  Lines                  125265   125249      -16     
======================================================
+ Hits                    97171    97177       +6     
+ Misses                  21643    21622      -21     
+ Partials                 6451     6450       -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.

Comment thread process/block/baseProcess.go Outdated
Comment on lines +1199 to +1200
err = process.CheckMiniBlock(miniBlock, selfId)
if err != nil {

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.

i think this is mainly the newly added thing compared to what we have on master, the others were already covered, it might be simpler to start the changes directly from master or after the update in master, and avoid handling conflicts later on

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.

depends on conflicts, not sure how many might be

…iblock-check-to-verify-block-proposal

# Conflicts:
#	process/block/baseProcess.go
#	process/coordinator/process.go
@BeniaminDrasovean BeniaminDrasovean merged commit 818563b into feat/testnet-fixes Jun 16, 2026
11 checks passed
@BeniaminDrasovean BeniaminDrasovean deleted the add-miniblock-check-to-verify-block-proposal branch June 16, 2026 11:01
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