Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a1db91e
feat: add scale data to bridge storage
partylikeits1983 Apr 14, 2026
7cf9843
feat: update config_agg_bridge note & fix register_faucet proc
partylikeits1983 Apr 15, 2026
8ba2cd5
feat: extend faucet registration with full metadata, is_native flag, …
partylikeits1983 Apr 15, 2026
096496d
feat: replace FPI with bridge-local reads in bridge_out, add lock pat…
partylikeits1983 Apr 16, 2026
3761f55
feat: add unlock path for native tokens in bridge_in, plus lock/unloc…
partylikeits1983 Apr 16, 2026
ac2f76d
chore: add changelog entry & bump rand to fix cargo-deny
partylikeits1983 Apr 17, 2026
179c101
refactor: slim faucet & update SPEC section
partylikeits1983 Apr 20, 2026
ff53888
style: rustfmt import grouping
partylikeits1983 Apr 20, 2026
67a28aa
refactor: tighten MASM stack ops, normalize stack-comment style
partylikeits1983 Apr 20, 2026
5531a6d
refactor: cleanup masm & stack comments
partylikeits1983 Apr 22, 2026
fe7c822
refactor: pack ConfigAggBridgeNote::create args into ConversionMetadata
partylikeits1983 Apr 22, 2026
80eb103
refactor: split bridge_in output-note emission into bridge_in_output.…
partylikeits1983 Apr 22, 2026
50d6a8f
refactor: fix stack-comment depths in CONFIG_AGG_BRIDGE.masm
partylikeits1983 Apr 23, 2026
ba2fa99
refactor: clarify docstrings and add native-path duplicate-claim test
partylikeits1983 Apr 23, 2026
e197f46
refactor: dedupe shared CLAIM_* consts and colocate UNLOCK_*_LOC
partylikeits1983 Apr 30, 2026
d3fc185
Merge branch 'agglayer' into ajl-agg-bridge-lock-unlock
partylikeits1983 Apr 30, 2026
fe4d174
refactor: apply PR suggestions
partylikeits1983 May 5, 2026
195eb55
Merge branch 'agglayer' into ajl-agg-bridge-lock-unlock
partylikeits1983 May 5, 2026
c5c0a9e
refactor(agglayer): drop redundant memory layout description in CONFI…
partylikeits1983 May 5, 2026
222df44
refactor(agglayer): add mem_load_double_word_unaligned helper
partylikeits1983 May 5, 2026
57cf8c6
refactor(agglayer): pre-pad CONFIG_AGG_BRIDGE call frames to drop the…
partylikeits1983 May 5, 2026
762a909
refactor(agglayer): introduce sub-key constants for faucet_metadata_map
partylikeits1983 May 5, 2026
50ff994
refactor(agglayer): cheaper register_faucet local stash via repeated …
partylikeits1983 May 5, 2026
6940c0a
refactor(agglayer): use repeat.5 dup.4 to duplicate origin token address
partylikeits1983 May 5, 2026
b499207
refactor(agglayer): unify get_faucet_metadata_hash key-prep with sibl…
partylikeits1983 May 5, 2026
4b1642c
refactor(agglayer): correct stack-padding annotations in register_faucet
partylikeits1983 May 5, 2026
7ea675a
refactor(agglayer): clarify is_faucet_native trailing-zeros comment
partylikeits1983 May 5, 2026
d96fcde
refactor(agglayer): clarify unlock_and_send local-stash comment
partylikeits1983 May 5, 2026
cfa5b4c
docs(agglayer): document native faucet registration and updated bridg…
partylikeits1983 May 5, 2026
f61c3ad
Apply suggestions from code review
mmagician May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## v0.15.0 (TBD)

### Features

- Added lock/unlock path for Miden-native tokens in the AggLayer bridge: `is_native` flag in `faucet_registry_map`, bridge-local `faucet_metadata_map` (replacing FPI to faucets for conversion data), and `lock_asset` / `unlock_and_send` procedures so the bridge holds native assets in its own vault instead of burn/mint via a faucet ([#2771](https://github.com/0xMiden/protocol/pull/2771)).
### Changes
- Added validation of leaf type on CLAIM note processing to prevent message leaves from being processed as asset claims ([#2730](https://github.com/0xMiden/protocol/pull/2730)).

Expand Down
33 changes: 19 additions & 14 deletions bin/bench-transaction/src/context_setups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use miden_agglayer::{
B2AggNote,
ClaimNoteStorage,
ConfigAggBridgeNote,
ConversionMetadata,
EthAddress,
MetadataHash,
UpdateGerNote,
Expand Down Expand Up @@ -206,10 +207,6 @@ pub async fn tx_consume_claim_note(data_source: ClaimDataSource) -> Result<Trans
max_supply,
Felt::ZERO,
bridge_account.id(),
&origin_token_address,
origin_network,
scale,
leaf_data.metadata_hash,
);
builder.add_account(agglayer_faucet.clone())?;

Expand All @@ -229,6 +226,7 @@ pub async fn tx_consume_claim_note(data_source: ClaimDataSource) -> Result<Trans
.scale_to_token_amount(scale as u32)
.expect("amount should scale successfully");

let config_metadata_hash = leaf_data.metadata_hash;
let claim_inputs = ClaimNoteStorage {
proof_data,
leaf_data,
Expand All @@ -246,9 +244,14 @@ pub async fn tx_consume_claim_note(data_source: ClaimDataSource) -> Result<Trans

// CREATE CONFIG_AGG_BRIDGE NOTE
let config_note = ConfigAggBridgeNote::create(
agglayer_faucet.id(),
&origin_token_address,
origin_network,
ConversionMetadata {
faucet_account_id: agglayer_faucet.id(),
origin_token_address,
scale,
origin_network,
is_native: false,
metadata_hash: config_metadata_hash,
},
bridge_admin.id(),
bridge_account.id(),
builder.rng_mut(),
Expand Down Expand Up @@ -406,18 +409,20 @@ pub async fn tx_consume_b2agg_note(pre_populate_leaves: Option<u32>) -> Result<T
Felt::new(FungibleAsset::MAX_AMOUNT),
Felt::new(bridge_amount),
bridge_account.id(),
&origin_token_address,
origin_network,
scale,
MetadataHash::from_token_info("AGG", "AGG", 8),
);
builder.add_account(faucet.clone())?;

// CREATE CONFIG_AGG_BRIDGE NOTE (registers faucet + token address in bridge)
let metadata_hash = MetadataHash::from_token_info("AGG", "AGG", 8);
let config_note = ConfigAggBridgeNote::create(
faucet.id(),
&origin_token_address,
origin_network,
ConversionMetadata {
faucet_account_id: faucet.id(),
origin_token_address,
scale,
origin_network,
is_native: false,
metadata_hash,
},
bridge_admin.id(),
bridge_account.id(),
builder.rng_mut(),
Expand Down
226 changes: 154 additions & 72 deletions crates/miden-agglayer/SPEC.md
Comment thread
partylikeits1983 marked this conversation as resolved.

Large diffs are not rendered by default.

Loading
Loading