fix: align testnet slashing penalties with L1 slash amounts#21722
Merged
aminsammara merged 4 commits intobackport-to-v4-stagingfrom Mar 18, 2026
Merged
fix: align testnet slashing penalties with L1 slash amounts#21722aminsammara merged 4 commits intobackport-to-v4-stagingfrom
aminsammara merged 4 commits intobackport-to-v4-stagingfrom
Conversation
Testnet validators were detecting inactive validators and starting slashing rounds, but all votes were computed as zero because the per-offense penalty (10e18) was far below the L1 contract's minimum slash threshold (100000e18). Set all testnet penalty values to 100000e18 to match AZTEC_SLASH_AMOUNT_SMALL.
- Disable PRUNE, DATA_WITHHOLDING, DUPLICATE_PROPOSAL, DUPLICATE_ATTESTATION penalties (set to 0) - Lower inactivity target percentage from 0.9 to 0.7 - Increase consecutive epoch threshold from 1 to 2 - Increase grace period from 64 to 3600 L2 slots
aminsammara
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testnet validators were detecting inactive validators and starting slashing rounds, but all votes were computed as zero because the per-offense penalty (
10e18= 10 TST) was far below the L1 contract's minimum slash threshold (100000e18= 100,000 TST).This PR sets all testnet slashing penalty values to
100000e18to matchAZTEC_SLASH_AMOUNT_SMALL, which is the minimum amount needed for a vote to register as 1 slash unit.Root Cause
The vote computation in
getSlashUnitsForAmount()(yarn-project/stdlib/src/slashing/tally.ts) checks if the accumulated offense amount reachesslashingAmounts[0](=AZTEC_SLASH_AMOUNT_SMALL). Since10e18 < 100000e18, the function always returned 0 slash units, causing all votes to be skipped.BigInt Parsing Verification
"100000e18")bigintConfigHelperinfoundation/src/config/index.tshandles scientific notation losslessly using bigint arithmetic (not float64)100000e18→BigInt("100000") * 10n ** 18n= exact resultChanges
spartan/environments/network-defaults.yml: Updated all testnetSLASH_*_PENALTYvalues from10e18to100000e18ClaudeBox log: https://claudebox.work/s/a2a0d7830a3d8ce3?run=2