@aztec/constants 0.0.1-commit.b655e406 → 0.0.1-commit.bf2612ae

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  // GENERATED FILE - DO NOT EDIT, RUN yarn remake-constants
2
2
  export const MAX_FIELD_VALUE = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;
3
+ export const MAX_ETH_ADDRESS_BIT_SIZE = 160;
4
+ export const MAX_ETH_ADDRESS_VALUE = 1461501637330902918203684832716283019655932542975n;
3
5
  export const MAX_U64_VALUE = 18446744073709551615n;
4
6
  export const MAX_U32_VALUE = 4294967295;
5
7
  export const MAX_FR_CALLDATA_TO_ALL_ENQUEUED_CALLS = 16000;
@@ -10,6 +12,7 @@ export const NOTE_HASH_TREE_HEIGHT = 42;
10
12
  export const PUBLIC_DATA_TREE_HEIGHT = 40;
11
13
  export const NULLIFIER_TREE_HEIGHT = 42;
12
14
  export const L1_TO_L2_MSG_TREE_HEIGHT = 36;
15
+ export const OUT_HASH_TREE_HEIGHT = 6;
13
16
  export const ARTIFACT_FUNCTION_TREE_MAX_HEIGHT = 7;
14
17
  export const NULLIFIER_TREE_ID = 0;
15
18
  export const NOTE_HASH_TREE_ID = 1;
@@ -18,6 +21,7 @@ export const L1_TO_L2_MESSAGE_TREE_ID = 3;
18
21
  export const ARCHIVE_TREE_ID = 4;
19
22
  export const NOTE_HASH_TREE_LEAF_COUNT = 4398046511104;
20
23
  export const L1_TO_L2_MSG_TREE_LEAF_COUNT = 68719476736;
24
+ export const OUT_HASH_TREE_LEAF_COUNT = 64;
21
25
  export const NOTE_HASH_SUBTREE_HEIGHT = 6;
22
26
  export const NULLIFIER_SUBTREE_HEIGHT = 6;
23
27
  export const PUBLIC_DATA_SUBTREE_HEIGHT = 6;
@@ -37,8 +41,8 @@ export const MAX_PUBLIC_DATA_READS_PER_TX = 64;
37
41
  export const MAX_L2_TO_L1_MSGS_PER_TX = 8;
38
42
  export const MAX_NOTE_HASH_READ_REQUESTS_PER_TX = 64;
39
43
  export const MAX_NULLIFIER_READ_REQUESTS_PER_TX = 64;
40
- export const MAX_KEY_VALIDATION_REQUESTS_PER_TX = 64;
41
44
  export const MAX_PRIVATE_LOGS_PER_TX = 64;
45
+ export const MAX_KEY_VALIDATION_REQUESTS_PER_TX = 64;
42
46
  export const MAX_CONTRACT_CLASS_LOGS_PER_TX = 1;
43
47
  export const MAX_NOTE_HASHES_PER_CALL = 16;
44
48
  export const MAX_NULLIFIERS_PER_CALL = 16;
@@ -47,43 +51,56 @@ export const MAX_ENQUEUED_CALLS_PER_CALL = 32;
47
51
  export const MAX_L2_TO_L1_MSGS_PER_CALL = 8;
48
52
  export const MAX_NOTE_HASH_READ_REQUESTS_PER_CALL = 16;
49
53
  export const MAX_NULLIFIER_READ_REQUESTS_PER_CALL = 16;
50
- export const MAX_KEY_VALIDATION_REQUESTS_PER_CALL = 16;
51
54
  export const MAX_PRIVATE_LOGS_PER_CALL = 16;
55
+ export const MAX_KEY_VALIDATION_REQUESTS_PER_CALL = 16;
52
56
  export const MAX_CONTRACT_CLASS_LOGS_PER_CALL = 1;
53
57
  export const NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP = 1024;
