fix(AggLayer): key faucet registry by (origin_network, origin_token_address)#2860
Open
partylikeits1983 wants to merge 4 commits intoagglayerfrom
Open
fix(AggLayer): key faucet registry by (origin_network, origin_token_address)#2860partylikeits1983 wants to merge 4 commits intoagglayerfrom
partylikeits1983 wants to merge 4 commits intoagglayerfrom
Conversation
… 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.
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.
Fixes #2799.
Widens the bridge's
token_registry_mapkey fromPoseidon2(origin_token_address[5])toPoseidon2(origin_token_address[5] || origin_network)and threadsorigin_networkthrough theCONFIG_AGG_BRIDGEnote,register_faucet, andlookup_faucet_by_token_address.bridge_in::claimnow loadsorigin_networkfrom 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 withERR_TOKEN_NOT_REGISTERED.SPEC.mdupdated.make test: 805/805 pass.