-
Notifications
You must be signed in to change notification settings - Fork 221
MX-17306 Tooling for incorrect cross shard execution #7419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/supernova-async-exec
Are you sure you want to change the base?
MX-17306 Tooling for incorrect cross shard execution #7419
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/supernova-async-exec #7419 +/- ##
=============================================================
- Coverage 77.60% 77.59% -0.02%
=============================================================
Files 874 874
Lines 119875 119904 +29
=============================================================
+ Hits 93031 93039 +8
- Misses 20749 20756 +7
- Partials 6095 6109 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 adds enhanced logging capabilities for debugging cross-shard miniblock execution by logging header details at key consensus stages using the PrettifyStruct utility.
Key changes:
- Added debug logging for headers when they are proposed, received, and committed across BLS consensus versions (v1 and v2)
- Added comprehensive test coverage for
PrettifyStructwith HeaderV3 and MetaBlockV3 types - Created mock helper functions to support the new tests
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| consensus/spos/bls/v2/subroundEndRound.go | Logs header details when a block is finalized and committed |
| consensus/spos/bls/v1/subroundEndRound.go | Logs header details when blocks are committed by both leader and participant nodes |
| consensus/spos/bls/v1/subroundBlock.go | Logs header details when blocks are sent and received during consensus |
| common/common_test.go | Adds test cases for HeaderV3/MetaBlockV3 and helper functions to create mock headers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
common/common_test.go
Outdated
| NotarizedInRound: hdrRound - 1, | ||
| }, | ||
| ExecutionResults: []*block.ExecutionResult{ | ||
| &block.ExecutionResult{ |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code uses the unidiomatic composite literal syntax &block.ExecutionResult{...} instead of {...}. When the slice element type is already a pointer ([]*block.ExecutionResult), you should omit the & operator. This applies to all three entries in the slice (lines 848, 857, 866).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| meta := createMockMetaHeaderV3() | ||
| hdr = meta | ||
| prettified, err = common.PrettifyStruct(meta) |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistency in the variable passed to PrettifyStruct. Line 510 assigns meta to hdr, but line 511 passes meta directly instead of using hdr. For consistency with the pattern used for the shard header (lines 504-505), this should be common.PrettifyStruct(hdr).
| prettified, err = common.PrettifyStruct(meta) | |
| prettified, err = common.PrettifyStruct(hdr) |
axenteoctavian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Copilot suggestions
…cross-shard-execution-analysis
Reasoning behind the pull request
Using the prettify block logging, improve the logs analysis tool to validate that cross shard miniblocks are executed (and proposed) in strict order, without gaps or duplications.
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?