Repository navigation
Conversation
slash_validator divides by WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA (4096) from Electra on. ProcessSlashings in state_electra.go still used the phase0 512, so every Electra and Fulu block with a slashing credited its proposer eight times the whistleblower reward it receives on chain.
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.
The bug
From Electra on,
slash_validatordivides byWHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA(4096).ProcessSlashingsinpkg/spec/metrics/state_electra.gostill divided by the phase0WhistleBlowerRewardQuotient(512), so on every Electra and Fulu block with a slashing the proposer was credited eight times the whistleblower reward it actually receives.Slot 15038043 (Fulu) slashes one validator with 32 ETH effective balance:
/rewards/blockstotalattester_slashingsChange
WhistleBlowerRewardQuotientElectra = 4096inpkg/spec/constants.go, used at both sites instate_electra.go. Only Electra and Fulu states reachElectraMetrics, so earlier forks keep 512 throughstate_phase0.go.electra_whistleblower_test.go: one test per branch (attester and proposer slashings), each slashing two validators with different effective balances (2048 and 32 ETH). Putting either site back to 512 fails its test.Affected data
f_cl_manual_rewardint_block_rewards, plus whatGetMaxRewardbuilds fromblock.ManualReward: the proposer'sf_block_experimental_rewardint_validator_rewards_summary, andf_max_rewardwhen the block has no API reward. On a 32 ETH slashing the over-credit is 54,687,500 gwei per slashed validator. Rows already written stay wrong until the post-Electra slashing blocks (t_slashings, valid,f_epoch >= 364032) are re-derived.The goteth-automatic-QA x7 adjustment in
checker/cross_source_validationencodes this bug and has to be dropped when this ships.