AggLayer: validate destination_network on CLAIM#2759
Open
Conversation
mmagician
reviewed
Apr 16, 2026
Comment on lines
+118
to
+124
| const LEAF_TYPE_ADDRESS = CLAIM_LEAF_DATA_START_PTR | ||
|
|
||
| const ORIGIN_TOKEN_ADDRESS_0 = CLAIM_LEAF_DATA_START_PTR + 2 | ||
| const ORIGIN_TOKEN_ADDRESS_1 = CLAIM_LEAF_DATA_START_PTR + 3 | ||
| const ORIGIN_TOKEN_ADDRESS_2 = CLAIM_LEAF_DATA_START_PTR + 4 | ||
| const ORIGIN_TOKEN_ADDRESS_3 = CLAIM_LEAF_DATA_START_PTR + 5 | ||
| const ORIGIN_TOKEN_ADDRESS_4 = CLAIM_LEAF_DATA_START_PTR + 6 |
Collaborator
There was a problem hiding this comment.
that's a nice addition but the changes are unrelated to the feature described in this PR; ideally should have been a separate PR
Contributor
Author
There was a problem hiding this comment.
I agree, but I was updating this addresses anyway, and since this change is quite small, I decide to include it into this PR.
Comment on lines
288
to
293
Collaborator
There was a problem hiding this comment.
I think we discussed this somewhere with @partylikeits1983 - the names Simulated / Rollup are not very meaningful anymore - and now even less so.
Ideally, these would become:
RollupMainnet
(everything is simulated now)
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.
Ensures CLAIM handling only accepts leaves whose AggLayer
destination_networkis Miden’s chain, in line with Solidity’s claimAsset check (#2698).The bridge stores Miden’s network ID in a new storage slot at deploy time and compares it to the piped leaf field early in
claim, before Merkle verification. Rust, MASM, SPEC, and tests are updated accordingly; Solidity vectors are aligned with the chosen Miden network ID, and the old real-tx vector is dropped since it can't use a new Miden network ID.Closes: #2698.