V2
The current transaction calldata version for transactV2 method
The second calldata version doesn't contain tree_proof and root_after fields since the transaction finalized with the separate method by prover. Also the memo block format was changed. Now it consist of 3 subblocks: tx_specific, message and extra_data.
selector
4
0
Contract method selector (0x5fd28f8c)
calldata_version
1
4
Available versions: 2 (the latest)
delta.index
6
69
Merkle tree index at the time of transaction creation
delta.energy
14
75
Pool XP token delta after the transaction execution (signed integer)
delta.token
8
89
Pool balance delta after the transaction execution (signed integer, in the pool dimension)
tx_proof
256
97
zkSNARK proof for transaction
tx_type
2
353
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
355
The following memo block size in bytes
memo.spec.proxy
20
357
The native address of the operator who commits the transaction to the pool contract and receives a reward for it (proxy_fee). It's selected and set by the transaction creator
memo.spec.prover
20
377
The native address of the prover who can finalize the transaction during the grace period and claim the prover_fee reward. After the grace period, anyone can calculate the Merkle proof and finalize the transaction (claiming the prover's reward)
memo.spec.proxy_fee
8
397
The tokens amount to be transferred to the memo.proxy after the transaction commitment (the Pool contract will multiply the fee by denominator)
memo.spec.prover_fee
8
405
The tokens amount to be transferred to the prover who will publish the new Merkle tree root corresponding to the transaction.
memo.msg.size
2
413
Length of memo.msg which contains encrypted account and notes
memo.msg.ItemsNum
2
415
Number of encrypted items (leafs) in the memo block. Deposit transactions contain an account only, i.e. ItemsNum always equals 1. Stored as a little-endian number
memo.msg.encryption_type
2
417
Memo format flags: 0x0000: ECDH encryption mode 0x0001: plain text (DD) 0x0002: symmetric encryption mode
memo.msg.Hash_acc
32
419
Output account hash (with updated balance)
memo.msg.nonce
24
451
XChaCha20 nonce. Used to decrypt memo.keys_enc by transaction sender
memo.msg.keys_enc
48
475
Encrypted account encryption key
memo.msg.acc_enc
86
523
Encrypted account with an updated balance
memo.extra_data
memo_size - 252
609
Contains application-specific data attached to the transaction such as user comments
ECDSA signature (r, s)
64
357 + memo_size
The nullifier signature. Used to recover deposit spender
Total bytes: 673 (without extra data)
selector
4
0
Contract method selector (0x5fd28f8c)
calldata_version
1
4
Available versions: 2 (the latest)
delta.index
6
69
Merkle tree index at the time of transaction creation
delta.energy
14
75
Pool XP token delta after the transaction execution (signed integer)
delta.token
8
89
Pool balance delta after the transaction execution (signed integer, in the pool dimension)
tx_proof
256
97
zkSNARK proof for transaction
tx_type
2
353
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
355
The following memo block size in bytes
memo.spec.proxy
20
357
The native address of the operator who commits the transaction to the pool contract and receives a reward for it (proxy_fee). It's selected and set by the transaction creator
memo.spec.prover
20
377
The native address of the prover who can finalize the transaction during the grace period and claim the prover_fee reward. After the grace period, anyone can calculate the Merkle proof and finalize the transaction (claiming the prover's reward)
memo.spec.proxy_fee
8
397
The tokens amount to be transferred to the memo.proxy after the transaction commitment (the Pool contract will multiply the fee by denominator)
memo.spec.prover_fee
8
405
The tokens amount to be transferred to the prover who will publish the new Merkle tree root corresponding to the transaction.
memo.msg.size
2
413
Length of memo.msg which contains encrypted account and notes
memo.msg.ItemsNum
2
415
Number of encrypted items (leafs) in the memo block (an account and zero or more notes; the maximum items number is 128; little-endian)
memo.msg.encryption_type
2
417
Memo format flags: 0x0000: ECDH encryption mode 0x0001: plain text (DD) 0x0002: symmetric encryption mode
memo.msg.Hash_acc
32
419
Output account hash (with updated balance)
memo.msg.Hash_notes
32 * (memo.msg.ItemsNum - 1)
451
Output note hash
memo.msg.nonce
24
419 + 32 β memo.msg.ItemsNum
XChaCha20 nonce. Used to decrypt memo.keys_enc by transaction sender
memo.msg.keys_enc
32 * memo.msg.ItemsNum + 16
443+ 32 β memo.msg.ItemsNum
Account and notes encryption keys
memo.msg.acc_enc
86
459 + 64 * memo.msg.ItemsNum
Encrypted account with an updated balance
memo.msg.notes_enc
108*(memo.msg.ItemsNum - 1)
545 + 64 * memo.msg.ItemsNum
A single encrypted note (Aiβ,Noteiencβ) takes 108 bytes:
sizeof(Aiβ)= 32 sizeof(Noteiencβ)= 76
memo.extra_data
memo_size - 172 * memo.msg.ItemsNum - 108
437 + 172 * memo.msg.ItemsNum
Contains application-specific data attached to the transaction such as user comments
Typical calldata length: 781 bytes (single-note transfer, without extra data)
selector
4
0
Contract method selector (0x5fd28f8c)
calldata_version
1
4
Available versions: 2 (the latest)
delta.index
6
69
Merkle tree index at the time of transaction creation
delta.energy
14
75
Pool XP token delta after the transaction execution (signed integer)
delta.token
8
89
Pool balance delta after the transaction execution (signed integer, in the pool dimension)
tx_proof
256
97
zkSNARK proof for transaction
tx_type
2
353
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
355
The following memo block size in bytes
memo.spec.proxy
20
357
The native address of the operator who commits the transaction to the pool contract and receives a reward for it (proxy_fee). It's selected and set by the transaction creator
memo.spec.prover
20
377
The native address of the prover who can finalize the transaction during the grace period and claim the prover_fee reward. After the grace period, anyone can calculate the Merkle proof and finalize the transaction (claiming the prover's reward)
memo.spec.proxy_fee
8
397
The tokens amount to be transferred to the memo.proxy after the transaction commitment (the Pool contract will multiply the fee by denominator)
memo.spec.prover_fee
8
405
The tokens amount to be transferred to the prover who will publish the new Merkle tree root corresponding to the transaction.
memo.spec.nativeamount
8
413
Permit signature (EIP712) deadline timestamp, in seconds
memo.spec.receiver
20
421
Destination native (L1) address for withdrawal
memo.msg_size
2
441
Length of memo.msg which contains encrypted account and notes
memo.msg.ItemsNum
2
443
Number of encrypted items (leafs) in the memo block. Withdrawal transactions contain an account only, i.e. ItemsNum always equals 1. Stored as a little-endian number
memo.msg.encryption_type
2
445
Memo format flags: 0x0000: ECDH encryption mode 0x0001: plain text (DD) 0x0002: symmetric encryption mode
memo.msg.Hash_acc
32
447
Output account hash (with updated balance)
memo.msg.nonce
24
479
XChaCha20 nonce. Used to decrypt memo.keys_enc by transaction sender
memo.msg.keys_enc
48
503
Account and notes encryption keys
memo.msg.acc_enc
86
551
Encrypted account with an updated balance
memo.extra_data
memo_size - 280
637
Contains application-specific data attached to the transaction such as user comments
Total bytes: 637 (without extra data)
selector
4
0
Contract method selector (0x5fd28f8c)
calldata_version
1
4
Available versions: 2 (the latest)
delta.index
6
69
Merkle tree index at the time of transaction creation
delta.energy
14
75
Pool XP token delta after the transaction execution (signed integer)
delta.token
8
89
Pool balance delta after the transaction execution (signed integer, in the pool dimension)
tx_proof
256
97
zkSNARK proof for transaction
tx_type
2
353
0 - deposit
1 - transfer
2 - withdraw 3 - permit deposit
memo_size
2
355
The following memo block size in bytes
memo.spec.proxy
20
357
The native address of the operator who commits the transaction to the pool contract and receives a reward for it (proxy_fee). It's selected and set by the transaction creator
memo.spec.prover
20
377
The native address of the prover who can finalize the transaction during the grace period and claim the prover_fee reward. After the grace period, anyone can calculate the Merkle proof and finalize the transaction (claiming the prover's reward)
memo.spec.proxy_fee
8
397
The tokens amount to be transferred to the memo.proxy after the transaction commitment (the Pool contract will multiply the fee by denominator)
memo.spec.prover_fee
8
405
The tokens amount to be transferred to the prover who will publish the new Merkle tree root corresponding to the transaction.
memo.spec.deadline
8
413
Permit signature (EIP712) deadline timestamp, in seconds
memo.spec.holder
20
421
Deposit holder L1-address
memo.msg_size
2
441
Length of memo.msg which contains encrypted account and notes
memo.msg.ItemsNum
2
443
Number of encrypted items (leafs) in the memo block. Deposit transactions contain an account only, i.e. ItemsNum always equals 1. Stored as a little-endian number
memo.msg.encryption_type
2
445
Memo format flags: 0x0000: ECDH encryption mode 0x0001: plain text (DD) 0x0002: symmetric encryption mode
memo.msg.Hash_acc
32
447
Output account hash (with updated balance)
memo.msg.nonce
24
479
XChaCha20 nonce. Used to decrypt memo.keys_enc by transaction sender
memo.msg.keys_enc
48
503
Account and notes encryption keys
memo.msg.acc_enc
86
551
Encrypted account with an updated balance
memo.extra_data
memo_size - 280
637
Contains application-specific data attached to the transaction such as user comments
ECDSA signature (r, s)
64
357 + memo_size
EIP-712 signature (typed data). Used to perform gasless transfer of user's tokens
Total bytes: 701 (without extra data)
Last updated
Was this helpful?