Skip to content

fix(AggLayer): key faucet registry by (origin_network, origin_token_address)#2860

Open
partylikeits1983 wants to merge 4 commits intoagglayerfrom
ajl-fix-faucet-registry-key
Open

fix(AggLayer): key faucet registry by (origin_network, origin_token_address)#2860
partylikeits1983 wants to merge 4 commits intoagglayerfrom
ajl-fix-faucet-registry-key

Conversation

@partylikeits1983
Copy link
Copy Markdown
Contributor

Fixes #2799.

Widens the bridge's token_registry_map key from Poseidon2(origin_token_address[5]) to Poseidon2(origin_token_address[5] || origin_network) and threads origin_network through the CONFIG_AGG_BRIDGE note, register_faucet, and lookup_faucet_by_token_address. bridge_in::claim now loads origin_network from the leaf and passes it to the lookup, so a CLAIM proven on one origin network can no longer resolve to a faucet registered for the same address on another network.

Two regression tests:

  • test_config_agg_bridge_distinguishes_origin_network — same token + two networks → two distinct registry entries.
  • test_claim_fails_when_origin_network_unregistered — CLAIM whose (addr, network) pair isn't registered fails with ERR_TOKEN_NOT_REGISTERED.

SPEC.md updated. make test: 805/805 pass.

@partylikeits1983 partylikeits1983 added the agglayer PRs or issues related to AggLayer bridging integration label May 1, 2026
@partylikeits1983 partylikeits1983 added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label May 1, 2026
… bridge_out_at_high_num_leaves

The new test added on agglayer (#2752) used the old 5-arg ConfigAggBridgeNote::create
signature; this PR's signature change (adding origin_network) needed to be threaded
through after the merge.
@partylikeits1983 partylikeits1983 marked this pull request as ready for review May 1, 2026 18:52
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 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.

1 participant