@@ -11,7 +11,7 @@ use miden::core::mem
1111# =================================================================================================
1212
1313const PROOF_DATA_SIZE = 536
14- const LEAF_DATA_SIZE = 24
14+ const LEAF_DATA_SIZE = 32
1515const OUTPUT_NOTE_SIZE = 8
1616
1717const PROOF_DATA_START_PTR = 0
6868#! ]
6969#!
7070#! LEAF_DATA_KEY => [
71+ #! leafType[1], // Leaf type (1 felt, uint32)
72+ #! padding[3], // padding (3 felts)
7173#! originNetwork[1], // Origin network identifier (1 felt, uint32)
7274#! originTokenAddress[5], // Origin token address (5 felts, address as 5 u32 felts)
7375#! destinationNetwork[1], // Destination network identifier (1 felt, uint32)
7476#! destinationAddress[5], // Destination address (5 felts, address as 5 u32 felts)
7577#! amount[8], // Amount of tokens (8 felts, uint256 as 8 u32 felts)
7678#! metadata[8], // ABI encoded metadata (8 felts, fixed size)
77- #! EMPTY_WORD // padding
7879#! ]
7980#!
8081#! TODO: Will be removed in future PR
8182#! OUTPUT_NOTE_DATA_KEY => [
8283#! output_p2id_serial_num[4], // P2ID note serial number (4 felts, Word)
8384#! target_faucet_account_id[2], // Target faucet account ID (2 felts, prefix and suffix)
8485#! output_note_tag[1], // P2ID output note tag
86+ #! padding[1], // padding (1 felt)
8587#! ]
8688#!
8789#! Invocation: exec
@@ -151,16 +153,18 @@ end
151153#! - globalIndex [512..519]: 8 felts
152154#! - mainnetExitRoot [520..527]: 8 felts
153155#! - rollupExitRoot [528..535]: 8 felts
154- #! - originNetwork [536] : 1 felt
155- #! - originTokenAddress [537..541]: 5 felts
156- #! - destinationNetwork [542] : 1 felt
157- #! - destinationAddress [543..547]: 5 felts
158- #! - amount [548..555]: 8 felts
159- #! - metadata [556..563]: 8 felts
160- #! - EMPTY_WORD [564..567]: 4 felts
156+ #! - leafType [536] : 1 felt
157+ #! - padding [537..539]: 3 felts
158+ #! - originNetwork [540] : 1 felt
159+ #! - originTokenAddress [541..545]: 5 felts
160+ #! - destinationNetwork [546] : 1 felt
161+ #! - destinationAddress [547..551]: 5 felts
162+ #! - amount [552..559]: 8 felts
163+ #! - metadata [560..567]: 8 felts
161164#! - output_p2id_serial_num [568..571]: 4 felts
162165#! - target_faucet_account_id [572..573]: 2 felts
163166#! - output_note_tag [574] : 1 felt
167+ #! - padding [575] : 1 felt
164168#!
165169#! Where:
166170#! - smtProofLocalExitRoot: SMT proof for local exit root (bytes32[_DEPOSIT_CONTRACT_TREE_DEPTH])
@@ -172,17 +176,19 @@ end
172176#! - Top 191 bits are ignored (not required to be zero), so indexers must decode it exactly like the contract does
173177#! - mainnetExitRoot: Mainnet exit root hash (bytes32 as 8 u32 felts)
174178#! - rollupExitRoot: Rollup exit root hash (bytes32 as 8 u32 felts)
179+ #! - leafType: Leaf type (uint32): [0] transfer Ether / ERC20 tokens, [1] message
175180#! - originNetwork: Origin network identifier (uint32)
176181#! - originTokenAddress: Origin token address (address as 5 u32 felts)
177182#! - destinationNetwork: Destination network identifier (uint32)
178183#! - destinationAddress: Destination address (address as 5 u32 felts)
179184#! - amount: Amount of tokens (uint256 as 8 u32 felts)
180185#! - metadata: ABI encoded metadata (fixed size)
181- #! - EMPTY_WORD: Padding word
186+ #! - padding (3 felts)
182187#! - output_p2id_serial_num: P2ID note serial number (Word)
183188#! - target_faucet_account_id: Target agglayer faucet account ID (prefix and suffix). Only this specific
184189#! account can consume the note - any other account will cause a panic.
185190#! - output_note_tag: P2ID output note tag
191+ #! - padding (1 felt)
186192#!
187193#! Panics if:
188194#! - account does not expose claim procedure.
0 commit comments