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

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.
@@ -51,35 +51,47 @@ export const MAX_KEY_VALIDATION_REQUESTS_PER_CALL = 16;
51
51
  export const MAX_PRIVATE_LOGS_PER_CALL = 16;
52
52
  export const MAX_CONTRACT_CLASS_LOGS_PER_CALL = 1;
53
53
  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;
54
+ export const PRIVATE_KERNEL_INIT_VK_INDEX = 0;
55
+ export const PRIVATE_KERNEL_INNER_VK_INDEX = 1;
56
+ export const PRIVATE_KERNEL_TAIL_VK_INDEX = 2;
57
+ export const PRIVATE_KERNEL_TAIL_TO_PUBLIC_VK_INDEX = 3;
58
58
  export const HIDING_KERNEL_TO_ROLLUP_VK_INDEX = 4;
59
59
  export const HIDING_KERNEL_TO_PUBLIC_VK_INDEX = 5;
60
60
  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;
61
+ export const PRIVATE_TX_BASE_ROLLUP_VK_INDEX = 7;
62
+ export const PUBLIC_TX_BASE_ROLLUP_VK_INDEX = 8;
63
+ export const TX_MERGE_ROLLUP_VK_INDEX = 9;
64
+ export const BLOCK_ROOT_FIRST_ROLLUP_VK_INDEX = 10;
65
+ export const BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP_VK_INDEX = 11;
66
+ export const BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP_VK_INDEX = 12;
67
+ export const BLOCK_ROOT_ROLLUP_VK_INDEX = 13;
68
+ export const BLOCK_ROOT_SINGLE_TX_ROLLUP_VK_INDEX = 14;
69
+ export const BLOCK_MERGE_ROLLUP_VK_INDEX = 15;
70
+ export const CHECKPOINT_ROOT_ROLLUP_VK_INDEX = 16;
71
+ export const CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP_VK_INDEX = 17;
72
+ export const CHECKPOINT_PADDING_ROLLUP_VK_INDEX = 18;
73
+ export const CHECKPOINT_MERGE_ROLLUP_VK_INDEX = 19;
74
+ export const ROOT_ROLLUP_VK_INDEX = 20;
75
+ export const PARITY_BASE_VK_INDEX = 21;
76
+ export const PARITY_ROOT_VK_INDEX = 22;
77
+ export const PRIVATE_KERNEL_RESET_VK_INDEX = 23;
78
+ export const GLOBAL_INDEX_NOTE_HASH_READ_REQUEST_OFFSET = 0;
79
+ export const GLOBAL_INDEX_NULLIFIER_READ_REQUEST_OFFSET = 16;
80
+ export const GLOBAL_INDEX_NOTE_HASH_OFFSET = 32;
81
+ export const GLOBAL_INDEX_NULLIFIER_OFFSET = 48;
82
+ export const GLOBAL_INDEX_PRIVATE_CALL_REQUEST_START_OFFSET = 64;
83
+ export const GLOBAL_INDEX_PRIVATE_CALL_REQUEST_END_OFFSET = 72;
84
+ export const GLOBAL_INDEX_PUBLIC_CALL_REQUEST_OFFSET = 80;
85
+ export const GLOBAL_INDEX_L2_TO_L1_MSG_OFFSET = 112;
86
+ export const GLOBAL_INDEX_PRIVATE_LOG_OFFSET = 120;
87
+ export const GLOBAL_INDEX_CONTRACT_CLASS_LOG_HASH_OFFSET = 136;
88
+ export const GLOBAL_INDEX_CONTRACT_MIN_REVERTIBLE_SIDE_EFFECT_COUNTER_OFFSET = 137;
89
+ export const TOTAL_COUNTED_SIDE_EFFECTS_PER_CALL = 138;
79
90
  export const FUNCTION_SELECTOR_NUM_BYTES = 4;
91
+ export const INITIAL_CHECKPOINT_NUMBER = 1;
80
92
  export const INITIAL_L2_BLOCK_NUM = 1;
81
93
  export const FIELDS_PER_BLOB = 4096;
82
- export const BLOBS_PER_BLOCK = 6;
94
+ export const BLOBS_PER_CHECKPOINT = 6;
83
95
  export const AZTEC_MAX_EPOCH_DURATION = 48;
