@aztec/cli 3.0.0-devnet.5 → 3.0.0-devnet.6-patch.1

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.
Files changed (149) hide show
  1. package/README.md +1 -1
  2. package/dest/cmds/aztec_node/block_number.d.ts +1 -1
  3. package/dest/cmds/aztec_node/get_block.d.ts +1 -1
  4. package/dest/cmds/aztec_node/get_block.d.ts.map +1 -1
  5. package/dest/cmds/aztec_node/get_block.js +2 -1
  6. package/dest/cmds/aztec_node/get_current_base_fee.d.ts +1 -1
  7. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +1 -1
  8. package/dest/cmds/aztec_node/get_logs.d.ts +3 -2
  9. package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -1
  10. package/dest/cmds/aztec_node/get_node_info.d.ts +1 -1
  11. package/dest/cmds/aztec_node/index.d.ts +1 -1
  12. package/dest/cmds/contracts/index.d.ts +1 -1
  13. package/dest/cmds/contracts/inspect_contract.d.ts +1 -1
  14. package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -1
  15. package/dest/cmds/contracts/inspect_contract.js +4 -10
  16. package/dest/cmds/contracts/parse_parameter_struct.d.ts +1 -1
  17. package/dest/cmds/infrastructure/index.d.ts +1 -1
  18. package/dest/cmds/infrastructure/index.d.ts.map +1 -1
  19. package/dest/cmds/infrastructure/index.js +0 -1
  20. package/dest/cmds/infrastructure/sequencers.d.ts +1 -2
  21. package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
  22. package/dest/cmds/infrastructure/sequencers.js +3 -1
  23. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
  24. package/dest/cmds/l1/advance_epoch.d.ts +1 -1
  25. package/dest/cmds/l1/assume_proven_through.d.ts +1 -1
  26. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
  27. package/dest/cmds/l1/assume_proven_through.js +2 -1
  28. package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
  29. package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
  30. package/dest/cmds/l1/bridge_erc20.js +2 -1
  31. package/dest/cmds/l1/create_l1_account.d.ts +1 -1
  32. package/dest/cmds/l1/deploy_l1_contracts.d.ts +1 -1
  33. package/dest/cmds/l1/deploy_l1_contracts.js +1 -1
  34. package/dest/cmds/l1/deploy_new_rollup.d.ts +2 -2
  35. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
  36. package/dest/cmds/l1/deploy_new_rollup.js +1 -1
  37. package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
  38. package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -1
  39. package/dest/cmds/l1/get_l1_addresses.js +2 -1
  40. package/dest/cmds/l1/get_l1_balance.d.ts +1 -1
  41. package/dest/cmds/l1/get_l1_balance.js +1 -1
  42. package/dest/cmds/l1/governance_utils.d.ts +5 -5
  43. package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
  44. package/dest/cmds/l1/governance_utils.js +3 -1
  45. package/dest/cmds/l1/index.d.ts +1 -1
  46. package/dest/cmds/l1/prover_stats.d.ts +1 -1
  47. package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
  48. package/dest/cmds/l1/prover_stats.js +29 -29
  49. package/dest/cmds/l1/trigger_seed_snapshot.d.ts +2 -2
  50. package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
  51. package/dest/cmds/l1/trigger_seed_snapshot.js +2 -1
  52. package/dest/cmds/l1/update_l1_validators.d.ts +6 -6
  53. package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
  54. package/dest/cmds/l1/update_l1_validators.js +7 -3
  55. package/dest/cmds/misc/compute_selector.d.ts +1 -1
  56. package/dest/cmds/misc/example_contracts.d.ts +1 -1
  57. package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
  58. package/dest/cmds/misc/generate_p2p_private_key.d.ts +1 -1
  59. package/dest/cmds/misc/generate_secret_and_hash.d.ts +1 -1
  60. package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
  61. package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
  62. package/dest/cmds/misc/get_canonical_sponsored_fpc_address.d.ts +1 -1
  63. package/dest/cmds/misc/index.d.ts +1 -1
  64. package/dest/cmds/misc/update/common.d.ts +1 -1
  65. package/dest/cmds/misc/update/github.d.ts +1 -1
  66. package/dest/cmds/misc/update/noir.d.ts +1 -1
  67. package/dest/cmds/misc/update/npm.d.ts +1 -1
  68. package/dest/cmds/misc/update/npm.js +1 -1
  69. package/dest/cmds/misc/update/utils.d.ts +1 -1
  70. package/dest/cmds/misc/update.d.ts +1 -1
  71. package/dest/cmds/validator_keys/add.d.ts +5 -0
  72. package/dest/cmds/validator_keys/add.d.ts.map +1 -0
  73. package/dest/cmds/validator_keys/add.js +83 -0
  74. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +12 -0
  75. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -0
  76. package/dest/cmds/validator_keys/generate_bls_keypair.js +27 -0
  77. package/dest/cmds/validator_keys/index.d.ts +4 -0
  78. package/dest/cmds/validator_keys/index.d.ts.map +1 -0
  79. package/dest/cmds/validator_keys/index.js +32 -0
  80. package/dest/cmds/validator_keys/new.d.ts +29 -0
  81. package/dest/cmds/validator_keys/new.d.ts.map +1 -0
  82. package/dest/cmds/validator_keys/new.js +132 -0
  83. package/dest/cmds/validator_keys/shared.d.ts +68 -0
  84. package/dest/cmds/validator_keys/shared.d.ts.map +1 -0
  85. package/dest/cmds/validator_keys/shared.js +274 -0
  86. package/dest/cmds/validator_keys/staker.d.ts +38 -0
  87. package/dest/cmds/validator_keys/staker.d.ts.map +1 -0
  88. package/dest/cmds/validator_keys/staker.js +208 -0
  89. package/dest/cmds/validator_keys/utils.d.ts +25 -0
  90. package/dest/cmds/validator_keys/utils.d.ts.map +1 -0
  91. package/dest/cmds/validator_keys/utils.js +52 -0
  92. package/dest/config/cached_fetch.d.ts +1 -1
  93. package/dest/config/chain_l2_config.d.ts +14 -10
  94. package/dest/config/chain_l2_config.d.ts.map +1 -1
  95. package/dest/config/chain_l2_config.js +128 -67
  96. package/dest/config/enrich_env.d.ts +1 -1
  97. package/dest/config/get_l1_config.d.ts +3 -2
  98. package/dest/config/get_l1_config.d.ts.map +1 -1
  99. package/dest/config/get_l1_config.js +3 -1
  100. package/dest/config/index.d.ts +1 -1
  101. package/dest/config/network_config.d.ts +6 -3
  102. package/dest/config/network_config.d.ts.map +1 -1
  103. package/dest/config/network_config.js +58 -28
  104. package/dest/utils/aztec.d.ts +5 -3
  105. package/dest/utils/aztec.d.ts.map +1 -1
  106. package/dest/utils/aztec.js +6 -3
  107. package/dest/utils/commands.d.ts +12 -3
  108. package/dest/utils/commands.d.ts.map +1 -1
  109. package/dest/utils/commands.js +30 -3
  110. package/dest/utils/encoding.d.ts +1 -1
  111. package/dest/utils/encoding.js +1 -1
  112. package/dest/utils/github.d.ts +1 -1
  113. package/dest/utils/index.d.ts +1 -1
  114. package/dest/utils/inspect.d.ts +3 -2
  115. package/dest/utils/inspect.d.ts.map +1 -1
  116. package/dest/utils/setup_contracts.d.ts +1 -1
  117. package/package.json +37 -28
  118. package/public_include_metric_prefixes.json +1 -0
  119. package/src/cmds/aztec_node/get_block.ts +2 -1
  120. package/src/cmds/aztec_node/get_logs.ts +3 -2
  121. package/src/cmds/contracts/inspect_contract.ts +4 -11
  122. package/src/cmds/infrastructure/index.ts +0 -1
  123. package/src/cmds/infrastructure/sequencers.ts +3 -2
  124. package/src/cmds/l1/assume_proven_through.ts +4 -1
  125. package/src/cmds/l1/bridge_erc20.ts +2 -1
  126. package/src/cmds/l1/deploy_l1_contracts.ts +1 -1
  127. package/src/cmds/l1/deploy_new_rollup.ts +2 -1
  128. package/src/cmds/l1/get_l1_addresses.ts +3 -1
  129. package/src/cmds/l1/get_l1_balance.ts +1 -1
  130. package/src/cmds/l1/governance_utils.ts +3 -8
  131. package/src/cmds/l1/prover_stats.ts +38 -30
  132. package/src/cmds/l1/trigger_seed_snapshot.ts +2 -1
  133. package/src/cmds/l1/update_l1_validators.ts +7 -12
  134. package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
  135. package/src/cmds/misc/update/npm.ts +1 -1
  136. package/src/cmds/validator_keys/add.ts +123 -0
  137. package/src/cmds/validator_keys/generate_bls_keypair.ts +34 -0
  138. package/src/cmds/validator_keys/index.ts +142 -0
  139. package/src/cmds/validator_keys/new.ts +207 -0
  140. package/src/cmds/validator_keys/shared.ts +326 -0
  141. package/src/cmds/validator_keys/staker.ts +301 -0
  142. package/src/cmds/validator_keys/utils.ts +80 -0
  143. package/src/config/chain_l2_config.ts +176 -92
  144. package/src/config/get_l1_config.ts +4 -1
  145. package/src/config/network_config.ts +67 -29
  146. package/src/utils/aztec.ts +9 -9
  147. package/src/utils/commands.ts +41 -3
  148. package/src/utils/encoding.ts +1 -1
  149. package/src/utils/inspect.ts +2 -1
