Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions crates/miden-agglayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ static GER_MANAGER_SLOT_NAME: LazyLock<StorageSlotName> = LazyLock::new(|| {
/// It reexports the procedures from `miden::agglayer::bridge`. When linking against this
/// component, the `agglayer` library must be available to the assembler.
/// The procedures of this component are:
/// - `bridge_out`, which bridges an asset from the AggLayer to the destination network.
/// - `verify_leaf_bridge`, which verifies a deposit leaf against one of the stored GERs.
/// - `update_ger`, which injects a new GER into the storage map.
/// - `assert_sender_is_bridge_admin`, which validates CONFIG note senders.
/// - `assert_sender_is_ger_manager`, which validates UPDATE_GER note senders.
/// - `register_faucet`, which registers a faucet in the bridge.
/// - `update_ger`, which injects a new GER into the storage map.
/// - `verify_leaf_bridge`, which verifies a deposit leaf against one of the stored GERs.
/// - `bridge_out`, which bridges an asset out of Miden to the destination network.
///
/// ## Storage Layout
///
Expand All @@ -166,6 +168,8 @@ static GER_MANAGER_SLOT_NAME: LazyLock<StorageSlotName> = LazyLock::new(|| {
/// - [`Self::ler_hi_slot_name`]: Stores the upper 32 bits of the LET root.
/// - [`Self::let_num_leaves_slot_name`]: Stores the number of leaves in the LET frontier.
/// - [`Self::faucet_registry_slot_name`]: Stores the faucet registry map.
/// - [`Self::bridge_admin_slot_name`]: Stores the bridge admin account ID.
/// - [`Self::ger_manager_slot_name`]: Stores the GER manager account ID.
///
/// The bridge starts with an empty faucet registry; faucets are registered at runtime via
/// CONFIG_AGG_BRIDGE notes.
Expand Down Expand Up @@ -434,7 +438,7 @@ impl From<AggLayerFaucet> for AccountComponent {

/// Creates a faucet registry map key from a faucet account ID.
///
/// The key format is `[faucet_id_prefix, faucet_id_suffix, 0, 0]`.
/// The key format is `[0, 0, faucet_id_suffix, faucet_id_prefix]`.
pub fn faucet_registry_key(faucet_id: AccountId) -> Word {
Word::new([Felt::ZERO, Felt::ZERO, faucet_id.suffix(), faucet_id.prefix().as_felt()])
}
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-testing/tests/agglayer/bridge_in.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async fn test_bridge_in_claim_to_p2id(#[case] data_source: ClaimDataSource) -> a
let ger_manager =
builder.add_existing_wallet(Auth::BasicAuth { auth_scheme: AuthScheme::Falcon512Rpo })?;

// CREATE BRIDGE ACCOUNT (with bridge_out component for MMR validation)
// CREATE BRIDGE ACCOUNT
// --------------------------------------------------------------------------------------------
let bridge_seed = builder.rng_mut().draw_word();
let bridge_account =
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-testing/tests/agglayer/bridge_out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ async fn b2agg_note_reclaim_scenario() -> anyhow::Result<()> {
let ger_manager =
builder.add_existing_wallet(Auth::BasicAuth { auth_scheme: AuthScheme::Falcon512Rpo })?;

// Create a bridge account (includes a `bridge_out` component)
// Create a bridge account (includes a `bridge` component)
let bridge_account = create_existing_bridge_account(
builder.rng_mut().draw_word(),
bridge_admin.id(),
Expand Down