@aztec/aztec 2.0.0-rc.13 → 2.0.0-rc.15

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.
@@ -23,8 +23,9 @@ export type L2ChainConfig = L1ContractsConfig & Omit<SlasherConfig, 'slashValida
23
23
  publicMetricsCollectFrom?: string[];
24
24
  sentinelEnabled: boolean;
25
25
  };
26
- export declare const testnetIgnitionL2ChainConfig: L2ChainConfig;
27
- export declare const alphaTestnetL2ChainConfig: L2ChainConfig;
26
+ export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
27
+ export declare const stagingPublicL2ChainConfig: L2ChainConfig;
28
+ export declare const testnetL2ChainConfig: L2ChainConfig;
28
29
  export declare function getBootnodes(networkName: NetworkNames, cacheDir?: string): Promise<any>;
29
30
  export declare function getL2ChainConfig(networkName: NetworkNames, cacheDir?: string): Promise<L2ChainConfig | undefined>;
30
31
  export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAOrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,aAAa,EAAE,sBAAsB,GAAG,uBAAuB,CAAC,GAAG;IACtE,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,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6
6
  type: 'json'
7
7
  };
8
- export const testnetIgnitionL2ChainConfig = {
8
+ export const stagingIgnitionL2ChainConfig = {
9
9
  l1ChainId: 11155111,
10
10
  testAccounts: true,
11
11
  sponsoredFPC: false,
12
12
  p2pEnabled: true,
13
13
  p2pBootstrapNodes: [],
14
- registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
14
+ registryAddress: '0xf299347e765cfb27f913bde8e4983fd0f195676f',
15
15
  slashFactoryAddress: '',
16
16
  feeAssetHandlerAddress: '',
17
17
  seqMinTxsPerBlock: 0,
@@ -49,21 +49,75 @@ export const testnetIgnitionL2ChainConfig = {
49
49
  slashOffenseExpirationRounds: 10,
50
50
  sentinelEnabled: false
51
51
  };
52
- export const alphaTestnetL2ChainConfig = {
52
+ export const stagingPublicL2ChainConfig = {
53
53
  l1ChainId: 11155111,
54
54
  testAccounts: false,
55
55
  sponsoredFPC: true,
56
56
  p2pEnabled: true,
57
57
  p2pBootstrapNodes: [],
58
- registryAddress: '0xec4156431d0f3df66d4e24ba3d30dcb4c85fa309',
59
- slashFactoryAddress: '0x8b1566249dc8fb47234037538ce491f9500480b1',
60
- feeAssetHandlerAddress: '0x4f0376b8bcbdf72ddb38c38f48317c00e9c9aec3',
58
+ registryAddress: '0x2e48addca360da61e4d6c21ff2b1961af56eb83b',
59
+ slashFactoryAddress: '0xe19410632fd00695bc5a08dd82044b7b26317742',
60
+ feeAssetHandlerAddress: '0xb46dc3d91f849999330b6dd93473fa29fc45b076',
61
+ seqMinTxsPerBlock: 0,
62
+ seqMaxTxsPerBlock: 20,
63
+ realProofs: true,
64
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
65
+ autoUpdate: 'disabled',
66
+ autoUpdateUrl: undefined,
67
+ maxTxPoolSize: 100_000_000,
68
+ // Deployment stuff
69
+ /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
70
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
71
+ /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
72
+ /** The target validator committee size. */ aztecTargetCommitteeSize: 48,
73
+ /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
74
+ /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
75
+ /** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
76
+ /** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
77
+ /** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
78
+ /** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
79
+ /** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
80
+ /** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
81
+ /** Tally-style slashing */ slasherFlavor: 'tally',
82
+ /** Allow one round for vetoing */ slashingExecutionDelayInRounds: 1,
83
+ /** How long for a slash payload to be executed */ slashingLifetimeInRounds: 5,
84
+ /** Allow 2 rounds to discover faults */ slashingOffsetInRounds: 2,
85
+ /** No slash vetoer */ slashingVetoer: EthAddress.ZERO,
86
+ /** Use default slash amounts */ slashAmountSmall: DefaultL1ContractsConfig.slashAmountSmall,
87
+ slashAmountMedium: DefaultL1ContractsConfig.slashAmountMedium,
88
+ slashAmountLarge: DefaultL1ContractsConfig.slashAmountLarge,
89
+ // Slashing stuff
90
+ slashMinPenaltyPercentage: 0.5,
91
+ slashMaxPenaltyPercentage: 2.0,
92
+ slashInactivityTargetPercentage: 0.7,
93
+ slashInactivityConsecutiveEpochThreshold: 1,
94
+ slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountSmall,
95
+ slashPrunePenalty: DefaultL1ContractsConfig.slashAmountSmall,
96
+ slashDataWithholdingPenalty: DefaultL1ContractsConfig.slashAmountSmall,
97
+ slashProposeInvalidAttestationsPenalty: DefaultL1ContractsConfig.slashAmountLarge,
98
+ slashAttestDescendantOfInvalidPenalty: DefaultL1ContractsConfig.slashAmountLarge,
99
+ slashUnknownPenalty: DefaultL1ContractsConfig.slashAmountSmall,
100
+ slashBroadcastedInvalidBlockPenalty: DefaultL1ContractsConfig.slashAmountMedium,
101
+ slashMaxPayloadSize: 50,
102
+ slashGracePeriodL2Slots: 32 * 2,
103
+ slashOffenseExpirationRounds: 8,
104
+ sentinelEnabled: true
105
+ };
106
+ export const testnetL2ChainConfig = {
107
+ l1ChainId: 11155111,
108
+ testAccounts: false,
109
+ sponsoredFPC: true,
110
+ p2pEnabled: true,
111
+ p2pBootstrapNodes: [],
112
+ registryAddress: '0xcfe61b2574984326679cd15c6566fbd4a724f3b4',
113
+ slashFactoryAddress: '0x58dc5b14f9d3085c9106f5b8208a1026f94614f0',
114
+ feeAssetHandlerAddress: '0x7abdec6e68ae27c37feb6a77371382a109ec4763',
61
115
  seqMinTxsPerBlock: 0,
62
116
  seqMaxTxsPerBlock: 20,
63
117
  realProofs: true,
64
118
  snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
65
119
  autoUpdate: 'config-and-version',
66
- autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/alpha-testnet.json',
120
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
67
121
  maxTxPoolSize: 100_000_000,
68
122
  publicIncludeMetrics,
69
123
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
@@ -78,14 +132,14 @@ export const alphaTestnetL2ChainConfig = {
78
132
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
79
133
  /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
80
134
  /** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
81
- /** The slashing round size */ slashingRoundSizeInEpochs: 4,
82
- /** Governance proposing round size */ governanceProposerRoundSize: 300,
135
+ /** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
136
+ /** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
83
137
  /** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
84
138
  /** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
85
139
  /** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
86
140
  /** Tally-style slashing */ slasherFlavor: 'tally',
87
141
  /** Allow one round for vetoing */ slashingExecutionDelayInRounds: 1,
88
- /** How long for a slash payload to be executed */ slashingLifetimeInRounds: 4,
142
+ /** How long for a slash payload to be executed */ slashingLifetimeInRounds: 5,
89
143
  /** Allow 2 rounds to discover faults */ slashingOffsetInRounds: 2,
90
144
  /** No slash vetoer */ slashingVetoer: EthAddress.ZERO,
91
145
  /** Use default slash amounts */ slashAmountSmall: DefaultL1ContractsConfig.slashAmountSmall,
@@ -140,20 +194,29 @@ export async function getBootnodes(networkName, cacheDir) {
140
194
  return json['bootnodes'];
141
195
  }
142
196
  export async function getL2ChainConfig(networkName, cacheDir) {
143
- if (networkName === 'testnet-ignition') {
144
- const config = {
145
- ...testnetIgnitionL2ChainConfig
197
+ let config;
198
+ if (networkName === 'staging-public') {
199
+ config = {
200
+ ...stagingPublicL2ChainConfig
146
201
  };
147
- config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
148
- return config;
149
- } else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
150
- const config = {
151
- ...alphaTestnetL2ChainConfig
202
+ } else if (networkName === 'testnet') {
203
+ config = {
204
+ ...testnetL2ChainConfig
152
205
  };
153
- config.p2pBootstrapNodes = await getBootnodes('alpha-testnet', cacheDir);
154
- return config;
206
+ } else if (networkName === 'staging-ignition') {
207
+ config = {
208
+ ...stagingIgnitionL2ChainConfig
209
+ };
210
+ }
211
+ if (!config) {
212
+ return undefined;
155
213
  }
156
- return undefined;
214
+ // If the bootnodes are not set, get them from the network
215
+ const bootnodeKey = 'BOOTSTRAP_NODES';
216
+ if (!process.env[bootnodeKey]) {
217
+ config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
218
+ }
219
+ return config;
157
220
  }
158
221
  function enrichVar(envVar, value) {
159
222
  // Don't override
@@ -171,15 +234,7 @@ function enrichEthAddressVar(envVar, value) {
171
234
  enrichVar(envVar, value);
172
235
  }
173
236
  function getDefaultDataDir(networkName) {
174
- let prefix;
175
- if (networkName === 'testnet-ignition') {
176
- prefix = 'testnet-ignition';
177
- } else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
178
- prefix = 'alpha-testnet';
179
- } else {
180
- prefix = networkName;
181
- }
182
- return path.join(process.env.HOME || '~', '.aztec', prefix, 'data');
237
+ return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
183
238
  }
184
239
  export async function enrichEnvironmentWithChainConfig(networkName) {
185
240
  if (networkName === 'local') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec",
3
- "version": "2.0.0-rc.13",
3
+ "version": "2.0.0-rc.15",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -28,37 +28,37 @@
28
28
  "../package.common.json"
29
29
  ],
30
30
  "dependencies": {
31
- "@aztec/accounts": "2.0.0-rc.13",
32
- "@aztec/archiver": "2.0.0-rc.13",
33
- "@aztec/aztec-faucet": "2.0.0-rc.13",
34
- "@aztec/aztec-node": "2.0.0-rc.13",
35
- "@aztec/aztec.js": "2.0.0-rc.13",
36
- "@aztec/bb-prover": "2.0.0-rc.13",
37
- "@aztec/bb.js": "2.0.0-rc.13",
38
- "@aztec/blob-sink": "2.0.0-rc.13",
39
- "@aztec/bot": "2.0.0-rc.13",
40
- "@aztec/builder": "2.0.0-rc.13",
41
- "@aztec/cli": "2.0.0-rc.13",
42
- "@aztec/cli-wallet": "2.0.0-rc.13",
43
- "@aztec/constants": "2.0.0-rc.13",
44
- "@aztec/entrypoints": "2.0.0-rc.13",
45
- "@aztec/ethereum": "2.0.0-rc.13",
46
- "@aztec/foundation": "2.0.0-rc.13",
47
- "@aztec/kv-store": "2.0.0-rc.13",
48
- "@aztec/l1-artifacts": "2.0.0-rc.13",
49
- "@aztec/node-lib": "2.0.0-rc.13",
50
- "@aztec/noir-contracts.js": "2.0.0-rc.13",
51
- "@aztec/noir-protocol-circuits-types": "2.0.0-rc.13",
52
- "@aztec/p2p": "2.0.0-rc.13",
53
- "@aztec/p2p-bootstrap": "2.0.0-rc.13",
54
- "@aztec/protocol-contracts": "2.0.0-rc.13",
55
- "@aztec/prover-client": "2.0.0-rc.13",
56
- "@aztec/prover-node": "2.0.0-rc.13",
57
- "@aztec/pxe": "2.0.0-rc.13",
58
- "@aztec/stdlib": "2.0.0-rc.13",
59
- "@aztec/telemetry-client": "2.0.0-rc.13",
60
- "@aztec/txe": "2.0.0-rc.13",
61
- "@aztec/world-state": "2.0.0-rc.13",
31
+ "@aztec/accounts": "2.0.0-rc.15",
32
+ "@aztec/archiver": "2.0.0-rc.15",
33
+ "@aztec/aztec-faucet": "2.0.0-rc.15",
34
+ "@aztec/aztec-node": "2.0.0-rc.15",
35
+ "@aztec/aztec.js": "2.0.0-rc.15",
36
+ "@aztec/bb-prover": "2.0.0-rc.15",
37
+ "@aztec/bb.js": "2.0.0-rc.15",
38
+ "@aztec/blob-sink": "2.0.0-rc.15",
39
+ "@aztec/bot": "2.0.0-rc.15",
40
+ "@aztec/builder": "2.0.0-rc.15",
41
+ "@aztec/cli": "2.0.0-rc.15",
42
+ "@aztec/cli-wallet": "2.0.0-rc.15",
43
+ "@aztec/constants": "2.0.0-rc.15",
44
+ "@aztec/entrypoints": "2.0.0-rc.15",
45
+ "@aztec/ethereum": "2.0.0-rc.15",
46
+ "@aztec/foundation": "2.0.0-rc.15",
47
+ "@aztec/kv-store": "2.0.0-rc.15",
48
+ "@aztec/l1-artifacts": "2.0.0-rc.15",
49
+ "@aztec/node-lib": "2.0.0-rc.15",
50
+ "@aztec/noir-contracts.js": "2.0.0-rc.15",
51
+ "@aztec/noir-protocol-circuits-types": "2.0.0-rc.15",
52
+ "@aztec/p2p": "2.0.0-rc.15",
53
+ "@aztec/p2p-bootstrap": "2.0.0-rc.15",
54
+ "@aztec/protocol-contracts": "2.0.0-rc.15",
55
+ "@aztec/prover-client": "2.0.0-rc.15",
56
+ "@aztec/prover-node": "2.0.0-rc.15",
57
+ "@aztec/pxe": "2.0.0-rc.15",
58
+ "@aztec/stdlib": "2.0.0-rc.15",
59
+ "@aztec/telemetry-client": "2.0.0-rc.15",
60
+ "@aztec/txe": "2.0.0-rc.15",
61
+ "@aztec/world-state": "2.0.0-rc.15",
62
62
  "@types/chalk": "^2.2.0",
63
63
  "abitype": "^0.8.11",
64
64
  "chalk": "^5.3.0",
@@ -34,13 +34,13 @@ export type L2ChainConfig = L1ContractsConfig &
34
34
  sentinelEnabled: boolean;
35
35
  };
36
36
 
37
- export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
37
+ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
38
38
  l1ChainId: 11155111,
39
39
  testAccounts: true,
40
40
  sponsoredFPC: false,
41
41
  p2pEnabled: true,
42
42
  p2pBootstrapNodes: [],
43
- registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
43
+ registryAddress: '0xf299347e765cfb27f913bde8e4983fd0f195676f',
44
44
  slashFactoryAddress: '',
45
45
  feeAssetHandlerAddress: '',
46
46
  seqMinTxsPerBlock: 0,
@@ -89,21 +89,96 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
89
89
  sentinelEnabled: false,
90
90
  };
91
91
 
92
- export const alphaTestnetL2ChainConfig: L2ChainConfig = {
92
+ export const stagingPublicL2ChainConfig: L2ChainConfig = {
93
93
  l1ChainId: 11155111,
94
94
  testAccounts: false,
95
95
  sponsoredFPC: true,
96
96
  p2pEnabled: true,
97
97
  p2pBootstrapNodes: [],
98
- registryAddress: '0xec4156431d0f3df66d4e24ba3d30dcb4c85fa309',
99
- slashFactoryAddress: '0x8b1566249dc8fb47234037538ce491f9500480b1',
100
- feeAssetHandlerAddress: '0x4f0376b8bcbdf72ddb38c38f48317c00e9c9aec3',
98
+ registryAddress: '0x2e48addca360da61e4d6c21ff2b1961af56eb83b',
99
+ slashFactoryAddress: '0xe19410632fd00695bc5a08dd82044b7b26317742',
100
+ feeAssetHandlerAddress: '0xb46dc3d91f849999330b6dd93473fa29fc45b076',
101
+ seqMinTxsPerBlock: 0,
102
+ seqMaxTxsPerBlock: 20,
103
+ realProofs: true,
104
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
105
+ autoUpdate: 'disabled',
106
+ autoUpdateUrl: undefined,
107
+ maxTxPoolSize: 100_000_000, // 100MB
108
+
109
+ // Deployment stuff
110
+ /** How many seconds an L1 slot lasts. */
111
+ ethereumSlotDuration: 12,
112
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
113
+ aztecSlotDuration: 36,
114
+ /** How many L2 slots an epoch lasts. */
115
+ aztecEpochDuration: 32,
116
+ /** The target validator committee size. */
117
+ aztecTargetCommitteeSize: 48,
118
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
119
+ aztecProofSubmissionEpochs: 1,
120
+ /** The deposit amount for a validator */
121
+ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
122
+ /** The minimum stake for a validator. */
123
+ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
124
+ /** The slashing round size */
125
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
126
+ /** Governance proposing round size */
127
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
128
+ /** The mana target for the rollup */
129
+ manaTarget: DefaultL1ContractsConfig.manaTarget,
130
+ /** The proving cost per mana */
131
+ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
132
+ /** Exit delay for stakers */
133
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
134
+ /** Tally-style slashing */
135
+ slasherFlavor: 'tally',
136
+ /** Allow one round for vetoing */
137
+ slashingExecutionDelayInRounds: 1,
138
+ /** How long for a slash payload to be executed */
139
+ slashingLifetimeInRounds: 5,
140
+ /** Allow 2 rounds to discover faults */
141
+ slashingOffsetInRounds: 2,
142
+ /** No slash vetoer */
143
+ slashingVetoer: EthAddress.ZERO,
144
+ /** Use default slash amounts */
145
+ slashAmountSmall: DefaultL1ContractsConfig.slashAmountSmall,
146
+ slashAmountMedium: DefaultL1ContractsConfig.slashAmountMedium,
147
+ slashAmountLarge: DefaultL1ContractsConfig.slashAmountLarge,
148
+
149
+ // Slashing stuff
150
+ slashMinPenaltyPercentage: 0.5,
151
+ slashMaxPenaltyPercentage: 2.0,
152
+ slashInactivityTargetPercentage: 0.7,
153
+ slashInactivityConsecutiveEpochThreshold: 1,
154
+ slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountSmall,
155
+ slashPrunePenalty: DefaultL1ContractsConfig.slashAmountSmall,
156
+ slashDataWithholdingPenalty: DefaultL1ContractsConfig.slashAmountSmall,
157
+ slashProposeInvalidAttestationsPenalty: DefaultL1ContractsConfig.slashAmountLarge,
158
+ slashAttestDescendantOfInvalidPenalty: DefaultL1ContractsConfig.slashAmountLarge,
159
+ slashUnknownPenalty: DefaultL1ContractsConfig.slashAmountSmall,
160
+ slashBroadcastedInvalidBlockPenalty: DefaultL1ContractsConfig.slashAmountMedium,
161
+ slashMaxPayloadSize: 50,
162
+ slashGracePeriodL2Slots: 32 * 2, // Two epochs from genesis
163
+ slashOffenseExpirationRounds: 8,
164
+ sentinelEnabled: true,
165
+ };
166
+
167
+ export const testnetL2ChainConfig: L2ChainConfig = {
168
+ l1ChainId: 11155111,
169
+ testAccounts: false,
170
+ sponsoredFPC: true,
171
+ p2pEnabled: true,
172
+ p2pBootstrapNodes: [],
173
+ registryAddress: '0xcfe61b2574984326679cd15c6566fbd4a724f3b4',
174
+ slashFactoryAddress: '0x58dc5b14f9d3085c9106f5b8208a1026f94614f0',
175
+ feeAssetHandlerAddress: '0x7abdec6e68ae27c37feb6a77371382a109ec4763',
101
176
  seqMinTxsPerBlock: 0,
102
177
  seqMaxTxsPerBlock: 20,
103
178
  realProofs: true,
104
179
  snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
105
180
  autoUpdate: 'config-and-version',
106
- autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/alpha-testnet.json',
181
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
107
182
  maxTxPoolSize: 100_000_000, // 100MB
108
183
  publicIncludeMetrics,
109
184
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
@@ -125,9 +200,9 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
125
200
  /** The minimum stake for a validator. */
126
201
  ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
127
202
  /** The slashing round size */
128
- slashingRoundSizeInEpochs: 4,
203
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
129
204
  /** Governance proposing round size */
130
- governanceProposerRoundSize: 300,
205
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
131
206
  /** The mana target for the rollup */
132
207
  manaTarget: DefaultL1ContractsConfig.manaTarget,
133
208
  /** The proving cost per mana */
@@ -139,7 +214,7 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
139
214
  /** Allow one round for vetoing */
140
215
  slashingExecutionDelayInRounds: 1,
141
216
  /** How long for a slash payload to be executed */
142
- slashingLifetimeInRounds: 4,
217
+ slashingLifetimeInRounds: 5,
143
218
  /** Allow 2 rounds to discover faults */
144
219
  slashingOffsetInRounds: 2,
145
220
  /** No slash vetoer */
@@ -207,16 +282,23 @@ export async function getL2ChainConfig(
207
282
  networkName: NetworkNames,
208
283
  cacheDir?: string,
209
284
  ): Promise<L2ChainConfig | undefined> {
210
- if (networkName === 'testnet-ignition') {
211
- const config = { ...testnetIgnitionL2ChainConfig };
285
+ let config: L2ChainConfig | undefined;
286
+ if (networkName === 'staging-public') {
287
+ config = { ...stagingPublicL2ChainConfig };
288
+ } else if (networkName === 'testnet') {
289
+ config = { ...testnetL2ChainConfig };
290
+ } else if (networkName === 'staging-ignition') {
291
+ config = { ...stagingIgnitionL2ChainConfig };
292
+ }
293
+ if (!config) {
294
+ return undefined;
295
+ }
296
+ // If the bootnodes are not set, get them from the network
297
+ const bootnodeKey: EnvVar = 'BOOTSTRAP_NODES';
298
+ if (!process.env[bootnodeKey]) {
212
299
  config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
213
- return config;
214
- } else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
215
- const config = { ...alphaTestnetL2ChainConfig };
216
- config.p2pBootstrapNodes = await getBootnodes('alpha-testnet', cacheDir);
217
- return config;
218
300
  }
219
- return undefined;
301
+ return config;
220
302
  }
221
303
 
222
304
  function enrichVar(envVar: EnvVar, value: string | undefined) {
@@ -237,16 +319,7 @@ function enrichEthAddressVar(envVar: EnvVar, value: string) {
237
319
  }
238
320
 
239
321
  function getDefaultDataDir(networkName: NetworkNames): string {
240
- let prefix: string;
241
- if (networkName === 'testnet-ignition') {
242
- prefix = 'testnet-ignition';
243
- } else if (networkName === 'alpha-testnet' || networkName === 'testnet') {
244
- prefix = 'alpha-testnet';
245
- } else {
246
- prefix = networkName;
247
- }
248
-
249
- return path.join(process.env.HOME || '~', '.aztec', prefix, 'data');
322
+ return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
250
323
  }
251
324
 
252
325
  export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {