@aztec/cli 4.0.0-nightly.20250907 → 4.0.0-nightly.20260108
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_min_fee.d.ts +3 -0
- package/dest/cmds/aztec_node/get_current_min_fee.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_current_min_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_min_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,54 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
2
|
+
import { mkdir, readFile, stat, writeFile } from 'fs/promises';
|
|
3
|
+
import { dirname } from 'path';
|
|
4
|
+
/**
|
|
5
|
+
* Fetches data from a URL with file-based caching support.
|
|
6
|
+
* This utility can be used by both remote config and bootnodes fetching.
|
|
7
|
+
*
|
|
8
|
+
* @param url - The URL to fetch from
|
|
9
|
+
* @param networkName - Network name for cache directory structure
|
|
10
|
+
* @param options - Caching and error handling options
|
|
11
|
+
* @param cacheDir - Optional cache directory (defaults to no caching)
|
|
12
|
+
* @returns The fetched and parsed JSON data, or undefined if fetch fails and throwOnError is false
|
|
13
|
+
*/ export async function cachedFetch(url, options, fetch = globalThis.fetch, log = createLogger('cached_fetch')) {
|
|
14
|
+
const { cacheDurationMs, cacheFile } = options;
|
|
15
|
+
// Try to read from cache first
|
|
16
|
+
try {
|
|
17
|
+
if (cacheFile) {
|
|
18
|
+
const info = await stat(cacheFile);
|
|
19
|
+
if (info.mtimeMs + cacheDurationMs > Date.now()) {
|
|
20
|
+
const cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
|
|
21
|
+
return cachedData;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
log.trace('Failed to read data from cache');
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetch(url);
|
|
29
|
+
if (!response.ok) {
|
|
30
|
+
log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const data = await response.json();
|
|
34
|
+
try {
|
|
35
|
+
if (cacheFile) {
|
|
36
|
+
await mkdir(dirname(cacheFile), {
|
|
37
|
+
recursive: true
|
|
38
|
+
});
|
|
39
|
+
await writeFile(cacheFile, JSON.stringify(data), 'utf-8');
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
log.warn('Failed to cache data on disk: ' + cacheFile, {
|
|
43
|
+
cacheFile,
|
|
44
|
+
err
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return data;
|
|
48
|
+
} catch (err) {
|
|
49
|
+
log.warn(`Failed to fetch from ${url}`, {
|
|
50
|
+
err
|
|
51
|
+
});
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { 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 type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
5
|
+
import type { P2PConfig } from '@aztec/p2p/config';
|
|
6
|
+
import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
7
|
+
export type L2ChainConfig = Omit<L1ContractsConfig, keyof L1TxUtilsConfig> & Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways' | 'slashOverridePayload' | 'slashSelfAllowed'> & Pick<P2PConfig, 'bootstrapNodes' | 'p2pEnabled' | 'txPoolDeleteTxsAfterReorg'> & Pick<SequencerConfig, 'buildCheckpointIfEmpty' | 'minTxsPerBlock' | 'maxTxsPerBlock' | 'blockDurationMs'> & {
|
|
8
|
+
l1ChainId: number;
|
|
9
|
+
testAccounts: boolean;
|
|
10
|
+
sponsoredFPC: boolean;
|
|
11
|
+
minTxsPerBlock: number;
|
|
12
|
+
maxTxsPerBlock: number;
|
|
13
|
+
realProofs: boolean;
|
|
14
|
+
snapshotsUrls: string[];
|
|
15
|
+
autoUpdate: SharedNodeConfig['autoUpdate'];
|
|
16
|
+
autoUpdateUrl?: string;
|
|
17
|
+
maxPendingTxCount: number;
|
|
18
|
+
publicMetricsOptOut: boolean;
|
|
19
|
+
publicIncludeMetrics?: string[];
|
|
20
|
+
publicMetricsCollectorUrl?: string;
|
|
21
|
+
publicMetricsCollectFrom?: string[];
|
|
22
|
+
skipArchiverInitialSync?: boolean;
|
|
23
|
+
blobAllowEmptySources?: boolean;
|
|
24
|
+
dataStoreMapSizeKb: number;
|
|
25
|
+
archiverStoreMapSizeKb: number;
|
|
26
|
+
noteHashTreeMapSizeKb: number;
|
|
27
|
+
nullifierTreeMapSizeKb: number;
|
|
28
|
+
publicDataTreeMapSizeKb: number;
|
|
29
|
+
sentinelEnabled: boolean;
|
|
30
|
+
disableTransactions: boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
|
|
33
|
+
export declare const stagingPublicL2ChainConfig: L2ChainConfig;
|
|
34
|
+
export declare const nextNetL2ChainConfig: L2ChainConfig;
|
|
35
|
+
export declare const testnetL2ChainConfig: L2ChainConfig;
|
|
36
|
+
export declare const mainnetL2ChainConfig: L2ChainConfig;
|
|
37
|
+
export declare const devnetL2ChainConfig: L2ChainConfig;
|
|
38
|
+
export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
|
|
39
|
+
export declare function enrichEnvironmentWithChainName(networkName: NetworkNames): void;
|
|
40
|
+
export declare function enrichEnvironmentWithChainConfig(config: L2ChainConfig): void;
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW5fbDJfY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlnL2NoYWluX2wyX2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQTRCLEtBQUssaUJBQWlCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUMxRixPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUMxRSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUU3RCxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQy9ELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxhQUFhLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQVl0RixNQUFNLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQyxHQUN4RSxJQUFJLENBQUMsYUFBYSxFQUFFLHNCQUFzQixHQUFHLHVCQUF1QixHQUFHLHNCQUFzQixHQUFHLGtCQUFrQixDQUFDLEdBQ25ILElBQUksQ0FBQyxTQUFTLEVBQUUsZ0JBQWdCLEdBQUcsWUFBWSxHQUFHLDJCQUEyQixDQUFDLEdBQzlFLElBQUksQ0FBQyxlQUFlLEVBQUUsd0JBQXdCLEdBQUcsZ0JBQWdCLEdBQUcsZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMsR0FBRztJQUMxRyxTQUFTLEVBQUUsTUFBTSxDQUFDO0lBQ2xCLFlBQVksRUFBRSxPQUFPLENBQUM7SUFDdEIsWUFBWSxFQUFFLE9BQU8sQ0FBQztJQUN0QixjQUFjLEVBQUUsTUFBTSxDQUFDO0lBQ3ZCLGNBQWMsRUFBRSxNQUFNLENBQUM7SUFDdkIsVUFBVSxFQUFFLE9BQU8sQ0FBQztJQUNwQixhQUFhLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFDeEIsVUFBVSxFQUFFLGdCQUFnQixDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQzNDLGFBQWEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUN2QixpQkFBaUIsRUFBRSxNQUFNLENBQUM7SUFDMUIsbUJBQW1CLEVBQUUsT0FBTyxDQUFDO0lBQzdCLG9CQUFvQixDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFDaEMseUJBQXlCLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDbkMsd0JBQXdCLENBQUMsRUFBRSxNQUFNLEVBQUUsQ0FBQztJQUNwQyx1QkFBdUIsQ0FBQyxFQUFFLE9BQU8sQ0FBQztJQUNsQyxxQkFBcUIsQ0FBQyxFQUFFLE9BQU8sQ0FBQztJQUloQyxrQkFBa0IsRUFBRSxNQUFNLENBQUM7SUFDM0Isc0JBQXNCLEVBQUUsTUFBTSxDQUFDO0lBQy9CLHFCQUFxQixFQUFFLE1BQU0sQ0FBQztJQUM5QixzQkFBc0IsRUFBRSxNQUFNLENBQUM7SUFDL0IsdUJBQXVCLEVBQUUsTUFBTSxDQUFDO0lBR2hDLGVBQWUsRUFBRSxPQUFPLENBQUM7SUFDekIsbUJBQW1CLEVBQUUsT0FBTyxDQUFDO0NBQzlCLENBQUM7QUErQ0osZUFBTyxNQUFNLDRCQUE0QixFQUFFLGFBc0YxQyxDQUFDO0FBRUYsZUFBTyxNQUFNLDBCQUEwQixFQUFFLGFBMER4QyxDQUFDO0FBRUYsZUFBTyxNQUFNLG9CQUFvQixFQUFFLGFBMERsQyxDQUFDO0FBRUYsZUFBTyxNQUFNLG9CQUFvQixFQUFFLGFBNEZsQyxDQUFDO0FBRUYsZUFBTyxNQUFNLG9CQUFvQixFQUFFLGFBMkZsQyxDQUFDO0FBRUYsZUFBTyxNQUFNLG1CQUFtQixFQUFFLGFBMERqQyxDQUFDO0FBRUYsd0JBQWdCLGdCQUFnQixDQUFDLFdBQVcsRUFBRSxZQUFZLEdBQUcsYUFBYSxHQUFHLFNBQVMsQ0FnQnJGO0FBTUQsd0JBQWdCLDhCQUE4QixDQUFDLFdBQVcsRUFBRSxZQUFZLFFBYXZFO0FBRUQsd0JBQWdCLGdDQUFnQyxDQUFDLE1BQU0sRUFBRSxhQUFhLFFBd0dyRSJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAYtF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,eAAe,CAAC,GACxE,IAAI,CAAC,aAAa,EAAE,sBAAsB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,kBAAkB,CAAC,GACnH,IAAI,CAAC,SAAS,EAAE,gBAAgB,GAAG,YAAY,GAAG,2BAA2B,CAAC,GAC9E,IAAI,CAAC,eAAe,EAAE,wBAAwB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC,GAAG;IAC1G,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAIhC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAGhC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+CJ,eAAO,MAAM,4BAA4B,EAAE,aAsF1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,aA0DxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aA0DlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aA4FlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aA2FlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aA0DjC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAgBrF;AAMD,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,YAAY,QAavE;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,aAAa,QAwGrE"}
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
|
|
5
|
+
type: 'json'
|
|
6
|
+
};
|
|
7
|
+
import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
|
|
8
|
+
const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
|
|
9
|
+
const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
|
|
10
|
+
const tbMapSizeKb = 1_024 * 1_024 * 1_024; // 1 TB
|
|
11
|
+
const DefaultSlashConfig = {
|
|
12
|
+
/** Tally-style slashing */ slasherFlavor: 'tally',
|
|
13
|
+
/** Allow one round for vetoing */ slashingExecutionDelayInRounds: 1,
|
|
14
|
+
/** How long for a slash payload to be executed */ slashingLifetimeInRounds: 5,
|
|
15
|
+
/** Allow 2 rounds to discover faults */ slashingOffsetInRounds: 2,
|
|
16
|
+
/** No slash vetoer */ slashingVetoer: EthAddress.ZERO,
|
|
17
|
+
/** Use default disable duration */ slashingDisableDuration: DefaultL1ContractsConfig.slashingDisableDuration,
|
|
18
|
+
/** Use default slash amounts */ slashAmountSmall: DefaultL1ContractsConfig.slashAmountSmall,
|
|
19
|
+
slashAmountMedium: DefaultL1ContractsConfig.slashAmountMedium,
|
|
20
|
+
slashAmountLarge: DefaultL1ContractsConfig.slashAmountLarge,
|
|
21
|
+
// Slashing stuff
|
|
22
|
+
slashMinPenaltyPercentage: 0.5,
|
|
23
|
+
slashMaxPenaltyPercentage: 2.0,
|
|
24
|
+
slashInactivityTargetPercentage: 0.7,
|
|
25
|
+
slashInactivityConsecutiveEpochThreshold: 1,
|
|
26
|
+
slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountSmall,
|
|
27
|
+
slashPrunePenalty: DefaultL1ContractsConfig.slashAmountSmall,
|
|
28
|
+
slashDataWithholdingPenalty: DefaultL1ContractsConfig.slashAmountSmall,
|
|
29
|
+
slashProposeInvalidAttestationsPenalty: DefaultL1ContractsConfig.slashAmountLarge,
|
|
30
|
+
slashAttestDescendantOfInvalidPenalty: DefaultL1ContractsConfig.slashAmountLarge,
|
|
31
|
+
slashUnknownPenalty: DefaultL1ContractsConfig.slashAmountSmall,
|
|
32
|
+
slashBroadcastedInvalidBlockPenalty: 0n,
|
|
33
|
+
slashMaxPayloadSize: 50,
|
|
34
|
+
slashGracePeriodL2Slots: 32 * 2,
|
|
35
|
+
slashOffenseExpirationRounds: 8,
|
|
36
|
+
sentinelEnabled: true,
|
|
37
|
+
slashExecuteRoundsLookBack: 4
|
|
38
|
+
};
|
|
39
|
+
const DefaultNetworkDBMapSizeConfig = {
|
|
40
|
+
dataStoreMapSizeKb: defaultDBMapSizeKb,
|
|
41
|
+
archiverStoreMapSizeKb: tbMapSizeKb,
|
|
42
|
+
noteHashTreeMapSizeKb: tbMapSizeKb,
|
|
43
|
+
nullifierTreeMapSizeKb: tbMapSizeKb,
|
|
44
|
+
publicDataTreeMapSizeKb: tbMapSizeKb
|
|
45
|
+
};
|
|
46
|
+
export const stagingIgnitionL2ChainConfig = {
|
|
47
|
+
l1ChainId: 11155111,
|
|
48
|
+
testAccounts: false,
|
|
49
|
+
sponsoredFPC: false,
|
|
50
|
+
disableTransactions: true,
|
|
51
|
+
p2pEnabled: true,
|
|
52
|
+
bootstrapNodes: [],
|
|
53
|
+
minTxsPerBlock: 0,
|
|
54
|
+
maxTxsPerBlock: 0,
|
|
55
|
+
buildCheckpointIfEmpty: true,
|
|
56
|
+
realProofs: true,
|
|
57
|
+
snapshotsUrls: [
|
|
58
|
+
`${SNAPSHOTS_URL}/staging-ignition/`
|
|
59
|
+
],
|
|
60
|
+
autoUpdate: 'config-and-version',
|
|
61
|
+
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-ignition.json',
|
|
62
|
+
maxPendingTxCount: 0,
|
|
63
|
+
publicMetricsOptOut: false,
|
|
64
|
+
publicIncludeMetrics,
|
|
65
|
+
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
66
|
+
publicMetricsCollectFrom: [
|
|
67
|
+
'sequencer'
|
|
68
|
+
],
|
|
69
|
+
txPoolDeleteTxsAfterReorg: false,
|
|
70
|
+
blobAllowEmptySources: true,
|
|
71
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
72
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
|
|
73
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
74
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 24,
|
|
75
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
|
|
76
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
|
|
77
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
|
|
78
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
79
|
+
/** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
|
|
80
|
+
slashingRoundSizeInEpochs: 4,
|
|
81
|
+
slashingLifetimeInRounds: 40,
|
|
82
|
+
slashingExecutionDelayInRounds: 28,
|
|
83
|
+
slashAmountSmall: 2_000n * 10n ** 18n,
|
|
84
|
+
slashAmountMedium: 10_000n * 10n ** 18n,
|
|
85
|
+
slashAmountLarge: 50_000n * 10n ** 18n,
|
|
86
|
+
slashingOffsetInRounds: 2,
|
|
87
|
+
slasherFlavor: 'tally',
|
|
88
|
+
slashingVetoer: EthAddress.ZERO,
|
|
89
|
+
/** The mana target for the rollup */ manaTarget: 0n,
|
|
90
|
+
exitDelaySeconds: 5 * 24 * 60 * 60,
|
|
91
|
+
/** The proving cost per mana */ provingCostPerMana: 0n,
|
|
92
|
+
localEjectionThreshold: 196_000n * 10n ** 18n,
|
|
93
|
+
ejectionThreshold: 100_000n * 10n ** 18n,
|
|
94
|
+
activationThreshold: 200_000n * 10n ** 18n,
|
|
95
|
+
governanceProposerRoundSize: 300,
|
|
96
|
+
governanceProposerQuorum: 151,
|
|
97
|
+
// Node slashing config
|
|
98
|
+
slashMinPenaltyPercentage: 0.5,
|
|
99
|
+
slashMaxPenaltyPercentage: 2.0,
|
|
100
|
+
slashInactivityTargetPercentage: 0.7,
|
|
101
|
+
slashInactivityConsecutiveEpochThreshold: 2,
|
|
102
|
+
slashInactivityPenalty: 2_000n * 10n ** 18n,
|
|
103
|
+
slashPrunePenalty: 0n,
|
|
104
|
+
slashDataWithholdingPenalty: 0n,
|
|
105
|
+
slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
|
|
106
|
+
slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
|
|
107
|
+
slashUnknownPenalty: 2_000n * 10n ** 18n,
|
|
108
|
+
slashBroadcastedInvalidBlockPenalty: 0n,
|
|
109
|
+
slashMaxPayloadSize: 50,
|
|
110
|
+
slashGracePeriodL2Slots: 32 * 4,
|
|
111
|
+
slashOffenseExpirationRounds: 8,
|
|
112
|
+
sentinelEnabled: true,
|
|
113
|
+
slashingDisableDuration: 5 * 24 * 60 * 60,
|
|
114
|
+
slashExecuteRoundsLookBack: 4,
|
|
115
|
+
...DefaultNetworkDBMapSizeConfig
|
|
116
|
+
};
|
|
117
|
+
export const stagingPublicL2ChainConfig = {
|
|
118
|
+
l1ChainId: 11155111,
|
|
119
|
+
testAccounts: false,
|
|
120
|
+
sponsoredFPC: true,
|
|
121
|
+
disableTransactions: false,
|
|
122
|
+
p2pEnabled: true,
|
|
123
|
+
bootstrapNodes: [],
|
|
124
|
+
minTxsPerBlock: 0,
|
|
125
|
+
maxTxsPerBlock: 20,
|
|
126
|
+
buildCheckpointIfEmpty: true,
|
|
127
|
+
realProofs: true,
|
|
128
|
+
snapshotsUrls: [
|
|
129
|
+
`${SNAPSHOTS_URL}/staging-public/`
|
|
130
|
+
],
|
|
131
|
+
autoUpdate: 'config-and-version',
|
|
132
|
+
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-public.json',
|
|
133
|
+
publicMetricsOptOut: false,
|
|
134
|
+
publicIncludeMetrics,
|
|
135
|
+
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
136
|
+
publicMetricsCollectFrom: [
|
|
137
|
+
'sequencer'
|
|
138
|
+
],
|
|
139
|
+
maxPendingTxCount: 1_000,
|
|
140
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
141
|
+
// Deployment stuff
|
|
142
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
143
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
|
|
144
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
145
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 48,
|
|
146
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
|
|
147
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
|
|
148
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
|
|
149
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
150
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
151
|
+
/** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
|
|
152
|
+
/** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
|
|
153
|
+
/** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
|
|
154
|
+
/** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
|
|
155
|
+
/** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
|
|
156
|
+
/** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
|
|
157
|
+
/** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
158
|
+
...DefaultSlashConfig,
|
|
159
|
+
...DefaultNetworkDBMapSizeConfig
|
|
160
|
+
};
|
|
161
|
+
export const nextNetL2ChainConfig = {
|
|
162
|
+
l1ChainId: 11155111,
|
|
163
|
+
testAccounts: true,
|
|
164
|
+
sponsoredFPC: true,
|
|
165
|
+
p2pEnabled: true,
|
|
166
|
+
disableTransactions: false,
|
|
167
|
+
bootstrapNodes: [],
|
|
168
|
+
minTxsPerBlock: 0,
|
|
169
|
+
maxTxsPerBlock: 8,
|
|
170
|
+
buildCheckpointIfEmpty: true,
|
|
171
|
+
realProofs: true,
|
|
172
|
+
snapshotsUrls: [],
|
|
173
|
+
autoUpdate: 'config-and-version',
|
|
174
|
+
autoUpdateUrl: '',
|
|
175
|
+
publicMetricsOptOut: true,
|
|
176
|
+
publicIncludeMetrics,
|
|
177
|
+
publicMetricsCollectorUrl: '',
|
|
178
|
+
publicMetricsCollectFrom: [
|
|
179
|
+
''
|
|
180
|
+
],
|
|
181
|
+
maxPendingTxCount: 1_000,
|
|
182
|
+
txPoolDeleteTxsAfterReorg: false,
|
|
183
|
+
// Deployment stuff
|
|
184
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
185
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
|
|
186
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
187
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 48,
|
|
188
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
|
|
189
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
|
|
190
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
|
|
191
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
192
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
193
|
+
/** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
|
|
194
|
+
/** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
|
|
195
|
+
/** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
|
|
196
|
+
/** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
|
|
197
|
+
/** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
|
|
198
|
+
/** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
|
|
199
|
+
/** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
200
|
+
...DefaultSlashConfig,
|
|
201
|
+
...DefaultNetworkDBMapSizeConfig
|
|
202
|
+
};
|
|
203
|
+
export const testnetL2ChainConfig = {
|
|
204
|
+
l1ChainId: 11155111,
|
|
205
|
+
testAccounts: false,
|
|
206
|
+
sponsoredFPC: true,
|
|
207
|
+
p2pEnabled: true,
|
|
208
|
+
disableTransactions: false,
|
|
209
|
+
bootstrapNodes: [],
|
|
210
|
+
minTxsPerBlock: 0,
|
|
211
|
+
maxTxsPerBlock: 20,
|
|
212
|
+
buildCheckpointIfEmpty: true,
|
|
213
|
+
realProofs: true,
|
|
214
|
+
snapshotsUrls: [
|
|
215
|
+
`${SNAPSHOTS_URL}/testnet/`
|
|
216
|
+
],
|
|
217
|
+
autoUpdate: 'config-and-version',
|
|
218
|
+
autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
|
|
219
|
+
maxPendingTxCount: 5_000,
|
|
220
|
+
publicMetricsOptOut: false,
|
|
221
|
+
publicIncludeMetrics,
|
|
222
|
+
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
223
|
+
publicMetricsCollectFrom: [
|
|
224
|
+
'sequencer'
|
|
225
|
+
],
|
|
226
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
227
|
+
skipArchiverInitialSync: true,
|
|
228
|
+
blobAllowEmptySources: true,
|
|
229
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
230
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
|
|
231
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
232
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 48,
|
|
233
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
|
|
234
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
|
|
235
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
|
|
236
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
237
|
+
// This is a diff from mainnet: we have 1-strike you're out, rather than 3 on mainnet.
|
|
238
|
+
localEjectionThreshold: 199_000n * 10n ** 18n,
|
|
239
|
+
/** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 33,
|
|
240
|
+
slashingRoundSizeInEpochs: 2,
|
|
241
|
+
slashingExecutionDelayInRounds: 2,
|
|
242
|
+
slashingLifetimeInRounds: 5,
|
|
243
|
+
slashingVetoer: EthAddress.fromString('0xdfe19Da6a717b7088621d8bBB66be59F2d78e924'),
|
|
244
|
+
slashingOffsetInRounds: 2,
|
|
245
|
+
slashingDisableDuration: 5 * 24 * 60 * 60,
|
|
246
|
+
slasherFlavor: 'tally',
|
|
247
|
+
slashAmountSmall: 10_000n * 10n ** 18n,
|
|
248
|
+
slashAmountMedium: 50_000n * 10n ** 18n,
|
|
249
|
+
slashAmountLarge: 200_000n * 10n ** 18n,
|
|
250
|
+
/** The mana target for the rollup */ manaTarget: 150_000_000n,
|
|
251
|
+
/** The proving cost per mana */ provingCostPerMana: 100n,
|
|
252
|
+
exitDelaySeconds: 4 * 24 * 60 * 60,
|
|
253
|
+
activationThreshold: 200_000n * 10n ** 18n,
|
|
254
|
+
ejectionThreshold: 100_000n * 10n ** 18n,
|
|
255
|
+
governanceProposerRoundSize: 100,
|
|
256
|
+
governanceProposerQuorum: 60,
|
|
257
|
+
// Node slashing config
|
|
258
|
+
slashInactivityTargetPercentage: 0.8,
|
|
259
|
+
slashInactivityConsecutiveEpochThreshold: 2,
|
|
260
|
+
slashInactivityPenalty: 10_000n * 10n ** 18n,
|
|
261
|
+
slashPrunePenalty: 0n,
|
|
262
|
+
slashDataWithholdingPenalty: 0n,
|
|
263
|
+
slashProposeInvalidAttestationsPenalty: 10_000n * 10n ** 18n,
|
|
264
|
+
slashAttestDescendantOfInvalidPenalty: 10_000n * 10n ** 18n,
|
|
265
|
+
slashUnknownPenalty: 10_000n * 10n ** 18n,
|
|
266
|
+
slashBroadcastedInvalidBlockPenalty: 10_000n * 10n ** 18n,
|
|
267
|
+
slashGracePeriodL2Slots: 1_200,
|
|
268
|
+
slashOffenseExpirationRounds: 8,
|
|
269
|
+
slashMinPenaltyPercentage: 0.5,
|
|
270
|
+
slashMaxPenaltyPercentage: 2.0,
|
|
271
|
+
slashMaxPayloadSize: 50,
|
|
272
|
+
slashExecuteRoundsLookBack: 4,
|
|
273
|
+
sentinelEnabled: true,
|
|
274
|
+
...DefaultNetworkDBMapSizeConfig
|
|
275
|
+
};
|
|
276
|
+
export const mainnetL2ChainConfig = {
|
|
277
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
278
|
+
disableTransactions: true,
|
|
279
|
+
l1ChainId: 1,
|
|
280
|
+
testAccounts: false,
|
|
281
|
+
sponsoredFPC: false,
|
|
282
|
+
p2pEnabled: true,
|
|
283
|
+
bootstrapNodes: [],
|
|
284
|
+
minTxsPerBlock: 0,
|
|
285
|
+
maxTxsPerBlock: 0,
|
|
286
|
+
buildCheckpointIfEmpty: true,
|
|
287
|
+
realProofs: true,
|
|
288
|
+
snapshotsUrls: [
|
|
289
|
+
`${SNAPSHOTS_URL}/mainnet/`
|
|
290
|
+
],
|
|
291
|
+
autoUpdate: 'notify',
|
|
292
|
+
autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
|
|
293
|
+
maxPendingTxCount: 0,
|
|
294
|
+
publicMetricsOptOut: true,
|
|
295
|
+
publicIncludeMetrics,
|
|
296
|
+
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
|
|
297
|
+
publicMetricsCollectFrom: [
|
|
298
|
+
'sequencer'
|
|
299
|
+
],
|
|
300
|
+
blobAllowEmptySources: true,
|
|
301
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
302
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
|
|
303
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
304
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 24,
|
|
305
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
|
|
306
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
|
|
307
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
|
|
308
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
309
|
+
localEjectionThreshold: 196_000n * 10n ** 18n,
|
|
310
|
+
/** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
|
|
311
|
+
slashingRoundSizeInEpochs: 4,
|
|
312
|
+
slashingExecutionDelayInRounds: 28,
|
|
313
|
+
slashingLifetimeInRounds: 34,
|
|
314
|
+
slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
|
|
315
|
+
slashingOffsetInRounds: 2,
|
|
316
|
+
slashingDisableDuration: 259_200,
|
|
317
|
+
slasherFlavor: 'tally',
|
|
318
|
+
slashAmountSmall: 2_000n * 10n ** 18n,
|
|
319
|
+
slashAmountMedium: 2_000n * 10n ** 18n,
|
|
320
|
+
slashAmountLarge: 2_000n * 10n ** 18n,
|
|
321
|
+
/** The mana target for the rollup */ manaTarget: 0n,
|
|
322
|
+
/** The proving cost per mana */ provingCostPerMana: 0n,
|
|
323
|
+
exitDelaySeconds: 4 * 24 * 60 * 60,
|
|
324
|
+
activationThreshold: 200_000n * 10n ** 18n,
|
|
325
|
+
ejectionThreshold: 100_000n * 10n ** 18n,
|
|
326
|
+
governanceProposerRoundSize: 1000,
|
|
327
|
+
governanceProposerQuorum: 600,
|
|
328
|
+
// Node slashing config
|
|
329
|
+
slashInactivityTargetPercentage: 0.8,
|
|
330
|
+
slashInactivityConsecutiveEpochThreshold: 2,
|
|
331
|
+
slashInactivityPenalty: 2_000n * 10n ** 18n,
|
|
332
|
+
slashPrunePenalty: 0n,
|
|
333
|
+
slashDataWithholdingPenalty: 0n,
|
|
334
|
+
slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
|
|
335
|
+
slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
|
|
336
|
+
slashUnknownPenalty: 2_000n * 10n ** 18n,
|
|
337
|
+
slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n,
|
|
338
|
+
slashGracePeriodL2Slots: 1_200,
|
|
339
|
+
slashOffenseExpirationRounds: 8,
|
|
340
|
+
slashMinPenaltyPercentage: 0.5,
|
|
341
|
+
slashMaxPenaltyPercentage: 2.0,
|
|
342
|
+
slashMaxPayloadSize: 50,
|
|
343
|
+
slashExecuteRoundsLookBack: 4,
|
|
344
|
+
sentinelEnabled: true,
|
|
345
|
+
...DefaultNetworkDBMapSizeConfig
|
|
346
|
+
};
|
|
347
|
+
export const devnetL2ChainConfig = {
|
|
348
|
+
l1ChainId: 11155111,
|
|
349
|
+
testAccounts: true,
|
|
350
|
+
sponsoredFPC: true,
|
|
351
|
+
p2pEnabled: true,
|
|
352
|
+
disableTransactions: false,
|
|
353
|
+
bootstrapNodes: [],
|
|
354
|
+
minTxsPerBlock: 0,
|
|
355
|
+
maxTxsPerBlock: 8,
|
|
356
|
+
buildCheckpointIfEmpty: true,
|
|
357
|
+
realProofs: false,
|
|
358
|
+
snapshotsUrls: [],
|
|
359
|
+
autoUpdate: 'config-and-version',
|
|
360
|
+
autoUpdateUrl: '',
|
|
361
|
+
publicMetricsOptOut: true,
|
|
362
|
+
publicIncludeMetrics,
|
|
363
|
+
publicMetricsCollectorUrl: '',
|
|
364
|
+
publicMetricsCollectFrom: [
|
|
365
|
+
''
|
|
366
|
+
],
|
|
367
|
+
maxPendingTxCount: 1_000,
|
|
368
|
+
txPoolDeleteTxsAfterReorg: true,
|
|
369
|
+
// Deployment stuff
|
|
370
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
371
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
|
|
372
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 8,
|
|
373
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 1,
|
|
374
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 1,
|
|
375
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 1,
|
|
376
|
+
/** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
|
|
377
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
|
|
378
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
379
|
+
/** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
|
|
380
|
+
/** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
|
|
381
|
+
/** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
|
|
382
|
+
/** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
|
|
383
|
+
/** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
|
|
384
|
+
/** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
|
|
385
|
+
/** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
386
|
+
...DefaultSlashConfig,
|
|
387
|
+
...DefaultNetworkDBMapSizeConfig
|
|
388
|
+
};
|
|
389
|
+
export function getL2ChainConfig(networkName) {
|
|
390
|
+
let config;
|
|
391
|
+
if (networkName === 'staging-public') {
|
|
392
|
+
config = {
|
|
393
|
+
...stagingPublicL2ChainConfig
|
|
394
|
+
};
|
|
395
|
+
} else if (networkName === 'testnet') {
|
|
396
|
+
config = {
|
|
397
|
+
...testnetL2ChainConfig
|
|
398
|
+
};
|
|
399
|
+
} else if (networkName === 'staging-ignition') {
|
|
400
|
+
config = {
|
|
401
|
+
...stagingIgnitionL2ChainConfig
|
|
402
|
+
};
|
|
403
|
+
} else if (networkName === 'mainnet') {
|
|
404
|
+
config = {
|
|
405
|
+
...mainnetL2ChainConfig
|
|
406
|
+
};
|
|
407
|
+
} else if (networkName === 'next-net') {
|
|
408
|
+
config = {
|
|
409
|
+
...nextNetL2ChainConfig
|
|
410
|
+
};
|
|
411
|
+
} else if (networkName === 'devnet') {
|
|
412
|
+
config = {
|
|
413
|
+
...devnetL2ChainConfig
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
return config;
|
|
417
|
+
}
|
|
418
|
+
function getDefaultDataDir(networkName) {
|
|
419
|
+
return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
|
|
420
|
+
}
|
|
421
|
+
export function enrichEnvironmentWithChainName(networkName) {
|
|
422
|
+
if (networkName === 'local') {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
|
|
426
|
+
const config = getL2ChainConfig(networkName);
|
|
427
|
+
if (!config) {
|
|
428
|
+
throw new Error(`Unknown network name: ${networkName}`);
|
|
429
|
+
}
|
|
430
|
+
enrichEnvironmentWithChainConfig(config);
|
|
431
|
+
}
|
|
432
|
+
export function enrichEnvironmentWithChainConfig(config) {
|
|
433
|
+
enrichVar('BOOTSTRAP_NODES', config.bootstrapNodes.join(','));
|
|
434
|
+
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
435
|
+
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
436
|
+
enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
|
|
437
|
+
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
438
|
+
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.minTxsPerBlock.toString());
|
|
439
|
+
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.maxTxsPerBlock.toString());
|
|
440
|
+
if (config.blockDurationMs !== undefined) {
|
|
441
|
+
enrichVar('SEQ_BLOCK_DURATION_MS', config.blockDurationMs.toString());
|
|
442
|
+
}
|
|
443
|
+
if (config.buildCheckpointIfEmpty !== undefined) {
|
|
444
|
+
enrichVar('SEQ_BUILD_CHECKPOINT_IF_EMPTY', config.buildCheckpointIfEmpty.toString());
|
|
445
|
+
}
|
|
446
|
+
enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
|
|
447
|
+
enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
|
|
448
|
+
enrichVar('SYNC_SNAPSHOTS_URLS', config.snapshotsUrls.join(','));
|
|
449
|
+
enrichVar('P2P_MAX_PENDING_TX_COUNT', config.maxPendingTxCount.toString());
|
|
450
|
+
enrichVar('P2P_TX_POOL_DELETE_TXS_AFTER_REORG', config.txPoolDeleteTxsAfterReorg.toString());
|
|
451
|
+
enrichVar('DATA_STORE_MAP_SIZE_KB', config.dataStoreMapSizeKb.toString());
|
|
452
|
+
enrichVar('ARCHIVER_STORE_MAP_SIZE_KB', config.archiverStoreMapSizeKb.toString());
|
|
453
|
+
enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
|
|
454
|
+
enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
|
|
455
|
+
enrichVar('PUBLIC_DATA_TREE_MAP_SIZE_KB', config.publicDataTreeMapSizeKb.toString());
|
|
456
|
+
if (config.skipArchiverInitialSync !== undefined) {
|
|
457
|
+
enrichVar('SKIP_ARCHIVER_INITIAL_SYNC', config.skipArchiverInitialSync.toString());
|
|
458
|
+
}
|
|
459
|
+
if (config.blobAllowEmptySources !== undefined) {
|
|
460
|
+
enrichVar('BLOB_ALLOW_EMPTY_SOURCES', config.blobAllowEmptySources.toString());
|
|
461
|
+
}
|
|
462
|
+
if (config.autoUpdate) {
|
|
463
|
+
enrichVar('AUTO_UPDATE', config.autoUpdate?.toString());
|
|
464
|
+
}
|
|
465
|
+
if (config.autoUpdateUrl) {
|
|
466
|
+
enrichVar('AUTO_UPDATE_URL', config.autoUpdateUrl);
|
|
467
|
+
}
|
|
468
|
+
if (config.publicIncludeMetrics) {
|
|
469
|
+
enrichVar('PUBLIC_OTEL_INCLUDE_METRICS', config.publicIncludeMetrics.join(','));
|
|
470
|
+
}
|
|
471
|
+
if (config.publicMetricsCollectorUrl) {
|
|
472
|
+
enrichVar('PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT', config.publicMetricsCollectorUrl);
|
|
473
|
+
}
|
|
474
|
+
if (config.publicMetricsCollectFrom) {
|
|
475
|
+
enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
|
|
476
|
+
}
|
|
477
|
+
enrichVar('PUBLIC_OTEL_OPT_OUT', config.publicMetricsOptOut.toString());
|
|
478
|
+
// Deployment stuff
|
|
479
|
+
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
480
|
+
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
481
|
+
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
482
|
+
enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
|
|
483
|
+
enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET', config.lagInEpochsForValidatorSet.toString());
|
|
484
|
+
enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_RANDAO', config.lagInEpochsForRandao.toString());
|
|
485
|
+
enrichVar('AZTEC_INBOX_LAG', config.inboxLag.toString());
|
|
486
|
+
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
487
|
+
enrichVar('AZTEC_ACTIVATION_THRESHOLD', config.activationThreshold.toString());
|
|
488
|
+
enrichVar('AZTEC_EJECTION_THRESHOLD', config.ejectionThreshold.toString());
|
|
489
|
+
enrichVar('AZTEC_LOCAL_EJECTION_THRESHOLD', config.localEjectionThreshold.toString());
|
|
490
|
+
enrichVar('AZTEC_SLASHING_QUORUM', config.slashingQuorum?.toString());
|
|
491
|
+
enrichVar('AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS', config.slashingRoundSizeInEpochs.toString());
|
|
492
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_QUORUM', config.governanceProposerQuorum?.toString());
|
|
493
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE', config.governanceProposerRoundSize.toString());
|
|
494
|
+
enrichVar('AZTEC_MANA_TARGET', config.manaTarget.toString());
|
|
495
|
+
enrichVar('AZTEC_PROVING_COST_PER_MANA', config.provingCostPerMana.toString());
|
|
496
|
+
enrichVar('AZTEC_SLASH_AMOUNT_SMALL', config.slashAmountSmall.toString());
|
|
497
|
+
enrichVar('AZTEC_SLASH_AMOUNT_MEDIUM', config.slashAmountMedium.toString());
|
|
498
|
+
enrichVar('AZTEC_SLASH_AMOUNT_LARGE', config.slashAmountLarge.toString());
|
|
499
|
+
enrichVar('AZTEC_SLASHING_LIFETIME_IN_ROUNDS', config.slashingLifetimeInRounds.toString());
|
|
500
|
+
enrichVar('AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS', config.slashingExecutionDelayInRounds.toString());
|
|
501
|
+
enrichVar('AZTEC_SLASHING_OFFSET_IN_ROUNDS', config.slashingOffsetInRounds.toString());
|
|
502
|
+
enrichVar('AZTEC_SLASHER_FLAVOR', config.slasherFlavor);
|
|
503
|
+
enrichVar('AZTEC_SLASHING_DISABLE_DURATION', config.slashingDisableDuration.toString());
|
|
504
|
+
enrichVar('AZTEC_EXIT_DELAY_SECONDS', config.exitDelaySeconds.toString());
|
|
505
|
+
enrichEthAddressVar('AZTEC_SLASHING_VETOER', config.slashingVetoer.toString());
|
|
506
|
+
// Slashing
|
|
507
|
+
enrichVar('SLASH_MIN_PENALTY_PERCENTAGE', config.slashMinPenaltyPercentage.toString());
|
|
508
|
+
enrichVar('SLASH_MAX_PENALTY_PERCENTAGE', config.slashMaxPenaltyPercentage.toString());
|
|
509
|
+
enrichVar('SLASH_PRUNE_PENALTY', config.slashPrunePenalty.toString());
|
|
510
|
+
enrichVar('SLASH_DATA_WITHHOLDING_PENALTY', config.slashDataWithholdingPenalty.toString());
|
|
511
|
+
enrichVar('SLASH_INACTIVITY_TARGET_PERCENTAGE', config.slashInactivityTargetPercentage.toString());
|
|
512
|
+
enrichVar('SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD', config.slashInactivityConsecutiveEpochThreshold.toString());
|
|
513
|
+
enrichVar('SLASH_INACTIVITY_PENALTY', config.slashInactivityPenalty.toString());
|
|
514
|
+
enrichVar('SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY', config.slashProposeInvalidAttestationsPenalty.toString());
|
|
515
|
+
enrichVar('SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY', config.slashAttestDescendantOfInvalidPenalty.toString());
|
|
516
|
+
enrichVar('SLASH_UNKNOWN_PENALTY', config.slashUnknownPenalty.toString());
|
|
517
|
+
enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashBroadcastedInvalidBlockPenalty.toString());
|
|
518
|
+
enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
|
|
519
|
+
enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
|
|
520
|
+
enrichVar('SLASH_GRACE_PERIOD_L2_SLOTS', config.slashGracePeriodL2Slots.toString());
|
|
521
|
+
enrichVar('SLASH_EXECUTE_ROUNDS_LOOK_BACK', config.slashExecuteRoundsLookBack.toString());
|
|
522
|
+
enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
|
|
523
|
+
enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
|
|
524
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EnvVar } from '@aztec/foundation/config';
|
|
2
|
+
export declare function enrichVar(envVar: EnvVar, value: string | undefined): void;
|
|
3
|
+
export declare function enrichEthAddressVar(envVar: EnvVar, value: string): void;
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5yaWNoX2Vudi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy9lbnJpY2hfZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXZELHdCQUFnQixTQUFTLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxHQUFHLFNBQVMsUUFNbEU7QUFFRCx3QkFBZ0IsbUJBQW1CLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxRQUdoRSJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrich_env.d.ts","sourceRoot":"","sources":["../../src/config/enrich_env.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,QAMlE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAGhE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
export function enrichVar(envVar, value) {
|
|
3
|
+
// Don't override
|
|
4
|
+
if (process.env[envVar] || value === undefined) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
process.env[envVar] = value;
|
|
8
|
+
}
|
|
9
|
+
export function enrichEthAddressVar(envVar, value) {
|
|
10
|
+
// EthAddress doesn't like being given empty strings
|
|
11
|
+
enrichVar(envVar, value || EthAddress.ZERO.toString());
|
|
12
|
+
}
|