feat(agglayer): add GER removal mechanism#2837
Open
partylikeits1983 wants to merge 4 commits intoagglayerfrom
Open
feat(agglayer): add GER removal mechanism#2837partylikeits1983 wants to merge 4 commits intoagglayerfrom
partylikeits1983 wants to merge 4 commits intoagglayerfrom
Conversation
e6bc635 to
0511b44
Compare
8ebfee1 to
82b6703
Compare
Adds a `remove_ger` MASM procedure gated by a new `ger_remover` role (separate from the existing GER manager) that revokes a previously registered Global Exit Root and folds it into a running keccak256 hash chain. Mirrors the Solidity sovereign-chain `removeGlobalExitRoots` / `removedGERHashChain` pair. Adds a `REMOVE_GER` note script, a `RemoveGerNote` Rust helper, three integration tests, and updates the spec.
1ab2ca7 to
6f83e87
Compare
Add three integration tests for the GER removal mechanism: removing a GER from the middle of a multi-insert sequence leaves the others registered, a second remove of the same GER reverts with ERR_GER_NOT_FOUND, and re-inserting a previously-removed GER succeeds without advancing the removed-GER hash chain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # crates/miden-agglayer/src/errors/agglayer.rs
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.
Closes #2702.
Adds a GER removal mechanism mirroring Solidity's
GlobalExitRootManagerL2SovereignChain.removeGlobalExitRoots:ger_removerrole (separate from the GER manager) stored in the bridge account.remove_gerMASM proc inbridge_config.masmthat asserts the sender is the GER remover, asserts the GER is currently registered, clearsger_map[ger]to[0,0,0,0], and folds the removed GER into a running keccak256 hash chain (new_chain = keccak256(prev_chain || ger)) — same shape as the existingupdate_cgi_chain_hashpattern inbridge_in.masm.REMOVE_GERnote script +RemoveGerNoteRust helper.ger_remover_account_id,removed_ger_hash_chain_lo,removed_ger_hash_chain_hi.keccak256(0…0 || ger)), unknown-GER reverts withERR_GER_NOT_FOUND, non-remover sender reverts withERR_SENDER_NOT_GER_REMOVER.AggLayerBridge::new,create_bridge_account, andcreate_existing_bridge_accountnow take a thirdger_remover_idargument; all existing call sites (tests + bench-transaction) updated.