You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a bridge-admin-gated `deregister_faucet` MASM procedure that revokes a
faucet, clearing every entry registration wrote for it: the `faucet_registry_map`,
`token_registry_map`, and all four `faucet_metadata_map` sub-keys. Wired through a
new `DEREGISTER_AGG_BRIDGE` note script and a `DeregisterAggBridgeNote` Rust
builder. After deregistration, in-flight B2AGG and CLAIM notes referencing the
cleared faucet fail their existing registration checks.
The token registry is pair-keyed on (origin_token_address, origin_network). Rather
than trusting note-supplied values, `deregister_faucet` reads the faucet's
registered address and network back from its own `faucet_metadata_map` (via
`get_faucet_conversion_info`) and recomputes the key, so the cleared token-registry
entry is provably the one `register_faucet` wrote and the two registries cannot
desynchronize. The note therefore carries only the faucet id (2 felts).
- bridge_config.masm: new `deregister_faucet` proc reusing
`assert_sender_is_bridge_admin`, `assert_faucet_registered`,
`get_faucet_conversion_info`, and `hash_token_address`.
- components/bridge.masm: re-export `deregister_faucet`.
- note_scripts/deregister_agg_bridge.masm: new note script.
- src/deregister_note.rs: new `DeregisterAggBridgeNote` builder.
- bridge.rs: add the DEREGISTER script root to the network-account note allowlist.
- tests/agglayer/config_bridge.rs: round-trip test verifying all three maps are
cleared, an end-to-end test proving the faucet is revoked, and negative tests for
`ERR_FAUCET_NOT_REGISTERED` and `ERR_SENDER_NOT_BRIDGE_ADMIN`.
- SPEC.md, CHANGELOG.md: documentation updates.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@
53
53
-[BREAKING] Removed `AccountStorageMode::Network`; network accounts are now identified via `NetworkAccountNoteAllowlist` ([#2900](https://github.com/0xMiden/protocol/pull/2900)).
54
54
- Added `PswapAttachment` scheme and `PswapNote::payback_note` / `remainder_note` discovery helpers so creators can reconstruct private paybacks from on-chain commitments ([#2909](https://github.com/0xMiden/protocol/pull/2909)).
55
55
- Added benchmark for ECDSA signed transaction ([#2967](https://github.com/0xMiden/protocol/pull/2967)).
56
+
-[agglayer] Added `bridge_config::deregister_faucet` MASM procedure, `DEREGISTER_AGG_BRIDGE` note script, and `DeregisterAggBridgeNote` Rust builder, enabling the bridge admin to revoke a faucet's authorization by clearing its `faucet_registry_map`, `token_registry_map`, and `faucet_metadata_map` entries. The token-registry key is recomputed from the faucet's stored metadata so the cleared key always matches what registration wrote, rather than trusting note-supplied values. `bridge_in::claim` now also re-checks `assert_faucet_registered` after the token lookup, making deregistration an unconditional revocation even if a stale token-registry key survives a re-registration ([#2838](https://github.com/0xMiden/protocol/pull/2838)).
0 commit comments