84
96
  export const MAX_INCLUDE_BY_TIMESTAMP_DURATION = 86400;
85
97
  export const GENESIS_BLOCK_HEADER_HASH = 6230580493657010651770048453555730909612826595416770775370473752814121567446n;
@@ -129,7 +141,7 @@ export const FUNCTION_LEAF_PREIMAGE_LENGTH = 5;
129
141
  export const GLOBAL_VARIABLES_LENGTH = 9;
130
142
  export const APPEND_ONLY_TREE_SNAPSHOT_LENGTH = 2;
131
143
  export const APPEND_ONLY_TREE_SNAPSHOT_LENGTH_BYTES = 36;
132
- export const SPONGE_BLOB_LENGTH = 11;
144
+ export const SPONGE_BLOB_LENGTH = 10;
133
145
  export const BLS12_FR_LIMBS = 3;
134
146
  export const BLS12_FQ_LIMBS = 4;
135
147
  export const BLS12_POINT_LENGTH = 9;
@@ -146,7 +158,6 @@ export const KEY_VALIDATION_REQUEST_LENGTH = 4;
146
158
  export const KEY_VALIDATION_REQUEST_AND_GENERATOR_LENGTH = 5;
147
159
  export const SCOPED_KEY_VALIDATION_REQUEST_AND_GENERATOR_LENGTH = 6;
148
160
  export const PARTIAL_STATE_REFERENCE_LENGTH = 6;
149
- export const READ_REQUEST_LENGTH = 2;
150
161
  export const TREE_LEAF_READ_REQUEST_LENGTH = 2;
151
162
  export const PRIVATE_LOG_SIZE_IN_FIELDS = 18;
152
163
  export const PRIVATE_LOG_LENGTH = 19;
@@ -182,22 +193,22 @@ export const TOTAL_FEES_LENGTH = 1;
182
193
  export const TOTAL_MANA_USED_LENGTH = 1;
183
194
  export const BLOCK_HEADER_LENGTH = 22;
184
195
  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;
196
+ export const CHECKPOINT_HEADER_LENGTH = 12;
197
+ export const CHECKPOINT_HEADER_SIZE_IN_BYTES = 316;
198
+ export const SCOPED_READ_REQUEST_LEN = 3;
199
+ export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 902;
188
200
  export const PRIVATE_CONTEXT_INPUTS_LENGTH = 37;
189
201
  export const FEE_RECIPIENT_LENGTH = 2;
190
202
  export const HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE = 56;
191
203
  export const PAIRING_POINTS_SIZE = 16;
192
204
  export const IPA_CLAIM_SIZE = 10;
193
- export const SCOPED_READ_REQUEST_LEN = 3;
194
205
  export const PUBLIC_DATA_READ_LENGTH = 3;
195
- export const PRIVATE_VALIDATION_REQUESTS_LENGTH = 773;
206
+ export const PRIVATE_VALIDATION_REQUESTS_LENGTH = 771;
196
207
  export const PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH = 1371;
197
208
  export const TX_CONSTANT_DATA_LENGTH = 34;
198
209
  export const COMBINED_CONSTANT_DATA_LENGTH = 43;
199
210
  export const PRIVATE_ACCUMULATED_DATA_LENGTH = 2187;
200
- export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3002;
211
+ export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3001;
201
212
  export const PRIVATE_TO_PUBLIC_ACCUMULATED_DATA_LENGTH = 1499;
202
213
  export const PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 152;
203
214
  export const NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3;
@@ -210,19 +221,19 @@ export const AVM_CIRCUIT_PUBLIC_INPUTS_LENGTH = 5008;
210
221
  export const BLOCK_CONSTANT_DATA_LENGTH = 16;
211
222
  export const CHECKPOINT_CONSTANT_DATA_LENGTH = 10;
212
223
  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;
224
+ export const TX_ROLLUP_PUBLIC_INPUTS_LENGTH = 52;
225
+ export const BLOCK_ROLLUP_PUBLIC_INPUTS_LENGTH = 57;
215
226
  export const CHECKPOINT_ROLLUP_PUBLIC_INPUTS_LENGTH = 193;
216
227
  export const ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH = 158;
217
228
  export const NUM_MSGS_PER_BASE_PARITY = 256;
218
229
  export const NUM_BASE_PARITY_PER_ROOT_PARITY = 4;
219
230
  export const RECURSIVE_PROOF_LENGTH = 457;
220
231
  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;
232
+ export const IPA_PROOF_LENGTH = 64;
233
+ export const ULTRA_KECCAK_PROOF_LENGTH = 339;
234
+ export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 531;
235
+ export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 531;
236
+ export const CHONK_PROOF_LENGTH = 1963;
226
237
  export const ULTRA_VK_LENGTH_IN_FIELDS = 115;
227
238
  export const MEGA_VK_LENGTH_IN_FIELDS = 127;
228
239
  export const CHONK_VK_LENGTH_IN_FIELDS = 127;
@@ -244,6 +255,9 @@ export const AVM_BITWISE_OR_OP_ID = 1;
244
255
  export const AVM_BITWISE_XOR_OP_ID = 2;
245
256
  export const AVM_KECCAKF1600_NUM_ROUNDS = 24;
246
257
  export const AVM_KECCAKF1600_STATE_SIZE = 25;
258
+ export const AVM_TX_PHASE_VALUE_START = 0;
259
+ export const AVM_TX_PHASE_VALUE_SETUP = 3;
260
+ export const AVM_TX_PHASE_VALUE_LAST = 11;
247
261
  export const AVM_SUBTRACE_ID_EXECUTION = 1;
248
262
  export const AVM_SUBTRACE_ID_ALU = 2;
249
263
  export const AVM_SUBTRACE_ID_BITWISE = 4;
@@ -366,7 +380,7 @@ export const AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX = 4684;
366
380
  export const AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH = 4685;
367
381
  export const AVM_NUM_PUBLIC_INPUT_COLUMNS = 4;
368
382
  export const AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH = 18740;
369
- export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED = 20000;
383
+ export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED = 16200;
370
384
  export const AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED = 1000;
371
385
  export const AVM_MAX_PROCESSABLE_L2_GAS = 6000000;
372
386
  export const DA_BYTES_PER_FIELD = 32;
@@ -374,7 +388,7 @@ export const DA_GAS_PER_BYTE = 16;
374
388
  export const FIXED_DA_GAS = 512;
375
389
  export const FIXED_L2_GAS = 512;
376
390
  export const FIXED_AVM_STARTUP_L2_GAS = 20000;
377
- export const MAX_PROCESSABLE_DA_GAS_PER_BLOCK = 12582912;
391
+ export const MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT = 12582912;
378
392
  export const GAS_ESTIMATION_TEARDOWN_L2_GAS_LIMIT = 6000000;
379
393
  export const GAS_ESTIMATION_L2_GAS_LIMIT = 12000000;
380
394
  export const GAS_ESTIMATION_TEARDOWN_DA_GAS_LIMIT = 12582912;
@@ -384,20 +398,22 @@ export const DEFAULT_L2_GAS_LIMIT = 6000000;
384
398
  export const DEFAULT_TEARDOWN_DA_GAS_LIMIT = 1000000;
385
399
  export const DEFAULT_DA_GAS_LIMIT = 12582912;
386
400
  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
401
  export const AVM_PC_SIZE_IN_BITS = 32;
391
402
  export const AVM_MAX_OPERANDS = 7;
392
403
  export const AVM_MAX_REGISTERS = 6;
393
404
  export const AVM_ADDRESSING_BASE_RESOLUTION_L2_GAS = 3;
394
405
  export const AVM_ADDRESSING_INDIRECT_L2_GAS = 3;
395
406
  export const AVM_ADDRESSING_RELATIVE_L2_GAS = 3;
407
+ export const L2_GAS_PER_NOTE_HASH = 0;
408
+ export const L2_GAS_PER_NULLIFIER = 0;
409
+ export const L2_GAS_PER_L2_TO_L1_MSG = 200;
410
+ export const L2_GAS_PER_PRIVATE_LOG = 0;
411
+ export const L2_GAS_PER_CONTRACT_CLASS_LOG = 0;
396
412
  export const AVM_ADD_BASE_L2_GAS = 12;
397
413
  export const AVM_SUB_BASE_L2_GAS = 12;
398
414
  export const AVM_MUL_BASE_L2_GAS = 27;
399
415
  export const AVM_DIV_BASE_L2_GAS = 27;
400
- export const AVM_FDIV_BASE_L2_GAS = 9;
416
+ export const AVM_FDIV_BASE_L2_GAS = 225;
401
417
  export const AVM_EQ_BASE_L2_GAS = 12;
402
418
  export const AVM_LT_BASE_L2_GAS = 42;
403
419
  export const AVM_LTE_BASE_L2_GAS = 42;
@@ -419,25 +435,25 @@ export const AVM_INTERNALCALL_BASE_L2_GAS = 9;
419
435
  export const AVM_INTERNALRETURN_BASE_L2_GAS = 9;
420
436
  export const AVM_SET_BASE_L2_GAS = 27;
421
437
  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;
438
+ export const AVM_SLOAD_BASE_L2_GAS = 1290;
439
+ export const AVM_SSTORE_BASE_L2_GAS = 33140;
440
+ export const AVM_NOTEHASHEXISTS_BASE_L2_GAS = 504;
441
+ export const AVM_EMITNOTEHASH_BASE_L2_GAS = 19275;
442
+ export const AVM_NULLIFIEREXISTS_BASE_L2_GAS = 924;
443
+ export const AVM_EMITNULLIFIER_BASE_L2_GAS = 30800;
444
+ export const AVM_L1TOL2MSGEXISTS_BASE_L2_GAS = 540;
445
+ export const AVM_GETCONTRACTINSTANCE_BASE_L2_GAS = 6108;
430
446
  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;
447
+ export const AVM_SENDL2TOL1MSG_BASE_L2_GAS = 418;
448
+ export const AVM_CALL_BASE_L2_GAS = 9936;
449
+ export const AVM_STATICCALL_BASE_L2_GAS = 9936;
434
450
  export const AVM_RETURN_BASE_L2_GAS = 9;
435
451
  export const AVM_REVERT_BASE_L2_GAS = 9;
436
452
  export const AVM_DEBUGLOG_BASE_L2_GAS = 9;
437
- export const AVM_POSEIDON2_BASE_L2_GAS = 24;
453
+ export const AVM_POSEIDON2_BASE_L2_GAS = 360;
438
454
  export const AVM_SHA256COMPRESSION_BASE_L2_GAS = 12288;
439
455
  export const AVM_KECCAKF1600_BASE_L2_GAS = 58176;
440
- export const AVM_ECADD_BASE_L2_GAS = 27;
456
+ export const AVM_ECADD_BASE_L2_GAS = 270;
441
457
  export const AVM_TORADIXBE_BASE_L2_GAS = 24;
442
458
  export const AVM_CALLDATACOPY_DYN_L2_GAS = 3;
443
459
  export const AVM_RETURNDATACOPY_DYN_L2_GAS = 3;
@@ -452,16 +468,16 @@ export const AVM_EMITUNENCRYPTEDLOG_DYN_DA_GAS = 512;
452
468
  export const AVM_SSTORE_DYN_DA_GAS = 1024;
453
469
  export const TX_START_PREFIX = 8392562855083340404n;
454
470
  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;
471
+ export const CHECKPOINT_END_PREFIX = 2016229657840014237853300314959460n;
472
+ export const PROOF_TYPE_HONK = 0;
473
+ export const PROOF_TYPE_OINK = 1;
474
+ export const PROOF_TYPE_HN = 2;
475
+ export const PROOF_TYPE_AVM = 3;
476
+ export const PROOF_TYPE_ROLLUP_HONK = 4;
477
+ export const PROOF_TYPE_ROOT_ROLLUP_HONK = 5;
478
+ export const PROOF_TYPE_HN_FINAL = 7;
479
+ export const PROOF_TYPE_HN_TAIL = 8;
480
+ export const PROOF_TYPE_CHONK = 9;
465
481
  export const TWO_POW_64 = 18446744073709551616n;
466
482
  export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT = 6;
467
483
  export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT = 18291678969210913367302010540259942201271604198321103848479209155223586227821n;