54
- export const PRIVATE_KERNEL_INIT_INDEX = 0;
55
- export const PRIVATE_KERNEL_INNER_INDEX = 1;
56
- export const PRIVATE_KERNEL_TAIL_INDEX = 2;
57
- export const PRIVATE_KERNEL_TAIL_TO_PUBLIC_INDEX = 3;
58
+ export const PRIVATE_KERNEL_INIT_VK_INDEX = 0;
59
+ export const PRIVATE_KERNEL_INNER_VK_INDEX = 1;
60
+ export const PRIVATE_KERNEL_TAIL_VK_INDEX = 2;
61
+ export const PRIVATE_KERNEL_TAIL_TO_PUBLIC_VK_INDEX = 3;
58
62
  export const HIDING_KERNEL_TO_ROLLUP_VK_INDEX = 4;
59
63
  export const HIDING_KERNEL_TO_PUBLIC_VK_INDEX = 5;
60
64
  export const PUBLIC_CHONK_VERIFIER_VK_INDEX = 6;
61
- export const AVM_VK_INDEX = 7;
62
- export const PRIVATE_TX_BASE_ROLLUP_VK_INDEX = 8;
63
- export const PUBLIC_TX_BASE_ROLLUP_VK_INDEX = 9;
64
- export const TX_MERGE_ROLLUP_VK_INDEX = 10;
65
- export const BLOCK_ROOT_FIRST_ROLLUP_VK_INDEX = 11;
66
- export const BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP_VK_INDEX = 12;
67
- export const BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP_VK_INDEX = 13;
68
- export const BLOCK_ROOT_ROLLUP_VK_INDEX = 14;
69
- export const BLOCK_ROOT_SINGLE_TX_ROLLUP_VK_INDEX = 15;
70
- export const BLOCK_MERGE_ROLLUP_VK_INDEX = 16;
71
- export const CHECKPOINT_ROOT_ROLLUP_VK_INDEX = 17;
72
- export const CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP_VK_INDEX = 18;
73
- export const CHECKPOINT_PADDING_ROLLUP_VK_INDEX = 19;
74
- export const CHECKPOINT_MERGE_ROLLUP_VK_INDEX = 20;
75
- export const ROOT_ROLLUP_VK_INDEX = 21;
76
- export const PARITY_BASE_VK_INDEX = 22;
77
- export const PARITY_ROOT_VK_INDEX = 23;
78
- export const PRIVATE_KERNEL_RESET_INDEX = 24;
65
+ export const PRIVATE_TX_BASE_ROLLUP_VK_INDEX = 7;
66
+ export const PUBLIC_TX_BASE_ROLLUP_VK_INDEX = 8;
67
+ export const TX_MERGE_ROLLUP_VK_INDEX = 9;
68
+ export const BLOCK_ROOT_FIRST_ROLLUP_VK_INDEX = 10;
69
+ export const BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP_VK_INDEX = 11;
70
+ export const BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP_VK_INDEX = 12;
71
+ export const BLOCK_ROOT_ROLLUP_VK_INDEX = 13;
72
+ export const BLOCK_ROOT_SINGLE_TX_ROLLUP_VK_INDEX = 14;
73
+ export const BLOCK_MERGE_ROLLUP_VK_INDEX = 15;
74
+ export const CHECKPOINT_ROOT_ROLLUP_VK_INDEX = 16;
75
+ export const CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP_VK_INDEX = 17;
76
+ export const CHECKPOINT_PADDING_ROLLUP_VK_INDEX = 18;
77
+ export const CHECKPOINT_MERGE_ROLLUP_VK_INDEX = 19;
78
+ export const ROOT_ROLLUP_VK_INDEX = 20;
79
+ export const PARITY_BASE_VK_INDEX = 21;
80
+ export const PARITY_ROOT_VK_INDEX = 22;
81
+ export const PRIVATE_KERNEL_RESET_VK_INDEX = 23;
82
+ export const GLOBAL_INDEX_NOTE_HASH_READ_REQUEST_OFFSET = 0;
83
+ export const GLOBAL_INDEX_NULLIFIER_READ_REQUEST_OFFSET = 16;
84
+ export const GLOBAL_INDEX_NOTE_HASH_OFFSET = 32;
85
+ export const GLOBAL_INDEX_NULLIFIER_OFFSET = 48;
86
+ export const GLOBAL_INDEX_PRIVATE_CALL_REQUEST_START_OFFSET = 64;
87
+ export const GLOBAL_INDEX_PRIVATE_CALL_REQUEST_END_OFFSET = 72;
88
+ export const GLOBAL_INDEX_PUBLIC_CALL_REQUEST_OFFSET = 80;
89
+ export const GLOBAL_INDEX_L2_TO_L1_MSG_OFFSET = 112;
90
+ export const GLOBAL_INDEX_PRIVATE_LOG_OFFSET = 120;
91
+ export const GLOBAL_INDEX_CONTRACT_CLASS_LOG_HASH_OFFSET = 136;
92
+ export const GLOBAL_INDEX_CONTRACT_MIN_REVERTIBLE_SIDE_EFFECT_COUNTER_OFFSET = 137;
93
+ export const TOTAL_COUNTED_SIDE_EFFECTS_PER_CALL = 138;
79
94
  export const FUNCTION_SELECTOR_NUM_BYTES = 4;
