@aztec/aztec 1.0.0-staging.2 → 1.0.0-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bin/index.js +2 -4
- package/dest/cli/chain_l2_config.d.ts +43 -6
- package/dest/cli/chain_l2_config.d.ts.map +1 -1
- package/dest/cli/chain_l2_config.js +101 -21
- package/package.json +30 -30
- package/src/bin/index.ts +3 -6
- package/src/cli/chain_l2_config.ts +172 -26
package/dest/bin/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infra
|
|
|
8
8
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
9
9
|
import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
10
10
|
import { injectCommands as injectPXECommands } from '@aztec/cli/pxe';
|
|
11
|
+
import { getActiveNetworkName } from '@aztec/foundation/config';
|
|
11
12
|
import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
12
13
|
import { Command } from 'commander';
|
|
13
14
|
import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
|
|
@@ -29,10 +30,7 @@ const debugLogger = createLogger('cli');
|
|
|
29
30
|
if (networkIndex !== -1) {
|
|
30
31
|
networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
if (networkValue !== undefined) {
|
|
34
|
-
await enrichEnvironmentWithChainConfig(networkValue);
|
|
35
|
-
}
|
|
33
|
+
await enrichEnvironmentWithChainConfig(getActiveNetworkName(networkValue));
|
|
36
34
|
const cliVersion = getCliVersion();
|
|
37
35
|
let program = new Command('aztec');
|
|
38
36
|
program.description('Aztec command line interface').version(cliVersion);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
+
import type { NetworkNames } from '@aztec/foundation/config';
|
|
1
2
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
2
|
-
export type NetworkNames = 'testnet-ignition' | 'alpha-testnet';
|
|
3
3
|
export type L2ChainConfig = {
|
|
4
4
|
l1ChainId: number;
|
|
5
|
-
ethereumSlotDuration: number;
|
|
6
|
-
aztecSlotDuration: number;
|
|
7
|
-
aztecEpochDuration: number;
|
|
8
|
-
aztecProofSubmissionEpochs: number;
|
|
9
5
|
testAccounts: boolean;
|
|
10
6
|
sponsoredFPC: boolean;
|
|
11
7
|
p2pEnabled: boolean;
|
|
@@ -23,10 +19,51 @@ export type L2ChainConfig = {
|
|
|
23
19
|
publicIncludeMetrics?: string[];
|
|
24
20
|
publicMetricsCollectorUrl?: string;
|
|
25
21
|
publicMetricsCollectFrom?: string[];
|
|
22
|
+
/** How many seconds an L1 slot lasts. */
|
|
23
|
+
ethereumSlotDuration: number;
|
|
24
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
|
|
25
|
+
aztecSlotDuration: number;
|
|
26
|
+
/** How many L2 slots an epoch lasts. */
|
|
27
|
+
aztecEpochDuration: number;
|
|
28
|
+
/** The target validator committee size. */
|
|
29
|
+
aztecTargetCommitteeSize: number;
|
|
30
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
31
|
+
aztecProofSubmissionEpochs: number;
|
|
32
|
+
/** The deposit amount for a validator */
|
|
33
|
+
depositAmount: bigint;
|
|
34
|
+
/** The minimum stake for a validator. */
|
|
35
|
+
minimumStake: bigint;
|
|
36
|
+
/** The slashing quorum */
|
|
37
|
+
slashingQuorum: number;
|
|
38
|
+
/** The slashing round size */
|
|
39
|
+
slashingRoundSize: number;
|
|
40
|
+
/** Governance proposing quorum */
|
|
41
|
+
governanceProposerQuorum: number;
|
|
42
|
+
/** Governance proposing round size */
|
|
43
|
+
governanceProposerRoundSize: number;
|
|
44
|
+
/** The mana target for the rollup */
|
|
45
|
+
manaTarget: bigint;
|
|
46
|
+
/** The proving cost per mana */
|
|
47
|
+
provingCostPerMana: bigint;
|
|
48
|
+
slashPayloadTtlSeconds: number;
|
|
49
|
+
slashPruneEnabled: boolean;
|
|
50
|
+
slashPrunePenalty: bigint;
|
|
51
|
+
slashPruneMaxPenalty: bigint;
|
|
52
|
+
slashInactivityEnabled: boolean;
|
|
53
|
+
slashInactivityCreateTargetPercentage: number;
|
|
54
|
+
slashInactivitySignalTargetPercentage: number;
|
|
55
|
+
slashInactivityCreatePenalty: bigint;
|
|
56
|
+
slashInactivityMaxPenalty: bigint;
|
|
57
|
+
slashInvalidBlockEnabled: boolean;
|
|
58
|
+
slashInvalidBlockPenalty: bigint;
|
|
59
|
+
slashInvalidBlockMaxPenalty: bigint;
|
|
26
60
|
};
|
|
27
61
|
export declare const testnetIgnitionL2ChainConfig: L2ChainConfig;
|
|
28
62
|
export declare const alphaTestnetL2ChainConfig: L2ChainConfig;
|
|
29
63
|
export declare function getBootnodes(networkName: NetworkNames): Promise<any>;
|
|
30
|
-
export declare function getL2ChainConfig(networkName: NetworkNames): Promise<
|
|
64
|
+
export declare function getL2ChainConfig(networkName: NetworkNames): Promise<{
|
|
65
|
+
config: L2ChainConfig;
|
|
66
|
+
networkName: string;
|
|
67
|
+
} | undefined>;
|
|
31
68
|
export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
|
|
32
69
|
//# sourceMappingURL=chain_l2_config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAIpC,yCAAyC;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wCAAwC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,+EAA+E;IAC/E,0BAA0B,EAAE,MAAM,CAAC;IACnC,yCAAyC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,8BAA8B;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,wBAAwB,EAAE,MAAM,CAAC;IACjC,sCAAsC;IACtC,2BAA2B,EAAE,MAAM,CAAC;IACpC,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAG3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,OAAO,CAAC;IAChC,qCAAqC,EAAE,MAAM,CAAC;IAC9C,qCAAqC,EAAE,MAAM,CAAC;IAC9C,4BAA4B,EAAE,MAAM,CAAC;IACrC,yBAAyB,EAAE,MAAM,CAAC;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aA0D1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aA6DvC,CAAC;AAEF,wBAAsB,YAAY,CAAC,WAAW,EAAE,YAAY,gBAW3D;AAED,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,YAAY,GACxB,OAAO,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAWrE;AAmBD,wBAAsB,gCAAgC,CAAC,WAAW,EAAE,YAAY,iBA2E/E"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/aztec.js';
|
|
2
|
+
import { DefaultL1ContractsConfig } from '@aztec/ethereum';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
|
|
4
5
|
type: 'json'
|
|
5
6
|
};
|
|
6
7
|
export const testnetIgnitionL2ChainConfig = {
|
|
7
8
|
l1ChainId: 11155111,
|
|
8
|
-
ethereumSlotDuration: 12,
|
|
9
|
-
aztecSlotDuration: 36,
|
|
10
|
-
aztecEpochDuration: 32,
|
|
11
|
-
aztecProofSubmissionEpochs: 1,
|
|
12
9
|
testAccounts: true,
|
|
13
10
|
sponsoredFPC: false,
|
|
14
11
|
p2pEnabled: true,
|
|
@@ -22,14 +19,37 @@ export const testnetIgnitionL2ChainConfig = {
|
|
|
22
19
|
snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
|
|
23
20
|
autoUpdate: 'disabled',
|
|
24
21
|
autoUpdateUrl: undefined,
|
|
25
|
-
maxTxPoolSize: 100_000_000
|
|
22
|
+
maxTxPoolSize: 100_000_000,
|
|
23
|
+
// Deployment stuff
|
|
24
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
25
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
|
|
26
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
27
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 48,
|
|
28
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
29
|
+
/** The deposit amount for a validator */ depositAmount: DefaultL1ContractsConfig.depositAmount,
|
|
30
|
+
/** The minimum stake for a validator. */ minimumStake: DefaultL1ContractsConfig.minimumStake,
|
|
31
|
+
/** The slashing quorum */ slashingQuorum: DefaultL1ContractsConfig.slashingQuorum,
|
|
32
|
+
/** The slashing round size */ slashingRoundSize: DefaultL1ContractsConfig.slashingRoundSize,
|
|
33
|
+
/** Governance proposing quorum */ governanceProposerQuorum: DefaultL1ContractsConfig.governanceProposerQuorum,
|
|
34
|
+
/** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
|
|
35
|
+
/** The mana target for the rollup */ manaTarget: 0n,
|
|
36
|
+
/** The proving cost per mana */ provingCostPerMana: 0n,
|
|
37
|
+
// slashing stuff
|
|
38
|
+
slashInactivityEnabled: false,
|
|
39
|
+
slashInactivityCreateTargetPercentage: 0,
|
|
40
|
+
slashInactivitySignalTargetPercentage: 0,
|
|
41
|
+
slashInactivityCreatePenalty: 0n,
|
|
42
|
+
slashInactivityMaxPenalty: 0n,
|
|
43
|
+
slashInvalidBlockEnabled: false,
|
|
44
|
+
slashPayloadTtlSeconds: 0,
|
|
45
|
+
slashPruneEnabled: false,
|
|
46
|
+
slashPrunePenalty: 0n,
|
|
47
|
+
slashPruneMaxPenalty: 0n,
|
|
48
|
+
slashInvalidBlockPenalty: 0n,
|
|
49
|
+
slashInvalidBlockMaxPenalty: 0n
|
|
26
50
|
};
|
|
27
51
|
export const alphaTestnetL2ChainConfig = {
|
|
28
52
|
l1ChainId: 11155111,
|
|
29
|
-
ethereumSlotDuration: 12,
|
|
30
|
-
aztecSlotDuration: 36,
|
|
31
|
-
aztecEpochDuration: 32,
|
|
32
|
-
aztecProofSubmissionEpochs: 1,
|
|
33
53
|
testAccounts: false,
|
|
34
54
|
sponsoredFPC: true,
|
|
35
55
|
p2pEnabled: true,
|
|
@@ -48,7 +68,34 @@ export const alphaTestnetL2ChainConfig = {
|
|
|
48
68
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec.network',
|
|
49
69
|
publicMetricsCollectFrom: [
|
|
50
70
|
'sequencer'
|
|
51
|
-
]
|
|
71
|
+
],
|
|
72
|
+
// Deployment stuff
|
|
73
|
+
/** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
|
|
74
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
|
|
75
|
+
/** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
|
|
76
|
+
/** The target validator committee size. */ aztecTargetCommitteeSize: 48,
|
|
77
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
|
|
78
|
+
/** The deposit amount for a validator */ depositAmount: DefaultL1ContractsConfig.depositAmount,
|
|
79
|
+
/** The minimum stake for a validator. */ minimumStake: DefaultL1ContractsConfig.minimumStake,
|
|
80
|
+
/** The slashing quorum */ slashingQuorum: 101,
|
|
81
|
+
/** The slashing round size */ slashingRoundSize: 200,
|
|
82
|
+
/** Governance proposing quorum */ governanceProposerQuorum: 151,
|
|
83
|
+
/** Governance proposing round size */ governanceProposerRoundSize: 300,
|
|
84
|
+
/** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
|
|
85
|
+
/** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
|
|
86
|
+
// slashing stuff
|
|
87
|
+
slashPayloadTtlSeconds: 36 * 32 * 24,
|
|
88
|
+
slashPruneEnabled: true,
|
|
89
|
+
slashPrunePenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
90
|
+
slashPruneMaxPenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
91
|
+
slashInactivityEnabled: true,
|
|
92
|
+
slashInactivityCreateTargetPercentage: 1,
|
|
93
|
+
slashInactivitySignalTargetPercentage: 1,
|
|
94
|
+
slashInactivityCreatePenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
95
|
+
slashInactivityMaxPenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
96
|
+
slashInvalidBlockEnabled: true,
|
|
97
|
+
slashInvalidBlockPenalty: DefaultL1ContractsConfig.depositAmount,
|
|
98
|
+
slashInvalidBlockMaxPenalty: DefaultL1ContractsConfig.depositAmount
|
|
52
99
|
};
|
|
53
100
|
export async function getBootnodes(networkName) {
|
|
54
101
|
const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
|
|
@@ -65,13 +112,19 @@ export async function getL2ChainConfig(networkName) {
|
|
|
65
112
|
...testnetIgnitionL2ChainConfig
|
|
66
113
|
};
|
|
67
114
|
config.p2pBootstrapNodes = await getBootnodes(networkName);
|
|
68
|
-
return
|
|
69
|
-
|
|
115
|
+
return {
|
|
116
|
+
config,
|
|
117
|
+
networkName
|
|
118
|
+
};
|
|
119
|
+
} else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
|
|
70
120
|
const config = {
|
|
71
121
|
...alphaTestnetL2ChainConfig
|
|
72
122
|
};
|
|
73
|
-
config.p2pBootstrapNodes = await getBootnodes(
|
|
74
|
-
return
|
|
123
|
+
config.p2pBootstrapNodes = await getBootnodes('alpha-testnet');
|
|
124
|
+
return {
|
|
125
|
+
config,
|
|
126
|
+
networkName: 'alpha-testnet'
|
|
127
|
+
};
|
|
75
128
|
}
|
|
76
129
|
return undefined;
|
|
77
130
|
}
|
|
@@ -91,14 +144,14 @@ function enrichEthAddressVar(envVar, value) {
|
|
|
91
144
|
enrichVar(envVar, value);
|
|
92
145
|
}
|
|
93
146
|
export async function enrichEnvironmentWithChainConfig(networkName) {
|
|
94
|
-
|
|
95
|
-
|
|
147
|
+
if (networkName === 'local') {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const result = await getL2ChainConfig(networkName);
|
|
151
|
+
if (!result) {
|
|
96
152
|
throw new Error(`Unknown network name: ${networkName}`);
|
|
97
153
|
}
|
|
98
|
-
|
|
99
|
-
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
100
|
-
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
101
|
-
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
154
|
+
const { config, networkName: name } = result;
|
|
102
155
|
enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
|
|
103
156
|
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
104
157
|
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
@@ -106,7 +159,7 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
|
|
|
106
159
|
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
107
160
|
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
|
|
108
161
|
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
|
|
109
|
-
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec',
|
|
162
|
+
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', name, 'data'));
|
|
110
163
|
enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
|
|
111
164
|
enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
|
|
112
165
|
enrichVar('SYNC_SNAPSHOTS_URL', config.snapshotsUrl);
|
|
@@ -129,4 +182,31 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
|
|
|
129
182
|
enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
130
183
|
enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
131
184
|
enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
185
|
+
// Deployment stuff
|
|
186
|
+
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
187
|
+
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
188
|
+
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
189
|
+
enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
|
|
190
|
+
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
191
|
+
enrichVar('AZTEC_DEPOSIT_AMOUNT', config.depositAmount.toString());
|
|
192
|
+
enrichVar('AZTEC_MINIMUM_STAKE', config.minimumStake.toString());
|
|
193
|
+
enrichVar('AZTEC_SLASHING_QUORUM', config.slashingQuorum.toString());
|
|
194
|
+
enrichVar('AZTEC_SLASHING_ROUND_SIZE', config.slashingRoundSize.toString());
|
|
195
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_QUORUM', config.governanceProposerQuorum.toString());
|
|
196
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE', config.governanceProposerRoundSize.toString());
|
|
197
|
+
enrichVar('AZTEC_MANA_TARGET', config.manaTarget.toString());
|
|
198
|
+
enrichVar('AZTEC_PROVING_COST_PER_MANA', config.provingCostPerMana.toString());
|
|
199
|
+
// Slashing
|
|
200
|
+
enrichVar('SLASH_PAYLOAD_TTL_SECONDS', config.slashPayloadTtlSeconds.toString());
|
|
201
|
+
enrichVar('SLASH_PRUNE_ENABLED', config.slashPruneEnabled.toString());
|
|
202
|
+
enrichVar('SLASH_PRUNE_PENALTY', config.slashPrunePenalty.toString());
|
|
203
|
+
enrichVar('SLASH_PRUNE_MAX_PENALTY', config.slashPruneMaxPenalty.toString());
|
|
204
|
+
enrichVar('SLASH_INACTIVITY_ENABLED', config.slashInactivityEnabled.toString());
|
|
205
|
+
enrichVar('SLASH_INACTIVITY_CREATE_TARGET_PERCENTAGE', config.slashInactivityCreateTargetPercentage.toString());
|
|
206
|
+
enrichVar('SLASH_INACTIVITY_SIGNAL_TARGET_PERCENTAGE', config.slashInactivitySignalTargetPercentage.toString());
|
|
207
|
+
enrichVar('SLASH_INACTIVITY_CREATE_PENALTY', config.slashInactivityCreatePenalty.toString());
|
|
208
|
+
enrichVar('SLASH_INACTIVITY_MAX_PENALTY', config.slashInactivityMaxPenalty.toString());
|
|
209
|
+
enrichVar('SLASH_INVALID_BLOCK_ENABLED', config.slashInvalidBlockEnabled.toString());
|
|
210
|
+
enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashInvalidBlockPenalty.toString());
|
|
211
|
+
enrichVar('SLASH_INVALID_BLOCK_MAX_PENALTY', config.slashInvalidBlockMaxPenalty.toString());
|
|
132
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "1.0.0-staging.
|
|
3
|
+
"version": "1.0.0-staging.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js"
|
|
@@ -27,35 +27,35 @@
|
|
|
27
27
|
"../package.common.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aztec/accounts": "1.0.0-staging.
|
|
31
|
-
"@aztec/archiver": "1.0.0-staging.
|
|
32
|
-
"@aztec/aztec-faucet": "1.0.0-staging.
|
|
33
|
-
"@aztec/aztec-node": "1.0.0-staging.
|
|
34
|
-
"@aztec/aztec.js": "1.0.0-staging.
|
|
35
|
-
"@aztec/bb-prover": "1.0.0-staging.
|
|
36
|
-
"@aztec/bb.js": "1.0.0-staging.
|
|
37
|
-
"@aztec/blob-sink": "1.0.0-staging.
|
|
38
|
-
"@aztec/bot": "1.0.0-staging.
|
|
39
|
-
"@aztec/builder": "1.0.0-staging.
|
|
40
|
-
"@aztec/cli": "1.0.0-staging.
|
|
41
|
-
"@aztec/cli-wallet": "1.0.0-staging.
|
|
42
|
-
"@aztec/constants": "1.0.0-staging.
|
|
43
|
-
"@aztec/entrypoints": "1.0.0-staging.
|
|
44
|
-
"@aztec/ethereum": "1.0.0-staging.
|
|
45
|
-
"@aztec/foundation": "1.0.0-staging.
|
|
46
|
-
"@aztec/kv-store": "1.0.0-staging.
|
|
47
|
-
"@aztec/noir-contracts.js": "1.0.0-staging.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-staging.
|
|
49
|
-
"@aztec/p2p": "1.0.0-staging.
|
|
50
|
-
"@aztec/p2p-bootstrap": "1.0.0-staging.
|
|
51
|
-
"@aztec/protocol-contracts": "1.0.0-staging.
|
|
52
|
-
"@aztec/prover-client": "1.0.0-staging.
|
|
53
|
-
"@aztec/prover-node": "1.0.0-staging.
|
|
54
|
-
"@aztec/pxe": "1.0.0-staging.
|
|
55
|
-
"@aztec/stdlib": "1.0.0-staging.
|
|
56
|
-
"@aztec/telemetry-client": "1.0.0-staging.
|
|
57
|
-
"@aztec/txe": "1.0.0-staging.
|
|
58
|
-
"@aztec/world-state": "1.0.0-staging.
|
|
30
|
+
"@aztec/accounts": "1.0.0-staging.4",
|
|
31
|
+
"@aztec/archiver": "1.0.0-staging.4",
|
|
32
|
+
"@aztec/aztec-faucet": "1.0.0-staging.4",
|
|
33
|
+
"@aztec/aztec-node": "1.0.0-staging.4",
|
|
34
|
+
"@aztec/aztec.js": "1.0.0-staging.4",
|
|
35
|
+
"@aztec/bb-prover": "1.0.0-staging.4",
|
|
36
|
+
"@aztec/bb.js": "1.0.0-staging.4",
|
|
37
|
+
"@aztec/blob-sink": "1.0.0-staging.4",
|
|
38
|
+
"@aztec/bot": "1.0.0-staging.4",
|
|
39
|
+
"@aztec/builder": "1.0.0-staging.4",
|
|
40
|
+
"@aztec/cli": "1.0.0-staging.4",
|
|
41
|
+
"@aztec/cli-wallet": "1.0.0-staging.4",
|
|
42
|
+
"@aztec/constants": "1.0.0-staging.4",
|
|
43
|
+
"@aztec/entrypoints": "1.0.0-staging.4",
|
|
44
|
+
"@aztec/ethereum": "1.0.0-staging.4",
|
|
45
|
+
"@aztec/foundation": "1.0.0-staging.4",
|
|
46
|
+
"@aztec/kv-store": "1.0.0-staging.4",
|
|
47
|
+
"@aztec/noir-contracts.js": "1.0.0-staging.4",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-staging.4",
|
|
49
|
+
"@aztec/p2p": "1.0.0-staging.4",
|
|
50
|
+
"@aztec/p2p-bootstrap": "1.0.0-staging.4",
|
|
51
|
+
"@aztec/protocol-contracts": "1.0.0-staging.4",
|
|
52
|
+
"@aztec/prover-client": "1.0.0-staging.4",
|
|
53
|
+
"@aztec/prover-node": "1.0.0-staging.4",
|
|
54
|
+
"@aztec/pxe": "1.0.0-staging.4",
|
|
55
|
+
"@aztec/stdlib": "1.0.0-staging.4",
|
|
56
|
+
"@aztec/telemetry-client": "1.0.0-staging.4",
|
|
57
|
+
"@aztec/txe": "1.0.0-staging.4",
|
|
58
|
+
"@aztec/world-state": "1.0.0-staging.4",
|
|
59
59
|
"@types/chalk": "^2.2.0",
|
|
60
60
|
"abitype": "^0.8.11",
|
|
61
61
|
"chalk": "^5.3.0",
|
package/src/bin/index.ts
CHANGED
|
@@ -8,12 +8,13 @@ import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infra
|
|
|
8
8
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
9
9
|
import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
10
10
|
import { injectCommands as injectPXECommands } from '@aztec/cli/pxe';
|
|
11
|
+
import { getActiveNetworkName } from '@aztec/foundation/config';
|
|
11
12
|
import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
12
13
|
|
|
13
14
|
import { Command } from 'commander';
|
|
14
15
|
|
|
15
16
|
import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
|
|
16
|
-
import {
|
|
17
|
+
import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
|
|
17
18
|
import { injectAztecCommands } from '../cli/index.js';
|
|
18
19
|
import { getCliVersion } from '../cli/release_version.js';
|
|
19
20
|
|
|
@@ -38,11 +39,7 @@ async function main() {
|
|
|
38
39
|
networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (networkValue !== undefined) {
|
|
44
|
-
await enrichEnvironmentWithChainConfig(networkValue as NetworkNames);
|
|
45
|
-
}
|
|
42
|
+
await enrichEnvironmentWithChainConfig(getActiveNetworkName(networkValue));
|
|
46
43
|
|
|
47
44
|
const cliVersion = getCliVersion();
|
|
48
45
|
let program = new Command('aztec');
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/aztec.js';
|
|
2
|
-
import
|
|
2
|
+
import { DefaultL1ContractsConfig } from '@aztec/ethereum';
|
|
3
|
+
import type { EnvVar, NetworkNames } from '@aztec/foundation/config';
|
|
3
4
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
4
5
|
|
|
5
6
|
import path from 'path';
|
|
6
7
|
|
|
7
8
|
import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with { type: 'json' };
|
|
8
9
|
|
|
9
|
-
export type NetworkNames = 'testnet-ignition' | 'alpha-testnet';
|
|
10
|
-
|
|
11
10
|
export type L2ChainConfig = {
|
|
12
11
|
l1ChainId: number;
|
|
13
|
-
ethereumSlotDuration: number;
|
|
14
|
-
aztecSlotDuration: number;
|
|
15
|
-
aztecEpochDuration: number;
|
|
16
|
-
aztecProofSubmissionEpochs: number;
|
|
17
12
|
testAccounts: boolean;
|
|
18
13
|
sponsoredFPC: boolean;
|
|
19
14
|
p2pEnabled: boolean;
|
|
@@ -31,14 +26,53 @@ export type L2ChainConfig = {
|
|
|
31
26
|
publicIncludeMetrics?: string[];
|
|
32
27
|
publicMetricsCollectorUrl?: string;
|
|
33
28
|
publicMetricsCollectFrom?: string[];
|
|
29
|
+
|
|
30
|
+
// Deployment stuff
|
|
31
|
+
|
|
32
|
+
/** How many seconds an L1 slot lasts. */
|
|
33
|
+
ethereumSlotDuration: number;
|
|
34
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
|
|
35
|
+
aztecSlotDuration: number;
|
|
36
|
+
/** How many L2 slots an epoch lasts. */
|
|
37
|
+
aztecEpochDuration: number;
|
|
38
|
+
/** The target validator committee size. */
|
|
39
|
+
aztecTargetCommitteeSize: number;
|
|
40
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
41
|
+
aztecProofSubmissionEpochs: number;
|
|
42
|
+
/** The deposit amount for a validator */
|
|
43
|
+
depositAmount: bigint;
|
|
44
|
+
/** The minimum stake for a validator. */
|
|
45
|
+
minimumStake: bigint;
|
|
46
|
+
/** The slashing quorum */
|
|
47
|
+
slashingQuorum: number;
|
|
48
|
+
/** The slashing round size */
|
|
49
|
+
slashingRoundSize: number;
|
|
50
|
+
/** Governance proposing quorum */
|
|
51
|
+
governanceProposerQuorum: number;
|
|
52
|
+
/** Governance proposing round size */
|
|
53
|
+
governanceProposerRoundSize: number;
|
|
54
|
+
/** The mana target for the rollup */
|
|
55
|
+
manaTarget: bigint;
|
|
56
|
+
/** The proving cost per mana */
|
|
57
|
+
provingCostPerMana: bigint;
|
|
58
|
+
|
|
59
|
+
// slashing stuff
|
|
60
|
+
slashPayloadTtlSeconds: number;
|
|
61
|
+
slashPruneEnabled: boolean;
|
|
62
|
+
slashPrunePenalty: bigint;
|
|
63
|
+
slashPruneMaxPenalty: bigint;
|
|
64
|
+
slashInactivityEnabled: boolean;
|
|
65
|
+
slashInactivityCreateTargetPercentage: number;
|
|
66
|
+
slashInactivitySignalTargetPercentage: number;
|
|
67
|
+
slashInactivityCreatePenalty: bigint;
|
|
68
|
+
slashInactivityMaxPenalty: bigint;
|
|
69
|
+
slashInvalidBlockEnabled: boolean;
|
|
70
|
+
slashInvalidBlockPenalty: bigint;
|
|
71
|
+
slashInvalidBlockMaxPenalty: bigint;
|
|
34
72
|
};
|
|
35
73
|
|
|
36
74
|
export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
|
|
37
75
|
l1ChainId: 11155111,
|
|
38
|
-
ethereumSlotDuration: 12,
|
|
39
|
-
aztecSlotDuration: 36,
|
|
40
|
-
aztecEpochDuration: 32,
|
|
41
|
-
aztecProofSubmissionEpochs: 1,
|
|
42
76
|
testAccounts: true,
|
|
43
77
|
sponsoredFPC: false,
|
|
44
78
|
p2pEnabled: true,
|
|
@@ -53,14 +87,52 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
53
87
|
autoUpdate: 'disabled',
|
|
54
88
|
autoUpdateUrl: undefined,
|
|
55
89
|
maxTxPoolSize: 100_000_000, // 100MB
|
|
56
|
-
};
|
|
57
90
|
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
// Deployment stuff
|
|
92
|
+
/** How many seconds an L1 slot lasts. */
|
|
60
93
|
ethereumSlotDuration: 12,
|
|
94
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
|
|
61
95
|
aztecSlotDuration: 36,
|
|
96
|
+
/** How many L2 slots an epoch lasts. */
|
|
62
97
|
aztecEpochDuration: 32,
|
|
98
|
+
/** The target validator committee size. */
|
|
99
|
+
aztecTargetCommitteeSize: 48,
|
|
100
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
63
101
|
aztecProofSubmissionEpochs: 1,
|
|
102
|
+
/** The deposit amount for a validator */
|
|
103
|
+
depositAmount: DefaultL1ContractsConfig.depositAmount,
|
|
104
|
+
/** The minimum stake for a validator. */
|
|
105
|
+
minimumStake: DefaultL1ContractsConfig.minimumStake,
|
|
106
|
+
/** The slashing quorum */
|
|
107
|
+
slashingQuorum: DefaultL1ContractsConfig.slashingQuorum,
|
|
108
|
+
/** The slashing round size */
|
|
109
|
+
slashingRoundSize: DefaultL1ContractsConfig.slashingRoundSize,
|
|
110
|
+
/** Governance proposing quorum */
|
|
111
|
+
governanceProposerQuorum: DefaultL1ContractsConfig.governanceProposerQuorum,
|
|
112
|
+
/** Governance proposing round size */
|
|
113
|
+
governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
|
|
114
|
+
/** The mana target for the rollup */
|
|
115
|
+
manaTarget: 0n,
|
|
116
|
+
/** The proving cost per mana */
|
|
117
|
+
provingCostPerMana: 0n,
|
|
118
|
+
|
|
119
|
+
// slashing stuff
|
|
120
|
+
slashInactivityEnabled: false,
|
|
121
|
+
slashInactivityCreateTargetPercentage: 0,
|
|
122
|
+
slashInactivitySignalTargetPercentage: 0,
|
|
123
|
+
slashInactivityCreatePenalty: 0n,
|
|
124
|
+
slashInactivityMaxPenalty: 0n,
|
|
125
|
+
slashInvalidBlockEnabled: false,
|
|
126
|
+
slashPayloadTtlSeconds: 0,
|
|
127
|
+
slashPruneEnabled: false,
|
|
128
|
+
slashPrunePenalty: 0n,
|
|
129
|
+
slashPruneMaxPenalty: 0n,
|
|
130
|
+
slashInvalidBlockPenalty: 0n,
|
|
131
|
+
slashInvalidBlockMaxPenalty: 0n,
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const alphaTestnetL2ChainConfig: L2ChainConfig = {
|
|
135
|
+
l1ChainId: 11155111,
|
|
64
136
|
testAccounts: false,
|
|
65
137
|
sponsoredFPC: true,
|
|
66
138
|
p2pEnabled: true,
|
|
@@ -78,6 +150,48 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
|
|
|
78
150
|
publicIncludeMetrics,
|
|
79
151
|
publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec.network',
|
|
80
152
|
publicMetricsCollectFrom: ['sequencer'],
|
|
153
|
+
|
|
154
|
+
// Deployment stuff
|
|
155
|
+
/** How many seconds an L1 slot lasts. */
|
|
156
|
+
ethereumSlotDuration: 12,
|
|
157
|
+
/** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
|
|
158
|
+
aztecSlotDuration: 36,
|
|
159
|
+
/** How many L2 slots an epoch lasts. */
|
|
160
|
+
aztecEpochDuration: 32,
|
|
161
|
+
/** The target validator committee size. */
|
|
162
|
+
aztecTargetCommitteeSize: 48,
|
|
163
|
+
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
164
|
+
aztecProofSubmissionEpochs: 1,
|
|
165
|
+
/** The deposit amount for a validator */
|
|
166
|
+
depositAmount: DefaultL1ContractsConfig.depositAmount,
|
|
167
|
+
/** The minimum stake for a validator. */
|
|
168
|
+
minimumStake: DefaultL1ContractsConfig.minimumStake,
|
|
169
|
+
/** The slashing quorum */
|
|
170
|
+
slashingQuorum: 101,
|
|
171
|
+
/** The slashing round size */
|
|
172
|
+
slashingRoundSize: 200,
|
|
173
|
+
/** Governance proposing quorum */
|
|
174
|
+
governanceProposerQuorum: 151,
|
|
175
|
+
/** Governance proposing round size */
|
|
176
|
+
governanceProposerRoundSize: 300,
|
|
177
|
+
/** The mana target for the rollup */
|
|
178
|
+
manaTarget: DefaultL1ContractsConfig.manaTarget,
|
|
179
|
+
/** The proving cost per mana */
|
|
180
|
+
provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
|
|
181
|
+
|
|
182
|
+
// slashing stuff
|
|
183
|
+
slashPayloadTtlSeconds: 36 * 32 * 24, // 24 epochs
|
|
184
|
+
slashPruneEnabled: true,
|
|
185
|
+
slashPrunePenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
186
|
+
slashPruneMaxPenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
187
|
+
slashInactivityEnabled: true,
|
|
188
|
+
slashInactivityCreateTargetPercentage: 1,
|
|
189
|
+
slashInactivitySignalTargetPercentage: 1,
|
|
190
|
+
slashInactivityCreatePenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
191
|
+
slashInactivityMaxPenalty: 17n * (DefaultL1ContractsConfig.depositAmount / 100n),
|
|
192
|
+
slashInvalidBlockEnabled: true,
|
|
193
|
+
slashInvalidBlockPenalty: DefaultL1ContractsConfig.depositAmount,
|
|
194
|
+
slashInvalidBlockMaxPenalty: DefaultL1ContractsConfig.depositAmount,
|
|
81
195
|
};
|
|
82
196
|
|
|
83
197
|
export async function getBootnodes(networkName: NetworkNames) {
|
|
@@ -93,15 +207,17 @@ export async function getBootnodes(networkName: NetworkNames) {
|
|
|
93
207
|
return json['bootnodes'];
|
|
94
208
|
}
|
|
95
209
|
|
|
96
|
-
export async function getL2ChainConfig(
|
|
210
|
+
export async function getL2ChainConfig(
|
|
211
|
+
networkName: NetworkNames,
|
|
212
|
+
): Promise<{ config: L2ChainConfig; networkName: string } | undefined> {
|
|
97
213
|
if (networkName === 'testnet-ignition') {
|
|
98
214
|
const config = { ...testnetIgnitionL2ChainConfig };
|
|
99
215
|
config.p2pBootstrapNodes = await getBootnodes(networkName);
|
|
100
|
-
return config;
|
|
101
|
-
} else if (networkName === 'alpha-testnet') {
|
|
216
|
+
return { config, networkName };
|
|
217
|
+
} else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
|
|
102
218
|
const config = { ...alphaTestnetL2ChainConfig };
|
|
103
|
-
config.p2pBootstrapNodes = await getBootnodes(
|
|
104
|
-
return config;
|
|
219
|
+
config.p2pBootstrapNodes = await getBootnodes('alpha-testnet');
|
|
220
|
+
return { config, networkName: 'alpha-testnet' };
|
|
105
221
|
}
|
|
106
222
|
return undefined;
|
|
107
223
|
}
|
|
@@ -124,14 +240,15 @@ function enrichEthAddressVar(envVar: EnvVar, value: string) {
|
|
|
124
240
|
}
|
|
125
241
|
|
|
126
242
|
export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
127
|
-
|
|
128
|
-
|
|
243
|
+
if (networkName === 'local') {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const result = await getL2ChainConfig(networkName);
|
|
248
|
+
if (!result) {
|
|
129
249
|
throw new Error(`Unknown network name: ${networkName}`);
|
|
130
250
|
}
|
|
131
|
-
|
|
132
|
-
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
133
|
-
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
134
|
-
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
251
|
+
const { config, networkName: name } = result;
|
|
135
252
|
enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
|
|
136
253
|
enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
|
|
137
254
|
enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
|
|
@@ -139,7 +256,7 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
|
|
|
139
256
|
enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
|
|
140
257
|
enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
|
|
141
258
|
enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
|
|
142
|
-
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec',
|
|
259
|
+
enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', name, 'data'));
|
|
143
260
|
enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
|
|
144
261
|
enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
|
|
145
262
|
enrichVar('SYNC_SNAPSHOTS_URL', config.snapshotsUrl);
|
|
@@ -168,4 +285,33 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
|
|
|
168
285
|
enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
169
286
|
enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
170
287
|
enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
288
|
+
|
|
289
|
+
// Deployment stuff
|
|
290
|
+
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
291
|
+
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
|
292
|
+
enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
|
|
293
|
+
enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
|
|
294
|
+
enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
|
|
295
|
+
enrichVar('AZTEC_DEPOSIT_AMOUNT', config.depositAmount.toString());
|
|
296
|
+
enrichVar('AZTEC_MINIMUM_STAKE', config.minimumStake.toString());
|
|
297
|
+
enrichVar('AZTEC_SLASHING_QUORUM', config.slashingQuorum.toString());
|
|
298
|
+
enrichVar('AZTEC_SLASHING_ROUND_SIZE', config.slashingRoundSize.toString());
|
|
299
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_QUORUM', config.governanceProposerQuorum.toString());
|
|
300
|
+
enrichVar('AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE', config.governanceProposerRoundSize.toString());
|
|
301
|
+
enrichVar('AZTEC_MANA_TARGET', config.manaTarget.toString());
|
|
302
|
+
enrichVar('AZTEC_PROVING_COST_PER_MANA', config.provingCostPerMana.toString());
|
|
303
|
+
|
|
304
|
+
// Slashing
|
|
305
|
+
enrichVar('SLASH_PAYLOAD_TTL_SECONDS', config.slashPayloadTtlSeconds.toString());
|
|
306
|
+
enrichVar('SLASH_PRUNE_ENABLED', config.slashPruneEnabled.toString());
|
|
307
|
+
enrichVar('SLASH_PRUNE_PENALTY', config.slashPrunePenalty.toString());
|
|
308
|
+
enrichVar('SLASH_PRUNE_MAX_PENALTY', config.slashPruneMaxPenalty.toString());
|
|
309
|
+
enrichVar('SLASH_INACTIVITY_ENABLED', config.slashInactivityEnabled.toString());
|
|
310
|
+
enrichVar('SLASH_INACTIVITY_CREATE_TARGET_PERCENTAGE', config.slashInactivityCreateTargetPercentage.toString());
|
|
311
|
+
enrichVar('SLASH_INACTIVITY_SIGNAL_TARGET_PERCENTAGE', config.slashInactivitySignalTargetPercentage.toString());
|
|
312
|
+
enrichVar('SLASH_INACTIVITY_CREATE_PENALTY', config.slashInactivityCreatePenalty.toString());
|
|
313
|
+
enrichVar('SLASH_INACTIVITY_MAX_PENALTY', config.slashInactivityMaxPenalty.toString());
|
|
314
|
+
enrichVar('SLASH_INVALID_BLOCK_ENABLED', config.slashInvalidBlockEnabled.toString());
|
|
315
|
+
enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashInvalidBlockPenalty.toString());
|
|
316
|
+
enrichVar('SLASH_INVALID_BLOCK_MAX_PENALTY', config.slashInvalidBlockMaxPenalty.toString());
|
|
171
317
|
}
|