Skip to content

chore: merge agglayer into next#2354

Merged
mmagician merged 22 commits intonextfrom
agglayer-fixed-2
Feb 5, 2026
Merged

chore: merge agglayer into next#2354
mmagician merged 22 commits intonextfrom
agglayer-fixed-2

Conversation

@mmagician
Copy link
Collaborator

@mmagician mmagician commented Jan 27, 2026

agglayer branch with clean history

You can verify the whole branch is 1-to-1 with aggalayer by:

git checkout agglayer-fixed-2
git checkout a5ac23e # before the merge commit df1ea7b & the port of the fix to next
git diff agglayer

(not guaranteed that each commit can be checked out and compiled)

closes #2347

mmagician and others added 8 commits January 27, 2026 19:47
Co-authored-by: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com>
* feat: impl fist frontier version, add (yet buggy) test

* test: fix the test, fix the bug in algorithm

* chore: update changelog

* docs: add docs for the MMR frontier in the masm file

* refactor: update the doc comments, slightly update code

* refactor: update docs and comments, add overflow check, update test

* test: add more leaves

* test: add zero root test

* chore: rename `root` -> `expected_root`

in leaf assertion tests

* chore: lint

* chore: revert to using old dir structure

* fix: update max leaves constants and comments

* chore: regen errors file

* fix: first assert valid u32, only then u32lte

---------

Co-authored-by: Marti <marti@miden.team>
…2312)

* feat: impl fist frontier version, add (yet buggy) test

* test: fix the test, fix the bug in algorithm

* chore: update changelog

* docs: add docs for the MMR frontier in the masm file

* refactor: update the doc comments, slightly update code

* refactor: update docs and comments, add overflow check, update test

* test: add more leaves

* test: add zero root test

* chore: rename `root` -> `expected_root`

in leaf assertion tests

* chore: lint

* chore: revert to using old dir structure

* feat: generate test vectors with foundry

* feat: use agglayer submodule instead of copying source files

* chore: use generated test vectors in compat tests

* chore: remove the human-readable fn

* chore: split test vectors

into leaf<>root<>count paris; and canonical zeros

* chore: remove unnecessary metadata

* chore: cleanup readme

* changelog

* chore: ignore submodule from typos check

* chore: exclude submodule from toml fmt

* fix: update max leaves constants and comments

* chore: regen errors file