95
+ export const INITIAL_CHECKPOINT_NUMBER = 1;
80
96
  export const INITIAL_L2_BLOCK_NUM = 1;
81
97
  export const FIELDS_PER_BLOB = 4096;
82
- export const BLOBS_PER_BLOCK = 6;
98
+ export const BLOBS_PER_CHECKPOINT = 6;
83
99
  export const AZTEC_MAX_EPOCH_DURATION = 48;
84
100
  export const MAX_INCLUDE_BY_TIMESTAMP_DURATION = 86400;
85
101
  export const GENESIS_BLOCK_HEADER_HASH = 6230580493657010651770048453555730909612826595416770775370473752814121567446n;
86
102
  export const GENESIS_ARCHIVE_ROOT = 14269942583723164841365114274712143548835546030057296325580016468921911294613n;
103
+ export const EMPTY_EPOCH_OUT_HASH = 425901435741743301163237390758864716627999612705062243139499504804273333597n;
87
104
  export const MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 3000;
88
105
  export const MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 3000;
89
106
  export const MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS = 3000;
@@ -100,7 +117,7 @@ export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
100
117
  export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 3;
101
118
  export const MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
102
119
  export const FEE_JUICE_ADDRESS = 5;
103
- export const ROUTER_ADDRESS = 6;
120
+ export const PUBLIC_CHECKS_ADDRESS = 6;
104
121
  export const SIDE_EFFECT_MASKING_ADDRESS = 12;
105
122
  export const NULL_MSG_SENDER_CONTRACT_ADDRESS = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;
106
123
  export const CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT = 79025834455612;
@@ -119,7 +136,6 @@ export const GAS_FEES_LENGTH = 2;
119
136
  export const GAS_LENGTH = 2;
120
137
  export const GAS_SETTINGS_LENGTH = 8;
121
138
  export const CALL_CONTEXT_LENGTH = 4;
122
- export const CONTENT_COMMITMENT_LENGTH = 3;
123
139
  export const CONTRACT_INSTANCE_LENGTH = 16;
124
140
  export const CONTRACT_STORAGE_READ_LENGTH = 3;
125
141
  export const CONTRACT_STORAGE_UPDATE_REQUEST_LENGTH = 3;
@@ -129,7 +145,7 @@ export const FUNCTION_LEAF_PREIMAGE_LENGTH = 5;
129
145
  export const GLOBAL_VARIABLES_LENGTH = 9;
130
146
  export const APPEND_ONLY_TREE_SNAPSHOT_LENGTH = 2;
131
147
  export const APPEND_ONLY_TREE_SNAPSHOT_LENGTH_BYTES = 36;
132
- export const SPONGE_BLOB_LENGTH = 11;
148
+ export const SPONGE_BLOB_LENGTH = 10;
133
149
  export const BLS12_FR_LIMBS = 3;
134
150
  export const BLS12_FQ_LIMBS = 4;
