Simplify merge.BeaconState definition
This commit is contained in:
parent
38a455c79f
commit
83453d212e
|
@ -77,40 +77,11 @@ class BeaconBlockBody(phase0.BeaconBlockBody):
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class BeaconState(Container):
|
class BeaconState(phase0.BeaconState):
|
||||||
# Versioning
|
|
||||||
genesis_time: uint64
|
|
||||||
genesis_validators_root: Root
|
|
||||||
slot: Slot
|
|
||||||
fork: Fork
|
|
||||||
# History
|
|
||||||
latest_block_header: BeaconBlockHeader
|
|
||||||
block_roots: Vector[Root, SLOTS_PER_HISTORICAL_ROOT]
|
|
||||||
state_roots: Vector[Root, SLOTS_PER_HISTORICAL_ROOT]
|
|
||||||
historical_roots: List[Root, HISTORICAL_ROOTS_LIMIT]
|
|
||||||
# Eth1
|
|
||||||
eth1_data: Eth1Data
|
|
||||||
eth1_data_votes: List[Eth1Data, EPOCHS_PER_ETH1_VOTING_PERIOD * SLOTS_PER_EPOCH]
|
|
||||||
eth1_deposit_index: uint64
|
|
||||||
# [Added in Merge] hash of the root of application state
|
# [Added in Merge] hash of the root of application state
|
||||||
application_state_root: Bytes32
|
application_state_root: Bytes32
|
||||||
# [Added in Merge] hash of recent application block
|
# [Added in Merge] hash of recent application block
|
||||||
application_block_hash: Bytes32
|
application_block_hash: Bytes32
|
||||||
# Registry
|
|
||||||
validators: List[Validator, VALIDATOR_REGISTRY_LIMIT]
|
|
||||||
balances: List[Gwei, VALIDATOR_REGISTRY_LIMIT]
|
|
||||||
# Randomness
|
|
||||||
randao_mixes: Vector[Bytes32, EPOCHS_PER_HISTORICAL_VECTOR]
|
|
||||||
# Slashings
|
|
||||||
slashings: Vector[Gwei, EPOCHS_PER_SLASHINGS_VECTOR] # Per-epoch sums of slashed effective balances
|
|
||||||
# Attestations
|
|
||||||
previous_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH]
|
|
||||||
current_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH]
|
|
||||||
# Finality
|
|
||||||
justification_bits: Bitvector[JUSTIFICATION_BITS_LENGTH] # Bit set for every recent justified epoch
|
|
||||||
previous_justified_checkpoint: Checkpoint # Previous epoch snapshot
|
|
||||||
current_justified_checkpoint: Checkpoint
|
|
||||||
finalized_checkpoint: Checkpoint
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### New containers
|
### New containers
|
||||||
|
|
Loading…
Reference in New Issue