-
Notifications
You must be signed in to change notification settings - Fork 115
feat(AggLayer): faucet registry #2426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mmagician
merged 47 commits into
agglayer-new
from
mmagician-cursor-agglayer-faucet-registry-5caf
Feb 18, 2026
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
3167760
chore: unify b2agg note storage layout with claim note
mmagician 62d903b
chore: clarify destinationAddress in CLAIM note
mmagician ea5c09b
feat: mem_store_double_word_unaligned
mmagician 2c7d070
feat: compute leaf value for bridging out
mmagician b82f071
chore: update comment about origin network ID
mmagician 545ba44
fix: write_address_to_memory had incorrect address arithmetic
cursoragent 5286915
fix: handling of dest address and ID in B2AGG
mmagician 4f58246
feat: reverse_limbs_and_change_byte_endianness
mmagician 78b8ba9
chore: integrate byte and limb swapping to bridging
mmagician 5a91cac
fix: swap origin net ID endianness; rearrange mem writes
mmagician c011f8d
chore: pad mem with zeros after metadata
mmagician 589c7a9
feat: store LET frontier in double-word array
mmagician 4e96929
feat: frontier test generation from param"d leaves
mmagician e35c439
feat: verify computed LER against expected root
mmagician b9b0aed
write leaf"s amounts to JSON
mmagician fbc27c3
fix: compare LET by elements, rev elements per word
mmagician 6f2af24
feat: add faucet registry
mmagician d7b3017
chore: CONFIG note docs
mmagician c767e60
chore: simplify creation of existing agg faucet w/supply
mmagician ed8b51d
lint
mmagician 4dbf355
chore: TODO on bridge admin validation
mmagician bbf63b1
chore: simplify stack operations
Copilot d94c035
chore: Replace `unwrap()` with `expect()` for StorageSlotName parsing…
Copilot a1c1499
Update crates/miden-testing/tests/agglayer/bridge_out.rs
mmagician 140ca14
Merge branch 'agglayer-new' into mmagician-bridge-out-store-frontier
mmagician 636bd41
chore: only truncate at the end
mmagician e37cb44
Merge branch 'mmagician-bridge-out-store-frontier' into mmagician-cur…
mmagician 29776a7
chore: move (de)ser logic to test_utils
mmagician fc7d332
chore: organize test_utils better
mmagician c06b6d5
chore: serialize amounts as strings in mmr test vecs
mmagician 4d71785
test bridge_out frontier persistence across two consumes
cursoragent 857d718
fix bridge_out frontier reload num_leaves endianness
cursoragent ed8a052
test bridge_out with shared multi-note helper and 32-leaf case
cursoragent bf8991d
refactor bridge_out coverage to direct 32-leaf burn flow
cursoragent afc240c
refactor MMR vectors to seeded per-leaf destinations
cursoragent 3bfb9d3
chore: cleanup tests
mmagician 1845253
Merge branch 'agglayer-new' into mmagician-bridge-out-store-frontier
mmagician 37ba1f1
Merge branch 'mmagician-bridge-out-store-frontier' into mmagician-cur…
mmagician 4f9d96b
Merge branch 'agglayer-new' into mmagician-cursor-bridge-out-componen…
mmagician ed63be4
Merge branch 'mmagician-cursor-bridge-out-component-implementation-de…
cursoragent d22a67f
fix: rustfmt line wrapping + clippy needless_range_loop
cursoragent 00bc41d
fix: read addr conversion slot in reverse
mmagician 43e0bb0
chore: use non-zero address
mmagician 493f126
Merge branch 'agglayer-new' into mmagician-cursor-agglayer-faucet-reg…
mmagician f271bd1
chore: rename loc const to distinguish
mmagician 6220ee2
chore: use loc const in create_burn_note
mmagician 2701f03
chore: bring back doc and inline comments
mmagician File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| use miden::protocol::native_account | ||
|
|
||
| # CONSTANTS | ||
| # ================================================================================================= | ||
|
|
||
| const FAUCET_REGISTRY_SLOT=word("miden::agglayer::bridge::faucet_registry") | ||
| const IS_REGISTERED_FLAG=1 | ||
|
|
||
| # PUBLIC INTERFACE | ||
| # ================================================================================================= | ||
|
|
||
| #! Registers a faucet in the bridge's faucet registry. | ||
| #! | ||
| #! Writes `KEY -> [1, 0, 0, 0]` into the `faucet_registry` map, where | ||
| #! `KEY = [faucet_id_prefix, faucet_id_suffix, 0, 0]`. | ||
| #! | ||
| #! The sentinel value `[1, 0, 0, 0]` distinguishes registered faucets from | ||
| #! non-existent entries (SMTs return EMPTY_WORD for missing keys). | ||
| #! | ||
| #! TODO: Currently, no sender validation is performed — anyone can register a faucet. | ||
| #! Tracked in https://github.com/0xMiden/miden-base/issues/2450 | ||
| #! | ||
| #! Inputs: [faucet_id_prefix, faucet_id_suffix, pad(14)] | ||
| #! Outputs: [pad(16)] | ||
| #! | ||
| #! Invocation: call | ||
| pub proc register_faucet | ||
| # => [faucet_id_prefix, faucet_id_suffix, pad(14)] | ||
|
|
||
| # set_map_item expects [slot_id(2), KEY(4), VALUE(4)] and returns [OLD_VALUE(4)]. | ||
| push.IS_REGISTERED_FLAG | ||
| # => [IS_REGISTERED_FLAG, slot_id_prefix, slot_id_suffix, pad(14)] | ||
|
|
||
| movdn.7 | ||
| # => [[slot_id_prefix, slot_id_suffix, 0, 0], [0, 0, 0, IS_REGISTERED_FLAG], pad(9)] | ||
|
|
||
| # Place slot ID on top | ||
| push.FAUCET_REGISTRY_SLOT[0..2] | ||
| # Stack: [slot0, slot1, [prefix, suffix, 0, 0], [0, 0, 0, 1], pad(9)] | ||
|
|
||
| exec.native_account::set_map_item | ||
| # => [OLD_VALUE(4), pad(9)] | ||
|
|
||
| dropw | ||
| end | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.