diff --git a/beacon_chain/beacon_chain_db_immutable.nim b/beacon_chain/beacon_chain_db_immutable.nim index 43c03a438..e6a7e6e01 100644 --- a/beacon_chain/beacon_chain_db_immutable.nim +++ b/beacon_chain/beacon_chain_db_immutable.nim @@ -16,8 +16,9 @@ from ./spec/datatypes/capella import from ./spec/datatypes/deneb import ExecutionPayloadHeader type - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/phase0/beacon-chain.md#beaconstate - # Memory-representation-equivalent to a phase0 BeaconState for in-place SSZ reading and writing + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconstate + # Memory-representation-equivalent to a phase0 BeaconState for in-place SSZ + # reading and writing Phase0BeaconStateNoImmutableValidators* = object # Versioning genesis_time*: uint64 @@ -26,11 +27,11 @@ type fork*: Fork # History - latest_block_header*: BeaconBlockHeader ##\ - ## `latest_block_header.state_root == ZERO_HASH` temporarily + latest_block_header*: BeaconBlockHeader + ## `latest_block_header.state_root == ZERO_HASH` temporarily - block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] ##\ - ## Needed to process attestations, older to newer + block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] + ## Needed to process attestations, older to newer state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] @@ -49,8 +50,8 @@ type randao_mixes*: HashArray[Limit EPOCHS_PER_HISTORICAL_VECTOR, Eth2Digest] # Slashings - slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] ##\ - ## Per-epoch sums of slashed effective balances + slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] + ## Per-epoch sums of slashed effective balances # Attestations previous_epoch_attestations*: @@ -60,14 +61,15 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch - previous_justified_checkpoint*: Checkpoint ##\ - ## Previous epoch snapshot + previous_justified_checkpoint*: Checkpoint + ## Previous epoch snapshot current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/altair/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/beacon-chain.md#beaconstate # Memory-representation-equivalent to an Altair BeaconState for in-place SSZ # reading and writing AltairBeaconStateNoImmutableValidators* = object @@ -78,11 +80,11 @@ type fork*: Fork # History - latest_block_header*: BeaconBlockHeader ##\ - ## `latest_block_header.state_root == ZERO_HASH` temporarily + latest_block_header*: BeaconBlockHeader + ## `latest_block_header.state_root == ZERO_HASH` temporarily - block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] ##\ - ## Needed to process attestations, older to newer + block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] + ## Needed to process attestations, older to newer state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] @@ -101,19 +103,20 @@ type randao_mixes*: HashArray[Limit EPOCHS_PER_HISTORICAL_VECTOR, Eth2Digest] # Slashings - slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] ##\ - ## Per-epoch sums of slashed effective balances + slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] + ## Per-epoch sums of slashed effective balances # Participation previous_epoch_participation*: EpochParticipationFlags + ## [Modified in Altair] current_epoch_participation*: EpochParticipationFlags + ## [Modified in Altair] # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch - previous_justified_checkpoint*: Checkpoint ##\ - ## Previous epoch snapshot - + previous_justified_checkpoint*: Checkpoint current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint @@ -135,11 +138,11 @@ type fork*: Fork # History - latest_block_header*: BeaconBlockHeader ##\ - ## `latest_block_header.state_root == ZERO_HASH` temporarily + latest_block_header*: BeaconBlockHeader + ## `latest_block_header.state_root == ZERO_HASH` temporarily - block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] ##\ - ## Needed to process attestations, older to newer + block_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] + ## Needed to process attestations, older to newer state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] @@ -158,8 +161,8 @@ type randao_mixes*: HashArray[Limit EPOCHS_PER_HISTORICAL_VECTOR, Eth2Digest] # Slashings - slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] ##\ - ## Per-epoch sums of slashed effective balances + slashings*: HashArray[Limit EPOCHS_PER_SLASHINGS_VECTOR, uint64] + ## Per-epoch sums of slashed effective balances # Participation previous_epoch_participation*: EpochParticipationFlags @@ -167,10 +170,9 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch - previous_justified_checkpoint*: Checkpoint ##\ - ## Previous epoch snapshot - + previous_justified_checkpoint*: Checkpoint current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint @@ -184,7 +186,7 @@ type # Execution latest_execution_payload_header*: bellatrix.ExecutionPayloadHeader # [New in Bellatrix] - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#beaconstate # with indirect changes via ExecutionPayload # Memory-representation-equivalent to a Capella BeaconState for in-place SSZ # reading and writing @@ -204,6 +206,7 @@ type state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] + ## Frozen in Capella, replaced by historical_summaries # Eth1 eth1_data*: Eth1Data @@ -229,10 +232,9 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint @@ -245,9 +247,10 @@ type # Execution latest_execution_payload_header*: capella.ExecutionPayloadHeader + ## [Modified in Capella] # Withdrawals - next_withdrawal_index*: WithdrawalIndex # [New in Capella] + next_withdrawal_index*: WithdrawalIndex # [New in Capella] next_withdrawal_validator_index*: uint64 # [New in Capella] # Deep history valid from Capella onwards @@ -275,6 +278,7 @@ type state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] + ## Frozen in Capella, replaced by historical_summaries # Eth1 eth1_data*: Eth1Data @@ -300,10 +304,9 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint diff --git a/beacon_chain/spec/datatypes/altair.nim b/beacon_chain/spec/datatypes/altair.nim index db6b11099..89b084db6 100644 --- a/beacon_chain/spec/datatypes/altair.nim +++ b/beacon_chain/spec/datatypes/altair.nim @@ -290,14 +290,15 @@ type # Participation previous_epoch_participation*: EpochParticipationFlags + ## [Modified in Altair] current_epoch_participation*: EpochParticipationFlags + ## [Modified in Altair] # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint diff --git a/beacon_chain/spec/datatypes/bellatrix.nim b/beacon_chain/spec/datatypes/bellatrix.nim index a1d12d4d9..a78bea094 100644 --- a/beacon_chain/spec/datatypes/bellatrix.nim +++ b/beacon_chain/spec/datatypes/bellatrix.nim @@ -137,19 +137,18 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint # Inactivity - inactivity_scores*: InactivityScores # [New in Altair] + inactivity_scores*: InactivityScores # Light client sync committees - current_sync_committee*: SyncCommittee # [New in Altair] - next_sync_committee*: SyncCommittee # [New in Altair] + current_sync_committee*: SyncCommittee + next_sync_committee*: SyncCommittee # Execution latest_execution_payload_header*: ExecutionPayloadHeader # [New in Bellatrix] diff --git a/beacon_chain/spec/datatypes/capella.nim b/beacon_chain/spec/datatypes/capella.nim index 9a676addd..0ec35528c 100644 --- a/beacon_chain/spec/datatypes/capella.nim +++ b/beacon_chain/spec/datatypes/capella.nim @@ -211,7 +211,7 @@ type ## (used to compute safety threshold) current_max_active_participants*: uint64 - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/capella/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#beaconstate BeaconState* = object # Versioning genesis_time*: uint64 @@ -227,8 +227,8 @@ type ## Needed to process attestations, older to newer state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] - historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] # \ - # Frozen in Capella, replaced by historical_summaries + historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] + ## Frozen in Capella, replaced by historical_summaries # Eth1 eth1_data*: Eth1Data @@ -253,10 +253,9 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint @@ -269,9 +268,10 @@ type # Execution latest_execution_payload_header*: ExecutionPayloadHeader + ## [Modified in Capella] # Withdrawals - next_withdrawal_index*: WithdrawalIndex # [New in Capella] + next_withdrawal_index*: WithdrawalIndex # [New in Capella] next_withdrawal_validator_index*: uint64 # [New in Capella] # Deep history valid from Capella onwards diff --git a/beacon_chain/spec/datatypes/deneb.nim b/beacon_chain/spec/datatypes/deneb.nim index 66701d83a..f68a1385a 100644 --- a/beacon_chain/spec/datatypes/deneb.nim +++ b/beacon_chain/spec/datatypes/deneb.nim @@ -231,7 +231,7 @@ type ## (used to compute safety threshold) current_max_active_participants*: uint64 - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#beaconstate # changes indirectly via ExecutionPayloadHeader BeaconState* = object # Versioning @@ -249,6 +249,7 @@ type state_roots*: HashArray[Limit SLOTS_PER_HISTORICAL_ROOT, Eth2Digest] historical_roots*: HashList[Eth2Digest, Limit HISTORICAL_ROOTS_LIMIT] + ## Frozen in Capella, replaced by historical_summaries # Eth1 eth1_data*: Eth1Data @@ -273,10 +274,9 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint - ## Previous epoch snapshot - current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint diff --git a/beacon_chain/spec/datatypes/phase0.nim b/beacon_chain/spec/datatypes/phase0.nim index 783b7bdd4..cf8d471bd 100644 --- a/beacon_chain/spec/datatypes/phase0.nim +++ b/beacon_chain/spec/datatypes/phase0.nim @@ -22,7 +22,7 @@ import export base type - # https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.5/specs/phase0/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconstate BeaconState* = object # Versioning genesis_time*: uint64 @@ -65,6 +65,7 @@ type # Finality justification_bits*: JustificationBits + ## Bit set for every recent justified epoch previous_justified_checkpoint*: Checkpoint ## Previous epoch snapshot