* refactor: use foundry cheatcode (#2314)

* chore: use workspace serde dep

* chore: cleanup changelog

---------

Co-authored-by: Andrey Khmuro <akhmuro@gmail.com>
Co-authored-by: Alexander John Lee <77119221+partylikeits1983@users.noreply.github.com>
* feat: add leafType param

fix after merge

* changelog
* feat: UPDATE_GER note outline

* feat: working update ger note

* chore: swap upper, lower GER parts

* lint: regen error file
@mmagician mmagician changed the title clean up agglayer branch chore: merge agglayer into next Jan 27, 2026
@mmagician mmagician marked this pull request as ready for review January 27, 2026 20:05
Copy link
Contributor

@partylikeits1983 partylikeits1983 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!!!

Apologies for the accidental merge of all my commits!

@bobbinth
Copy link
Contributor

Is this something we want to merge now or is it meant like a tracking PR?

@mmagician
Copy link
Collaborator Author

mmagician commented Jan 27, 2026

Is this something we want to merge now or is it meant like a tracking PR?

It would be good to merge sooner rather than later.


btw, I just pushed feat: port of #2352 because that fix got lost during the rebase (create_claim_note lives in a different file location now)

@mmagician
Copy link
Collaborator Author

After merging, we should also delete the old agglayer branch (or reset --hard to next)

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a very detailed review from me - but looks good! Thank you!

mmagician and others added 7 commits January 29, 2026 08:04
… `miden-base` (#2359)

* chore: use the helper from vm

* Fix test failure and clippy warning in crypto_utils after adopting bytes_to_packed_u32_felts (#2360)

* Initial plan

* Fix lint and test failures: pad felts and keep FieldElement import

Co-authored-by: mmagician <8402446+mmagician@users.noreply.github.com>

* Add constant for LEAF_DATA_FELTS to improve code maintainability

Co-authored-by: mmagician <8402446+mmagician@users.noreply.github.com>

* Apply rustfmt formatting to comment line length

Co-authored-by: mmagician <8402446+mmagician@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mmagician <8402446+mmagician@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* feat: implement verify_leaf_bridge

* chore: stack is empty, can swap instead of pad

* chore: load leaf first, proof later

* feat(AggLayer): implement `verify_leaf` (#2295)

* feat: verify_leaf stubbed

feat: fill some TODOs

* chore: test global index processing

* chore: update comments

* self review

* changelog

* docs: add comment about exit root pointer locations in compute_ger

Addresses PR feedback: clarify that mainnet exit root is at exit_roots_ptr
and rollup exit root is at exit_roots_ptr + 8.

Co-authored-by: marti <marti@hungrycats.studio>

* refactor: remove unused verify_claim_proof procedure

This procedure has been replaced by verify_merkle_proof and is no longer used.

Co-authored-by: marti <marti@hungrycats.studio>

* style: add section headers for better organization in bridge_in.masm

Addresses PR feedback: organize the file with clear section headers for:
- Constants (storage slots and memory layout)
- Errors
- Public interface procedures
- Helper procedures

Co-authored-by: marti <marti@hungrycats.studio>

* fix: get leaf value is exec, should not truncate stack

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: add padding to stack comments

* chore: make padding explicit for update ger

* chore: update_ger proc is call not exec

* chore: assert_valid_ger is not public

* docs: make panics explicit; add verify steps

* chore: fix indent for inline comment

* chore: re-org procedures: pub/helper

* chore: Word prefer empty over default

* changelog: move entry 0.13 -> 0.14

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fumuran and others added 4 commits February 4, 2026 13:21
* feat: initial implementation

* test: implement test for verify_merkle_proof

* refactor: move verify_merkle_proof to crypto_utils

* refactor: use DoubleWord type, update doc comments

* refactor: move vectors generation to its own sol file, update the generation

* docs: update the inline comments in solidity file

* refactor: use local memory for loop flag, add comstants for local memory ops

* refactor: update path generation, return bool from verify_merkle_proof

* test: move test for the verify_merkle_proof to crypto_utils

* refactor: remove outdated panic doc comment, remove unused import

* refactor: add type signatures, update their formatting
* feat: put target account in attachment

* feat: extract b2agg creation to helper

* lint: regen error file

* feat: use NetworkAccountTarget for attachments

- make bridge a network account
- move the ID check to non-reclaim branch

* fix: still need LET slot

* chore: test the target mismatch logic

* chore: apply target checks to UPDATE_GER

* Apply suggestion from @mmagician

* chore: add TODOs

* chore: lint

* docs(masm): trim dangling B2AGG note description

Co-authored-by: marti <marti@hungrycats.studio>

* docs(masm): clarify B2AGG attachment layout

Co-authored-by: marti <marti@hungrycats.studio>

* feat: use network account target helper

Co-authored-by: marti <marti@hungrycats.studio>

* feat: make B2AGG notes always public

Co-authored-by: marti <marti@hungrycats.studio>

* feat: mark B2AGG notes always consumable

Co-authored-by: marti <marti@hungrycats.studio>

* style: use NoteScript import for B2AGG

Co-authored-by: marti <marti@hungrycats.studio>

* docs: add changelog entry for PR 2334

Co-authored-by: marti <marti@hungrycats.studio>

* Apply suggestions from code review

* chore: move helper to network_account_target

* chore: note script section headers

* chore: comment simplify and wrap

* lint

* fix: use `with_account_target` instead of `0` for `NoteTag`

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: add missing panic to get_id

* chore: mention active note

* docs: how active_account_matches_target_account panics

* Revert "fix: use `with_account_target` instead of `0` for `NoteTag`"

This reverts commit 0282672.

* feat: extract assert_is_network_account_target helper

* feat: change is_network_account_target to return bool, not panic

* feat: swap kind/scheme in signatures

* lint: regen errors

* feat: encapsulate note logic in structs

* chore: rename file to bagg_note

* chore: remove redundant comments

* Revert "feat: swap kind/scheme in signatures"

This reverts commit aad47e5.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mmagician mmagician merged commit c2974c7 into next Feb 5, 2026
17 checks passed
@mmagician mmagician deleted the agglayer-fixed-2 branch February 5, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants