Skip to content

feat: auto penalty mode - #887

Open
vgorkavenko wants to merge 7 commits into
phase-2from
feat/auto-penalty-mode
Open

vgorkavenko wants to merge 7 commits into
phase-2from
feat/auto-penalty-mode

Conversation

@vgorkavenko

@vgorkavenko vgorkavenko commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

  • reportValidatorSlashing penalizes the Node Operator and reports the key as withdrawn right away, with no committee involved.
  • The penalty is a per-32-ETH rate from the operator's bond curve, scaled by the pre-slashing key balance.
  • Bond claims are restricted until the proven withdrawableEpoch plus 14 days, replacing the unresolved slashings counter.
  • Repeated reports are a no-op; replaying one settles a slashing recorded before the upgrade.
  • Breaking: reportSlashedWithdrawnValidators and its role removed, ValidatorWithdrawn slimmed down, getNodeOperatorUnresolvedSlashedValidators replaced by getBondClaimLockedUntil.

Checklist

  • Appropriate PR labels applied
  • Test coverage maintained (just coverage)
    • Tests are added/updated
  • Documentation maintained
    • No need to update

@vgorkavenko
vgorkavenko requested a review from a team as a code owner September 11, 2026 09:06
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

vgorkavenko and others added 6 commits September 11, 2026 15:20
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.
/// @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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need it configurable based on node operator type? Validators and penalties are the same.

parametersRegistryProxy.proxy__upgradeToAndCall(
deploymentConfig.parametersRegistryImpl,
abi.encodeCall(ParametersRegistry.finalizeUpgradeV3, ())
abi.encodeCall(ParametersRegistry.finalizeUpgradeV3, (deployParams.defaultSlashingPenalty))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now it sounds like accounting responsibility

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rebrand it fully into slashing settled thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants