Skip to content

Commit

Permalink
Merge pull request #3643 from rolfyone/max_eb_withdrawal_rename
Browse files Browse the repository at this point in the history
EIP-7251: rename PartialWithdrawal field
  • Loading branch information
mkalinin committed Apr 2, 2024
2 parents a2c4c27 + 9b291ab commit e5020c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions specs/_features/eip7251/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [Containers](#containers)
- [New containers](#new-containers)
- [New `PendingBalanceDeposit`](#new-pendingbalancedeposit)
- [New `PartialWithdrawal`](#new-partialwithdrawal)
- [New `PendingPartialWithdrawal`](#new-pendingpartialwithdrawal)
- [New `ExecutionLayerWithdrawRequest`](#new-executionlayerwithdrawrequest)
- [New `Consolidation`](#new-consolidation)
- [New `SignedConsolidation`](#new-signedconsolidation)
Expand Down Expand Up @@ -160,10 +160,10 @@ class PendingBalanceDeposit(Container):
amount: Gwei
```

#### New `PartialWithdrawal`
#### New `PendingPartialWithdrawal`

```python
class PartialWithdrawal(Container):
class PendingPartialWithdrawal(Container):
index: ValidatorIndex
amount: Gwei
withdrawable_epoch: Epoch
Expand Down Expand Up @@ -254,7 +254,7 @@ class BeaconState(Container):
consolidation_balance_to_consume: Gwei # [New in EIP-7251]
earliest_consolidation_epoch: Epoch # [New in EIP-7251]
pending_balance_deposits: List[PendingBalanceDeposit, PENDING_BALANCE_DEPOSITS_LIMIT] # [New in EIP-7251]
pending_partial_withdrawals: List[PartialWithdrawal, PENDING_PARTIAL_WITHDRAWALS_LIMIT] # [New in EIP-7251]
pending_partial_withdrawals: List[PendingPartialWithdrawal, PENDING_PARTIAL_WITHDRAWALS_LIMIT] # [New in EIP-7251]
pending_consolidations: List[PendingConsolidation, PENDING_CONSOLIDATIONS_LIMIT] # [New in EIP-7251]
```

Expand Down Expand Up @@ -904,7 +904,7 @@ def process_execution_layer_withdraw_request(
)
exit_queue_epoch = compute_exit_epoch_and_update_churn(state, to_withdraw)
withdrawable_epoch = Epoch(exit_queue_epoch + MIN_VALIDATOR_WITHDRAWABILITY_DELAY)
state.pending_partial_withdrawals.append(PartialWithdrawal(
state.pending_partial_withdrawals.append(PendingPartialWithdrawal(
index=index,
amount=to_withdraw,
withdrawable_epoch=withdrawable_epoch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_partial_withdrawal_queue_full(spec, state):
amount=10 ** 9,
)

partial_withdrawal = spec.PartialWithdrawal(index=0, amount=1, withdrawable_epoch=current_epoch)
partial_withdrawal = spec.PendingPartialWithdrawal(index=0, amount=1, withdrawable_epoch=current_epoch)
state.pending_partial_withdrawals = [partial_withdrawal] * spec.PENDING_PARTIAL_WITHDRAWALS_LIMIT
yield from run_execution_layer_withdraw_request_processing(
spec, state, execution_layer_withdraw_request, success=False
Expand Down

0 comments on commit e5020c7

Please sign in to comment.