Skip to content

AggLayer: validate destination_network on CLAIM#2759

Open
Fumuran wants to merge 6 commits intonextfrom
andrew-validate-destination-network-bridge-in
Open

AggLayer: validate destination_network on CLAIM#2759
Fumuran wants to merge 6 commits intonextfrom
andrew-validate-destination-network-bridge-in

Conversation

@Fumuran
Copy link
Copy Markdown
Contributor

@Fumuran Fumuran commented Apr 13, 2026

Ensures CLAIM handling only accepts leaves whose AggLayer destination_network is 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.

@Fumuran Fumuran added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Apr 13, 2026
@Fumuran Fumuran marked this pull request as ready for review April 13, 2026 20:53
@Fumuran Fumuran added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label Apr 15, 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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

that's a nice addition but the changes are unrelated to the feature described in this PR; ideally should have been a separate PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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:

  • Rollup
  • Mainnet

(everything is simulated now)

@Fumuran Fumuran added the agglayer PRs or issues related to AggLayer bridging integration label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agglayer PRs or issues related to AggLayer bridging integration no changelog This PR does not require an entry in the `CHANGELOG.md` file pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AggLayer: Validate destination network during CLAIM note processing

2 participants