Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply suggestions from reviews
Browse files Browse the repository at this point in the history
Co-authored-by: Pop Chunhapanya <haxx.pop@gmail.com>
jtraglia and ppopth authored Jan 21, 2025
1 parent 14a5db5 commit c8c05ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@
- [New `get_activation_exit_churn_limit`](#new-get_activation_exit_churn_limit)
- [New `get_consolidation_churn_limit`](#new-get_consolidation_churn_limit)
- [New `get_pending_balance_to_withdraw`](#new-get_pending_balance_to_withdraw)
- [New `new-get_pending_deposits_for_validator`](#new-new-get_pending_deposits_for_validator)
- [New `get_pending_deposits_for_validator`](#new-get_pending_deposits_for_validator)
- [Modified `get_attesting_indices`](#modified-get_attesting_indices)
- [Modified `get_next_sync_committee_indices`](#modified-get_next_sync_committee_indices)
- [Beacon state mutators](#beacon-state-mutators)
@@ -594,7 +594,7 @@ def get_pending_balance_to_withdraw(state: BeaconState, validator_index: Validat
)
```

#### New `new-get_pending_deposits_for_validator`
#### New `get_pending_deposits_for_validator`

```python
def get_pending_deposits_for_validator(state: BeaconState, pubkey: BLSPubkey) -> Gwei:
@@ -604,7 +604,6 @@ def get_pending_deposits_for_validator(state: BeaconState, pubkey: BLSPubkey) ->
)
```


#### Modified `get_attesting_indices`

*Note*: The function `get_attesting_indices` is modified to support EIP7549.
@@ -1507,6 +1506,7 @@ def process_voluntary_exit(state: BeaconState, signed_voluntary_exit: SignedVolu
assert get_current_epoch(state) >= validator.activation_epoch + SHARD_COMMITTEE_PERIOD
# Only exit validator if it has no pending withdrawals in the queue
assert get_pending_balance_to_withdraw(state, voluntary_exit.validator_index) == 0 # [New in Electra:EIP7251]
# Only exit validator if it has no pending deposits in the queue
assert get_pending_deposits_for_validator(state, voluntary_exit.pubkey) == 0 # [New in Electra:EIP7251]
# Verify signature
domain = compute_domain(DOMAIN_VOLUNTARY_EXIT, CAPELLA_FORK_VERSION, state.genesis_validators_root)

0 comments on commit c8c05ca

Please sign in to comment.