Skip to content

feat: add meta and all-shards destination handling - #3

Merged
AdoAdoAdo merged 2 commits into
developfrom
add-treatment-destination-meta-and-allshards
Aug 13, 2026
Merged

feat: add meta and all-shards destination handling#3
AdoAdoAdo merged 2 commits into
developfrom
add-treatment-destination-meta-and-allshards

Conversation

@AdoAdoAdo

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ID constants and refines destination counting to ignore meta_origin* mentions for meta-destined miniblocks.
  • Extends WRONG_PROCESSING_ORDER checking 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.

Comment thread multiversx_cross_shard_analysis/issues.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_broadcast also sorts mentions by round only. 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_order sorts mentions by round only, even though MiniblockData.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:

@AdoAdoAdo
AdoAdoAdo requested a lite review from Copilot August 13, 2026 13:31
@AdoAdoAdo
AdoAdoAdo merged commit f02ebe9 into develop Aug 13, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

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.

2 participants