feat: auto penalty mode - #887
Open
vgorkavenko wants to merge 7 commits into
Open
vgorkavenko wants to merge 7 commits into
vgorkavenko wants to merge 7 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Slashings are settled by the module itself, so the committee reporting path is gone: a slashing proof penalizes the Node Operator and reports the key as withdrawn right away. The penalty rate comes from the Node Operator's bond curve and is scaled by the pre-slashing key balance, next to the strikes penalty. Bond claims are restricted until the proven withdrawable epoch plus a delay, replacing the unresolved slashings counter.
Pass the chain config the Verifier needs to turn the proven withdrawable epoch into a timestamp, seed the default slashing penalty, and drop the grants of the removed committee role.
Deriving the withdrawable timestamp from the beacon chain genesis extrapolates across the whole chain history, so any change of the slot duration skews the result permanently and the error grows with the chain age. A longer slot would lift the bond claim lock too early. The Verifier now reports the time left until the key becomes withdrawable, measured from the slot of the header the proof is verified against, and the module anchors it to the current block. Past forks stop mattering and the extrapolation window shrinks to the remaining epochs.
The Verifier no longer anchors the withdrawable timestamp to the beacon chain genesis, so it does not need the genesis time anymore.
madlabman
reviewed
Sep 17, 2026
| /// @notice Set the slashing penalty for a single 32 ether validator for the given curveId | ||
| /// @param curveId Curve Id to associate slashing penalty with | ||
| /// @param penalty Slashing penalty | ||
| function setSlashingPenalty(uint256 curveId, uint256 penalty) external; |
Contributor
There was a problem hiding this comment.
Do we really need it configurable based on node operator type? Validators and penalties are the same.
madlabman
approved these changes
Sep 17, 2026
skhomuti
requested changes
Sep 18, 2026
| parametersRegistryProxy.proxy__upgradeToAndCall( | ||
| deploymentConfig.parametersRegistryImpl, | ||
| abi.encodeCall(ParametersRegistry.finalizeUpgradeV3, ()) | ||
| abi.encodeCall(ParametersRegistry.finalizeUpgradeV3, (deployParams.defaultSlashingPenalty)) |
Contributor
There was a problem hiding this comment.
this should be a separate upgrade script (we can remove this one) and maybe put it into a new finalizer?
| /// @inheritdoc IBaseModule | ||
| function getNodeOperatorUnresolvedSlashedValidators(uint256 nodeOperatorId) external view returns (uint256) { | ||
| return _baseStorage().unresolvedSlashedValidators[nodeOperatorId]; | ||
| function getBondClaimLockedUntil(uint256 nodeOperatorId) external view returns (uint256) { |
Contributor
There was a problem hiding this comment.
now it sounds like accounting responsibility
Contributor
There was a problem hiding this comment.
maybe rebrand it fully into slashing settled thing
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.
Description
reportValidatorSlashingpenalizes the Node Operator and reports the key as withdrawn right away, with no committee involved.withdrawableEpochplus 14 days, replacing the unresolved slashings counter.reportSlashedWithdrawnValidatorsand its role removed,ValidatorWithdrawnslimmed down,getNodeOperatorUnresolvedSlashedValidatorsreplaced bygetBondClaimLockedUntil.Checklist
just coverage)