Skip to content

fix: Move sender validation from note script into bridge procedures#2511

Merged
mmagician merged 6 commits intoagglayerfrom
claude/move-authorization-to-account-tFUVi
Feb 25, 2026
Merged

fix: Move sender validation from note script into bridge procedures#2511
mmagician merged 6 commits intoagglayerfrom
claude/move-authorization-to-account-tFUVi

Conversation

@mmagician
Copy link
Collaborator

@mmagician mmagician commented Feb 25, 2026

While working on the spec, I realized that enforcing who is the note sender from within the note script itself is easily by-passable.

This PR fixes sender validation logic by moving the assertion checks from note scripts into the bridge configuration procedures themselves.

Key Changes

  • update_ger procedure: Added assert_sender_is_ger_manager call at the start to validate the note sender is the global exit root manager
  • register_faucet procedure: Added assert_sender_is_bridge_admin call at the start to validate the note sender is the bridge admin
  • UPDATE_GER.masm: Removed the explicit assert_sender_is_ger_manager call since it's now enforced by update_ger
  • CONFIG_AGG_BRIDGE.masm: Removed the explicit assert_sender_is_bridge_admin call since it's now enforced by register_faucet
  • Documentation updates: Updated procedure documentation to reflect that sender validation is now performed internally
  • Invocation type corrections: Changed invocation type from call to exec for the assertion helper procedures (assert_sender_is_bridge_admin and assert_sender_is_ger_manager)
  • Comment fixes: Corrected variable names in comments (slot_id → faucet_id) in the register_faucet procedure

https://claude.ai/code/session_01JeSHNeBxs1aTUe3Lm8NjVi

…ocedures

Sender authorization for UPDATE_GER and CONFIG_AGG_BRIDGE notes was
previously enforced in the note scripts via separate calls to
assert_sender_is_ger_manager / assert_sender_is_bridge_admin. This was
unsafe because any note script consumed by the bridge account could call
update_ger or register_faucet directly, bypassing the sender check.

Move the authorization into the account procedures themselves
(update_ger and register_faucet) so that sender verification is enforced
regardless of which note script invokes them. The assertion procedures
have a net-zero stack effect, so they can be called first thing without
disturbing the procedure's inputs.

https://claude.ai/code/session_01JeSHNeBxs1aTUe3Lm8NjVi
@mmagician mmagician changed the title Move sender validation into bridge config procedures fix: Move sender validation into bridge config procedures Feb 25, 2026
@mmagician mmagician added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Feb 25, 2026
@mmagician mmagician marked this pull request as ready for review February 25, 2026 10:41
@mmagician mmagician added agglayer PRs or issues related to AggLayer bridging integration pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority labels Feb 25, 2026
@mmagician mmagician changed the title fix: Move sender validation into bridge config procedures fix: Move sender validation from note script into bridge procedures Feb 25, 2026
Copy link
Contributor

@partylikeits1983 partylikeits1983 left a comment

Choose a reason for hiding this comment

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

Really good catch.

@mmagician mmagician merged commit 893c7de into agglayer Feb 25, 2026
17 checks passed
@mmagician mmagician deleted the claude/move-authorization-to-account-tFUVi branch February 25, 2026 11:58
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.

3 participants