Skip to content

docs(agglayer): sync spec, diagram & comments with #2771#2980

Merged
mmagician merged 7 commits into
mainfrom
mmagician-claude/agglayer-doc-fixes
Jun 10, 2026
Merged

docs(agglayer): sync spec, diagram & comments with #2771#2980
mmagician merged 7 commits into
mainfrom
mmagician-claude/agglayer-doc-fixes

Conversation

@mmagician

Copy link
Copy Markdown
Collaborator

What

#2771 moved faucet metadata onto the bridge (faucet_metadata_map), removed the faucet's asset_to_origin_asset / get_metadata_hash / get_scale procedures, added the native lock/unlock path, and grew CONFIG_AGG_BRIDGE to 18 felts. Several docs, the spec, and a few comments were left describing the old FPI-based design. This PR brings them in line with the merged code. Docs/comments only - no logic changes.

Changes

  • SPEC.md §3.1 (Bridge Account Component):
    • Removed the FPI references in bridge_out / bridge_in::claim (metadata is now read from faucet_metadata_map via bridge_config::get_faucet_conversion_info / get_faucet_scale / get_faucet_metadata_hash).
    • Corrected register_faucet inputs and the [1, is_native, 0, 0] registry value; documented the faucet_metadata_map writes.
    • Added store_faucet_metadata_hash and the internal metadata-reader helper docs, plus a faucet_metadata_map storage row.
    • Documented the native lock/unlock branch on both bridge-out and bridge-in.
  • SPEC.md §3.2 (Faucet Account Component): the component now re-exports only mint_and_send + receive_and_burn on top of Ownable2Step + OwnerControlled. Deleted the removed proc subsections and the dead faucet storage slots.
  • SPEC.md §4.3 (CONFIG_AGG_BRIDGE): note is 18 felts now - fixed the layout table and consumption description (register_faucet + store_faucet_metadata_hash).
  • bridge_out.masm / tests/agglayer/bridge_out.rs: dropped the stale "via FPI" wording.
  • diagrams/bridge-out: replaced "FPI: get amount / FPI: get metadata" with bridge-storage reads; regenerated the PNG via make agglayer-spec.

Verification

  • cargo build -p miden-agglayer (compiles the edited embedded MASM comments).
  • cargo +nightly fmt --all --check and typos clean.
  • Repo-wide grep confirms no remaining stale references (removed procs, "via FPI", old storage slots) outside the one sentence that explicitly documents their removal.
  • Regenerated bridge-out.png visually verified.

🤖 Generated with Claude Code

@mmagician mmagician added no changelog This PR does not require an entry in the `CHANGELOG.md` file pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority labels May 26, 2026
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-testing/tests/agglayer/bridge_out.rs Outdated
Comment thread crates/miden-testing/tests/agglayer/bridge_out.rs Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
Comment thread crates/miden-testing/tests/agglayer/bridge_out.rs Outdated
Comment thread crates/miden-agglayer/SPEC.md Outdated
@mmagician mmagician marked this pull request as ready for review June 8, 2026 08:32
@mmagician mmagician changed the base branch from next to main June 8, 2026 16:19
claude and others added 4 commits June 8, 2026 16:22
PR #2771 moved faucet metadata onto the bridge (faucet_metadata_map),
removed the faucet's asset_to_origin_asset / get_metadata_hash / get_scale
procs, added the native lock/unlock path, and grew CONFIG_AGG_BRIDGE to 18
felts -- but left several docs referring to the old FPI-based design.

- SPEC.md 3.1: drop FPI references in bridge_out/bridge_in, fix
  register_faucet inputs and the [1, is_native, 0, 0] registry value, add
  store_faucet_metadata_hash + internal metadata-reader proc docs, add the
  faucet_metadata_map storage row, document the native lock/unlock branch.
- SPEC.md 3.2: faucet component now re-exports only mint_and_send +
  receive_and_burn; delete the removed proc subsections and the dead faucet
  storage slots.
- SPEC.md 4.3: CONFIG_AGG_BRIDGE is 18 felts; fix the layout table and
  consumption (register_faucet + store_faucet_metadata_hash).
- bridge_out.masm / bridge_out.rs: drop 'via FPI' wording.
- bridge-out diagram: 'FPI: get amount/metadata' -> bridge-storage reads;
  regenerate PNG.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Marti <marcin.gorny.94@protonmail.com>
Co-authored-by: Marti <marcin.gorny.94@protonmail.com>
@mmagician mmagician force-pushed the mmagician-claude/agglayer-doc-fixes branch from 83c0c6f to 39b7059 Compare June 8, 2026 16:22

@partylikeits1983 partylikeits1983 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice! Thanks for updating the chart!

@mmagician mmagician enabled auto-merge (squash) June 10, 2026 06:06
@mmagician mmagician merged commit eeafd71 into main Jun 10, 2026
17 checks passed
@mmagician mmagician deleted the mmagician-claude/agglayer-doc-fixes branch June 10, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants