@aztec/constants 0.0.1-commit.d3ec352c → 0.0.1-commit.e310a4c8
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.
- package/dest/constants.d.ts +5 -3
- package/dest/constants.d.ts.map +1 -1
- package/dest/constants.gen.d.ts +109 -120
- package/dest/constants.gen.d.ts.map +1 -1
- package/dest/constants.gen.js +108 -119
- package/dest/constants.js +8 -6
- package/dest/scripts/constants.in.js +19 -12
- package/package.json +3 -3
- package/src/constants.gen.ts +108 -119
- package/src/constants.ts +11 -5
package/dest/constants.gen.js
CHANGED
|
@@ -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;
|
|
@@ -35,57 +39,58 @@ export const MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 64;
|
|
|
35
39
|
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 63;
|
|
36
40
|
export const MAX_PUBLIC_DATA_READS_PER_TX = 64;
|
|
37
41
|
export const MAX_L2_TO_L1_MSGS_PER_TX = 8;
|
|
42
|
+
export const MAX_PRIVATE_LOGS_PER_TX = 64;
|
|
43
|
+
export const MAX_CONTRACT_CLASS_LOGS_PER_TX = 1;
|
|
38
44
|
export const MAX_NOTE_HASH_READ_REQUESTS_PER_TX = 64;
|
|
39
45
|
export const MAX_NULLIFIER_READ_REQUESTS_PER_TX = 64;
|
|
40
46
|
export const MAX_KEY_VALIDATION_REQUESTS_PER_TX = 64;
|
|
41
|
-
export const MAX_PRIVATE_LOGS_PER_TX = 64;
|
|
42
|
-
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;
|
|
45
49
|
export const MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL = 8;
|
|
46
50
|
export const MAX_ENQUEUED_CALLS_PER_CALL = 32;
|
|
47
51
|
export const MAX_L2_TO_L1_MSGS_PER_CALL = 8;
|
|
52
|
+
export const MAX_PRIVATE_LOGS_PER_CALL = 16;
|
|
53
|
+
export const MAX_CONTRACT_CLASS_LOGS_PER_CALL = 1;
|
|
48
54
|
export const MAX_NOTE_HASH_READ_REQUESTS_PER_CALL = 16;
|
|
49
55
|
export const MAX_NULLIFIER_READ_REQUESTS_PER_CALL = 16;
|
|
50
56
|
export const MAX_KEY_VALIDATION_REQUESTS_PER_CALL = 16;
|
|
51
|
-
export const MAX_PRIVATE_LOGS_PER_CALL = 16;
|
|
52
|
-
export const MAX_CONTRACT_CLASS_LOGS_PER_CALL = 1;
|
|
53
57
|
export const NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP = 1024;
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
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
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
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;
|
|
79
82
|
export const GLOBAL_INDEX_NOTE_HASH_READ_REQUEST_OFFSET = 0;
|
|
80
83
|
export const GLOBAL_INDEX_NULLIFIER_READ_REQUEST_OFFSET = 16;
|
|
81
84
|
export const GLOBAL_INDEX_NOTE_HASH_OFFSET = 32;
|
|
82
85
|
export const GLOBAL_INDEX_NULLIFIER_OFFSET = 48;
|
|
83
|
-
export const
|
|
84
|
-
export const
|
|
85
|
-
export const
|
|
86
|
-
export const
|
|
87
|
-
export const
|
|
88
|
-
export const
|
|
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;
|
|
89
94
|
export const FUNCTION_SELECTOR_NUM_BYTES = 4;
|
|
90
95
|
export const INITIAL_CHECKPOINT_NUMBER = 1;
|
|
91
96
|
export const INITIAL_L2_BLOCK_NUM = 1;
|
|
@@ -93,8 +98,9 @@ export const FIELDS_PER_BLOB = 4096;
|
|
|
93
98
|
export const BLOBS_PER_CHECKPOINT = 6;
|
|
94
99
|
export const AZTEC_MAX_EPOCH_DURATION = 48;
|
|
95
100
|
export const MAX_INCLUDE_BY_TIMESTAMP_DURATION = 86400;
|
|
96
|
-
export const GENESIS_BLOCK_HEADER_HASH =
|
|
97
|
-
export const GENESIS_ARCHIVE_ROOT =
|
|
101
|
+
export const GENESIS_BLOCK_HEADER_HASH = 14710079915322740317808687122062173337464078712794912405124797936019536947264n;
|
|
102
|
+
export const GENESIS_ARCHIVE_ROOT = 19669888813533984740577615922349869995342895739385283929087009026587729644092n;
|
|
103
|
+
export const EMPTY_EPOCH_OUT_HASH = 425901435741743301163237390758864716627999612705062243139499504804273333597n;
|
|
98
104
|
export const MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 3000;
|
|
99
105
|
export const MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 3000;
|
|
100
106
|
export const MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS = 3000;
|
|
@@ -111,7 +117,7 @@ export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
|
|
|
111
117
|
export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 3;
|
|
112
118
|
export const MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
|
|
113
119
|
export const FEE_JUICE_ADDRESS = 5;
|
|
114
|
-
export const
|
|
120
|
+
export const PUBLIC_CHECKS_ADDRESS = 6;
|
|
115
121
|
export const SIDE_EFFECT_MASKING_ADDRESS = 12;
|
|
116
122
|
export const NULL_MSG_SENDER_CONTRACT_ADDRESS = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;
|
|
117
123
|
export const CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT = 79025834455612;
|
|
@@ -130,7 +136,6 @@ export const GAS_FEES_LENGTH = 2;
|
|
|
130
136
|
export const GAS_LENGTH = 2;
|
|
131
137
|
export const GAS_SETTINGS_LENGTH = 8;
|
|
132
138
|
export const CALL_CONTEXT_LENGTH = 4;
|
|
133
|
-
export const CONTENT_COMMITMENT_LENGTH = 3;
|
|
134
139
|
export const CONTRACT_INSTANCE_LENGTH = 16;
|
|
135
140
|
export const CONTRACT_STORAGE_READ_LENGTH = 3;
|
|
136
141
|
export const CONTRACT_STORAGE_UPDATE_REQUEST_LENGTH = 3;
|
|
@@ -191,7 +196,6 @@ export const TX_REQUEST_LENGTH = 15;
|
|
|
191
196
|
export const TOTAL_FEES_LENGTH = 1;
|
|
192
197
|
export const TOTAL_MANA_USED_LENGTH = 1;
|
|
193
198
|
export const BLOCK_HEADER_LENGTH = 22;
|
|
194
|
-
export const BLOCK_HEADER_LENGTH_BYTES = 616;
|
|
195
199
|
export const CHECKPOINT_HEADER_LENGTH = 12;
|
|
196
200
|
export const CHECKPOINT_HEADER_SIZE_IN_BYTES = 316;
|
|
197
201
|
export const SCOPED_READ_REQUEST_LEN = 3;
|
|
@@ -221,9 +225,9 @@ export const BLOCK_CONSTANT_DATA_LENGTH = 16;
|
|
|
221
225
|
export const CHECKPOINT_CONSTANT_DATA_LENGTH = 10;
|
|
222
226
|
export const EPOCH_CONSTANT_DATA_LENGTH = 5;
|
|
223
227
|
export const TX_ROLLUP_PUBLIC_INPUTS_LENGTH = 52;
|
|
224
|
-
export const BLOCK_ROLLUP_PUBLIC_INPUTS_LENGTH =
|
|
225
|
-
export const CHECKPOINT_ROLLUP_PUBLIC_INPUTS_LENGTH =
|
|
226
|
-
export const ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH =
|
|
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;
|
|
227
231
|
export const NUM_MSGS_PER_BASE_PARITY = 256;
|
|
228
232
|
export const NUM_BASE_PARITY_PER_ROOT_PARITY = 4;
|
|
229
233
|
export const RECURSIVE_PROOF_LENGTH = 457;
|
|
@@ -379,7 +383,7 @@ export const AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX = 4684;
|
|
|
379
383
|
export const AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH = 4685;
|
|
380
384
|
export const AVM_NUM_PUBLIC_INPUT_COLUMNS = 4;
|
|
381
385
|
export const AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH = 18740;
|
|
382
|
-
export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED =
|
|
386
|
+
export const AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED = 16200;
|
|
383
387
|
export const AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED = 1000;
|
|
384
388
|
export const AVM_MAX_PROCESSABLE_L2_GAS = 6000000;
|
|
385
389
|
export const DA_BYTES_PER_FIELD = 32;
|
|
@@ -412,7 +416,7 @@ export const AVM_ADD_BASE_L2_GAS = 12;
|
|
|
412
416
|
export const AVM_SUB_BASE_L2_GAS = 12;
|
|
413
417
|
export const AVM_MUL_BASE_L2_GAS = 27;
|
|
414
418
|
export const AVM_DIV_BASE_L2_GAS = 27;
|
|
415
|
-
export const AVM_FDIV_BASE_L2_GAS =
|
|
419
|
+
export const AVM_FDIV_BASE_L2_GAS = 225;
|
|
416
420
|
export const AVM_EQ_BASE_L2_GAS = 12;
|
|
417
421
|
export const AVM_LT_BASE_L2_GAS = 42;
|
|
418
422
|
export const AVM_LTE_BASE_L2_GAS = 42;
|
|
@@ -434,25 +438,25 @@ export const AVM_INTERNALCALL_BASE_L2_GAS = 9;
|
|
|
434
438
|
export const AVM_INTERNALRETURN_BASE_L2_GAS = 9;
|
|
435
439
|
export const AVM_SET_BASE_L2_GAS = 27;
|
|
436
440
|
export const AVM_MOV_BASE_L2_GAS = 12;
|
|
437
|
-
export const AVM_SLOAD_BASE_L2_GAS =
|
|
438
|
-
export const AVM_SSTORE_BASE_L2_GAS =
|
|
439
|
-
export const AVM_NOTEHASHEXISTS_BASE_L2_GAS =
|
|
440
|
-
export const AVM_EMITNOTEHASH_BASE_L2_GAS =
|
|
441
|
-
export const AVM_NULLIFIEREXISTS_BASE_L2_GAS =
|
|
442
|
-
export const AVM_EMITNULLIFIER_BASE_L2_GAS =
|
|
443
|
-
export const AVM_L1TOL2MSGEXISTS_BASE_L2_GAS =
|
|
444
|
-
export const AVM_GETCONTRACTINSTANCE_BASE_L2_GAS =
|
|
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 = 903;
|
|
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;
|
|
445
449
|
export const AVM_EMITUNENCRYPTEDLOG_BASE_L2_GAS = 15;
|
|
446
|
-
export const AVM_SENDL2TOL1MSG_BASE_L2_GAS =
|
|
447
|
-
export const AVM_CALL_BASE_L2_GAS =
|
|
448
|
-
export const AVM_STATICCALL_BASE_L2_GAS =
|
|
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;
|
|
449
453
|
export const AVM_RETURN_BASE_L2_GAS = 9;
|
|
450
454
|
export const AVM_REVERT_BASE_L2_GAS = 9;
|
|
451
455
|
export const AVM_DEBUGLOG_BASE_L2_GAS = 9;
|
|
452
|
-
export const AVM_POSEIDON2_BASE_L2_GAS =
|
|
456
|
+
export const AVM_POSEIDON2_BASE_L2_GAS = 360;
|
|
453
457
|
export const AVM_SHA256COMPRESSION_BASE_L2_GAS = 12288;
|
|
454
458
|
export const AVM_KECCAKF1600_BASE_L2_GAS = 58176;
|
|
455
|
-
export const AVM_ECADD_BASE_L2_GAS =
|
|
459
|
+
export const AVM_ECADD_BASE_L2_GAS = 270;
|
|
456
460
|
export const AVM_TORADIXBE_BASE_L2_GAS = 24;
|
|
457
461
|
export const AVM_CALLDATACOPY_DYN_L2_GAS = 3;
|
|
458
462
|
export const AVM_RETURNDATACOPY_DYN_L2_GAS = 3;
|
|
@@ -466,18 +470,18 @@ export const AVM_EMITUNENCRYPTEDLOG_BASE_DA_GAS = 1024;
|
|
|
466
470
|
export const AVM_EMITUNENCRYPTEDLOG_DYN_DA_GAS = 512;
|
|
467
471
|
export const AVM_SSTORE_DYN_DA_GAS = 1024;
|
|
468
472
|
export const TX_START_PREFIX = 8392562855083340404n;
|
|
473
|
+
export const TX_START_PREFIX_BIT_SIZE = 64;
|
|
469
474
|
export const BLOCK_END_PREFIX = 1815594492414860291684n;
|
|
470
475
|
export const CHECKPOINT_END_PREFIX = 2016229657840014237853300314959460n;
|
|
471
|
-
export const
|
|
472
|
-
export const
|
|
473
|
-
export const
|
|
474
|
-
export const
|
|
475
|
-
export const
|
|
476
|
-
export const
|
|
477
|
-
export const
|
|
478
|
-
export const
|
|
479
|
-
export const
|
|
480
|
-
export const PROOF_TYPE_CHONK = 10;
|
|
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;
|
|
481
485
|
export const TWO_POW_64 = 18446744073709551616n;
|
|
482
486
|
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT = 6;
|
|
483
487
|
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT = 18291678969210913367302010540259942201271604198321103848479209155223586227821n;
|
|
@@ -498,59 +502,44 @@ export const GRUMPKIN_ONE_X = 1;
|
|
|
498
502
|
export const GRUMPKIN_ONE_Y = 17631683881184975370165255887551781615748388533673675138860n;
|
|
499
503
|
export const DEFAULT_MAX_DEBUG_LOG_MEMORY_READS = 125000;
|
|
500
504
|
export var GeneratorIndex = /*#__PURE__*/ function(GeneratorIndex) {
|
|
501
|
-
GeneratorIndex[GeneratorIndex["NOTE_HASH"] =
|
|
502
|
-
GeneratorIndex[GeneratorIndex["NOTE_HASH_NONCE"] =
|
|
503
|
-
GeneratorIndex[GeneratorIndex["UNIQUE_NOTE_HASH"] =
|
|
504
|
-
GeneratorIndex[GeneratorIndex["SILOED_NOTE_HASH"] =
|
|
505
|
-
GeneratorIndex[GeneratorIndex["
|
|
506
|
-
GeneratorIndex[GeneratorIndex["
|
|
507
|
-
GeneratorIndex[GeneratorIndex["
|
|
508
|
-
GeneratorIndex[GeneratorIndex["
|
|
509
|
-
GeneratorIndex[GeneratorIndex["
|
|
510
|
-
GeneratorIndex[GeneratorIndex["
|
|
511
|
-
GeneratorIndex[GeneratorIndex["
|
|
512
|
-
GeneratorIndex[GeneratorIndex["
|
|
513
|
-
GeneratorIndex[GeneratorIndex["
|
|
514
|
-
GeneratorIndex[GeneratorIndex["
|
|
515
|
-
GeneratorIndex[GeneratorIndex["
|
|
516
|
-
GeneratorIndex[GeneratorIndex["
|
|
517
|
-
GeneratorIndex[GeneratorIndex["
|
|
518
|
-
GeneratorIndex[GeneratorIndex["
|
|
519
|
-
GeneratorIndex[GeneratorIndex["
|
|
520
|
-
GeneratorIndex[GeneratorIndex["
|
|
521
|
-
GeneratorIndex[GeneratorIndex["
|
|
522
|
-
GeneratorIndex[GeneratorIndex["
|
|
523
|
-
GeneratorIndex[GeneratorIndex["
|
|
524
|
-
GeneratorIndex[GeneratorIndex["
|
|
525
|
-
GeneratorIndex[GeneratorIndex["
|
|
526
|
-
GeneratorIndex[GeneratorIndex["
|
|
527
|
-
GeneratorIndex[GeneratorIndex["
|
|
528
|
-
GeneratorIndex[GeneratorIndex["
|
|
529
|
-
GeneratorIndex[GeneratorIndex["
|
|
530
|
-
GeneratorIndex[GeneratorIndex["
|
|
531
|
-
GeneratorIndex[GeneratorIndex["
|
|
532
|
-
GeneratorIndex[GeneratorIndex["
|
|
533
|
-
GeneratorIndex[GeneratorIndex["
|
|
534
|
-
GeneratorIndex[GeneratorIndex["
|
|
535
|
-
GeneratorIndex[GeneratorIndex["
|
|
536
|
-
GeneratorIndex[GeneratorIndex["
|
|
537
|
-
GeneratorIndex[GeneratorIndex["
|
|
538
|
-
GeneratorIndex[GeneratorIndex["
|
|
539
|
-
GeneratorIndex[GeneratorIndex["
|
|
540
|
-
GeneratorIndex[GeneratorIndex["AUTHWIT_NULLIFIER"] = 47] = "AUTHWIT_NULLIFIER";
|
|
541
|
-
GeneratorIndex[GeneratorIndex["NSK_M"] = 48] = "NSK_M";
|
|
542
|
-
GeneratorIndex[GeneratorIndex["IVSK_M"] = 49] = "IVSK_M";
|
|
543
|
-
GeneratorIndex[GeneratorIndex["OVSK_M"] = 50] = "OVSK_M";
|
|
544
|
-
GeneratorIndex[GeneratorIndex["TSK_M"] = 51] = "TSK_M";
|
|
545
|
-
GeneratorIndex[GeneratorIndex["PUBLIC_KEYS_HASH"] = 52] = "PUBLIC_KEYS_HASH";
|
|
546
|
-
GeneratorIndex[GeneratorIndex["NOTE_NULLIFIER"] = 53] = "NOTE_NULLIFIER";
|
|
547
|
-
GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY"] = 54] = "SYMMETRIC_KEY";
|
|
548
|
-
GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY_2"] = 55] = "SYMMETRIC_KEY_2";
|
|
549
|
-
GeneratorIndex[GeneratorIndex["PUBLIC_TX_HASH"] = 56] = "PUBLIC_TX_HASH";
|
|
550
|
-
GeneratorIndex[GeneratorIndex["PRIVATE_TX_HASH"] = 57] = "PRIVATE_TX_HASH";
|
|
551
|
-
GeneratorIndex[GeneratorIndex["PARTIAL_NOTE_VALIDITY_COMMITMENT"] = 58] = "PARTIAL_NOTE_VALIDITY_COMMITMENT";
|
|
552
|
-
GeneratorIndex[GeneratorIndex["EVENT_COMMITMENT"] = 59] = "EVENT_COMMITMENT";
|
|
553
|
-
GeneratorIndex[GeneratorIndex["PUBLIC_BYTECODE"] = 60] = "PUBLIC_BYTECODE";
|
|
554
|
-
GeneratorIndex[GeneratorIndex["PROTOCOL_CONTRACTS"] = 61] = "PROTOCOL_CONTRACTS";
|
|
505
|
+
GeneratorIndex[GeneratorIndex["NOTE_HASH"] = 570261536] = "NOTE_HASH";
|
|
506
|
+
GeneratorIndex[GeneratorIndex["NOTE_HASH_NONCE"] = 4040695053] = "NOTE_HASH_NONCE";
|
|
507
|
+
GeneratorIndex[GeneratorIndex["UNIQUE_NOTE_HASH"] = 1615905817] = "UNIQUE_NOTE_HASH";
|
|
508
|
+
GeneratorIndex[GeneratorIndex["SILOED_NOTE_HASH"] = 3552985968] = "SILOED_NOTE_HASH";
|
|
509
|
+
GeneratorIndex[GeneratorIndex["NOTE_NULLIFIER"] = 2273326939] = "NOTE_NULLIFIER";
|
|
510
|
+
GeneratorIndex[GeneratorIndex["MESSAGE_NULLIFIER"] = 4179235419] = "MESSAGE_NULLIFIER";
|
|
511
|
+
GeneratorIndex[GeneratorIndex["SILOED_NULLIFIER"] = 1843769845] = "SILOED_NULLIFIER";
|
|
512
|
+
GeneratorIndex[GeneratorIndex["PRIVATE_LOG_FIRST_FIELD"] = 3381826258] = "PRIVATE_LOG_FIRST_FIELD";
|
|
513
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_LEAF_SLOT"] = 2853865602] = "PUBLIC_LEAF_SLOT";
|
|
514
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_STORAGE_MAP_SLOT"] = 1106049611] = "PUBLIC_STORAGE_MAP_SLOT";
|
|
515
|
+
GeneratorIndex[GeneratorIndex["PRIVATE_FUNCTION_LEAF"] = 3274445394] = "PRIVATE_FUNCTION_LEAF";
|
|
516
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_BYTECODE"] = 4245021897] = "PUBLIC_BYTECODE";
|
|
517
|
+
GeneratorIndex[GeneratorIndex["CONTRACT_CLASS_ID"] = 1134959961] = "CONTRACT_CLASS_ID";
|
|
518
|
+
GeneratorIndex[GeneratorIndex["INITIALIZER"] = 3165476885] = "INITIALIZER";
|
|
519
|
+
GeneratorIndex[GeneratorIndex["NHK_M"] = 3431122223] = "NHK_M";
|
|
520
|
+
GeneratorIndex[GeneratorIndex["IVSK_M"] = 3641144584] = "IVSK_M";
|
|
521
|
+
GeneratorIndex[GeneratorIndex["OVSK_M"] = 449371170] = "OVSK_M";
|
|
522
|
+
GeneratorIndex[GeneratorIndex["TSK_M"] = 4031170476] = "TSK_M";
|
|
523
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_KEYS_HASH"] = 349301051] = "PUBLIC_KEYS_HASH";
|
|
524
|
+
GeneratorIndex[GeneratorIndex["PARTIAL_ADDRESS"] = 1453969891] = "PARTIAL_ADDRESS";
|
|
525
|
+
GeneratorIndex[GeneratorIndex["CONTRACT_ADDRESS_V1"] = 2091531360] = "CONTRACT_ADDRESS_V1";
|
|
526
|
+
GeneratorIndex[GeneratorIndex["BLOCK_HEADER_HASH"] = 2064783670] = "BLOCK_HEADER_HASH";
|
|
527
|
+
GeneratorIndex[GeneratorIndex["TX_REQUEST"] = 1076396939] = "TX_REQUEST";
|
|
528
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_TX_HASH"] = 419169672] = "PUBLIC_TX_HASH";
|
|
529
|
+
GeneratorIndex[GeneratorIndex["PRIVATE_TX_HASH"] = 4261301885] = "PRIVATE_TX_HASH";
|
|
530
|
+
GeneratorIndex[GeneratorIndex["PUBLIC_CALLDATA"] = 388853507] = "PUBLIC_CALLDATA";
|
|
531
|
+
GeneratorIndex[GeneratorIndex["FUNCTION_ARGS"] = 587126185] = "FUNCTION_ARGS";
|
|
532
|
+
GeneratorIndex[GeneratorIndex["PROTOCOL_CONTRACTS"] = 3581307760] = "PROTOCOL_CONTRACTS";
|
|
533
|
+
GeneratorIndex[GeneratorIndex["EVENT_COMMITMENT"] = 469373807] = "EVENT_COMMITMENT";
|
|
534
|
+
GeneratorIndex[GeneratorIndex["AUTHWIT_INNER"] = 829479065] = "AUTHWIT_INNER";
|
|
535
|
+
GeneratorIndex[GeneratorIndex["AUTHWIT_OUTER"] = 1502324539] = "AUTHWIT_OUTER";
|
|
536
|
+
GeneratorIndex[GeneratorIndex["AUTHWIT_NULLIFIER"] = 1450992171] = "AUTHWIT_NULLIFIER";
|
|
537
|
+
GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY"] = 690840336] = "SYMMETRIC_KEY";
|
|
538
|
+
GeneratorIndex[GeneratorIndex["SYMMETRIC_KEY_2"] = 3484314061] = "SYMMETRIC_KEY_2";
|
|
539
|
+
GeneratorIndex[GeneratorIndex["PARTIAL_NOTE_VALIDITY_COMMITMENT"] = 1665410974] = "PARTIAL_NOTE_VALIDITY_COMMITMENT";
|
|
540
|
+
GeneratorIndex[GeneratorIndex["INITIALIZATION_NULLIFIER"] = 2762319966] = "INITIALIZATION_NULLIFIER";
|
|
541
|
+
GeneratorIndex[GeneratorIndex["SECRET_HASH"] = 15484084] = "SECRET_HASH";
|
|
542
|
+
GeneratorIndex[GeneratorIndex["TX_NULLIFIER"] = 1039603495] = "TX_NULLIFIER";
|
|
543
|
+
GeneratorIndex[GeneratorIndex["SIGNATURE_PAYLOAD"] = 2407104296] = "SIGNATURE_PAYLOAD";
|
|
555
544
|
return GeneratorIndex;
|
|
556
545
|
}({});
|
package/dest/constants.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
// Re-export L2 block number constants with proper BlockNumber type
|
|
4
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_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW } from './constants.gen.js';
|
|
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';
|
|
6
6
|
// Typescript-land-only constants
|
|
7
7
|
export const SPONSORED_FPC_SALT = BigInt(0);
|
|
8
8
|
// Autogenerated constants loaded from noir-land
|
|
9
|
-
// eslint-disable-next-line import/export
|
|
9
|
+
// eslint-disable-next-line import-x/export
|
|
10
10
|
export * from './constants.gen.js';
|
|
11
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
|
|
12
|
+
// eslint-disable-next-line import-x/export
|
|
13
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);
|
|
14
16
|
/** The block header hash for the genesis block 0. */ // Shadow the export from constants.gen above
|
|
15
|
-
// eslint-disable-next-line import/export
|
|
17
|
+
// eslint-disable-next-line import-x/export
|
|
16
18
|
export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);
|
|
@@ -9,6 +9,8 @@ const SOLIDITY_CONSTANTS_FILE = '../../../../l1-contracts/src/core/libraries/Con
|
|
|
9
9
|
// Whitelist of constants that will be copied to aztec_constants.hpp.
|
|
10
10
|
// We don't copy everything as just a handful are needed, and updating them breaks the cache and triggers expensive bb builds.
|
|
11
11
|
const CPP_CONSTANTS = [
|
|
12
|
+
'MAX_ETH_ADDRESS_BIT_SIZE',
|
|
13
|
+
'MAX_ETH_ADDRESS_VALUE',
|
|
12
14
|
'GENESIS_BLOCK_HEADER_HASH',
|
|
13
15
|
'GENESIS_ARCHIVE_ROOT',
|
|
14
16
|
'MEM_TAG_U1',
|
|
@@ -24,7 +26,7 @@ const CPP_CONSTANTS = [
|
|
|
24
26
|
'CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS',
|
|
25
27
|
'MULTI_CALL_ENTRYPOINT_ADDRESS',
|
|
26
28
|
'FEE_JUICE_ADDRESS',
|
|
27
|
-
'
|
|
29
|
+
'PUBLIC_CHECKS_ADDRESS',
|
|
28
30
|
'FEE_JUICE_BALANCES_SLOT',
|
|
29
31
|
'UPDATED_CLASS_IDS_SLOT',
|
|
30
32
|
'UPDATES_DELAYED_PUBLIC_MUTABLE_VALUES_LEN',
|
|
@@ -111,19 +113,22 @@ const CPP_CONSTANTS = [
|
|
|
111
113
|
'DEFAULT_MAX_DEBUG_LOG_MEMORY_READS'
|
|
112
114
|
];
|
|
113
115
|
const CPP_GENERATORS = [
|
|
116
|
+
'BLOCK_HEADER_HASH',
|
|
114
117
|
'PARTIAL_ADDRESS',
|
|
115
118
|
'CONTRACT_ADDRESS_V1',
|
|
116
|
-
'
|
|
119
|
+
'CONTRACT_CLASS_ID',
|
|
117
120
|
'PUBLIC_KEYS_HASH',
|
|
118
121
|
'NOTE_HASH_NONCE',
|
|
119
122
|
'UNIQUE_NOTE_HASH',
|
|
120
123
|
'SILOED_NOTE_HASH',
|
|
121
|
-
'
|
|
122
|
-
'
|
|
124
|
+
'SILOED_NULLIFIER',
|
|
125
|
+
'PUBLIC_LEAF_SLOT',
|
|
126
|
+
'PUBLIC_STORAGE_MAP_SLOT',
|
|
123
127
|
'PUBLIC_CALLDATA',
|
|
124
128
|
'PUBLIC_BYTECODE'
|
|
125
129
|
];
|
|
126
130
|
const PIL_CONSTANTS = [
|
|
131
|
+
'MAX_ETH_ADDRESS_VALUE',
|
|
127
132
|
'MEM_TAG_U1',
|
|
128
133
|
'MEM_TAG_U8',
|
|
129
134
|
'MEM_TAG_U16',
|
|
@@ -159,7 +164,7 @@ const PIL_CONSTANTS = [
|
|
|
159
164
|
'CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS',
|
|
160
165
|
'MULTI_CALL_ENTRYPOINT_ADDRESS',
|
|
161
166
|
'FEE_JUICE_ADDRESS',
|
|
162
|
-
'
|
|
167
|
+
'PUBLIC_CHECKS_ADDRESS',
|
|
163
168
|
'FEE_JUICE_BALANCES_SLOT',
|
|
164
169
|
'TIMESTAMP_OF_CHANGE_BIT_SIZE',
|
|
165
170
|
'UPDATES_DELAYED_PUBLIC_MUTABLE_METADATA_BIT_SIZE',
|
|
@@ -297,19 +302,21 @@ const PIL_CONSTANTS = [
|
|
|
297
302
|
const PIL_GENERATORS = [
|
|
298
303
|
'PARTIAL_ADDRESS',
|
|
299
304
|
'CONTRACT_ADDRESS_V1',
|
|
300
|
-
'
|
|
305
|
+
'CONTRACT_CLASS_ID',
|
|
301
306
|
'PUBLIC_KEYS_HASH',
|
|
302
307
|
'NOTE_HASH_NONCE',
|
|
303
308
|
'UNIQUE_NOTE_HASH',
|
|
304
309
|
'SILOED_NOTE_HASH',
|
|
305
|
-
'
|
|
306
|
-
'
|
|
310
|
+
'SILOED_NULLIFIER',
|
|
311
|
+
'PUBLIC_LEAF_SLOT',
|
|
312
|
+
'PUBLIC_STORAGE_MAP_SLOT',
|
|
307
313
|
'PUBLIC_CALLDATA',
|
|
308
314
|
'PUBLIC_BYTECODE'
|
|
309
315
|
];
|
|
310
316
|
const SOLIDITY_CONSTANTS = [
|
|
311
317
|
'MAX_FIELD_VALUE',
|
|
312
318
|
'MAX_L2_TO_L1_MSGS_PER_TX',
|
|
319
|
+
'EMPTY_EPOCH_OUT_HASH',
|
|
313
320
|
'L1_TO_L2_MSG_SUBTREE_HEIGHT',
|
|
314
321
|
'NUM_MSGS_PER_BASE_PARITY',
|
|
315
322
|
'NUM_BASE_PARITY_PER_ROOT_PARITY',
|
|
@@ -341,7 +348,7 @@ const SOLIDITY_CONSTANTS = [
|
|
|
341
348
|
*/ function processConstantsCpp(constants, generatorIndices) {
|
|
342
349
|
const code = [];
|
|
343
350
|
Object.entries(constants).forEach(([key, value])=>{
|
|
344
|
-
if (CPP_CONSTANTS.includes(key) || key.startsWith('AVM_')
|
|
351
|
+
if (CPP_CONSTANTS.includes(key) || key.startsWith('AVM_')) {
|
|
345
352
|
if (BigInt(value) <= 2n ** 31n - 1n) {
|
|
346
353
|
code.push(`#define ${key} ${value}`);
|
|
347
354
|
} else if (BigInt(value) <= 2n ** 64n - 1n) {
|
|
@@ -353,7 +360,7 @@ const SOLIDITY_CONSTANTS = [
|
|
|
353
360
|
});
|
|
354
361
|
Object.entries(generatorIndices).forEach(([key, value])=>{
|
|
355
362
|
if (CPP_GENERATORS.includes(key)) {
|
|
356
|
-
code.push(`#define
|
|
363
|
+
code.push(`#define DOM_SEP__${key} ${value}UL`);
|
|
357
364
|
}
|
|
358
365
|
});
|
|
359
366
|
return code.join('\n');
|
|
@@ -373,7 +380,7 @@ const SOLIDITY_CONSTANTS = [
|
|
|
373
380
|
});
|
|
374
381
|
Object.entries(generatorIndices).forEach(([key, value])=>{
|
|
375
382
|
if (PIL_GENERATORS.includes(key)) {
|
|
376
|
-
code.push(` pol
|
|
383
|
+
code.push(` pol DOM_SEP__${key} = ${value};`);
|
|
377
384
|
}
|
|
378
385
|
});
|
|
379
386
|
return code.join('\n');
|
|
@@ -482,7 +489,7 @@ ${processConstantsSolidity(constants)}
|
|
|
482
489
|
{
|
|
483
490
|
const [, name, _type, value, end] = line.match(/global\s+(\w+)(\s*:\s*\w+)?\s*=\s*([^;]*)(;)?/) || [];
|
|
484
491
|
if (name && value) {
|
|
485
|
-
const [, indexName] = name.match(/
|
|
492
|
+
const [, indexName] = name.match(/DOM_SEP__(\w+)/) || [];
|
|
486
493
|
if (indexName) {
|
|
487
494
|
// Generator index.
|
|
488
495
|
generatorIndexEnum[indexName] = +value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/constants",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.e310a4c8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json"
|
|
@@ -16,14 +16,14 @@
|
|
|
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.
|
|
19
|
+
"@aztec/foundation": "0.0.1-commit.e310a4c8",
|
|
20
20
|
"tslib": "^2.4.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@jest/globals": "^30.0.0",
|
|
24
24
|
"@types/jest": "^30.0.0",
|
|
25
25
|
"@types/node": "^22.15.17",
|
|
26
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
26
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
27
27
|
"eslint": "^9.26.0",
|
|
28
28
|
"jest": "^30.0.0",
|
|
29
29
|
"prettier": "^3.5.3",
|