diff --git a/presets/mainnet/eip7251.yaml b/presets/mainnet/eip7251.yaml index cde13a5f4..7489be387 100644 --- a/presets/mainnet/eip7251.yaml +++ b/presets/mainnet/eip7251.yaml @@ -21,3 +21,7 @@ MIN_SLASHING_PENALTY_QUOTIENT_EIP7251: 65536 # --------------------------------------------------------------- MAX_CONSOLIDATIONS: 1 +# Execution +# --------------------------------------------------------------- +# 2**3 (= 8) partial withdrawals +MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD: 16 diff --git a/presets/minimal/eip7251.yaml b/presets/minimal/eip7251.yaml index cea46c17e..1e8bc58d5 100644 --- a/presets/minimal/eip7251.yaml +++ b/presets/minimal/eip7251.yaml @@ -23,3 +23,7 @@ MIN_SLASHING_PENALTY_QUOTIENT_EIP7251: 65536 # --------------------------------------------------------------- MAX_CONSOLIDATIONS: 1 +# Execution +# --------------------------------------------------------------- +# [customized] 2**1 (= 2) +MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD: 2 diff --git a/specs/_features/eip7251/beacon-chain.md b/specs/_features/eip7251/beacon-chain.md index b70be3866..967438992 100644 --- a/specs/_features/eip7251/beacon-chain.md +++ b/specs/_features/eip7251/beacon-chain.md @@ -116,6 +116,12 @@ The following values are (non-configurable) constants used throughout the specif | - | - | | `MAX_CONSOLIDATIONS` | `uint64(1)` | +### Execution + +| Name | Value | Description | +| - | - | - | +| `MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD` | `uint64(2**3)` (= 8) | Maximum amount of partial withdrawals allowed in each payload | + ### State list lengths | Name | Value | Unit | @@ -620,7 +626,7 @@ def get_expected_withdrawals(state: BeaconState) -> Tuple[Sequence[Withdrawal], # [New in EIP7251] Consume pending partial withdrawals for withdrawal in state.pending_partial_withdrawals: - if withdrawal.withdrawable_epoch > epoch or len(withdrawals) == MAX_WITHDRAWALS_PER_PAYLOAD // 2: + if withdrawal.withdrawable_epoch > epoch or len(withdrawals) == MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD: break validator = state.validators[withdrawal.index]