135
151
  export const BLS12_POINT_LENGTH = 9;
@@ -146,7 +162,6 @@ export const KEY_VALIDATION_REQUEST_LENGTH = 4;
146
162
  export const KEY_VALIDATION_REQUEST_AND_GENERATOR_LENGTH = 5;
147
163
  export const SCOPED_KEY_VALIDATION_REQUEST_AND_GENERATOR_LENGTH = 6;
148
164
  export const PARTIAL_STATE_REFERENCE_LENGTH = 6;
149
- export const READ_REQUEST_LENGTH = 2;
150
165
  export const TREE_LEAF_READ_REQUEST_LENGTH = 2;
151
166
  export const PRIVATE_LOG_SIZE_IN_FIELDS = 18;
152
167
  export const PRIVATE_LOG_LENGTH = 19;
@@ -181,23 +196,22 @@ export const TX_REQUEST_LENGTH = 15;
181
196
  export const TOTAL_FEES_LENGTH = 1;
182
197
  export const TOTAL_MANA_USED_LENGTH = 1;
183
198
  export const BLOCK_HEADER_LENGTH = 22;
184
- export const BLOCK_HEADER_LENGTH_BYTES = 616;
185
- export const PROPOSED_BLOCK_HEADER_LENGTH = 11;
186
- export const PROPOSED_BLOCK_HEADER_LENGTH_BYTES = 284;
187
- export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 868;
199
+ export const CHECKPOINT_HEADER_LENGTH = 12;
200
+ export const CHECKPOINT_HEADER_SIZE_IN_BYTES = 316;
201
+ export const SCOPED_READ_REQUEST_LEN = 3;
202
+ export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 902;
188
203
  export const PRIVATE_CONTEXT_INPUTS_LENGTH = 37;
189
204
  export const FEE_RECIPIENT_LENGTH = 2;
190
205
  export const HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE = 56;
191
206
  export const PAIRING_POINTS_SIZE = 16;
192
207
  export const IPA_CLAIM_SIZE = 10;
193
- export const SCOPED_READ_REQUEST_LEN = 3;
194
208
  export const PUBLIC_DATA_READ_LENGTH = 3;
195
- export const PRIVATE_VALIDATION_REQUESTS_LENGTH = 773;
209
+ export const PRIVATE_VALIDATION_REQUESTS_LENGTH = 771;
196
210
  export const PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH = 1371;
197
211
  export const TX_CONSTANT_DATA_LENGTH = 34;
198
212
  export const COMBINED_CONSTANT_DATA_LENGTH = 43;
199
213
  export const PRIVATE_ACCUMULATED_DATA_LENGTH = 2187;
200
- export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3002;
214
+ export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3001;
201
215
  export const PRIVATE_TO_PUBLIC_ACCUMULATED_DATA_LENGTH = 1499;
202
216
  export const PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 152;
203
217
  export const NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3;
@@ -210,19 +224,19 @@ export const AVM_CIRCUIT_PUBLIC_INPUTS_LENGTH = 5008;
210
224
  export const BLOCK_CONSTANT_DATA_LENGTH = 16;
211
225
  export const CHECKPOINT_CONSTANT_DATA_LENGTH = 10;
212
226
  export const EPOCH_CONSTANT_DATA_LENGTH = 5;
213
- export const TX_ROLLUP_PUBLIC_INPUTS_LENGTH = 54;
214
- export const BLOCK_ROLLUP_PUBLIC_INPUTS_LENGTH = 58;
215
- export const CHECKPOINT_ROLLUP_PUBLIC_INPUTS_LENGTH = 193;
216
- export const ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH = 158;
227
+ export const TX_ROLLUP_PUBLIC_INPUTS_LENGTH = 52;
228
+ export const BLOCK_ROLLUP_PUBLIC_INPUTS_LENGTH = 56;
229
+ export const CHECKPOINT_ROLLUP_PUBLIC_INPUTS_LENGTH = 197;
230
+ export const ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH = 159;
217
231
  export const NUM_MSGS_PER_BASE_PARITY = 256;
