diff --git a/presets/mainnet/electra.yaml b/presets/mainnet/electra.yaml index 7b336c216c..a1a3501277 100644 --- a/presets/mainnet/electra.yaml +++ b/presets/mainnet/electra.yaml @@ -47,4 +47,4 @@ MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8 # Pending deposits processing # --------------------------------------------------------------- # 2**4 ( = 4) pending deposits -MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING: 16 +MAX_PENDING_DEPOSITS_PER_EPOCH: 16 diff --git a/presets/minimal/electra.yaml b/presets/minimal/electra.yaml index cbcb754e9c..aede73a7f9 100644 --- a/presets/minimal/electra.yaml +++ b/presets/minimal/electra.yaml @@ -47,4 +47,4 @@ MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 1 # Pending deposits processing # --------------------------------------------------------------- # 2**4 ( = 4) pending deposits -MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING: 16 +MAX_PENDING_DEPOSITS_PER_EPOCH: 16 diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 89a5345e18..5d0bac5c08 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -184,7 +184,7 @@ The following values are (non-configurable) constants used throughout the specif ### Pending deposits processing | Name | Value | Description | | - | - | - | -| `MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING` | `uint64(2**4)` (= 16)| *[New in Electra:EIP6110]* Maximum number of pending deposits to process per epoch | +| `MAX_PENDING_DEPOSITS_PER_EPOCH` | `uint64(2**4)` (= 16)| *[New in Electra:EIP6110]* Maximum number of pending deposits to process per epoch | ## Configuration @@ -896,7 +896,7 @@ def apply_pending_deposit(state: BeaconState, deposit: PendingDeposit) -> None: Iterating over `pending_deposits` queue this function runs the following checks before applying pending deposit: 1. All Eth1 bridge deposits are processed before the first deposit request gets processed. 2. Deposit position in the queue is finalized. -3. Deposit does not exceed the `MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING` limit. +3. Deposit does not exceed the `MAX_PENDING_DEPOSITS_PER_EPOCH` limit. 4. Deposit does not exceed the activation churn limit. ```python @@ -924,7 +924,7 @@ def process_pending_deposits(state: BeaconState) -> None: break # Check if number of processed deposits has not reached the limit, otherwise, stop processing. - if next_deposit_index >= MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING: + if next_deposit_index >= MAX_PENDING_DEPOSITS_PER_EPOCH: break # Read validator state diff --git a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_deposits.py b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_deposits.py index cc78e39d50..e1f2544020 100644 --- a/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_deposits.py +++ b/tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_process_pending_deposits.py @@ -194,7 +194,7 @@ def test_process_pending_deposits_not_finalized(spec, state): def test_process_pending_deposits_limit_is_reached(spec, state): # set pending deposits to the maximum amount = spec.EFFECTIVE_BALANCE_INCREMENT * 1 - for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING + 2): + for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH + 2): wc = state.validators[i].withdrawal_credentials pd = prepare_pending_deposit(spec, i, amount, withdrawal_credentials=wc, signed=True) state.pending_deposits.append(pd) @@ -209,10 +209,10 @@ def test_process_pending_deposits_limit_is_reached(spec, state): # deposit_balance_to_consume was reset to 0 assert state.deposit_balance_to_consume == 0 # no deposits above limit were processed - assert state.pending_deposits == new_pending_deposits[spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING:] - for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING): + assert state.pending_deposits == new_pending_deposits[spec.MAX_PENDING_DEPOSITS_PER_EPOCH:] + for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH): assert state.balances[i] == pre_balances[i] + amount - for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING, spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING + 2): + for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH, spec.MAX_PENDING_DEPOSITS_PER_EPOCH + 2): assert state.balances[i] == pre_balances[i]