chore: set config params for staging-ignition and testnet#16976
chore: set config params for staging-ignition and testnet#16976PhilWindle merged 1 commit intonextfrom
Conversation
alexghr
left a comment
There was a problem hiding this comment.
Looks great but the large numbers need to either be strings or defined using bigint powers (e.g. 10n ** 18n)
| slashAmountSmall: BigInt(2_000e18), | ||
| slashAmountMedium: BigInt(10_000e18), | ||
| slashAmountLarge: BigInt(50_000e18), |
There was a problem hiding this comment.
This is not safe. This would convert 2000e18 from a number to a bigint but 2000e18 is greater than Number.MAX_SAFE_INTEGER so it'll overflow before it is converted to bigint
| localEjectionThreshold: BigInt(196_000e18), | ||
|
|
||
| ejectionThreshold: BigInt(100_000e18), | ||
| activationThreshold: BigInt(200_000e18), |
|
|
||
| slashingRoundSizeInEpochs: 4, | ||
| slashingLifetimeInRounds: 40, | ||
| slashingExecutionDelayInRounds: 20, |
There was a problem hiding this comment.
| slashingExecutionDelayInRounds: 20, | |
| slashingExecutionDelayInRounds: 28, |
There was a problem hiding this comment.
We talked about having a 3 day slashing execution delay and a 5 day exit delay.
| slashingExecutionDelayInRounds: 20, | ||
| slashAmountSmall: BigInt(2_000e18), | ||
| slashAmountMedium: BigInt(10_000e18), | ||
| slashAmountLarge: BigInt(50_000e18), |
There was a problem hiding this comment.
slashAmountLarge: BigInt(50_000e18),
I think this is fine for Ignition where there is no txs, but for Alpha this slashAmountLarge would need to be close to 100% of the stake.
| slashMinPenaltyPercentage: 0.5, | ||
| slashMaxPenaltyPercentage: 2.0, | ||
| slashInactivityTargetPercentage: 0.7, | ||
| slashInactivityConsecutiveEpochThreshold: 1, |
There was a problem hiding this comment.
Can we set this to two to test it out?
| slashUnknownPenalty: BigInt(2_000e18), | ||
| slashBroadcastedInvalidBlockPenalty: BigInt(10_000e18), | ||
| slashMaxPayloadSize: 50, | ||
| slashGracePeriodL2Slots: 32 * 2, // Two epochs from genesis |
There was a problem hiding this comment.
| slashGracePeriodL2Slots: 32 * 2, // Two epochs from genesis | |
| slashGracePeriodL2Slots: 32 * 4, // One round from genesis |
| slashBroadcastedInvalidBlockPenalty: BigInt(10_000e18), | ||
| slashMaxPayloadSize: 50, | ||
| slashGracePeriodL2Slots: 32 * 2, // Two epochs from genesis | ||
| slashOffenseExpirationRounds: 8, |
There was a problem hiding this comment.
Question: is there any point setting this to far above the slashingOffsetInRounds?
There was a problem hiding this comment.
Should take input from @spalladino here.
There was a problem hiding this comment.
Just debugging. Any offenses still in the store can be queried via the node admin API.
yarn-project/ethereum/src/config.ts
Outdated
| proposeConfig: { | ||
| lockDelay: 60n * 60n * 24n, | ||
| lockAmount: DefaultL1ContractsConfig.activationThreshold * 100n, | ||
| lockDelay: 60n * 24n * 60n * 60n, // 60 days |
There was a problem hiding this comment.
For testnet? Why?
fa8a445 to
6c3986b
Compare
| @@ -125,31 +125,32 @@ const StagingPublicGovernanceConfiguration = { | |||
|
|
|||
| const TestnetGovernanceConfiguration = { | |||
There was a problem hiding this comment.
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)
| slashAmountLarge: BigInt(50e18), | ||
| activationThreshold: 100n * 10n ** 18n, | ||
| ejectionThreshold: 50n * 10n ** 18n, | ||
| localEjectionThreshold: 98n * 10n ** 18n, |
There was a problem hiding this comment.
None of these values (except slashAmountLarge) matches what we have in the issue TMNT-263: Rollup Configuration) so don't think they are running any tests with the new values at all. (I had issue with that).
There was a problem hiding this comment.
They were getting set explicitly over in the chain l2 config, but I will update here as well.
There was a problem hiding this comment.
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 😬
cd84e6e to
4799590
Compare
yarn-project/ethereum/src/config.ts
Outdated
| a: 1000, | ||
| k: 1000000, | ||
| minimum: 100000, | ||
| k: 100000, |
There was a problem hiding this comment.
The existing value was the correct here. It has now been invalidated. All of the reward configs really should just be the same so there is only one and that one would be the TestnetRewardBoostConfig. I will update that.
4799590 to
f2bee27
Compare
|
I pushed an update to the cofngis here, and will be running it on a solidity branch to ensure that the config make it behaves correctly. |
There are some failing tests but they are all related to the configurations changing and some slashing tests, e.g., empire vs. tally and previously having run with 0 delay. |
LHerskind
left a comment
There was a problem hiding this comment.
I have updated the reward booster configuration such that there will be only one. It does not make much sense to me that there are actually multiple different ones between networks.
Will be adding fixes and moving this more into the solidity tests as well in #16988 |

See https://linear.app/aztec-labs/issue/TMNT-258/configuration