218
232
  export const NUM_BASE_PARITY_PER_ROOT_PARITY = 4;
219
233
  export const RECURSIVE_PROOF_LENGTH = 457;
220
234
  export const NESTED_RECURSIVE_PROOF_LENGTH = 457;
221
- export const IPA_PROOF_LENGTH = 68;
222
- export const ULTRA_KECCAK_PROOF_LENGTH = 350;
223
- export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 535;
224
- export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 535;
225
- export const CHONK_PROOF_LENGTH = 2084;
235
+ export const IPA_PROOF_LENGTH = 64;
236
+ export const ULTRA_KECCAK_PROOF_LENGTH = 339;
237
+ export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 531;
238
+ export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 531;
239
+ export const CHONK_PROOF_LENGTH = 1963;
226
240
  export const ULTRA_VK_LENGTH_IN_FIELDS = 115;
227
241
  export const MEGA_VK_LENGTH_IN_FIELDS = 127;
228
242
  export const CHONK_VK_LENGTH_IN_FIELDS = 127;
@@ -244,6 +258,9 @@ export const AVM_BITWISE_OR_OP_ID = 1;
244
258
  export const AVM_BITWISE_XOR_OP_ID = 2;
245
259
  export const AVM_KECCAKF1600_NUM_ROUNDS = 24;
246
260
  export const AVM_KECCAKF1600_STATE_SIZE = 25;
261
+ export const AVM_TX_PHASE_VALUE_START = 0;
262
+ export const AVM_TX_PHASE_VALUE_SETUP = 3;
263
+ export const AVM_TX_PHASE_VALUE_LAST = 11;
247
264
  export const AVM_SUBTRACE_ID_EXECUTION = 1;
248
265
  export const AVM_SUBTRACE_ID_ALU = 2;
249
266
  export const AVM_SUBTRACE_ID_BITWISE = 4;
@@ -366,7 +383,7 @@ export const AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX = 4684;
366
383
  export const AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH = 4685;
367
384
  export const AVM_NUM_PUBLIC_INPUT_COLUMNS = 4;
368
385
  export const AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH = 18740;
369
- export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED = 20000;
386
+ export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED = 16200;
370
387
  export const AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED = 1000;
371
388
  export const AVM_MAX_PROCESSABLE_L2_GAS = 6000000;
372
389
  export const DA_BYTES_PER_FIELD = 32;
@@ -374,7 +391,7 @@ export const DA_GAS_PER_BYTE = 16;
374
391
  export const FIXED_DA_GAS = 512;
375
392
  export const FIXED_L2_GAS = 512;
376
393
  export const FIXED_AVM_STARTUP_L2_GAS = 20000;
377
- export const MAX_PROCESSABLE_DA_GAS_PER_BLOCK = 12582912;
394
+ export const MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT = 12582912;
378
395
  export const GAS_ESTIMATION_TEARDOWN_L2_GAS_LIMIT = 6000000;
379
396
  export const GAS_ESTIMATION_L2_GAS_LIMIT = 12000000;
380
397
  export const GAS_ESTIMATION_TEARDOWN_DA_GAS_LIMIT = 12582912;
@@ -384,20 +401,22 @@ export const DEFAULT_L2_GAS_LIMIT = 6000000;
384
401
  export const DEFAULT_TEARDOWN_DA_GAS_LIMIT = 1000000;
385
402
  export const DEFAULT_DA_GAS_LIMIT = 12582912;
386
403
  export const L2_GAS_DISTRIBUTED_STORAGE_PREMIUM = 1024;
387
- export const L2_GAS_PER_PRIVATE_LOG = 0;
388
- export const L2_GAS_PER_CONTRACT_CLASS_LOG = 0;
389
- export const L2_GAS_PER_L2_TO_L1_MSG = 200;
390
404
  export const AVM_PC_SIZE_IN_BITS = 32;
391
405
  export const AVM_MAX_OPERANDS = 7;
392
406
  export const AVM_MAX_REGISTERS = 6;
