Skip to content

Commit f4ed8a8

Browse files
committed
Mainnet configuration
1 parent 29979d7 commit f4ed8a8

File tree

2 files changed

+69
-31
lines changed

2 files changed

+69
-31
lines changed

yarn-project/cli/src/config/chain_l2_config.ts

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -352,60 +352,62 @@ export const mainnetL2ChainConfig: L2ChainConfig = {
352352
aztecEpochDuration: 32,
353353
/** The target validator committee size. */
354354
aztecTargetCommitteeSize: 24,
355-
/** The number of epochs after an epoch ends that proofs are still accepted. */
356-
aztecProofSubmissionEpochs: 1,
357-
/** How many sequencers must agree with a slash for it to be executed. */
358-
slashingQuorum: 65,
359-
360355
/** The number of epochs to lag behind the current epoch for validator selection. */
361356
lagInEpochs: 2,
357+
/** The number of epochs after an epoch ends that proofs are still accepted. */
358+
aztecProofSubmissionEpochs: 1,
362359

363360
localEjectionThreshold: 196_000n * 10n ** 18n,
364-
slashingDisableDuration: 5 * 24 * 60 * 60,
365-
361+
/** How many sequencers must agree with a slash for it to be executed. */
362+
slashingQuorum: 65,
366363
slashingRoundSizeInEpochs: 4,
367-
slashingLifetimeInRounds: 40,
368364
slashingExecutionDelayInRounds: 28,
369-
slashAmountSmall: 2_000n * 10n ** 18n,
370-
slashAmountMedium: 10_000n * 10n ** 18n,
371-
slashAmountLarge: 50_000n * 10n ** 18n,
365+
slashingLifetimeInRounds: 34,
366+
slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
372367
slashingOffsetInRounds: 2,
368+
369+
slashingDisableDuration: 259_200, // 3 days
373370
slasherFlavor: 'tally',
374-
slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
371+
372+
slashAmountSmall: 2_000n * 10n ** 18n,
373+
slashAmountMedium: 2_000n * 10n ** 18n,
374+
slashAmountLarge: 2_000n * 10n ** 18n,
375375

376376
/** The mana target for the rollup */
377377
manaTarget: 0n,
378378

379-
exitDelaySeconds: 5 * 24 * 60 * 60,
380-
381379
/** The proving cost per mana */
382380
provingCostPerMana: 0n,
383381

384-
ejectionThreshold: 100_000n * 10n ** 18n,
382+
exitDelaySeconds: 4 * 24 * 60 * 60, // 4 days
383+
385384
activationThreshold: 200_000n * 10n ** 18n,
385+
ejectionThreshold: 100_000n * 10n ** 18n,
386386

387-
governanceProposerRoundSize: 300, // TODO TMNT-322
388-
governanceProposerQuorum: 151, // TODO TMNT-322
387+
governanceProposerRoundSize: 1000,
388+
governanceProposerQuorum: 600,
389389

390390
// Node slashing config
391391
// TODO TMNT-330
392-
slashMinPenaltyPercentage: 0.5,
393-
slashMaxPenaltyPercentage: 2.0,
394-
slashInactivityTargetPercentage: 0.7,
392+
slashInactivityTargetPercentage: 0.8,
395393
slashInactivityConsecutiveEpochThreshold: 2,
396394
slashInactivityPenalty: 2_000n * 10n ** 18n,
397395
slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now
398396
slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now
399-
slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
400-
slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
397+
slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
398+
slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
401399
slashUnknownPenalty: 2_000n * 10n ** 18n,
402-
slashBroadcastedInvalidBlockPenalty: 0n, // 10_000n * 10n ** 18n, Disabled for now until further testing
403-
slashMaxPayloadSize: 50,
404-
slashGracePeriodL2Slots: 32 * 4, // One round from genesis
400+
slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n, // 10_000n * 10n ** 18n, Disabled for now until further testing
401+
slashGracePeriodL2Slots: 1_200, // One day from deployment
405402
slashOffenseExpirationRounds: 8,
406-
sentinelEnabled: true,
403+
404+
slashMinPenaltyPercentage: 0.5,
405+
slashMaxPenaltyPercentage: 2.0,
406+
slashMaxPayloadSize: 50,
407407
slashExecuteRoundsLookBack: 4,
408408

409+
sentinelEnabled: true,
410+
409411
...DefaultNetworkDBMapSizeConfig,
410412
};
411413

