diff --git a/specs/_features/eip7251/beacon-chain.md b/specs/_features/eip7251/beacon-chain.md index ef61e3d3a9..992951e706 100644 --- a/specs/_features/eip7251/beacon-chain.md +++ b/specs/_features/eip7251/beacon-chain.md @@ -75,6 +75,7 @@ - [New `process_execution_layer_withdraw_request`](#new-process_execution_layer_withdraw_request) - [Consolidations](#consolidations) - [New `process_consolidation`](#new-process_consolidation) + - [New `is_consolidation_queue_full`](#new-is_consolidation_queue_full) - [Voluntary exits](#voluntary-exits) - [Updated `process_voluntary_exit`](#updated-process_voluntary_exit) - [Testing](#testing) @@ -996,7 +997,7 @@ def process_execution_layer_withdraw_request( ```python def process_consolidation(state: BeaconState, signed_consolidation: SignedConsolidation) -> None: # If the pending consolidations queue is full, no consolidations are allowed in the block - assert len(state.pending_consolidations) < PENDING_CONSOLIDATIONS_LIMIT + assert not is_consolidation_queue_full(state) # If there is too little available consolidation churn limit, no consolidations are allowed in the block assert get_consolidation_churn_limit(state) > MIN_ACTIVATION_BALANCE consolidation = signed_consolidation.message @@ -1039,6 +1040,14 @@ def process_consolidation(state: BeaconState, signed_consolidation: SignedConsol )) ``` +###### New `is_consolidation_queue_full` + +```python +def is_consolidation_queue_full(state: BeaconState) -> bool: + epoch = get_current_epoch(state) + MIN_VALIDATOR_WITHDRAWABILITY_DELAY + 1 + MAX_SEED_LOOKAHEAD + return state.earliest_consolidation_epoch > epoch +``` + ##### Voluntary exits ###### Updated `process_voluntary_exit`