@@ -486,55 +502,38 @@ export var GeneratorIndex = /*#__PURE__*/ function(GeneratorIndex) {
486
502
  GeneratorIndex[GeneratorIndex["NOTE_HASH_NONCE"] = 2] = "NOTE_HASH_NONCE";
487
503
  GeneratorIndex[GeneratorIndex["UNIQUE_NOTE_HASH"] = 3] = "UNIQUE_NOTE_HASH";
488
504
  GeneratorIndex[GeneratorIndex["SILOED_NOTE_HASH"] = 4] = "SILOED_NOTE_HASH";
489
- GeneratorIndex[GeneratorIndex["MESSAGE_NULLIFIER"] = 5] = "MESSAGE_NULLIFIER";
490
- GeneratorIndex[GeneratorIndex["INITIALIZATION_NULLIFIER"] = 6] = "INITIALIZATION_NULLIFIER";
505
+ GeneratorIndex[GeneratorIndex["NOTE_NULLIFIER"] = 53] = "NOTE_NULLIFIER";
491
506
  GeneratorIndex[GeneratorIndex["OUTER_NULLIFIER"] = 7] = "OUTER_NULLIFIER";
492
- GeneratorIndex[GeneratorIndex["PUBLIC_DATA_READ"] = 8] = "PUBLIC_DATA_READ";
493
- GeneratorIndex[GeneratorIndex["PUBLIC_DATA_UPDATE_REQUEST"] = 9] = "PUBLIC_DATA_UPDATE_REQUEST";
494
- GeneratorIndex[GeneratorIndex["FUNCTION_DATA"] = 10] = "FUNCTION_DATA";
507
+ GeneratorIndex[GeneratorIndex["PUBLIC_LEAF_INDEX"] = 23] = "PUBLIC_LEAF_INDEX";
508
+ GeneratorIndex[GeneratorIndex["MESSAGE_NULLIFIER"] = 5] = "MESSAGE_NULLIFIER";
495
509
  GeneratorIndex[GeneratorIndex["FUNCTION_LEAF"] = 11] = "FUNCTION_LEAF";
496
- GeneratorIndex[GeneratorIndex["CONTRACT_DEPLOYMENT_DATA"] = 12] = "CONTRACT_DEPLOYMENT_DATA";
510
+ GeneratorIndex[GeneratorIndex["PUBLIC_BYTECODE"] = 60] = "PUBLIC_BYTECODE";
511
+ GeneratorIndex[GeneratorIndex["CONTRACT_CLASS_ID"] = 16] = "CONTRACT_CLASS_ID";
497
512
  GeneratorIndex[GeneratorIndex["CONSTRUCTOR"] = 13] = "CONSTRUCTOR";
498
- GeneratorIndex[GeneratorIndex["CONSTRUCTOR_ARGS"] = 14] = "CONSTRUCTOR_ARGS";
499
- GeneratorIndex[GeneratorIndex["CONTRACT_ADDRESS_V1"] = 15] = "CONTRACT_ADDRESS_V1";
500
- GeneratorIndex[GeneratorIndex["CONTRACT_LEAF"] = 16] = "CONTRACT_LEAF";
501
- GeneratorIndex[GeneratorIndex["CALL_CONTEXT"] = 17] = "CALL_CONTEXT";
502
- GeneratorIndex[GeneratorIndex["CALL_STACK_ITEM"] = 18] = "CALL_STACK_ITEM";
503
- GeneratorIndex[GeneratorIndex["CALL_STACK_ITEM_2"] = 19] = "CALL_STACK_ITEM_2";
504
- GeneratorIndex[GeneratorIndex["SECRET_HASH"] = 20] = "SECRET_HASH";
505
- GeneratorIndex[GeneratorIndex["L2_TO_L1_MSG"] = 21] = "L2_TO_L1_MSG";
506
- GeneratorIndex[GeneratorIndex["TX_CONTEXT"] = 22] = "TX_CONTEXT";
507
- GeneratorIndex[GeneratorIndex["PUBLIC_LEAF_INDEX"] = 23] = "PUBLIC_LEAF_INDEX";
508
- GeneratorIndex[GeneratorIndex["PUBLIC_DATA_LEAF"] = 24] = "PUBLIC_DATA_LEAF";
509
- GeneratorIndex[GeneratorIndex["SIGNED_TX_REQUEST"] = 25] = "SIGNED_TX_REQUEST";
510
- GeneratorIndex[GeneratorIndex["GLOBAL_VARIABLES"] = 26] = "GLOBAL_VARIABLES";
513
+ GeneratorIndex[GeneratorIndex["NSK_M"] = 48] = "NSK_M";
514
+ GeneratorIndex[GeneratorIndex["IVSK_M"] = 49] = "IVSK_M";
515
+ GeneratorIndex[GeneratorIndex["OVSK_M"] = 50] = "OVSK_M";
516
+ GeneratorIndex[GeneratorIndex["TSK_M"] = 51] = "TSK_M";
517
+ GeneratorIndex[GeneratorIndex["PUBLIC_KEYS_HASH"] = 52] = "PUBLIC_KEYS_HASH";
511
518
  GeneratorIndex[GeneratorIndex["PARTIAL_ADDRESS"] = 27] = "PARTIAL_ADDRESS";
519
+ GeneratorIndex[GeneratorIndex["CONTRACT_ADDRESS_V1"] = 15] = "CONTRACT_ADDRESS_V1";
512
520
  GeneratorIndex[GeneratorIndex["BLOCK_HASH"] = 28] = "BLOCK_HASH";
513
- GeneratorIndex[GeneratorIndex["SIDE_EFFECT"] = 29] = "SIDE_EFFECT";
514
- GeneratorIndex[GeneratorIndex["FEE_PAYLOAD"] = 30] = "FEE_PAYLOAD";
515
- GeneratorIndex[GeneratorIndex["COMBINED_PAYLOAD"] = 31] = "COMBINED_PAYLOAD";
516
- GeneratorIndex[GeneratorIndex["TX_NULLIFIER"] = 32] = "TX_NULLIFIER";
517
521
  GeneratorIndex[GeneratorIndex["TX_REQUEST"] = 33] = "TX_REQUEST";
518
- GeneratorIndex[GeneratorIndex["SIGNATURE_PAYLOAD"] = 34] = "SIGNATURE_PAYLOAD";
519
- GeneratorIndex[GeneratorIndex["VK"] = 41] = "VK";
522
+ GeneratorIndex[GeneratorIndex["PUBLIC_TX_HASH"] = 56] = "PUBLIC_TX_HASH";
523
+ GeneratorIndex[GeneratorIndex["PRIVATE_TX_HASH"] = 57] = "PRIVATE_TX_HASH";
520
524
  GeneratorIndex[GeneratorIndex["PUBLIC_CALLDATA"] = 43] = "PUBLIC_CALLDATA";
521
525
  GeneratorIndex[GeneratorIndex["FUNCTION_ARGS"] = 44] = "FUNCTION_ARGS";
526
+ GeneratorIndex[GeneratorIndex["PROTOCOL_CONTRACTS"] = 61] = "PROTOCOL_CONTRACTS";
527
+ GeneratorIndex[GeneratorIndex["EVENT_COMMITMENT"] = 59] = "EVENT_COMMITMENT";
522
528
  GeneratorIndex[GeneratorIndex["AUTHWIT_INNER"] = 45] = "AUTHWIT_INNER";
523
529
  GeneratorIndex[GeneratorIndex["AUTHWIT_OUTER"] = 46] = "AUTHWIT_OUTER";
524
530
  GeneratorIndex[GeneratorIndex["AUTHWIT_NULLIFIER"] = 47] = "AUTHWIT_NULLIFIER";
525
- GeneratorIndex[GeneratorIndex["NSK_M"] = 48] = "NSK_M";
526
- GeneratorIndex[GeneratorIndex["IVSK_M"] = 49] = "IVSK_M";
527
- GeneratorIndex[GeneratorIndex["OVSK_M"] = 50] = "OVSK_M";
528
- GeneratorIndex[GeneratorIndex["TSK_M"] = 51] = "TSK_M";
529
- GeneratorIndex[GeneratorIndex["PUBLIC_KEYS_HASH"] = 52] = "PUBLIC_KEYS_HASH";
530
- GeneratorIndex[GeneratorIndex["NOTE_NULLIFIER"] = 53] = "NOTE_NULLIFIER";
531
531
  GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY"] = 54] = "SYMMETRIC_KEY";
532
532
  GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY_2"] = 55] = "SYMMETRIC_KEY_2";
533
- GeneratorIndex[GeneratorIndex["PUBLIC_TX_HASH"] = 56] = "PUBLIC_TX_HASH";
534
- GeneratorIndex[GeneratorIndex["PRIVATE_TX_HASH"] = 57] = "PRIVATE_TX_HASH";
535
533
  GeneratorIndex[GeneratorIndex["PARTIAL_NOTE_VALIDITY_COMMITMENT"] = 58] = "PARTIAL_NOTE_VALIDITY_COMMITMENT";
536
- GeneratorIndex[GeneratorIndex["EVENT_COMMITMENT"] = 59] = "EVENT_COMMITMENT";
537
- GeneratorIndex[GeneratorIndex["PUBLIC_BYTECODE"] = 60] = "PUBLIC_BYTECODE";
538
- GeneratorIndex[GeneratorIndex["PROTOCOL_CONTRACTS"] = 61] = "PROTOCOL_CONTRACTS";
534
+ GeneratorIndex[GeneratorIndex["INITIALIZATION_NULLIFIER"] = 6] = "INITIALIZATION_NULLIFIER";
535
+ GeneratorIndex[GeneratorIndex["SECRET_HASH"] = 20] = "SECRET_HASH";
536
+ GeneratorIndex[GeneratorIndex["TX_NULLIFIER"] = 32] = "TX_NULLIFIER";
537
+ GeneratorIndex[GeneratorIndex["SIGNATURE_PAYLOAD"] = 34] = "SIGNATURE_PAYLOAD";
539
538
  return GeneratorIndex;
540
539
  }({});
