@aztec/cli 0.0.1-commit.b655e406 → 0.0.1-commit.fce3e4f
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/README.md +1 -1
- package/dest/cmds/aztec_node/block_number.d.ts +1 -1
- package/dest/cmds/aztec_node/get_block.d.ts +1 -1
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts +1 -1
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +1 -1
- package/dest/cmds/aztec_node/get_logs.d.ts +1 -1
- package/dest/cmds/aztec_node/get_node_info.d.ts +1 -1
- package/dest/cmds/aztec_node/index.d.ts +1 -1
- package/dest/cmds/contracts/index.d.ts +1 -1
- package/dest/cmds/contracts/inspect_contract.d.ts +1 -1
- package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -1
- package/dest/cmds/contracts/inspect_contract.js +3 -9
- package/dest/cmds/contracts/parse_parameter_struct.d.ts +1 -1
- package/dest/cmds/infrastructure/index.d.ts +1 -1
- package/dest/cmds/infrastructure/sequencers.d.ts +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
- package/dest/cmds/l1/advance_epoch.d.ts +1 -1
- package/dest/cmds/l1/assume_proven_through.d.ts +1 -1
- package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
- package/dest/cmds/l1/create_l1_account.d.ts +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +1 -1
- package/dest/cmds/l1/deploy_new_rollup.d.ts +1 -1
- package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
- package/dest/cmds/l1/get_l1_balance.d.ts +1 -1
- package/dest/cmds/l1/governance_utils.d.ts +5 -5
- package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
- package/dest/cmds/l1/index.d.ts +1 -1
- package/dest/cmds/l1/prover_stats.d.ts +1 -1
- package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
- package/dest/cmds/l1/prover_stats.js +28 -28
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts +2 -2
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.d.ts +6 -6
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +2 -2
- package/dest/cmds/misc/compute_selector.d.ts +1 -1
- package/dest/cmds/misc/example_contracts.d.ts +1 -1
- package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
- package/dest/cmds/misc/generate_p2p_private_key.d.ts +1 -1
- package/dest/cmds/misc/generate_secret_and_hash.d.ts +1 -1
- package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
- package/dest/cmds/misc/get_canonical_sponsored_fpc_address.d.ts +1 -1
- package/dest/cmds/misc/index.d.ts +1 -1
- package/dest/cmds/misc/update/common.d.ts +1 -1
- package/dest/cmds/misc/update/github.d.ts +1 -1
- package/dest/cmds/misc/update/noir.d.ts +1 -1
- package/dest/cmds/misc/update/npm.d.ts +1 -1
- package/dest/cmds/misc/update/npm.js +1 -1
- package/dest/cmds/misc/update/utils.d.ts +1 -1
- package/dest/cmds/misc/update.d.ts +1 -1
- package/dest/cmds/validator_keys/add.d.ts +1 -1
- package/dest/cmds/validator_keys/add.d.ts.map +1 -1
- package/dest/cmds/validator_keys/add.js +20 -7
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +1 -1
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -1
- package/dest/cmds/validator_keys/generate_bls_keypair.js +2 -1
- package/dest/cmds/validator_keys/index.d.ts +1 -1
- package/dest/cmds/validator_keys/index.d.ts.map +1 -1
- package/dest/cmds/validator_keys/index.js +16 -4
- package/dest/cmds/validator_keys/new.d.ts +7 -4
- package/dest/cmds/validator_keys/new.d.ts.map +1 -1
- package/dest/cmds/validator_keys/new.js +87 -16
- package/dest/cmds/validator_keys/shared.d.ts +4 -4
- package/dest/cmds/validator_keys/shared.d.ts.map +1 -1
- package/dest/cmds/validator_keys/shared.js +29 -27
- package/dest/cmds/validator_keys/staker.d.ts +38 -0
- package/dest/cmds/validator_keys/staker.d.ts.map +1 -0
- package/dest/cmds/validator_keys/staker.js +207 -0
- package/dest/cmds/validator_keys/utils.d.ts +25 -0
- package/dest/cmds/validator_keys/utils.d.ts.map +1 -0
- package/dest/cmds/validator_keys/utils.js +52 -0
- package/dest/config/cached_fetch.d.ts +1 -1
- package/dest/config/chain_l2_config.d.ts +11 -10
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +64 -34
- package/dest/config/enrich_env.d.ts +1 -1
- package/dest/config/get_l1_config.d.ts +1 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/network_config.d.ts +2 -2
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +19 -5
- package/dest/utils/aztec.d.ts +1 -1
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/commands.d.ts +2 -2
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/encoding.d.ts +1 -1
- package/dest/utils/github.d.ts +1 -1
- package/dest/utils/index.d.ts +1 -1
- package/dest/utils/inspect.d.ts +1 -1
- package/dest/utils/setup_contracts.d.ts +1 -1
- package/package.json +34 -29
- package/public_include_metric_prefixes.json +1 -0
- package/src/cmds/contracts/inspect_contract.ts +3 -10
- package/src/cmds/l1/prover_stats.ts +36 -29
- package/src/cmds/l1/update_l1_validators.ts +2 -2
- package/src/cmds/misc/update/npm.ts +1 -1
- package/src/cmds/validator_keys/add.ts +20 -10
- package/src/cmds/validator_keys/generate_bls_keypair.ts +2 -1
- package/src/cmds/validator_keys/index.ts +67 -21
- package/src/cmds/validator_keys/new.ts +109 -23
- package/src/cmds/validator_keys/shared.ts +30 -26
- package/src/cmds/validator_keys/staker.ts +300 -0
- package/src/cmds/validator_keys/utils.ts +80 -0
- package/src/config/chain_l2_config.ts +86 -45
- package/src/config/network_config.ts +26 -5
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
|
|
1
|
+
import { DefaultL1ContractsConfig, type L1ContractsConfig, type L1TxUtilsConfig } from '@aztec/ethereum';
|
|
2
2
|
import type { NetworkNames } from '@aztec/foundation/config';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
5
|
-
import type {
|
|
5
|
+
import type { P2PConfig } from '@aztec/p2p';
|
|
6
|
+
import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
6
7
|
|
|
7
8
|
import path from 'path';
|
|
8
9
|
|
|
@@ -14,29 +15,30 @@ const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
|
|
|
14
15
|
const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
|
|
15
16
|
const tbMapSizeKb = 1_024 * 1_024 * 1_024; // 1 TB
|
|
16
17
|
|
|
17
|
-
export type L2ChainConfig = L1ContractsConfig &
|
|
18
|
-
Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways'> &
|
|
18
|
+
export type L2ChainConfig = Omit<L1ContractsConfig, keyof L1TxUtilsConfig> &
|
|
19
|
+
Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways' | 'slashOverridePayload' | 'slashSelfAllowed'> &
|
|
20
|
+
Pick<P2PConfig, 'bootstrapNodes' | 'p2pEnabled' | 'txPoolDeleteTxsAfterReorg'> &
|
|
21
|
+
Pick<SequencerConfig, 'minTxsPerBlock' | 'maxTxsPerBlock'> & {
|
|
19
22
|
l1ChainId: number;
|
|
20
23
|
testAccounts: boolean;
|
|
21
24
|
sponsoredFPC: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
seqMinTxsPerBlock: number;
|
|
25
|
-
seqMaxTxsPerBlock: number;
|
|
25
|
+
minTxsPerBlock: number;
|
|
26
|
+
maxTxsPerBlock: number;
|
|
26
27
|
realProofs: boolean;
|
|
27
28
|
snapshotsUrls: string[];
|
|
28
29
|
autoUpdate: SharedNodeConfig['autoUpdate'];
|
|
29
30
|
autoUpdateUrl?: string;
|
|
30
31
|
maxTxPoolSize: number;
|
|
32
|
+
publicMetricsOptOut: boolean;
|
|
31
33
|
publicIncludeMetrics?: string[];
|
|
32
34
|
publicMetricsCollectorUrl?: string;
|
|
33
35
|
publicMetricsCollectFrom?: string[];
|
|
34
36
|
skipArchiverInitialSync?: boolean;
|
|
35
37
|
blobAllowEmptySources?: boolean;
|
|
36
38
|
|
|
37
|
-
// Setting the
|
|
39
|
+
// Setting the dataStoreMapSize provides the default for every DB in the node.
|
|
38
40
|
// Then we explicitly override the sizes for the archiver and the larger trees.
|
|
39
|
-
|
|
41
|
+
dataStoreMapSizeKb: number;
|
|
40
42
|
archiverStoreMapSizeKb: number;
|
|
41
43
|
noteHashTreeMapSizeKb: number;
|
|
42
44
|
nullifierTreeMapSizeKb: number;
|
|
@@ -85,7 +87,7 @@ const DefaultSlashConfig = {
|
|
|
85
87
|
} satisfies Partial<L2ChainConfig>;
|
|
86
88
|
|
|
87
89
|
const DefaultNetworkDBMapSizeConfig = {
|
|
88
|
-
|
|
90
|
+
dataStoreMapSizeKb: defaultDBMapSizeKb,
|
|
89
91
|
archiverStoreMapSizeKb: tbMapSizeKb,
|
|
90
92
|
noteHashTreeMapSizeKb: tbMapSizeKb,
|
|
91
93
|
nullifierTreeMapSizeKb: tbMapSizeKb,
|
|
@@ -98,17 +100,20 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
98
100
|
sponsoredFPC: false,
|
|
99
101
|
disableTransactions: true,
|
|
100
102
|
p2pEnabled: true,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
bootstrapNodes: [],
|
|
104
|
+
minTxsPerBlock: 0,
|
|
105
|
+
maxTxsPerBlock: 0,
|
|
104
106
|
realProofs: true,
|
|
105
107
|
snapshotsUrls: [`${SNAPSHOTS_URL}/staging-ignition/`],
|
|
106
108
|
autoUpdate: 'config-and-version',
|
|
107
109
|
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-ignition.json',
|
|
108
|
-
maxTxPoolSize:
|
|
110
|
+
maxTxPoolSize: 0,
|
|
111
|
+
publicMetricsOptOut: false,
|
|
109
112
|
publicIncludeMetrics,
|
|
110
113
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
111
114
|
publicMetricsCollectFrom: ['sequencer'],
|
|
115
|
+
txPoolDeleteTxsAfterReorg: false,
|
|
116
|
+
blobAllowEmptySources: true,
|
|
112
117
|
|
|
113
118
|
/** How many seconds an L1 slot lasts. */
|
|
114
119
|
ethereumSlotDuration: 12,
|
|
@@ -119,7 +124,9 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
119
124
|
/** The target validator committee size. */
|
|
120
125
|
aztecTargetCommitteeSize: 24,
|
|
121
126
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
122
|
-
|
|
127
|
+
lagInEpochsForValidatorSet: 2,
|
|
128
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
129
|
+
lagInEpochsForRandao: 2,
|
|
123
130
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
124
131
|
aztecProofSubmissionEpochs: 1,
|
|
125
132
|
/** How many sequencers must agree with a slash for it to be executed. */
|
|
@@ -133,7 +140,7 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
133
140
|
slashAmountLarge: 50_000n * 10n ** 18n,
|
|
134
141
|
slashingOffsetInRounds: 2,
|
|
135
142
|
slasherFlavor: 'tally',
|
|
136
|
-
slashingVetoer: EthAddress.ZERO,
|
|
143
|
+
slashingVetoer: EthAddress.ZERO,
|
|
137
144
|
|
|
138
145
|
/** The mana target for the rollup */
|
|
139
146
|
manaTarget: 0n,
|
|
@@ -178,17 +185,19 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
|
|
|
178
185
|
sponsoredFPC: true,
|
|
179
186
|
disableTransactions: false,
|
|
180
187
|
p2pEnabled: true,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
bootstrapNodes: [],
|
|
189
|
+
minTxsPerBlock: 0,
|
|
190
|
+
maxTxsPerBlock: 20,
|
|
184
191
|
realProofs: true,
|
|
185
192
|
snapshotsUrls: [`${SNAPSHOTS_URL}/staging-public/`],
|
|
186
193
|
autoUpdate: 'config-and-version',
|
|
187
194
|
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-public.json',
|
|
195
|
+
publicMetricsOptOut: false,
|
|
188
196
|
publicIncludeMetrics,
|
|
189
197
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
190
198
|
publicMetricsCollectFrom: ['sequencer'],
|
|
191
199
|
maxTxPoolSize: 100_000_000, // 100MB
|
|
200
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
192
201
|
|
|
193
202
|
// Deployment stuff
|
|
194
203
|
/** How many seconds an L1 slot lasts. */
|
|
@@ -200,7 +209,9 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
|
|
|
200
209
|
/** The target validator committee size. */
|
|
201
210
|
aztecTargetCommitteeSize: 48,
|
|
202
211
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
203
|
-
|
|
212
|
+
lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
|
|
213
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
214
|
+
lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
|
|
204
215
|
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
205
216
|
localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
206
217
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
@@ -231,17 +242,19 @@ export const nextNetL2ChainConfig: L2ChainConfig = {
|
|
|
231
242
|
sponsoredFPC: true,
|
|
232
243
|
p2pEnabled: true,
|
|
233
244
|
disableTransactions: false,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
245
|
+
bootstrapNodes: [],
|
|
246
|
+
minTxsPerBlock: 0,
|
|
247
|
+
maxTxsPerBlock: 8,
|
|
237
248
|
realProofs: true,
|
|
238
249
|
snapshotsUrls: [],
|
|
239
250
|
autoUpdate: 'config-and-version',
|
|
240
251
|
autoUpdateUrl: '',
|
|
252
|
+
publicMetricsOptOut: true,
|
|
241
253
|
publicIncludeMetrics,
|
|
242
254
|
publicMetricsCollectorUrl: '',
|
|
243
255
|
publicMetricsCollectFrom: [''],
|
|
244
256
|
maxTxPoolSize: 100_000_000, // 100MB
|
|
257
|
+
txPoolDeleteTxsAfterReorg: false,
|
|
245
258
|
|
|
246
259
|
// Deployment stuff
|
|
247
260
|
/** How many seconds an L1 slot lasts. */
|
|
@@ -253,7 +266,9 @@ export const nextNetL2ChainConfig: L2ChainConfig = {
|
|
|
253
266
|
/** The target validator committee size. */
|
|
254
267
|
aztecTargetCommitteeSize: 48,
|
|
255
268
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
256
|
-
|
|
269
|
+
lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
|
|
270
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
271
|
+
lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
|
|
257
272
|
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
258
273
|
localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
259
274
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
@@ -284,17 +299,19 @@ export const testnetL2ChainConfig: L2ChainConfig = {
|
|
|
284
299
|
sponsoredFPC: true,
|
|
285
300
|
p2pEnabled: true,
|
|
286
301
|
disableTransactions: true,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
302
|
+
bootstrapNodes: [],
|
|
303
|
+
minTxsPerBlock: 0,
|
|
304
|
+
maxTxsPerBlock: 0,
|
|
290
305
|
realProofs: true,
|
|
291
306
|
snapshotsUrls: [`${SNAPSHOTS_URL}/testnet/`],
|
|
292
307
|
autoUpdate: 'config-and-version',
|
|
293
308
|
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
|
|
294
309
|
maxTxPoolSize: 100_000_000, // 100MB
|
|
310
|
+
publicMetricsOptOut: false,
|
|
295
311
|
publicIncludeMetrics,
|
|
296
312
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
297
313
|
publicMetricsCollectFrom: ['sequencer'],
|
|
314
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
298
315
|
skipArchiverInitialSync: true,
|
|
299
316
|
blobAllowEmptySources: true,
|
|
300
317
|
|
|
@@ -307,7 +324,9 @@ export const testnetL2ChainConfig: L2ChainConfig = {
|
|
|
307
324
|
/** The target validator committee size. */
|
|
308
325
|
aztecTargetCommitteeSize: 24,
|
|
309
326
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
310
|
-
|
|
327
|
+
lagInEpochsForValidatorSet: 2,
|
|
328
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
329
|
+
lagInEpochsForRandao: 2,
|
|
311
330
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
312
331
|
aztecProofSubmissionEpochs: 1,
|
|
313
332
|
|
|
@@ -366,22 +385,26 @@ export const testnetL2ChainConfig: L2ChainConfig = {
|
|
|
366
385
|
};
|
|
367
386
|
|
|
368
387
|
export const mainnetL2ChainConfig: L2ChainConfig = {
|
|
388
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
389
|
+
disableTransactions: true,
|
|
390
|
+
|
|
369
391
|
l1ChainId: 1,
|
|
370
392
|
testAccounts: false,
|
|
371
393
|
sponsoredFPC: false,
|
|
372
394
|
p2pEnabled: true,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
seqMaxTxsPerBlock: 0,
|
|
395
|
+
bootstrapNodes: [],
|
|
396
|
+
minTxsPerBlock: 0,
|
|
397
|
+
maxTxsPerBlock: 0,
|
|
377
398
|
realProofs: true,
|
|
378
399
|
snapshotsUrls: [`${SNAPSHOTS_URL}/mainnet/`],
|
|
379
400
|
autoUpdate: 'notify',
|
|
380
401
|
autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
|
|
381
|
-
maxTxPoolSize:
|
|
402
|
+
maxTxPoolSize: 0,
|
|
403
|
+
publicMetricsOptOut: true,
|
|
382
404
|
publicIncludeMetrics,
|
|
383
405
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
384
406
|
publicMetricsCollectFrom: ['sequencer'],
|
|
407
|
+
blobAllowEmptySources: true,
|
|
385
408
|
|
|
386
409
|
/** How many seconds an L1 slot lasts. */
|
|
387
410
|
ethereumSlotDuration: 12,
|
|
@@ -392,7 +415,9 @@ export const mainnetL2ChainConfig: L2ChainConfig = {
|
|
|
392
415
|
/** The target validator committee size. */
|
|
393
416
|
aztecTargetCommitteeSize: 24,
|
|
394
417
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
395
|
-
|
|
418
|
+
lagInEpochsForValidatorSet: 2,
|
|
419
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
420
|
+
lagInEpochsForRandao: 2,
|
|
396
421
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
397
422
|
aztecProofSubmissionEpochs: 1,
|
|
398
423
|
|
|
@@ -402,7 +427,7 @@ export const mainnetL2ChainConfig: L2ChainConfig = {
|
|
|
402
427
|
slashingRoundSizeInEpochs: 4,
|
|
403
428
|
slashingExecutionDelayInRounds: 28,
|
|
404
429
|
slashingLifetimeInRounds: 34,
|
|
405
|
-
slashingVetoer: EthAddress.
|
|
430
|
+
slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
|
|
406
431
|
slashingOffsetInRounds: 2,
|
|
407
432
|
|
|
408
433
|
slashingDisableDuration: 259_200, // 3 days
|
|
@@ -455,17 +480,19 @@ export const devnetL2ChainConfig: L2ChainConfig = {
|
|
|
455
480
|
sponsoredFPC: true,
|
|
456
481
|
p2pEnabled: true,
|
|
457
482
|
disableTransactions: false,
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
483
|
+
bootstrapNodes: [],
|
|
484
|
+
minTxsPerBlock: 0,
|
|
485
|
+
maxTxsPerBlock: 8,
|
|
461
486
|
realProofs: false,
|
|
462
487
|
snapshotsUrls: [],
|
|
463
488
|
autoUpdate: 'config-and-version',
|
|
464
489
|
autoUpdateUrl: '',
|
|
490
|
+
publicMetricsOptOut: true,
|
|
465
491
|
publicIncludeMetrics,
|
|
466
492
|
publicMetricsCollectorUrl: '',
|
|
467
493
|
publicMetricsCollectFrom: [''],
|
|
468
494
|
maxTxPoolSize: 100_000_000, // 100MB
|
|
495
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
469
496
|
|
|
470
497
|
// Deployment stuff
|
|
471
498
|
/** How many seconds an L1 slot lasts. */
|
|
@@ -477,7 +504,9 @@ export const devnetL2ChainConfig: L2ChainConfig = {
|
|
|
477
504
|
/** The target validator committee size. */
|
|
478
505
|
aztecTargetCommitteeSize: 1,
|
|
479
506
|
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
480
|
-
|
|
507
|
+
lagInEpochsForValidatorSet: 1,
|
|
508
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
509
|
+
lagInEpochsForRandao: 1,
|
|
481
510
|
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
482
511
|
localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
483
512
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
@@ -524,7 +553,7 @@ function getDefaultDataDir(networkName: NetworkNames): string {
|
|
|
524
553
|
return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
|
|
525
554
|
}
|
|
526
555
|
|
|
527
|
-
export function
|
|
556
|
+
export function enrichEnvironmentWithChainName(networkName: NetworkNames) {
|
|
528
557
|
if (networkName === 'local') {
|
|
529
558
|
return;
|
|
530
559
|
}
|
|
@@ -536,19 +565,24 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
|
536
565
|
throw new Error(`Unknown network name: ${networkName}`);
|
|
537
566
|
}
|
|
538
567
|
|
|
539
|
-
|
|
568
|
+
enrichEnvironmentWithChainConfig(config);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export function enrichEnvironmentWithChainConfig(config: L2ChainConfig) {
|
|
572
|
+
enrichVar('BOOTSTRAP_NODES', config.bootstrapNodes.join(','));
|
|
540
573
|
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
541
574
|
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
542
575
|
enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
|
|
543
576
|
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
544
|
-
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.
|
|
545
|
-
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.
|
|
577
|
+
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.minTxsPerBlock.toString());
|
|
578
|
+
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.maxTxsPerBlock.toString());
|
|
546
579
|
enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
|
|
547
580
|
enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
|
|
548
581
|
enrichVar('SYNC_SNAPSHOTS_URLS', config.snapshotsUrls.join(','));
|
|
549
582
|
enrichVar('P2P_MAX_TX_POOL_SIZE', config.maxTxPoolSize.toString());
|
|
583
|
+
enrichVar('P2P_TX_POOL_DELETE_TXS_AFTER_REORG', config.txPoolDeleteTxsAfterReorg.toString());
|
|
550
584
|
|
|
551
|
-
enrichVar('DATA_STORE_MAP_SIZE_KB', config.
|
|
585
|
+
enrichVar('DATA_STORE_MAP_SIZE_KB', config.dataStoreMapSizeKb.toString());
|
|
552
586
|
enrichVar('ARCHIVER_STORE_MAP_SIZE_KB', config.archiverStoreMapSizeKb.toString());
|
|
553
587
|
enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
|
|
554
588
|
enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
|
|
@@ -582,11 +616,15 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
|
582
616
|
enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
|
|
583
617
|
}
|
|
584
618
|
|
|
619
|
+
enrichVar('PUBLIC_OTEL_OPT_OUT', config.publicMetricsOptOut.toString());
|
|
620
|
+
|
|
585
621
|
// Deployment stuff
|
|
586
622
|
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
587
623
|
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
588
624
|
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
589
625
|
enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
|
|
626
|
+
enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET', config.lagInEpochsForValidatorSet.toString());
|
|
627
|
+
enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_RANDAO', config.lagInEpochsForRandao.toString());
|
|
590
628
|
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
591
629
|
enrichVar('AZTEC_ACTIVATION_THRESHOLD', config.activationThreshold.toString());
|
|
592
630
|
enrichVar('AZTEC_EJECTION_THRESHOLD', config.ejectionThreshold.toString());
|
|
@@ -604,6 +642,7 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
|
604
642
|
enrichVar('AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS', config.slashingExecutionDelayInRounds.toString());
|
|
605
643
|
enrichVar('AZTEC_SLASHING_OFFSET_IN_ROUNDS', config.slashingOffsetInRounds.toString());
|
|
606
644
|
enrichVar('AZTEC_SLASHER_FLAVOR', config.slasherFlavor);
|
|
645
|
+
enrichVar('AZTEC_SLASHING_DISABLE_DURATION', config.slashingDisableDuration.toString());
|
|
607
646
|
enrichVar('AZTEC_EXIT_DELAY_SECONDS', config.exitDelaySeconds.toString());
|
|
608
647
|
enrichEthAddressVar('AZTEC_SLASHING_VETOER', config.slashingVetoer.toString());
|
|
609
648
|
|
|
@@ -621,6 +660,8 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
|
621
660
|
enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashBroadcastedInvalidBlockPenalty.toString());
|
|
622
661
|
enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
|
|
623
662
|
enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
|
|
663
|
+
enrichVar('SLASH_GRACE_PERIOD_L2_SLOTS', config.slashGracePeriodL2Slots.toString());
|
|
664
|
+
enrichVar('SLASH_EXECUTE_ROUNDS_LOOK_BACK', config.slashExecuteRoundsLookBack.toString());
|
|
624
665
|
|
|
625
666
|
enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
|
|
626
667
|
enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
|
|
@@ -8,11 +8,12 @@ import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
|
|
|
8
8
|
|
|
9
9
|
const DEFAULT_CONFIG_URL =
|
|
10
10
|
'https://raw.githubusercontent.com/AztecProtocol/networks/refs/heads/main/network_config.json';
|
|
11
|
+
const FALLBACK_CONFIG_URL = 'https://metadata.aztec.network/network_config.json';
|
|
11
12
|
const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Fetches remote network configuration from GitHub with caching support.
|
|
15
|
-
* Uses the reusable cachedFetch utility.
|
|
16
|
+
* Uses the reusable cachedFetch utility. Falls back to metadata.aztec.network if the default URL fails.
|
|
16
17
|
*
|
|
17
18
|
* @param networkName - The network name to fetch config for
|
|
18
19
|
* @param cacheDir - Optional cache directory for storing fetched config
|
|
@@ -22,13 +23,33 @@ export async function getNetworkConfig(
|
|
|
22
23
|
networkName: NetworkNames,
|
|
23
24
|
cacheDir?: string,
|
|
24
25
|
): Promise<NetworkConfig | undefined> {
|
|
25
|
-
|
|
26
|
+
// Try with the primary URL (env var or default)
|
|
26
27
|
const configLocation = process.env.NETWORK_CONFIG_LOCATION || DEFAULT_CONFIG_URL;
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
// First try the primary config location
|
|
30
|
+
let config = await fetchNetworkConfigFromUrl(configLocation, networkName, cacheDir);
|
|
31
|
+
|
|
32
|
+
// If primary fails and we were using the default URL, try the fallback
|
|
33
|
+
if (!config && configLocation === DEFAULT_CONFIG_URL) {
|
|
34
|
+
config = await fetchNetworkConfigFromUrl(FALLBACK_CONFIG_URL, networkName, cacheDir);
|
|
30
35
|
}
|
|
31
36
|
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Helper function to fetch network config from a specific URL.
|
|
42
|
+
* @param configLocation - The URL or file path to fetch from
|
|
43
|
+
* @param networkName - The network name to fetch config for
|
|
44
|
+
* @param cacheDir - Optional cache directory for storing fetched config
|
|
45
|
+
* @returns Remote configuration for the specified network, or undefined if not found/error
|
|
46
|
+
*/
|
|
47
|
+
async function fetchNetworkConfigFromUrl(
|
|
48
|
+
configLocation: string,
|
|
49
|
+
networkName: NetworkNames,
|
|
50
|
+
cacheDir?: string,
|
|
51
|
+
): Promise<NetworkConfig | undefined> {
|
|
52
|
+
let url: URL | undefined;
|
|
32
53
|
try {
|
|
33
54
|
if (configLocation.includes('://')) {
|
|
34
55
|
url = new URL(configLocation);
|
|
@@ -88,7 +109,7 @@ export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNam
|
|
|
88
109
|
const networkConfig = await getNetworkConfig(networkName, cacheDir);
|
|
89
110
|
|
|
90
111
|
if (!networkConfig) {
|
|
91
|
-
|
|
112
|
+
throw new Error(`Failed to fetch network config for network: ${networkName}`);
|
|
92
113
|
}
|
|
93
114
|
|
|
94
115
|
enrichVar('BOOTSTRAP_NODES', networkConfig.bootnodes.join(','));
|