@@ -1,8 +1,10 @@
1
- import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
1
+ import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum/config';
2
+ import type { L1TxUtilsConfig } from '@aztec/ethereum/l1-tx-utils';
2
3
  import type { NetworkNames } from '@aztec/foundation/config';
3
4
  import { EthAddress } from '@aztec/foundation/eth-address';
4
5
  import type { SharedNodeConfig } from '@aztec/node-lib/config';
5
- import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
6
+ import type { P2PConfig } from '@aztec/p2p';
7
+ import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
6
8
 
7
9
  import path from 'path';
8
10
 
@@ -14,27 +16,30 @@ const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
14
16
  const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
15
17
  const tbMapSizeKb = 1_024 * 1_024 * 1_024; // 1 TB
16
18
 
17
- export type L2ChainConfig = L1ContractsConfig &
18
- Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways'> & {
19
+ export type L2ChainConfig = Omit<L1ContractsConfig, keyof L1TxUtilsConfig> &
20
+ Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways' | 'slashOverridePayload' | 'slashSelfAllowed'> &
21
+ Pick<P2PConfig, 'bootstrapNodes' | 'p2pEnabled' | 'txPoolDeleteTxsAfterReorg'> &
22
+ Pick<SequencerConfig, 'minTxsPerBlock' | 'maxTxsPerBlock'> & {
19
23
  l1ChainId: number;
20
24
  testAccounts: boolean;
21
25
  sponsoredFPC: boolean;
22
- p2pEnabled: boolean;
23
- p2pBootstrapNodes: string[];
24
- seqMinTxsPerBlock: number;
25
- seqMaxTxsPerBlock: number;
26
+ minTxsPerBlock: number;
27
+ maxTxsPerBlock: number;
26
28
  realProofs: boolean;
27
29
  snapshotsUrls: string[];
28
30
  autoUpdate: SharedNodeConfig['autoUpdate'];
29
31
  autoUpdateUrl?: string;
30
32
  maxTxPoolSize: number;
33
+ publicMetricsOptOut: boolean;
31
34
  publicIncludeMetrics?: string[];
32
35
  publicMetricsCollectorUrl?: string;
33
36
  publicMetricsCollectFrom?: string[];
37
+ skipArchiverInitialSync?: boolean;
38
+ blobAllowEmptySources?: boolean;
34
39
 
35
- // Setting the dbMapSize provides the default for every DB in the node.
40
+ // Setting the dataStoreMapSize provides the default for every DB in the node.
36
41
  // Then we explicitly override the sizes for the archiver and the larger trees.
37
- dbMapSizeKb: number;
42
+ dataStoreMapSizeKb: number;
38
43
  archiverStoreMapSizeKb: number;
39
44
  noteHashTreeMapSizeKb: number;
40
45
  nullifierTreeMapSizeKb: number;
@@ -83,7 +88,7 @@ const DefaultSlashConfig = {
83
88
  } satisfies Partial<L2ChainConfig>;
84
89
 
85
90
  const DefaultNetworkDBMapSizeConfig = {
86
- dbMapSizeKb: defaultDBMapSizeKb,
91
+ dataStoreMapSizeKb: defaultDBMapSizeKb,
87
92
  archiverStoreMapSizeKb: tbMapSizeKb,
88
93
  noteHashTreeMapSizeKb: tbMapSizeKb,
89
94
  nullifierTreeMapSizeKb: tbMapSizeKb,
@@ -96,17 +101,20 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
96
101
  sponsoredFPC: false,
97
102
  disableTransactions: true,
98
103
  p2pEnabled: true,
99
- p2pBootstrapNodes: [],
100
- seqMinTxsPerBlock: 0,
101
- seqMaxTxsPerBlock: 0,
104
+ bootstrapNodes: [],
105
+ minTxsPerBlock: 0,
106
+ maxTxsPerBlock: 0,
102
107
  realProofs: true,
103
108
  snapshotsUrls: [`${SNAPSHOTS_URL}/staging-ignition/`],
104
109
  autoUpdate: 'config-and-version',
105
110
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-ignition.json',
106
- maxTxPoolSize: 100_000_000, // 100MB
111
+ maxTxPoolSize: 0,
112
+ publicMetricsOptOut: false,
107
113
  publicIncludeMetrics,
108
114
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
109
115
  publicMetricsCollectFrom: ['sequencer'],
116
+ txPoolDeleteTxsAfterReorg: false,
117
+ blobAllowEmptySources: true,
110
118
 
111
119
  /** How many seconds an L1 slot lasts. */
112
120
  ethereumSlotDuration: 12,
@@ -117,7 +125,9 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
117
125
  /** The target validator committee size. */
118
126
  aztecTargetCommitteeSize: 24,
119
127
  /** The number of epochs to lag behind the current epoch for validator selection. */
120
- lagInEpochs: 2,
128
+ lagInEpochsForValidatorSet: 2,
129
+ /** The number of epochs to lag behind the current epoch for randao selection. */
130
+ lagInEpochsForRandao: 2,
121
131
  /** The number of epochs after an epoch ends that proofs are still accepted. */
122
132
  aztecProofSubmissionEpochs: 1,
123
133
  /** How many sequencers must agree with a slash for it to be executed. */
@@ -131,7 +141,7 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
131
141
  slashAmountLarge: 50_000n * 10n ** 18n,
132
142
  slashingOffsetInRounds: 2,
133
143
  slasherFlavor: 'tally',
134
- slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
144
+ slashingVetoer: EthAddress.ZERO,
135
145
 
136
146
  /** The mana target for the rollup */
137
147
  manaTarget: 0n,
@@ -145,11 +155,10 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
145
155
  ejectionThreshold: 100_000n * 10n ** 18n,
146
156
  activationThreshold: 200_000n * 10n ** 18n,
147
157
 
148
- governanceProposerRoundSize: 300, // TODO TMNT-322
149
- governanceProposerQuorum: 151, // TODO TMNT-322
158
+ governanceProposerRoundSize: 300,
159
+ governanceProposerQuorum: 151,
150
160
 
151
161
  // Node slashing config
152
- // TODO TMNT-330
153
162
  slashMinPenaltyPercentage: 0.5,
154
163
  slashMaxPenaltyPercentage: 2.0,
155
164
  slashInactivityTargetPercentage: 0.7,
@@ -177,17 +186,19 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
177
186
  sponsoredFPC: true,
178
187
  disableTransactions: false,
179
188
  p2pEnabled: true,
180
- p2pBootstrapNodes: [],
181
- seqMinTxsPerBlock: 0,
182
- seqMaxTxsPerBlock: 20,
189
+ bootstrapNodes: [],
190
+ minTxsPerBlock: 0,
191
+ maxTxsPerBlock: 20,
183
192
  realProofs: true,
184
193
  snapshotsUrls: [`${SNAPSHOTS_URL}/staging-public/`],
185
194
  autoUpdate: 'config-and-version',
186
195
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-public.json',
196
+ publicMetricsOptOut: false,
187
197
  publicIncludeMetrics,
188
198
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
189
199
  publicMetricsCollectFrom: ['sequencer'],
190
200
  maxTxPoolSize: 100_000_000, // 100MB
201
+ txPoolDeleteTxsAfterReorg: true,
191
202
 
192
203
  // Deployment stuff
193
204
  /** How many seconds an L1 slot lasts. */
@@ -199,7 +210,9 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
199
210
  /** The target validator committee size. */
200
211
  aztecTargetCommitteeSize: 48,
201
212
  /** The number of epochs to lag behind the current epoch for validator selection. */
202
- lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
213
+ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
214
+ /** The number of epochs to lag behind the current epoch for randao selection. */
215
+ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
203
216
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
204
217
  localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
205
218
  /** The number of epochs after an epoch ends that proofs are still accepted. */
@@ -230,17 +243,19 @@ export const nextNetL2ChainConfig: L2ChainConfig = {
230
243
  sponsoredFPC: true,
231
244
  p2pEnabled: true,
232
245
  disableTransactions: false,
233
- p2pBootstrapNodes: [],
234
- seqMinTxsPerBlock: 0,
235
- seqMaxTxsPerBlock: 8,
246
+ bootstrapNodes: [],
247
+ minTxsPerBlock: 0,
248
+ maxTxsPerBlock: 8,
236
249
  realProofs: true,
237
250
  snapshotsUrls: [],
238
251
  autoUpdate: 'config-and-version',
239
252
  autoUpdateUrl: '',
253
+ publicMetricsOptOut: true,
240
254
  publicIncludeMetrics,
241
255
  publicMetricsCollectorUrl: '',
242
256
  publicMetricsCollectFrom: [''],
243
257
  maxTxPoolSize: 100_000_000, // 100MB
258
+ txPoolDeleteTxsAfterReorg: false,
244
259
 
245
260
  // Deployment stuff
246
261
  /** How many seconds an L1 slot lasts. */
@@ -252,7 +267,9 @@ export const nextNetL2ChainConfig: L2ChainConfig = {
252
267
  /** The target validator committee size. */
253
268
  aztecTargetCommitteeSize: 48,
254
269
  /** The number of epochs to lag behind the current epoch for validator selection. */
255
- lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
270
+ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
271
+ /** The number of epochs to lag behind the current epoch for randao selection. */
272
+ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
256
273
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
257
274
  localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
258
275
  /** The number of epochs after an epoch ends that proofs are still accepted. */
@@ -283,72 +300,112 @@ export const testnetL2ChainConfig: L2ChainConfig = {
283
300
  sponsoredFPC: true,
284
301
  p2pEnabled: true,
285
302
  disableTransactions: true,
286
- p2pBootstrapNodes: [],
287
- seqMinTxsPerBlock: 0,
288
- seqMaxTxsPerBlock: 0,
303
+ bootstrapNodes: [],
304
+ minTxsPerBlock: 0,
305
+ maxTxsPerBlock: 0,
289
306
  realProofs: true,
290
307
  snapshotsUrls: [`${SNAPSHOTS_URL}/testnet/`],
291
308
  autoUpdate: 'config-and-version',
292
309
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
293
310
  maxTxPoolSize: 100_000_000, // 100MB
311
+ publicMetricsOptOut: false,
294
312
  publicIncludeMetrics,
295
313
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
296
314
  publicMetricsCollectFrom: ['sequencer'],
315
+ txPoolDeleteTxsAfterReorg: true,
316
+ skipArchiverInitialSync: true,
317
+ blobAllowEmptySources: true,
297
318
 
298
- // Deployment stuff
299
319
  /** How many seconds an L1 slot lasts. */
300
320
  ethereumSlotDuration: 12,
301
321
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
302
- aztecSlotDuration: 36,
322
+ aztecSlotDuration: 72,
303
323
  /** How many L2 slots an epoch lasts. */
304
324
  aztecEpochDuration: 32,
305
325
  /** The target validator committee size. */
306
- aztecTargetCommitteeSize: 48,
326
+ aztecTargetCommitteeSize: 24,
307
327
  /** The number of epochs to lag behind the current epoch for validator selection. */
308
- lagInEpochs: 2,
328
+ lagInEpochsForValidatorSet: 2,
329
+ /** The number of epochs to lag behind the current epoch for randao selection. */
330
+ lagInEpochsForRandao: 2,
309
331
  /** The number of epochs after an epoch ends that proofs are still accepted. */
310
332
  aztecProofSubmissionEpochs: 1,
311
- /** The deposit amount for a validator */
312
- activationThreshold: DefaultL1ContractsConfig.activationThreshold,
313
- /** The minimum stake for a validator. */
314
- ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
315
- /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
316
- localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
317
- /** The slashing round size */
318
- slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
319
- /** Governance proposing round size */
320
- governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
333
+
334
+ // This is a diff from mainnet: we have 2-strikes you're out, rather than 3 on mainnet.
335
+ localEjectionThreshold: 198_000n * 10n ** 18n,
336
+ /** How many sequencers must agree with a slash for it to be executed. */
337
+ slashingQuorum: 65,
338
+ slashingRoundSizeInEpochs: 4,
339
+ slashingExecutionDelayInRounds: 28,
340
+ slashingLifetimeInRounds: 34,
341
+ slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
342
+ slashingOffsetInRounds: 2,
343
+
344
+ slashingDisableDuration: 259_200, // 3 days
345
+ slasherFlavor: 'tally',
346
+
347
+ slashAmountSmall: 2_000n * 10n ** 18n,
348
+ slashAmountMedium: 2_000n * 10n ** 18n,
349
+ slashAmountLarge: 2_000n * 10n ** 18n,
350
+
321
351
  /** The mana target for the rollup */
322
352
  manaTarget: 0n,
353
+
323
354
  /** The proving cost per mana */
324
- provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
325
- /** Exit delay for stakers */
326
- exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
355
+ provingCostPerMana: 0n,
327
356
 
328
- ...DefaultSlashConfig,
329
- slashPrunePenalty: 0n,
330
- slashDataWithholdingPenalty: 0n,
357
+ exitDelaySeconds: 4 * 24 * 60 * 60, // 4 days
358
+
359
+ activationThreshold: 200_000n * 10n ** 18n,
360
+ ejectionThreshold: 100_000n * 10n ** 18n,
361
+
362
+ governanceProposerRoundSize: 300,
363
+ governanceProposerQuorum: 151,
364
+
365
+ // Node slashing config
366
+ slashInactivityTargetPercentage: 0.8,
367
+ slashInactivityConsecutiveEpochThreshold: 2,
368
+ slashInactivityPenalty: 2_000n * 10n ** 18n,
369
+ slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now
370
+ slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now
371
+ slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
372
+ slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
373
+ slashUnknownPenalty: 2_000n * 10n ** 18n,
374
+ slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n, // 10_000n * 10n ** 18n, Disabled for now until further testing
375
+ slashGracePeriodL2Slots: 1_200, // One day from deployment
376
+ slashOffenseExpirationRounds: 8,
377
+
378
+ slashMinPenaltyPercentage: 0.5,
379
+ slashMaxPenaltyPercentage: 2.0,
380
+ slashMaxPayloadSize: 50,
381
+ slashExecuteRoundsLookBack: 4,
382
+
383
+ sentinelEnabled: true,
331
384
 
332
385
  ...DefaultNetworkDBMapSizeConfig,
333
386
  };
334
387
 
335
388
  export const mainnetL2ChainConfig: L2ChainConfig = {
389
+ txPoolDeleteTxsAfterReorg: true,
390
+ disableTransactions: true,
391
+
336
392
  l1ChainId: 1,
337
393
  testAccounts: false,
338
394
  sponsoredFPC: false,
339
395
  p2pEnabled: true,
340
- disableTransactions: true,
341
- p2pBootstrapNodes: [],
342
- seqMinTxsPerBlock: 0,
343
- seqMaxTxsPerBlock: 0,
396
+ bootstrapNodes: [],
397
+ minTxsPerBlock: 0,
398
+ maxTxsPerBlock: 0,
344
399
  realProofs: true,
345
400
  snapshotsUrls: [`${SNAPSHOTS_URL}/mainnet/`],
346
401
  autoUpdate: 'notify',
347
402
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
348
- maxTxPoolSize: 100_000_000, // 100MB
403
+ maxTxPoolSize: 0,
404
+ publicMetricsOptOut: true,
349
405
  publicIncludeMetrics,
350
406
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
351
407
  publicMetricsCollectFrom: ['sequencer'],
408
+ blobAllowEmptySources: true,
352
409
 
353
410
  /** How many seconds an L1 slot lasts. */
354
411
  ethereumSlotDuration: 12,
@@ -358,60 +415,63 @@ export const mainnetL2ChainConfig: L2ChainConfig = {
358
415
  aztecEpochDuration: 32,
359
416
  /** The target validator committee size. */
360
417
  aztecTargetCommitteeSize: 24,
418
+ /** The number of epochs to lag behind the current epoch for validator selection. */
419
+ lagInEpochsForValidatorSet: 2,
420
+ /** The number of epochs to lag behind the current epoch for randao selection. */
421
+ lagInEpochsForRandao: 2,
361
422
  /** The number of epochs after an epoch ends that proofs are still accepted. */
362
423
  aztecProofSubmissionEpochs: 1,
363
- /** How many sequencers must agree with a slash for it to be executed. */
364
- slashingQuorum: 65,
365
-
366
- /** The number of epochs to lag behind the current epoch for validator selection. */
367
- lagInEpochs: 2,
368
424
 
369
425
  localEjectionThreshold: 196_000n * 10n ** 18n,
370
- slashingDisableDuration: 5 * 24 * 60 * 60,
371
-
426
+ /** How many sequencers must agree with a slash for it to be executed. */
427
+ slashingQuorum: 65,
372
428
  slashingRoundSizeInEpochs: 4,
373
- slashingLifetimeInRounds: 40,
374
429
  slashingExecutionDelayInRounds: 28,
375
- slashAmountSmall: 2_000n * 10n ** 18n,
376
- slashAmountMedium: 10_000n * 10n ** 18n,
377
- slashAmountLarge: 50_000n * 10n ** 18n,
430
+ slashingLifetimeInRounds: 34,
431
+ slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
378
432
  slashingOffsetInRounds: 2,
433
+
434
+ slashingDisableDuration: 259_200, // 3 days
379
435
  slasherFlavor: 'tally',
380
- slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
436
+
437
+ slashAmountSmall: 2_000n * 10n ** 18n,
438
+ slashAmountMedium: 2_000n * 10n ** 18n,
439
+ slashAmountLarge: 2_000n * 10n ** 18n,
381
440
 
382
441
  /** The mana target for the rollup */
383
442
  manaTarget: 0n,
384
443
 
385
- exitDelaySeconds: 5 * 24 * 60 * 60,
386
-
387
444
  /** The proving cost per mana */
388
445
  provingCostPerMana: 0n,
389
446
 
390
- ejectionThreshold: 100_000n * 10n ** 18n,
447
+ exitDelaySeconds: 4 * 24 * 60 * 60, // 4 days
448
+
391
449
  activationThreshold: 200_000n * 10n ** 18n,
450
+ ejectionThreshold: 100_000n * 10n ** 18n,
392
451
 
393
- governanceProposerRoundSize: 300, // TODO TMNT-322
394
- governanceProposerQuorum: 151, // TODO TMNT-322
452
+ governanceProposerRoundSize: 1000,
453
+ governanceProposerQuorum: 600,
395
454
 
396
455
  // Node slashing config
397
- // TODO TMNT-330
398
- slashMinPenaltyPercentage: 0.5,
399
- slashMaxPenaltyPercentage: 2.0,
400
- slashInactivityTargetPercentage: 0.7,
456
+ slashInactivityTargetPercentage: 0.8,
401
457
  slashInactivityConsecutiveEpochThreshold: 2,
402
458
  slashInactivityPenalty: 2_000n * 10n ** 18n,
403
459
  slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now
404
460
  slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now
405
- slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
406
- slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
461
+ slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
462
+ slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
407
463
  slashUnknownPenalty: 2_000n * 10n ** 18n,
408
- slashBroadcastedInvalidBlockPenalty: 0n, // 10_000n * 10n ** 18n, Disabled for now until further testing
409
- slashMaxPayloadSize: 50,
410
- slashGracePeriodL2Slots: 32 * 4, // One round from genesis
464
+ slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n, // 10_000n * 10n ** 18n, Disabled for now until further testing
465
+ slashGracePeriodL2Slots: 1_200, // One day from deployment
411
466
  slashOffenseExpirationRounds: 8,
412
- sentinelEnabled: true,
467
+
468
+ slashMinPenaltyPercentage: 0.5,
469
+ slashMaxPenaltyPercentage: 2.0,
470
+ slashMaxPayloadSize: 50,
413
471
  slashExecuteRoundsLookBack: 4,
414
472
 
473
+ sentinelEnabled: true,
474
+
415
475
  ...DefaultNetworkDBMapSizeConfig,
416
476
  };
417
477
 
@@ -421,17 +481,19 @@ export const devnetL2ChainConfig: L2ChainConfig = {
421
481
  sponsoredFPC: true,
422
482
  p2pEnabled: true,
423
483
  disableTransactions: false,
424
- p2pBootstrapNodes: [],
425
- seqMinTxsPerBlock: 0,
426
- seqMaxTxsPerBlock: 8,
484
+ bootstrapNodes: [],
485
+ minTxsPerBlock: 0,
486
+ maxTxsPerBlock: 8,
427
487
  realProofs: false,
428
488
  snapshotsUrls: [],
429
489
  autoUpdate: 'config-and-version',
430
490
  autoUpdateUrl: '',
491
+ publicMetricsOptOut: true,
431
492
  publicIncludeMetrics,
432
493
  publicMetricsCollectorUrl: '',
433
494
  publicMetricsCollectFrom: [''],
434
495
  maxTxPoolSize: 100_000_000, // 100MB
496
+ txPoolDeleteTxsAfterReorg: true,
435
497
 
436
498
  // Deployment stuff
437
499
  /** How many seconds an L1 slot lasts. */
@@ -443,7 +505,9 @@ export const devnetL2ChainConfig: L2ChainConfig = {
443
505
  /** The target validator committee size. */
444
506
  aztecTargetCommitteeSize: 1,
445
507
  /** The number of epochs to lag behind the current epoch for validator selection. */
446
- lagInEpochs: 1,
508
+ lagInEpochsForValidatorSet: 1,
509
+ /** The number of epochs to lag behind the current epoch for randao selection. */
510
+ lagInEpochsForRandao: 1,
447
511
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
448
512
  localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
449
513
  /** The number of epochs after an epoch ends that proofs are still accepted. */
@@ -490,7 +554,7 @@ function getDefaultDataDir(networkName: NetworkNames): string {
490
554
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
491
555
  }
492
556
 
493
- export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
557
+ export function enrichEnvironmentWithChainName(networkName: NetworkNames) {
494
558
  if (networkName === 'local') {
495
559
  return;
496
560
  }
@@ -502,24 +566,37 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
502
566
  throw new Error(`Unknown network name: ${networkName}`);
503
567
  }
504
568
 
505
- enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
569
+ enrichEnvironmentWithChainConfig(config);
570
+ }
571
+
572
+ export function enrichEnvironmentWithChainConfig(config: L2ChainConfig) {
573
+ enrichVar('BOOTSTRAP_NODES', config.bootstrapNodes.join(','));
506
574
  enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
507
575
  enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
508
576
  enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
509
577
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
510
- enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
511
- enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
578
+ enrichVar('SEQ_MIN_TX_PER_BLOCK', config.minTxsPerBlock.toString());
579
+ enrichVar('SEQ_MAX_TX_PER_BLOCK', config.maxTxsPerBlock.toString());
512
580
  enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
513
581
  enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
514
582
  enrichVar('SYNC_SNAPSHOTS_URLS', config.snapshotsUrls.join(','));
515
583
  enrichVar('P2P_MAX_TX_POOL_SIZE', config.maxTxPoolSize.toString());
584
+ enrichVar('P2P_TX_POOL_DELETE_TXS_AFTER_REORG', config.txPoolDeleteTxsAfterReorg.toString());
516
585
 
517
- enrichVar('DATA_STORE_MAP_SIZE_KB', config.dbMapSizeKb.toString());
586
+ enrichVar('DATA_STORE_MAP_SIZE_KB', config.dataStoreMapSizeKb.toString());
518
587
  enrichVar('ARCHIVER_STORE_MAP_SIZE_KB', config.archiverStoreMapSizeKb.toString());
519
588
  enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
520
589
  enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
521
590
  enrichVar('PUBLIC_DATA_TREE_MAP_SIZE_KB', config.publicDataTreeMapSizeKb.toString());
522
591
 
592
+ if (config.skipArchiverInitialSync !== undefined) {
593
+ enrichVar('SKIP_ARCHIVER_INITIAL_SYNC', config.skipArchiverInitialSync.toString());
594
+ }
595
+
596
+ if (config.blobAllowEmptySources !== undefined) {
597
+ enrichVar('BLOB_ALLOW_EMPTY_SOURCES', config.blobAllowEmptySources.toString());
598
+ }
599
+
523
600
  if (config.autoUpdate) {
524
601
  enrichVar('AUTO_UPDATE', config.autoUpdate?.toString());
525
602
  }
@@ -540,11 +617,15 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
540
617
  enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
541
618
  }
542
619
 
620
+ enrichVar('PUBLIC_OTEL_OPT_OUT', config.publicMetricsOptOut.toString());
621
+
543
622
  // Deployment stuff
544
623
  enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
545
624
  enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
546
625
  enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
547
626
  enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
627
+ enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET', config.lagInEpochsForValidatorSet.toString());
628
+ enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_RANDAO', config.lagInEpochsForRandao.toString());
548
629
  enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
549
630
  enrichVar('AZTEC_ACTIVATION_THRESHOLD', config.activationThreshold.toString());
550
631
  enrichVar('AZTEC_EJECTION_THRESHOLD', config.ejectionThreshold.toString());
@@ -562,6 +643,7 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
562
643
  enrichVar('AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS', config.slashingExecutionDelayInRounds.toString());
563
644
  enrichVar('AZTEC_SLASHING_OFFSET_IN_ROUNDS', config.slashingOffsetInRounds.toString());
564
645
  enrichVar('AZTEC_SLASHER_FLAVOR', config.slasherFlavor);
646
+ enrichVar('AZTEC_SLASHING_DISABLE_DURATION', config.slashingDisableDuration.toString());
565
647
  enrichVar('AZTEC_EXIT_DELAY_SECONDS', config.exitDelaySeconds.toString());
566
648
  enrichEthAddressVar('AZTEC_SLASHING_VETOER', config.slashingVetoer.toString());
567
649
 
@@ -579,6 +661,8 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
579
661
  enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashBroadcastedInvalidBlockPenalty.toString());
580
662
  enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
581
663
  enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
664
+ enrichVar('SLASH_GRACE_PERIOD_L2_SLOTS', config.slashGracePeriodL2Slots.toString());
665
+ enrichVar('SLASH_EXECUTE_ROUNDS_LOOK_BACK', config.slashExecuteRoundsLookBack.toString());
582
666
 
583
667
  enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
584
668
  enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
@@ -1,4 +1,7 @@
1
- import { type L1ContractAddresses, RegistryContract, getL1ContractsConfig, getPublicClient } from '@aztec/ethereum';
1
+ import { getPublicClient } from '@aztec/ethereum/client';
2
+ import { RegistryContract } from '@aztec/ethereum/contracts';
3
+ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
4
+ import { getL1ContractsConfig } from '@aztec/ethereum/queries';
2
5
  import { EthAddress } from '@aztec/foundation/eth-address';
3
6
 
4
7
  export async function getL1Config(