feat: add meta and all-shards destination handling - #3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support in the issue-detection logic for miniblocks destined to the Meta shard and for broadcast (“all shards”) miniblocks, and introduces targeted tests to validate the new behavior.
Changes:
- Introduces
META_SHARD_ID/ALL_SHARDS_IDconstants and refines destination counting to ignoremeta_origin*mentions for meta-destined miniblocks. - Extends
WRONG_PROCESSING_ORDERchecking to handle meta-destined flows and adds per-destination ordering checks for broadcast miniblocks. - Adds a new test suite covering correct/incorrect flows for both destination validation and processing order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| multiversx_cross_shard_analysis/issues.py | Adds meta/all-shards handling to destination and ordering issue checks. |
| multiversx_cross_shard_analysis/test_issues.py | New tests covering meta-destined and broadcast scenarios for the updated checks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2)
multiversx_cross_shard_analysis/issues.py:77
check_wrong_order_broadcastalso sorts mentions byroundonly. For consistency (and correctness if mentions can span multiple epochs), sort by(epoch, round)so events from different epochs don’t get interleaved incorrectly.
mentions = sorted(mb_info.get('mentioned', []), key=lambda x: x[1].get('round', 0))
dest_shards = {data.get('shard_id') for mtype, data in mentions if
multiversx_cross_shard_analysis/issues.py:59
check_wrong_ordersorts mentions byroundonly, even thoughMiniblockData.verify_miniblocks()orders mentions by(epoch, round). If a miniblock’s mentions span multiple epochs (e.g., around epoch boundaries), sorting only by round can reorder events across epochs and produce incorrect ordering alarms. Consider sorting by(epoch, round)here as well.
This issue also appears on line 76 of the same file.
for mtype, data in sorted(mb_info.get('mentioned', []), key=lambda x: x[1].get('round', 0)):
if 'exec' in mtype:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.