mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Fix a few things in Capella specs
This commit is contained in:
parent
9ec97badf3
commit
3bc7ff9f80
@ -52,11 +52,11 @@
|
|||||||
|
|
||||||
Capella is a consensus-layer upgrade containing a number of features related
|
Capella is a consensus-layer upgrade containing a number of features related
|
||||||
to validator withdrawals. Including:
|
to validator withdrawals. Including:
|
||||||
* Automatic withdrawals of `withdrawable` validators
|
* Automatic withdrawals of `withdrawable` validators.
|
||||||
* Partial withdrawals sweep for validators with 0x01 withdrawal
|
* Partial withdrawals sweep for validators with 0x01 withdrawal
|
||||||
credentials and balances in exceess of `MAX_EFFECTIVE_BALANCE`
|
credentials and balances in excess of `MAX_EFFECTIVE_BALANCE`.
|
||||||
* Operation to change from `BLS_WITHDRAWAL_PREFIX` to
|
* Operation to change from `BLS_WITHDRAWAL_PREFIX` to
|
||||||
`ETH1_ADDRESS_WITHDRAWAL_PREFIX` versioned withdrawal credentials to enable withdrawals for a validator
|
`ETH1_ADDRESS_WITHDRAWAL_PREFIX` versioned withdrawal credentials to enable withdrawals for a validator.
|
||||||
|
|
||||||
## Custom types
|
## Custom types
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ We define the following Python custom types for type hinting and readability:
|
|||||||
|
|
||||||
### State list lengths
|
### State list lengths
|
||||||
|
|
||||||
| Name | Value | Unit | Duration |
|
| Name | Value | Unit |
|
||||||
| - | - | :-: | :-: |
|
| - | - | :-: | :-: |
|
||||||
| `WITHDRAWAL_QUEUE_LIMIT` | `uint64(2**40)` (= 1,099,511,627,776) | withdrawals enqueued in state |
|
| `WITHDRAWAL_QUEUE_LIMIT` | `uint64(2**40)` (= 1,099,511,627,776) | withdrawals enqueued in state |
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ def withdraw_balance(state: BeaconState, validator_index: ValidatorIndex, amount
|
|||||||
```python
|
```python
|
||||||
def has_eth1_withdrawal_credential(validator: Validator) -> bool:
|
def has_eth1_withdrawal_credential(validator: Validator) -> bool:
|
||||||
"""
|
"""
|
||||||
Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential
|
Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential.
|
||||||
"""
|
"""
|
||||||
return validator.withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
|
return validator.withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
|
||||||
```
|
```
|
||||||
|
@ -58,5 +58,5 @@ class PayloadAttributes(object):
|
|||||||
timestamp: uint64
|
timestamp: uint64
|
||||||
prev_randao: Bytes32
|
prev_randao: Bytes32
|
||||||
suggested_fee_recipient: ExecutionAddress
|
suggested_fee_recipient: ExecutionAddress
|
||||||
withdrawals: Sequence[Withdrawal] # new in Capella
|
withdrawals: Sequence[Withdrawal] # [New in Capella]
|
||||||
```
|
```
|
||||||
|
@ -65,7 +65,7 @@ an irregular state change is made to upgrade to Capella.
|
|||||||
|
|
||||||
The upgrade occurs after the completion of the inner loop of `process_slots` that sets `state.slot` equal to `CAPELLA_FORK_EPOCH * SLOTS_PER_EPOCH`.
|
The upgrade occurs after the completion of the inner loop of `process_slots` that sets `state.slot` equal to `CAPELLA_FORK_EPOCH * SLOTS_PER_EPOCH`.
|
||||||
Care must be taken when transitioning through the fork boundary as implementations will need a modified [state transition function](../phase0/beacon-chain.md#beacon-chain-state-transition-function) that deviates from the Phase 0 document.
|
Care must be taken when transitioning through the fork boundary as implementations will need a modified [state transition function](../phase0/beacon-chain.md#beacon-chain-state-transition-function) that deviates from the Phase 0 document.
|
||||||
In particular, the outer `state_transition` function defined in the Phase 0 document will not expose the precise fork slot to execute the upgrade in the presence of skipped slots at the fork boundary. Instead the logic must be within `process_slots`.
|
In particular, the outer `state_transition` function defined in the Phase 0 document will not expose the precise fork slot to execute the upgrade in the presence of skipped slots at the fork boundary. Instead, the logic must be within `process_slots`.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def upgrade_to_capella(pre: bellatrix.BeaconState) -> BeaconState:
|
def upgrade_to_capella(pre: bellatrix.BeaconState) -> BeaconState:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user