393
407
  export const AVM_ADDRESSING_BASE_RESOLUTION_L2_GAS = 3;
394
408
  export const AVM_ADDRESSING_INDIRECT_L2_GAS = 3;
395
409
  export const AVM_ADDRESSING_RELATIVE_L2_GAS = 3;
410
+ export const L2_GAS_PER_NOTE_HASH = 0;
411
+ export const L2_GAS_PER_NULLIFIER = 0;
412
+ export const L2_GAS_PER_L2_TO_L1_MSG = 200;
413
+ export const L2_GAS_PER_PRIVATE_LOG = 0;
414
+ export const L2_GAS_PER_CONTRACT_CLASS_LOG = 0;
396
415
  export const AVM_ADD_BASE_L2_GAS = 12;
397
416
  export const AVM_SUB_BASE_L2_GAS = 12;
398
417
  export const AVM_MUL_BASE_L2_GAS = 27;
399
418
  export const AVM_DIV_BASE_L2_GAS = 27;
400
- export const AVM_FDIV_BASE_L2_GAS = 9;
419
+ export const AVM_FDIV_BASE_L2_GAS = 225;
401
420
  export const AVM_EQ_BASE_L2_GAS = 12;
402
421
  export const AVM_LT_BASE_L2_GAS = 42;
403
422
  export const AVM_LTE_BASE_L2_GAS = 42;
@@ -419,25 +438,25 @@ export const AVM_INTERNALCALL_BASE_L2_GAS = 9;
419
438
  export const AVM_INTERNALRETURN_BASE_L2_GAS = 9;
420
439
  export const AVM_SET_BASE_L2_GAS = 27;
421
440
  export const AVM_MOV_BASE_L2_GAS = 12;
422
- export const AVM_SLOAD_BASE_L2_GAS = 129;
423
- export const AVM_SSTORE_BASE_L2_GAS = 1657;
424
- export const AVM_NOTEHASHEXISTS_BASE_L2_GAS = 126;
425
- export const AVM_EMITNOTEHASH_BASE_L2_GAS = 1285;
426
- export const AVM_NULLIFIEREXISTS_BASE_L2_GAS = 132;
427
- export const AVM_EMITNULLIFIER_BASE_L2_GAS = 1540;
428
- export const AVM_L1TOL2MSGEXISTS_BASE_L2_GAS = 108;
429
- export const AVM_GETCONTRACTINSTANCE_BASE_L2_GAS = 1527;
441
+ export const AVM_SLOAD_BASE_L2_GAS = 1290;
442
+ export const AVM_SSTORE_BASE_L2_GAS = 33140;
443
+ export const AVM_NOTEHASHEXISTS_BASE_L2_GAS = 504;
444
+ export const AVM_EMITNOTEHASH_BASE_L2_GAS = 19275;
445
+ export const AVM_NULLIFIEREXISTS_BASE_L2_GAS = 924;
446
+ export const AVM_EMITNULLIFIER_BASE_L2_GAS = 30800;
447
+ export const AVM_L1TOL2MSGEXISTS_BASE_L2_GAS = 540;
448
+ export const AVM_GETCONTRACTINSTANCE_BASE_L2_GAS = 6108;
430
449
  export const AVM_EMITUNENCRYPTEDLOG_BASE_L2_GAS = 15;
431
- export const AVM_SENDL2TOL1MSG_BASE_L2_GAS = 209;
432
- export const AVM_CALL_BASE_L2_GAS = 3312;
433
- export const AVM_STATICCALL_BASE_L2_GAS = 3312;
450
+ export const AVM_SENDL2TOL1MSG_BASE_L2_GAS = 478;
451
+ export const AVM_CALL_BASE_L2_GAS = 9936;
452
+ export const AVM_STATICCALL_BASE_L2_GAS = 9936;
434
453
  export const AVM_RETURN_BASE_L2_GAS = 9;
435
454
  export const AVM_REVERT_BASE_L2_GAS = 9;
436
455
  export const AVM_DEBUGLOG_BASE_L2_GAS = 9;
