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

EIP-7251: Stricter bound for consolidation queue #3661

Closed
wants to merge 3 commits into from
Closed
Changes from 2 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
11 changes: 10 additions & 1 deletion specs/_features/eip7251/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 is_consolidation_queue_full(state)
dapplion marked this conversation as resolved.
Show resolved Hide resolved
# 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
Expand Down Expand Up @@ -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
dapplion marked this conversation as resolved.
Show resolved Hide resolved
```

##### Voluntary exits

###### Updated `process_voluntary_exit`
Expand Down
Loading