yarn-project/ethereum/src/config.ts

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,21 @@ const StagingIgnitionGovernanceConfiguration = {
156156
minimumVotes: 1250n * 200_000n * 10n ** 18n,
157157
};
158158

159+
const MainnetGovernanceConfiguration = {
160+
proposeConfig: {
161+
lockDelay: 90n * 24n * 60n * 60n,
162+
lockAmount: 258_750_000n * 10n ** 18n,
163+
},
164+
165+
votingDelay: 3n * 24n * 60n * 60n,
166+
votingDuration: 7n * 24n * 60n * 60n,
167+
executionDelay: 7n * 24n * 60n * 60n,
168+
gracePeriod: 7n * 24n * 60n * 60n,
169+
quorum: 2n * 10n ** 17n, // 20%
170+
requiredYeaMargin: 33n * 10n ** 16n, // 33%
171+
minimumVotes: 1000n * 200_000n * 10n ** 18n,
172+
};
173+
159174
export const getGovernanceConfiguration = (networkName: NetworkNames) => {
160175
switch (networkName) {
161176
case 'local':
@@ -170,6 +185,8 @@ export const getGovernanceConfiguration = (networkName: NetworkNames) => {
170185
return TestnetGovernanceConfiguration;
171186
case 'staging-ignition':
172187
return StagingIgnitionGovernanceConfiguration;
188+
case 'mainnet':
189+
return MainnetGovernanceConfiguration;
173190
default:
174191
throw new Error(`Unrecognized network name: ${networkName}`);
175192
}
@@ -186,6 +203,13 @@ const DefaultRewardConfig = {
186203
blockReward: 500n * 10n ** 18n,
187204
};
188205

206+
const MainnetRewardConfig = {
207+
sequencerBps: 7_000,
208+
rewardDistributor: EthAddress.ZERO.toString(),
209+
booster: EthAddress.ZERO.toString(),
210+
blockReward: 400n * 10n ** 18n,
211+
};
212+
189213
export const getRewardConfig = (networkName: NetworkNames) => {
190214
switch (networkName) {
191215
case 'local':
@@ -195,6 +219,8 @@ export const getRewardConfig = (networkName: NetworkNames) => {
195219
case 'testnet':
196220
case 'staging-ignition':
197221
return DefaultRewardConfig;
222+
case 'mainnet':
223+
return MainnetRewardConfig;
198224
default:
199225
throw new Error(`Unrecognized network name: ${networkName}`);
200226
}
@@ -204,11 +230,11 @@ export const getRewardBoostConfig = () => {
204230
// The reward configuration is specified with a precision of 1e5, and we use the same across
205231
// all networks.
206232
return {
207-
increment: 125000, // 1.25
208-
maxScore: 15000000, // 150
209-
a: 1000, // 0.01
210-
k: 1000000, // 10
211-
minimum: 100000, // 1
233+
increment: 125_000, // 1.25
234+
maxScore: 15_000_000, // 150
235+
a: 1_000, // 0.01
236+
k: 1_000_000, // 10
237+
minimum: 100_000, // 1
212238
};
213239
};
214240

@@ -245,6 +271,14 @@ const StagingIgnitionEntryQueueConfig = {
245271
maxQueueFlushSize: 24n,
246272
};
247273

274+
const MainnetEntryQueueConfig = {
275+
bootstrapValidatorSetSize: 1_000n,
276+
bootstrapFlushSize: 1_000n,
277+
normalFlushSizeMin: 1n,
278+
normalFlushSizeQuotient: 2_048n,
279+
maxQueueFlushSize: 8n,
280+
};
281+
248282
export const getEntryQueueConfig = (networkName: NetworkNames) => {
249283
switch (networkName) {
250284
case 'local':
@@ -259,6 +293,8 @@ export const getEntryQueueConfig = (networkName: NetworkNames) => {
259293
return TestnetEntryQueueConfig;
260294
case 'staging-ignition':
261295
return StagingIgnitionEntryQueueConfig;
296+
case 'mainnet':
297+
return MainnetEntryQueueConfig;
262298
default:
263299
throw new Error(`Unrecognized network name: ${networkName}`);
264300
}

0 commit comments

Comments
 (0)