Skip to content

Commit 85e2452

Browse files
authored
Remove queue_entire_balance_and_reset_validator (#3951)
1 parent ecb4c2a commit 85e2452

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

specs/electra/beacon-chain.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
- [Modified `initiate_validator_exit`](#modified-initiate_validator_exit)
6161
- [New `switch_to_compounding_validator`](#new-switch_to_compounding_validator)
6262
- [New `queue_excess_active_balance`](#new-queue_excess_active_balance)
63-
- [New `queue_entire_balance_and_reset_validator`](#new-queue_entire_balance_and_reset_validator)
6463
- [New `compute_exit_epoch_and_update_churn`](#new-compute_exit_epoch_and_update_churn)
6564
- [New `compute_consolidation_epoch_and_update_churn`](#new-compute_consolidation_epoch_and_update_churn)
6665
- [Modified `slash_validator`](#modified-slash_validator)
@@ -646,20 +645,6 @@ def queue_excess_active_balance(state: BeaconState, index: ValidatorIndex) -> No
646645
)
647646
```
648647

649-
#### New `queue_entire_balance_and_reset_validator`
650-
651-
```python
652-
def queue_entire_balance_and_reset_validator(state: BeaconState, index: ValidatorIndex) -> None:
653-
balance = state.balances[index]
654-
state.balances[index] = 0
655-
validator = state.validators[index]
656-
validator.effective_balance = 0
657-
validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH
658-
state.pending_balance_deposits.append(
659-
PendingBalanceDeposit(index=index, amount=balance)
660-
)
661-
```
662-
663648
#### New `compute_exit_epoch_and_update_churn`
664649

665650
```python

specs/electra/fork.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,14 @@ def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState:
152152
))
153153

154154
for index in pre_activation:
155-
queue_entire_balance_and_reset_validator(post, ValidatorIndex(index))
155+
balance = post.balances[index]
156+
post.balances[index] = 0
157+
validator = post.validators[index]
158+
validator.effective_balance = 0
159+
validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH
160+
post.pending_balance_deposits.append(
161+
PendingBalanceDeposit(index=index, amount=balance)
162+
)
156163

157164
# Ensure early adopters of compounding credentials go through the activation churn
158165
for index, validator in enumerate(post.validators):

0 commit comments

Comments
 (0)