437
- export const AVM_POSEIDON2_BASE_L2_GAS = 24;
456
+ export const AVM_POSEIDON2_BASE_L2_GAS = 360;
438
457
  export const AVM_SHA256COMPRESSION_BASE_L2_GAS = 12288;
439
458
  export const AVM_KECCAKF1600_BASE_L2_GAS = 58176;
440
- export const AVM_ECADD_BASE_L2_GAS = 27;
459
+ export const AVM_ECADD_BASE_L2_GAS = 270;
441
460
  export const AVM_TORADIXBE_BASE_L2_GAS = 24;
442
461
  export const AVM_CALLDATACOPY_DYN_L2_GAS = 3;
443
462
  export const AVM_RETURNDATACOPY_DYN_L2_GAS = 3;
@@ -451,17 +470,18 @@ export const AVM_EMITUNENCRYPTEDLOG_BASE_DA_GAS = 1024;
451
470
  export const AVM_EMITUNENCRYPTEDLOG_DYN_DA_GAS = 512;
452
471
  export const AVM_SSTORE_DYN_DA_GAS = 1024;
453
472
  export const TX_START_PREFIX = 8392562855083340404n;
473
+ export const TX_START_PREFIX_BIT_SIZE = 64;
454
474
  export const BLOCK_END_PREFIX = 1815594492414860291684n;
455
- export const PROOF_TYPE_PLONK = 0;
456
- export const PROOF_TYPE_HONK = 1;
457
- export const PROOF_TYPE_OINK = 2;
458
- export const PROOF_TYPE_HN = 3;
459
- export const PROOF_TYPE_AVM = 4;
460
- export const PROOF_TYPE_ROLLUP_HONK = 5;
461
- export const PROOF_TYPE_ROOT_ROLLUP_HONK = 6;
462
- export const PROOF_TYPE_HN_FINAL = 8;
463
- export const PROOF_TYPE_HN_TAIL = 9;
464
- export const PROOF_TYPE_CHONK = 10;
475
+ export const CHECKPOINT_END_PREFIX = 2016229657840014237853300314959460n;
476
+ export const PROOF_TYPE_HONK = 0;
477
+ export const PROOF_TYPE_OINK = 1;
478
+ export const PROOF_TYPE_HN = 2;
479
+ export const PROOF_TYPE_AVM = 3;
480
+ export const PROOF_TYPE_ROLLUP_HONK = 4;
481
+ export const PROOF_TYPE_ROOT_ROLLUP_HONK = 5;
482
+ export const PROOF_TYPE_HN_FINAL = 7;
483
+ export const PROOF_TYPE_HN_TAIL = 8;
484
+ export const PROOF_TYPE_CHONK = 9;
465
485
  export const TWO_POW_64 = 18446744073709551616n;
466
486
  export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT = 6;
467
487
  export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT = 18291678969210913367302010540259942201271604198321103848479209155223586227821n;
