Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove queue_entire_balance_and_reset_validator #3951

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
- [Modified `initiate_validator_exit`](#modified-initiate_validator_exit)
- [New `switch_to_compounding_validator`](#new-switch_to_compounding_validator)
- [New `queue_excess_active_balance`](#new-queue_excess_active_balance)
- [New `queue_entire_balance_and_reset_validator`](#new-queue_entire_balance_and_reset_validator)
- [New `compute_exit_epoch_and_update_churn`](#new-compute_exit_epoch_and_update_churn)
- [New `compute_consolidation_epoch_and_update_churn`](#new-compute_consolidation_epoch_and_update_churn)
- [Modified `slash_validator`](#modified-slash_validator)
Expand Down Expand Up @@ -655,20 +654,6 @@ def queue_excess_active_balance(state: BeaconState, index: ValidatorIndex) -> No
)
```

#### New `queue_entire_balance_and_reset_validator`

```python
def queue_entire_balance_and_reset_validator(state: BeaconState, index: ValidatorIndex) -> None:
balance = state.balances[index]
state.balances[index] = 0
validator = state.validators[index]
validator.effective_balance = 0
validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH
state.pending_balance_deposits.append(
PendingBalanceDeposit(index=index, amount=balance)
)
```

#### New `compute_exit_epoch_and_update_churn`

```python
Expand Down
9 changes: 8 additions & 1 deletion specs/electra/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState:
))

for index in pre_activation:
queue_entire_balance_and_reset_validator(post, ValidatorIndex(index))
balance = post.balances[index]
post.balances[index] = 0
validator = post.validators[index]
validator.effective_balance = 0
validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH
post.pending_balance_deposits.append(
PendingBalanceDeposit(index=index, amount=balance)
)

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