feat(agglayer): store block number with each registered GER#2579
Open
feat(agglayer): store block number with each registered GER#2579
Conversation
Store the transaction's reference block number alongside the GER flag in the bridge's GER map, changing the value from [1, 0, 0, 0] to [1, block_num, 0, 0]. This enables recovery scenarios that need to know when each GER was registered. The assert_valid_ger procedure now checks only the flag element instead of comparing the full word, since the block_num element is variable. Closes #2578 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmagician
commented
Mar 10, 2026
Address review feedback: reorder stack operations so the flag is pushed before getting the block number, eliminating the need for a swap. Also add changelog entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the AggLayer bridge GER registry to persist the transaction reference block number alongside the “known” flag, enabling recovery workflows to determine when a GER was registered.
Changes:
- Store
[GER_KNOWN_FLAG, block_num, 0, 0]as the GER map value (instead of a fixed sentinel). - Update
assert_valid_gerto validate only the flag element, sinceblock_numvaries. - Update tests and spec/docs to reflect the new GER value layout.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/miden-testing/tests/agglayer/update_ger.rs | Updates storage assertion to include the stored reference block number. |
| crates/miden-agglayer/asm/agglayer/bridge/bridge_config.masm | Writes block_num into GER map values and adjusts GER validation logic accordingly. |
| crates/miden-agglayer/SPEC.md | Documents the updated GER map value encoding and meaning. |
| CHANGELOG.md | Notes the new feature in the upcoming release changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
[1, 0, 0, 0]to[1, block_num, 0, 0]assert_valid_gerto check only the flag element (instead of full word comparison), since block_num is now variableTest plan
BUILD_GENERATED_FILES_IN_SRC=1 make test name=update_ger- all 3 tests passmake lint- cleanCloses #2578
🤖 Generated with Claude Code