@@ -486,54 +506,37 @@ export enum GeneratorIndex {
486
506
  NOTE_HASH_NONCE = 2,
487
507
  UNIQUE_NOTE_HASH = 3,
488
508
  SILOED_NOTE_HASH = 4,
489
- MESSAGE_NULLIFIER = 5,
490
- INITIALIZATION_NULLIFIER = 6,
509
+ NOTE_NULLIFIER = 53,
491
510
  OUTER_NULLIFIER = 7,
492
- PUBLIC_DATA_READ = 8,
493
- PUBLIC_DATA_UPDATE_REQUEST = 9,
494
- FUNCTION_DATA = 10,
511
+ PUBLIC_LEAF_INDEX = 23,
512
+ MESSAGE_NULLIFIER = 5,
495
513
  FUNCTION_LEAF = 11,
496
- CONTRACT_DEPLOYMENT_DATA = 12,
514
+ PUBLIC_BYTECODE = 60,
515
+ CONTRACT_CLASS_ID = 16,
497
516
  CONSTRUCTOR = 13,
498
- CONSTRUCTOR_ARGS = 14,
499
- CONTRACT_ADDRESS_V1 = 15,
500
- CONTRACT_LEAF = 16,
501
- CALL_CONTEXT = 17,
502
- CALL_STACK_ITEM = 18,
503
- CALL_STACK_ITEM_2 = 19,
504
- SECRET_HASH = 20,
505
- L2_TO_L1_MSG = 21,
506
- TX_CONTEXT = 22,
507
- PUBLIC_LEAF_INDEX = 23,
508
- PUBLIC_DATA_LEAF = 24,
509
- SIGNED_TX_REQUEST = 25,
510
- GLOBAL_VARIABLES = 26,
517
+ NSK_M = 48,
518
+ IVSK_M = 49,
519
+ OVSK_M = 50,
520
+ TSK_M = 51,
521
+ PUBLIC_KEYS_HASH = 52,
511
522
  PARTIAL_ADDRESS = 27,
523
+ CONTRACT_ADDRESS_V1 = 15,
512
524
  BLOCK_HASH = 28,
513
- SIDE_EFFECT = 29,
514
- FEE_PAYLOAD = 30,
515
- COMBINED_PAYLOAD = 31,
516
- TX_NULLIFIER = 32,
517
525
  TX_REQUEST = 33,
518
- SIGNATURE_PAYLOAD = 34,
519
- VK = 41,
526
+ PUBLIC_TX_HASH = 56,
527
+ PRIVATE_TX_HASH = 57,
520
528
  PUBLIC_CALLDATA = 43,
521
529
  FUNCTION_ARGS = 44,
530
+ PROTOCOL_CONTRACTS = 61,
531
+ EVENT_COMMITMENT = 59,
522
532
  AUTHWIT_INNER = 45,
523
533
  AUTHWIT_OUTER = 46,
524
534
  AUTHWIT_NULLIFIER = 47,
525
- NSK_M = 48,
526
- IVSK_M = 49,
527
- OVSK_M = 50,
528
- TSK_M = 51,
529
- PUBLIC_KEYS_HASH = 52,
530
- NOTE_NULLIFIER = 53,
531
535
  SYMMETRIC_KEY = 54,
532
536
  SYMMETRIC_KEY_2 = 55,
533
- PUBLIC_TX_HASH = 56,
534
- PRIVATE_TX_HASH = 57,
535
537
  PARTIAL_NOTE_VALIDITY_COMMITMENT = 58,
536
- EVENT_COMMITMENT = 59,
537
- PUBLIC_BYTECODE = 60,
538
- PROTOCOL_CONTRACTS = 61,
539
- }
538
+ INITIALIZATION_NULLIFIER = 6,
539
+ SECRET_HASH = 20,
540
+ TX_NULLIFIER = 32,
541
+ SIGNATURE_PAYLOAD = 34,
542
+ }
package/src/constants.ts CHANGED
@@ -1,5 +1,32 @@
1
+ import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+
4
+ // Re-export L2 block number constants with proper BlockNumber type
5
+ // Note: The generated constants are plain numbers, but we provide typed versions here
6
+ import {
7
+ GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT,
8
+ INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW,
9
+ INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW,
10
+ } from './constants.gen.js';
11
+
1
12
  // Typescript-land-only constants
2
13
  export const SPONSORED_FPC_SALT = BigInt(0);
3
14
 
4
15
  // Autogenerated constants loaded from noir-land
16
+ // eslint-disable-next-line import-x/export
5
17
  export * from './constants.gen.js';
18
+
19
+ /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */
20
+ // Shadow the export from constants.gen above
21
+ // eslint-disable-next-line import-x/export
22
+ export const INITIAL_L2_BLOCK_NUM: BlockNumber = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
23
+
24
+ /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */
25
+ // Shadow the export from constants.gen above
26
+
27
+ export const INITIAL_L2_CHECKPOINT_NUM: CheckpointNumber = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
28
+
29
+ /** The block header hash for the genesis block 0. */
30
+ // Shadow the export from constants.gen above
31
+ // eslint-disable-next-line import-x/export
32
+ export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);