use checkMiniBlock in verifyBlockProposal#7869
Conversation
There was a problem hiding this comment.
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)inprocess/common.goand removes the coordinator-localcheckMiniBlockimplementation. - 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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
| err = process.CheckMiniBlock(miniBlock, selfId) | ||
| if err != nil { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
depends on conflicts, not sure how many might be
…iblock-check-to-verify-block-proposal # Conflicts: # process/block/baseProcess.go # process/coordinator/process.go
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?