package/dest/constants.js CHANGED
@@ -1,4 +1,18 @@
1
+ import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ // Re-export L2 block number constants with proper BlockNumber type
4
+ // Note: The generated constants are plain numbers, but we provide typed versions here
5
+ import { GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT, INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW, INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW } from './constants.gen.js';
1
6
  // Typescript-land-only constants
2
7
  export const SPONSORED_FPC_SALT = BigInt(0);
3
8
  // Autogenerated constants loaded from noir-land
9
+ // eslint-disable-next-line import/export
4
10
  export * from './constants.gen.js';
11
+ /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */ // Shadow the export from constants.gen above
12
+ // eslint-disable-next-line import/export
13
+ export const INITIAL_L2_BLOCK_NUM = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
14
+ /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */ // Shadow the export from constants.gen above
15
+ export const INITIAL_L2_CHECKPOINT_NUM = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
16
+ /** The block header hash for the genesis block 0. */ // Shadow the export from constants.gen above
17
+ // eslint-disable-next-line import/export
18
+ export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=constants.in.d.ts.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmluLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2NyaXB0cy9jb25zdGFudHMuaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -113,7 +113,7 @@ const CPP_CONSTANTS = [
113
113
  const CPP_GENERATORS = [
114
114
  'PARTIAL_ADDRESS',
115
115
  'CONTRACT_ADDRESS_V1',
116
- 'CONTRACT_LEAF',
116
+ 'CONTRACT_CLASS_ID',
117
117
  'PUBLIC_KEYS_HASH',
118
118
  'NOTE_HASH_NONCE',
119
119
  'UNIQUE_NOTE_HASH',
@@ -136,6 +136,9 @@ const PIL_CONSTANTS = [
136
136
  'AVM_BITWISE_XOR_OP_ID',
137
137
  'AVM_KECCAKF1600_NUM_ROUNDS',
138
138
  'AVM_KECCAKF1600_STATE_SIZE',
139
+ 'AVM_TX_PHASE_VALUE_START',
140
+ 'AVM_TX_PHASE_VALUE_SETUP',
141
+ 'AVM_TX_PHASE_VALUE_LAST',
139
142
  'AVM_HIGHEST_MEM_ADDRESS',
140
143
  'AVM_MEMORY_NUM_BITS',
141
144
  'AVM_MEMORY_SIZE',
@@ -294,7 +297,7 @@ const PIL_CONSTANTS = [
294
297
  const PIL_GENERATORS = [
295
298
  'PARTIAL_ADDRESS',
296
299
  'CONTRACT_ADDRESS_V1',
297
- 'CONTRACT_LEAF',
300
+ 'CONTRACT_CLASS_ID',
298
301
  'PUBLIC_KEYS_HASH',
299
302
  'NOTE_HASH_NONCE',
300
303
  'UNIQUE_NOTE_HASH',
@@ -310,11 +313,9 @@ const SOLIDITY_CONSTANTS = [
310
313
  'L1_TO_L2_MSG_SUBTREE_HEIGHT',
311
314
  'NUM_MSGS_PER_BASE_PARITY',
312
315
  'NUM_BASE_PARITY_PER_ROOT_PARITY',
313
- 'PROPOSED_BLOCK_HEADER_LENGTH_BYTES',
314
316
  'BLS12_POINT_COMPRESSED_BYTES',
315
317
  'ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH',
316
- 'BLOBS_PER_BLOCK',
317
- 'INITIAL_L2_BLOCK_NUM',
318
+ 'INITIAL_CHECKPOINT_NUMBER',
318
319
  'GENESIS_ARCHIVE_ROOT',
319
320
  'FEE_JUICE_ADDRESS',
320
321
  'AZTEC_MAX_EPOCH_DURATION'
@@ -340,7 +341,7 @@ const SOLIDITY_CONSTANTS = [
340
341
  */ function processConstantsCpp(constants, generatorIndices) {
341
342
  const code = [];
342
343
  Object.entries(constants).forEach(([key, value])=>{
343
- if (CPP_CONSTANTS.includes(key) || key.startsWith('AVM_') && key !== 'AVM_VK_INDEX') {
344
+ if (CPP_CONSTANTS.includes(key) || key.startsWith('AVM_')) {
344
345
  if (BigInt(value) <= 2n ** 31n - 1n) {
345
346
  code.push(`#define ${key} ${value}`);
346
347
  } else if (BigInt(value) <= 2n ** 64n - 1n) {
@@ -352,7 +353,7 @@ const SOLIDITY_CONSTANTS = [
352
353
  });
353
354
  Object.entries(generatorIndices).forEach(([key, value])=>{
354
355
  if (CPP_GENERATORS.includes(key)) {
355
- code.push(`#define GENERATOR_INDEX__${key} ${value}`);
356
+ code.push(`#define DOM_SEP__${key} ${value}`);
356
357
  }
357
358
  });
358
359
  return code.join('\n');
@@ -372,7 +373,7 @@ const SOLIDITY_CONSTANTS = [
372
373
  });
373
374
  Object.entries(generatorIndices).forEach(([key, value])=>{
374
375
  if (PIL_GENERATORS.includes(key)) {
375
- code.push(` pol GENERATOR_INDEX__${key} = ${value};`);
376
+ code.push(` pol DOM_SEP__${key} = ${value};`);
376
377
  }
377
378
  });
378
379
  return code.join('\n');
@@ -481,7 +482,7 @@ ${processConstantsSolidity(constants)}
481
482
  {
482
483
  const [, name, _type, value, end] = line.match(/global\s+(\w+)(\s*:\s*\w+)?\s*=\s*([^;]*)(;)?/) || [];
483
484
  if (name && value) {
484
- const [, indexName] = name.match(/GENERATOR_INDEX__(\w+)/) || [];
485
+ const [, indexName] = name.match(/DOM_SEP__(\w+)/) || [];
485
486
  if (indexName) {
486
487
  // Generator index.
487
488
  generatorIndexEnum[indexName] = +value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/constants",
3
- "version": "0.0.1-commit.b655e406",
3
+ "version": "0.0.1-commit.c7c42ec",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json"
@@ -9,19 +9,21 @@
9
9
  ".": "./dest/constants.js"
10
10
  },
11
11
  "scripts": {
12
- "build": "yarn clean && tsc -b",
13
- "build:dev": "tsc -b --watch",
12
+ "build": "yarn clean && ../scripts/tsc.sh",
13
+ "build:dev": "../scripts/tsc.sh --watch",
14
14
  "clean": "rm -rf ./dest .tsbuildinfo",
15
15
  "remake-constants": "node --loader @swc-node/register/esm src/scripts/constants.in.ts && cd ../../l1-contracts && forge fmt",
16
16
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
17
17
  },
18
18
  "dependencies": {
19
+ "@aztec/foundation": "0.0.1-commit.c7c42ec",
19
20
  "tslib": "^2.4.0"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@jest/globals": "^30.0.0",
23
24
  "@types/jest": "^30.0.0",
24
25
  "@types/node": "^22.15.17",
26
+ "@typescript/native-preview": "7.0.0-dev.20251126.1",
25
27
  "eslint": "^9.26.0",
26
28
  "jest": "^30.0.0",
27
29
  "prettier": "^3.5.3",