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