-
Notifications
You must be signed in to change notification settings - Fork 599
chore: set config params for staging-ignition and testnet #16976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ const DefaultSlashConfig = { | |
|
|
||
| export const stagingIgnitionL2ChainConfig: L2ChainConfig = { | ||
| l1ChainId: 11155111, | ||
| testAccounts: true, | ||
| testAccounts: false, | ||
| sponsoredFPC: false, | ||
| p2pEnabled: true, | ||
| p2pBootstrapNodes: [], | ||
|
|
@@ -90,23 +90,64 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = { | |
| publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics', | ||
| publicMetricsCollectFrom: ['sequencer'], | ||
|
|
||
| ...DefaultL1ContractsConfig, | ||
| ...DefaultSlashConfig, | ||
|
|
||
| /** How many seconds an L1 slot lasts. */ | ||
| ethereumSlotDuration: 12, | ||
| /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ | ||
| aztecSlotDuration: 36, | ||
| aztecSlotDuration: 72, | ||
| /** How many L2 slots an epoch lasts. */ | ||
| aztecEpochDuration: 32, | ||
| /** The target validator committee size. */ | ||
| aztecTargetCommitteeSize: 48, | ||
| aztecTargetCommitteeSize: 24, | ||
| /** The number of epochs to lag behind the current epoch for validator selection. */ | ||
| lagInEpochs: 2, | ||
| /** The number of epochs after an epoch ends that proofs are still accepted. */ | ||
| aztecProofSubmissionEpochs: 1, | ||
| /** How many sequencers must agree with a slash for it to be executed. */ | ||
| slashingQuorum: 65, | ||
|
|
||
| slashingRoundSizeInEpochs: 4, | ||
| slashingLifetimeInRounds: 40, | ||
| slashingExecutionDelayInRounds: 28, | ||
| slashAmountSmall: 2_000n * 10n ** 18n, | ||
| slashAmountMedium: 10_000n * 10n ** 18n, | ||
| slashAmountLarge: 50_000n * 10n ** 18n, | ||
| slashingOffsetInRounds: 2, | ||
| slasherFlavor: 'tally', | ||
| slashingVetoer: EthAddress.ZERO, // TODO TMNT-329 | ||
|
|
||
| /** The mana target for the rollup */ | ||
| manaTarget: 0n, | ||
|
|
||
| exitDelaySeconds: 5 * 24 * 60 * 60, | ||
|
|
||
| /** The proving cost per mana */ | ||
| provingCostPerMana: 0n, | ||
| localEjectionThreshold: 196_000n * 10n ** 18n, | ||
|
|
||
| ejectionThreshold: 100_000n * 10n ** 18n, | ||
| activationThreshold: 200_000n * 10n ** 18n, | ||
|
|
||
| governanceProposerRoundSize: 300, // TODO TMNT-322 | ||
| governanceProposerQuorum: 151, // TODO TMNT-322 | ||
|
|
||
| // Node slashing config | ||
| // TODO TMNT-330 | ||
| slashMinPenaltyPercentage: 0.5, | ||
| slashMaxPenaltyPercentage: 2.0, | ||
| slashInactivityTargetPercentage: 0.7, | ||
| slashInactivityConsecutiveEpochThreshold: 2, | ||
| slashInactivityPenalty: 2_000n * 10n ** 18n, | ||
| slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now | ||
| slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now | ||
| slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n, | ||
| slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n, | ||
| slashUnknownPenalty: 2_000n * 10n ** 18n, | ||
| slashBroadcastedInvalidBlockPenalty: 10_000n * 10n ** 18n, | ||
| slashMaxPayloadSize: 50, | ||
| slashGracePeriodL2Slots: 32 * 4, // One round from genesis | ||
| slashOffenseExpirationRounds: 8, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: is there any point setting this to far above the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should take input from @spalladino here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just debugging. Any offenses still in the store can be queried via the node admin API. |
||
| sentinelEnabled: true, | ||
| slashingDisableDuration: 5 * 24 * 60 * 60, | ||
| }; | ||
|
|
||
| export const stagingPublicL2ChainConfig: L2ChainConfig = { | ||
|
|
@@ -213,6 +254,8 @@ export const testnetL2ChainConfig: L2ChainConfig = { | |
| exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds, | ||
|
|
||
| ...DefaultSlashConfig, | ||
| slashPrunePenalty: 0n, | ||
| slashDataWithholdingPenalty: 0n, | ||
| }; | ||
|
|
||
| const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,12 +79,12 @@ export const DefaultL1ContractsConfig = { | |
| aztecTargetCommitteeSize: 48, | ||
| lagInEpochs: 2, | ||
| aztecProofSubmissionEpochs: 1, // you have a full epoch to submit a proof after the epoch to prove ends | ||
| activationThreshold: BigInt(100e18), | ||
| ejectionThreshold: BigInt(50e18), | ||
| localEjectionThreshold: BigInt(98e18), | ||
| slashAmountSmall: BigInt(10e18), | ||
| slashAmountMedium: BigInt(20e18), | ||
| slashAmountLarge: BigInt(50e18), | ||
| activationThreshold: 100n * 10n ** 18n, | ||
| ejectionThreshold: 50n * 10n ** 18n, | ||
| localEjectionThreshold: 98n * 10n ** 18n, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of these values (except
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They were getting set explicitly over in the chain l2 config, but I will update here as well.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we change the defaults much here you will see an insane amount of tests failing because many of them are using hard coded values 😬 |
||
| slashAmountSmall: 10n * 10n ** 18n, | ||
| slashAmountMedium: 20n * 10n ** 18n, | ||
| slashAmountLarge: 50n * 10n ** 18n, | ||
| slashingRoundSizeInEpochs: 4, | ||
| slashingLifetimeInRounds: 5, | ||
| slashingExecutionDelayInRounds: 0, // round N may be submitted in round N + 1 | ||
|
|
@@ -128,31 +128,32 @@ const StagingPublicGovernanceConfiguration = { | |
|
|
||
| const TestnetGovernanceConfiguration = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the values are mostly sane, but would have preferred seeing it not explode in tests first (when trying to update some of these in the #16988 I ran into plenty things) |
||
| proposeConfig: { | ||
| lockDelay: 60n * 60n * 24n, | ||
| lockAmount: DefaultL1ContractsConfig.activationThreshold * 100n, | ||
| lockDelay: 10n * 365n * 24n * 60n * 60n, | ||
| lockAmount: 1250n * 200_000n * 10n ** 18n, | ||
| }, | ||
| votingDelay: 60n, | ||
| votingDuration: 60n * 60n, | ||
| executionDelay: 60n * 60n * 24n, | ||
| gracePeriod: 60n * 60n * 24n * 7n, | ||
| quorum: 3n * 10n ** 17n, // 30% | ||
| requiredYeaMargin: 4n * 10n ** 16n, // 4% | ||
| minimumVotes: DefaultL1ContractsConfig.ejectionThreshold * 200n, | ||
|
|
||
| votingDelay: 12n * 60n * 60n, // 12 hours | ||
| votingDuration: 1n * 24n * 60n * 60n, // 1 day | ||
| executionDelay: 12n * 60n * 60n, // 12 hours | ||
| gracePeriod: 1n * 24n * 60n * 60n, // 1 day | ||
| quorum: 2n * 10n ** 17n, // 20% | ||
| requiredYeaMargin: 1n * 10n ** 17n, // 10% | ||
| minimumVotes: 1250n * 200_000n * 10n ** 18n, | ||
| }; | ||
|
|
||
| const StagingIgnitionGovernanceConfiguration = { | ||
| proposeConfig: { | ||
| lockDelay: 60n * 60n * 24n * 30n, // 30 days | ||
| lockAmount: DefaultL1ContractsConfig.activationThreshold * 100n, | ||
| lockDelay: 10n * 365n * 24n * 60n * 60n, | ||
| lockAmount: 1250n * 200_000n * 10n ** 18n, | ||
| }, | ||
|
|
||
| votingDelay: 60n, | ||
| votingDuration: 60n * 60n, | ||
| executionDelay: 60n, | ||
| gracePeriod: 60n * 60n * 24n * 7n, | ||
| quorum: 3n * 10n ** 17n, // 30% | ||
| requiredYeaMargin: 4n * 10n ** 16n, // 4% | ||
| minimumVotes: DefaultL1ContractsConfig.ejectionThreshold * 200n, // >= 200 validators must vote | ||
| votingDelay: 7n * 24n * 60n * 60n, | ||
| votingDuration: 7n * 24n * 60n * 60n, | ||
| executionDelay: 30n * 24n * 60n * 60n, | ||
| gracePeriod: 7n * 24n * 60n * 60n, | ||
| quorum: 2n * 10n ** 17n, // 20% | ||
| requiredYeaMargin: 1n * 10n ** 17n, // 10% | ||
| minimumVotes: 1250n * 200_000n * 10n ** 18n, | ||
just-mitch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| export const getGovernanceConfiguration = (networkName: NetworkNames) => { | ||
|
|
@@ -175,10 +176,10 @@ export const getGovernanceConfiguration = (networkName: NetworkNames) => { | |
| // for it seems overkill | ||
|
|
||
| const DefaultRewardConfig = { | ||
| sequencerBps: 5000, | ||
| sequencerBps: 8000, | ||
| rewardDistributor: EthAddress.ZERO.toString(), | ||
| booster: EthAddress.ZERO.toString(), | ||
| blockReward: BigInt(50e18), | ||
| blockReward: 500n * 10n ** 18n, | ||
| }; | ||
|
|
||
| export const getRewardConfig = (networkName: NetworkNames) => { | ||
|
|
@@ -193,51 +194,16 @@ export const getRewardConfig = (networkName: NetworkNames) => { | |
| } | ||
| }; | ||
|
|
||
| const LocalRewardBoostConfig = { | ||
| increment: 200000, | ||
| maxScore: 5000000, | ||
| a: 5000, | ||
| k: 1000000, | ||
| minimum: 100000, | ||
| }; | ||
|
|
||
| const StagingPublicRewardBoostConfig = { | ||
| increment: 200000, | ||
| maxScore: 5000000, | ||
| a: 5000, | ||
| k: 1000000, | ||
| minimum: 100000, | ||
| }; | ||
|
|
||
| const TestnetRewardBoostConfig = { | ||
| increment: 125000, | ||
| maxScore: 15000000, | ||
| a: 1000, | ||
| k: 1000000, | ||
| minimum: 100000, | ||
| }; | ||
|
|
||
| const StagingIgnitionRewardBoostConfig = { | ||
| increment: 200000, | ||
| maxScore: 5000000, | ||
| a: 5000, | ||
| k: 1000000, | ||
| minimum: 100000, | ||
| }; | ||
|
|
||
| export const getRewardBoostConfig = (networkName: NetworkNames) => { | ||
| switch (networkName) { | ||
| case 'local': | ||
| return LocalRewardBoostConfig; | ||
| case 'staging-public': | ||
| return StagingPublicRewardBoostConfig; | ||
| case 'testnet': | ||
| return TestnetRewardBoostConfig; | ||
| case 'staging-ignition': | ||
| return StagingIgnitionRewardBoostConfig; | ||
| default: | ||
| throw new Error(`Unrecognized network name: ${networkName}`); | ||
| } | ||
| export const getRewardBoostConfig = () => { | ||
| // The reward configuration is specified with a precision of 1e5, and we use the same across | ||
| // all networks. | ||
| return { | ||
| increment: 125000, // 1.25 | ||
| maxScore: 15000000, // 150 | ||
| a: 1000, // 0.01 | ||
| k: 1000000, // 10 | ||
| minimum: 100000, // 1 | ||
| }; | ||
| }; | ||
|
|
||
| // Similar to the above, no need for environment variables for this. | ||
|
|
@@ -259,18 +225,18 @@ const StagingPublicEntryQueueConfig = { | |
|
|
||
| const TestnetEntryQueueConfig = { | ||
| bootstrapValidatorSetSize: 750n, | ||
| bootstrapFlushSize: 48n, // will effectively be bounded by maxQueueFlushSize | ||
| normalFlushSizeMin: 1n, | ||
| bootstrapFlushSize: 32n, | ||
| normalFlushSizeMin: 32n, | ||
| normalFlushSizeQuotient: 2475n, | ||
| maxQueueFlushSize: 32n, // Limited to 32 so flush cost are kept below 15M gas. | ||
| maxQueueFlushSize: 32n, | ||
| }; | ||
|
|
||
| const StagingIgnitionEntryQueueConfig = { | ||
| bootstrapValidatorSetSize: 750n, | ||
| bootstrapFlushSize: 48n, // will effectively be bounded by maxQueueFlushSize | ||
| bootstrapValidatorSetSize: 1250n, | ||
| bootstrapFlushSize: 8n, | ||
| normalFlushSizeMin: 1n, | ||
| normalFlushSizeQuotient: 2475n, | ||
| maxQueueFlushSize: 32n, // Limited to 32 so flush cost are kept below 15M gas. | ||
| normalFlushSizeQuotient: 2048n, | ||
| maxQueueFlushSize: 8n, | ||
| }; | ||
|
|
||
| export const getEntryQueueConfig = (networkName: NetworkNames) => { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.