mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Merge pull request #3002 from jtraglia/fix-a-few-things
Fix a few things in Capella specs
This commit is contained in:
commit
b72afffe26
@ -52,11 +52,11 @@
|
||||
|
||||
Capella is a consensus-layer upgrade containing a number of features related
|
||||
to validator withdrawals. Including:
|
||||
* Automatic withdrawals of `withdrawable` validators
|
||||
* Automatic withdrawals of `withdrawable` validators.
|
||||
* 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
|
||||
`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
|
||||
|
||||
@ -64,7 +64,7 @@ We define the following Python custom types for type hinting and readability:
|
||||
|
||||
| Name | SSZ equivalent | Description |
|
||||
| - | - | - |
|
||||
| `WithdrawalIndex` | `uint64` | an index of a `Withdrawal`|
|
||||
| `WithdrawalIndex` | `uint64` | an index of a `Withdrawal` |
|
||||
|
||||
## Constants
|
||||
|
||||
@ -84,9 +84,9 @@ We define the following Python custom types for type hinting and readability:
|
||||
|
||||
### State list lengths
|
||||
|
||||
| Name | Value | Unit | Duration |
|
||||
| - | - | :-: | :-: |
|
||||
| `WITHDRAWAL_QUEUE_LIMIT` | `uint64(2**40)` (= 1,099,511,627,776) | withdrawals enqueued in state|
|
||||
| Name | Value | Unit |
|
||||
| - | - | :-: |
|
||||
| `WITHDRAWAL_QUEUE_LIMIT` | `uint64(2**40)` (= 1,099,511,627,776) | withdrawals enqueued in state |
|
||||
|
||||
### Max operations per block
|
||||
|
||||
@ -289,7 +289,7 @@ def withdraw_balance(state: BeaconState, validator_index: ValidatorIndex, amount
|
||||
```python
|
||||
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
|
||||
```
|
||||
|
@ -58,5 +58,5 @@ class PayloadAttributes(object):
|
||||
timestamp: uint64
|
||||
prev_randao: Bytes32
|
||||
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`.
|
||||
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
|
||||
def upgrade_to_capella(pre: bellatrix.BeaconState) -> BeaconState:
|
||||
|
Loading…
x
Reference in New Issue
Block a user