diff --git a/specs/phase0/beacon-chain.md b/specs/phase0/beacon-chain.md index 2e6c64be5..aa573ff16 100644 --- a/specs/phase0/beacon-chain.md +++ b/specs/phase0/beacon-chain.md @@ -1405,7 +1405,7 @@ def process_final_updates(state: BeaconState) -> None: QUARTER_INCREMENT = EFFECTIVE_BALANCE_INCREMENT // 4 if ( balance + QUARTER_INCREMENT < validator.effective_balance - or validator.effective_balance + 7 * QUARTER_INCREMENT < balance + or validator.effective_balance + 5 * QUARTER_INCREMENT < balance ): validator.effective_balance = min(balance - balance % EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE) # Reset slashings diff --git a/tests/core/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_final_updates.py b/tests/core/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_final_updates.py index b0d05427a..36dae8fb7 100644 --- a/tests/core/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_final_updates.py +++ b/tests/core/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_final_updates.py @@ -62,8 +62,8 @@ def test_effective_balance_hysteresis(spec, state): (max, max - inc, max - inc, "exactly 1 step lower"), (max, max - inc - 1, max - (2 * inc), "past 1 step lower, double step"), (max, max - inc + 1, max - inc, "close to 1 step lower"), - (min, min + (quar_inc * 7), min, "bigger balance, but not high enough"), - (min, min + (quar_inc * 7) + 1, min + inc, "bigger balance, high enough, but small step"), + (min, min + (quar_inc * 5), min, "bigger balance, but not high enough"), + (min, min + (quar_inc * 5) + 1, min + inc, "bigger balance, high enough, but small step"), (min, min + (quar_inc * 8) - 1, min + inc, "bigger balance, high enough, close to double step"), (min, min + (quar_inc * 8), min + (2 * inc), "exact two step balance increment"), (min, min + (quar_inc * 8) + 1, min + (2 * inc), "over two steps, round down"),