consensus-specs icon indicating copy to clipboard operation
consensus-specs copied to clipboard

Tests from Holesky Incident

Open marioevz opened this issue 10 months ago • 2 comments

Wanted to open this issue with potential test case that have come up from the Holesky incident discussions.

Only got one so far, from the debrief call, but if other could chime in with more that would be great.

  • [ ] Test where the exit queue is completely full and there's at least one inactive validator with an already-zero balance that cannot exit immediately.

marioevz avatar Feb 26 '25 15:02 marioevz

To be clear, in this situation the validator is slashed but active (not inactive) and its effective balance (not balance) is zero. I'll look into adding some test cases for this specifically. I'd like to note that we may already have tests for this. If I come across some, I'll mention them below.

Rewards tests with very low effective balances (including zero)

There are four existing test cases for attestation rewards/penalties for validators with zero effective balances.

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/phase0/rewards/test_basic.py#L60-L63

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/phase0/rewards/test_basic.py#L66-L69

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/phase0/rewards/test_leak.py#L70-L74

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/phase0/rewards/test_leak.py#L77-L81

Given these two helper functions:

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/helpers/rewards.py#L392-L400

https://github.com/ethereum/consensus-specs/blob/36d80adb44c21c66379c6207a9578f9b1dcc8a2d/tests/core/pyspec/eth2spec/test/helpers/rewards.py#L403-L419

jtraglia avatar Feb 26 '25 21:02 jtraglia

i'd be interested in active_ongoing and 0 balance specifically because thats where we'd be headed if noone wants to be slashed with the current ruleset...

rolfyone avatar Mar 03 '25 00:03 rolfyone