diff --git a/eth2/state_processing/src/common/initiate_validator_exit.rs b/eth2/state_processing/src/common/initiate_validator_exit.rs index 24548080a1..f8d342863f 100644 --- a/eth2/state_processing/src/common/initiate_validator_exit.rs +++ b/eth2/state_processing/src/common/initiate_validator_exit.rs @@ -3,7 +3,7 @@ use types::{BeaconStateError as Error, *}; /// Initiate the exit of the validator of the given `index`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn initiate_validator_exit( state: &mut BeaconState, index: usize, diff --git a/eth2/state_processing/src/common/slash_validator.rs b/eth2/state_processing/src/common/slash_validator.rs index 369c8ce35d..fde3150cca 100644 --- a/eth2/state_processing/src/common/slash_validator.rs +++ b/eth2/state_processing/src/common/slash_validator.rs @@ -4,7 +4,7 @@ use types::{BeaconStateError as Error, *}; /// Slash the validator with index ``index``. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn slash_validator( state: &mut BeaconState, slashed_index: usize, diff --git a/eth2/state_processing/src/genesis.rs b/eth2/state_processing/src/genesis.rs index f1cb59fe3a..f091bc2ea1 100644 --- a/eth2/state_processing/src/genesis.rs +++ b/eth2/state_processing/src/genesis.rs @@ -5,7 +5,7 @@ use types::*; /// Initialize a `BeaconState` from genesis data. /// -/// Spec v0.9.0 +/// Spec v0.9.1 // TODO: this is quite inefficient and we probably want to rethink how we do this pub fn initialize_beacon_state_from_eth1( eth1_block_hash: Hash256, @@ -58,7 +58,7 @@ pub fn initialize_beacon_state_from_eth1( /// Determine whether a candidate genesis state is suitable for starting the chain. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn is_valid_genesis_state(state: &BeaconState, spec: &ChainSpec) -> bool { state.genesis_time >= spec.min_genesis_time && state.get_active_validator_indices(T::genesis_epoch()).len() as u64 diff --git a/eth2/state_processing/src/per_block_processing.rs b/eth2/state_processing/src/per_block_processing.rs index 83d8fc3c83..a4c0ee3c30 100644 --- a/eth2/state_processing/src/per_block_processing.rs +++ b/eth2/state_processing/src/per_block_processing.rs @@ -68,7 +68,7 @@ impl VerifySignatures { /// signature. If it is `None` the signed root is calculated here. This parameter only exists to /// avoid re-calculating the root when it is already known. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn per_block_processing( mut state: &mut BeaconState, block: &BeaconBlock, @@ -128,7 +128,7 @@ pub fn per_block_processing( /// Processes the block header. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_block_header( state: &mut BeaconState, block: &BeaconBlock, @@ -167,7 +167,7 @@ pub fn process_block_header( /// Verifies the signature of a block. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_block_signature( state: &BeaconState, block: &BeaconBlock, @@ -185,7 +185,7 @@ pub fn verify_block_signature( /// Verifies the `randao_reveal` against the block's proposer pubkey and updates /// `state.latest_randao_mixes`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_randao( state: &mut BeaconState, block: &BeaconBlock, @@ -208,7 +208,7 @@ pub fn process_randao( /// Update the `state.eth1_data_votes` based upon the `eth1_data` provided. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_eth1_data( state: &mut BeaconState, eth1_data: &Eth1Data, @@ -233,7 +233,7 @@ pub fn process_eth1_data( /// Returns `Ok(())` if the validation and state updates completed successfully, otherwise returns /// an `Err` describing the invalid object or cause of failure. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_proposer_slashings( state: &mut BeaconState, proposer_slashings: &[ProposerSlashing], @@ -262,7 +262,7 @@ pub fn process_proposer_slashings( /// Returns `Ok(())` if the validation and state updates completed successfully, otherwise returns /// an `Err` describing the invalid object or cause of failure. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_attester_slashings( state: &mut BeaconState, attester_slashings: &[AttesterSlashing], @@ -316,7 +316,7 @@ pub fn process_attester_slashings( /// Returns `Ok(())` if the validation and state updates completed successfully, otherwise returns /// an `Err` describing the invalid object or cause of failure. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_attestations( state: &mut BeaconState, attestations: &[Attestation], @@ -362,7 +362,7 @@ pub fn process_attestations( /// Returns `Ok(())` if the validation and state updates completed successfully, otherwise returns /// an `Err` describing the invalid object or cause of failure. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_deposits( state: &mut BeaconState, deposits: &[Deposit], @@ -399,7 +399,7 @@ pub fn process_deposits( /// Process a single deposit, optionally verifying its merkle proof. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_deposit( state: &mut BeaconState, deposit: &Deposit, @@ -465,7 +465,7 @@ pub fn process_deposit( /// Returns `Ok(())` if the validation and state updates completed successfully, otherwise returns /// an `Err` describing the invalid object or cause of failure. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_exits( state: &mut BeaconState, voluntary_exits: &[VoluntaryExit], diff --git a/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs b/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs index 098ce86866..f115cda595 100644 --- a/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs +++ b/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs @@ -11,7 +11,7 @@ fn error(reason: Invalid) -> BlockOperationError { /// Verify an `IndexedAttestation`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn is_valid_indexed_attestation( state: &BeaconState, indexed_attestation: &IndexedAttestation, diff --git a/eth2/state_processing/src/per_block_processing/verify_attestation.rs b/eth2/state_processing/src/per_block_processing/verify_attestation.rs index be5785af5d..7d42a4ca35 100644 --- a/eth2/state_processing/src/per_block_processing/verify_attestation.rs +++ b/eth2/state_processing/src/per_block_processing/verify_attestation.rs @@ -15,7 +15,7 @@ fn error(reason: Invalid) -> BlockOperationError { /// /// Optionally verifies the aggregate signature, depending on `verify_signatures`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_attestation_for_block_inclusion( state: &BeaconState, attestation: &Attestation, @@ -49,7 +49,7 @@ pub fn verify_attestation_for_block_inclusion( /// Returns a descriptive `Err` if the attestation is malformed or does not accurately reflect the /// prior blocks in `state`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_attestation_for_state( state: &BeaconState, attestation: &Attestation, @@ -74,7 +74,7 @@ pub fn verify_attestation_for_state( /// Check target epoch and source checkpoint. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn verify_casper_ffg_vote( attestation: &Attestation, state: &BeaconState, diff --git a/eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs b/eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs index ec9baee40c..cf966935f2 100644 --- a/eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs +++ b/eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs @@ -15,7 +15,7 @@ fn error(reason: Invalid) -> BlockOperationError { /// /// Returns `Ok(())` if the `AttesterSlashing` is valid, otherwise indicates the reason for invalidity. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_attester_slashing( state: &BeaconState, attester_slashing: &AttesterSlashing, @@ -47,7 +47,7 @@ pub fn verify_attester_slashing( /// /// Returns Ok(indices) if `indices.len() > 0`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn get_slashable_indices( state: &BeaconState, attester_slashing: &AttesterSlashing, diff --git a/eth2/state_processing/src/per_block_processing/verify_deposit.rs b/eth2/state_processing/src/per_block_processing/verify_deposit.rs index aacb9e000e..3663c11589 100644 --- a/eth2/state_processing/src/per_block_processing/verify_deposit.rs +++ b/eth2/state_processing/src/per_block_processing/verify_deposit.rs @@ -14,7 +14,7 @@ fn error(reason: DepositInvalid) -> BlockOperationError { /// Verify `Deposit.pubkey` signed `Deposit.signature`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_deposit_signature( state: &BeaconState, deposit: &Deposit, @@ -50,7 +50,7 @@ pub fn get_existing_validator_index( /// The deposit index is provided as a parameter so we can check proofs /// before they're due to be processed, and in parallel. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_deposit_merkle_proof( state: &BeaconState, deposit: &Deposit, diff --git a/eth2/state_processing/src/per_block_processing/verify_exit.rs b/eth2/state_processing/src/per_block_processing/verify_exit.rs index 266e8c8aca..385e506102 100644 --- a/eth2/state_processing/src/per_block_processing/verify_exit.rs +++ b/eth2/state_processing/src/per_block_processing/verify_exit.rs @@ -13,7 +13,7 @@ fn error(reason: ExitInvalid) -> BlockOperationError { /// /// Returns `Ok(())` if the `Exit` is valid, otherwise indicates the reason for invalidity. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_exit( state: &BeaconState, exit: &VoluntaryExit, @@ -25,7 +25,7 @@ pub fn verify_exit( /// Like `verify_exit` but doesn't run checks which may become true in future states. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_exit_time_independent_only( state: &BeaconState, exit: &VoluntaryExit, @@ -37,7 +37,7 @@ pub fn verify_exit_time_independent_only( /// Parametric version of `verify_exit` that skips some checks if `time_independent_only` is true. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn verify_exit_parametric( state: &BeaconState, exit: &VoluntaryExit, diff --git a/eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs b/eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs index adeeb65858..9683d8762a 100644 --- a/eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs +++ b/eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs @@ -14,7 +14,7 @@ fn error(reason: Invalid) -> BlockOperationError { /// /// Returns `Ok(())` if the `ProposerSlashing` is valid, otherwise indicates the reason for invalidity. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn verify_proposer_slashing( proposer_slashing: &ProposerSlashing, state: &BeaconState, diff --git a/eth2/state_processing/src/per_epoch_processing.rs b/eth2/state_processing/src/per_epoch_processing.rs index ba479b4d3b..080767203c 100644 --- a/eth2/state_processing/src/per_epoch_processing.rs +++ b/eth2/state_processing/src/per_epoch_processing.rs @@ -19,7 +19,7 @@ pub use registry_updates::process_registry_updates; /// Mutates the given `BeaconState`, returning early if an error is encountered. If an error is /// returned, a state might be "half-processed" and therefore in an invalid state. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn per_epoch_processing( state: &mut BeaconState, spec: &ChainSpec, @@ -66,7 +66,7 @@ pub fn per_epoch_processing( /// - `finalized_epoch` /// - `finalized_root` /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[allow(clippy::if_same_then_else)] // For readability and consistency with spec. pub fn process_justification_and_finalization( state: &mut BeaconState, @@ -134,7 +134,7 @@ pub fn process_justification_and_finalization( /// Finish up an epoch update. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_final_updates( state: &mut BeaconState, spec: &ChainSpec, diff --git a/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs b/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs index 26efb5bd60..f0f701160c 100644 --- a/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs +++ b/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs @@ -32,7 +32,7 @@ impl std::ops::AddAssign for Delta { /// Apply attester and proposer rewards. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_rewards_and_penalties( state: &mut BeaconState, validator_statuses: &mut ValidatorStatuses, @@ -66,7 +66,7 @@ pub fn process_rewards_and_penalties( /// For each attesting validator, reward the proposer who was first to include their attestation. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn get_proposer_deltas( deltas: &mut Vec, state: &BeaconState, @@ -99,7 +99,7 @@ fn get_proposer_deltas( /// Apply rewards for participation in attestations during the previous epoch. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn get_attestation_deltas( deltas: &mut Vec, state: &BeaconState, @@ -132,7 +132,7 @@ fn get_attestation_deltas( /// Determine the delta for a single validator, sans proposer rewards. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn get_attestation_delta( validator: &ValidatorStatus, total_balances: &TotalBalances, @@ -214,7 +214,7 @@ fn get_attestation_delta( /// Returns the base reward for some validator. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn get_base_reward( state: &BeaconState, index: usize, diff --git a/eth2/state_processing/src/per_epoch_processing/process_slashings.rs b/eth2/state_processing/src/per_epoch_processing/process_slashings.rs index e6d33d827d..b96add8e20 100644 --- a/eth2/state_processing/src/per_epoch_processing/process_slashings.rs +++ b/eth2/state_processing/src/per_epoch_processing/process_slashings.rs @@ -2,7 +2,7 @@ use types::{BeaconStateError as Error, *}; /// Process slashings. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_slashings( state: &mut BeaconState, total_balance: u64, diff --git a/eth2/state_processing/src/per_epoch_processing/registry_updates.rs b/eth2/state_processing/src/per_epoch_processing/registry_updates.rs index 1c258180dd..ab3d529799 100644 --- a/eth2/state_processing/src/per_epoch_processing/registry_updates.rs +++ b/eth2/state_processing/src/per_epoch_processing/registry_updates.rs @@ -5,7 +5,7 @@ use types::*; /// Performs a validator registry update, if required. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn process_registry_updates( state: &mut BeaconState, spec: &ChainSpec, diff --git a/eth2/state_processing/src/per_epoch_processing/validator_statuses.rs b/eth2/state_processing/src/per_epoch_processing/validator_statuses.rs index c0e40eb8ba..285fc94cdd 100644 --- a/eth2/state_processing/src/per_epoch_processing/validator_statuses.rs +++ b/eth2/state_processing/src/per_epoch_processing/validator_statuses.rs @@ -144,7 +144,7 @@ impl ValidatorStatuses { /// - Active validators /// - Total balances for the current and previous epochs. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn new( state: &BeaconState, spec: &ChainSpec, @@ -184,7 +184,7 @@ impl ValidatorStatuses { /// Process some attestations from the given `state` updating the `statuses` and /// `total_balances` fields. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn process_attestations( &mut self, state: &BeaconState, @@ -263,7 +263,7 @@ impl ValidatorStatuses { /// Returns `true` if the attestation's FFG target is equal to the hash of the `state`'s first /// beacon block in the given `epoch`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn target_matches_epoch_start_block( a: &PendingAttestation, state: &BeaconState, @@ -278,7 +278,7 @@ fn target_matches_epoch_start_block( /// Returns `true` if a `PendingAttestation` and `BeaconState` share the same beacon block hash for /// the current slot of the `PendingAttestation`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn has_common_beacon_block_root( a: &PendingAttestation, state: &BeaconState, diff --git a/eth2/state_processing/src/per_slot_processing.rs b/eth2/state_processing/src/per_slot_processing.rs index 0fa1dc163e..0b8a906c15 100644 --- a/eth2/state_processing/src/per_slot_processing.rs +++ b/eth2/state_processing/src/per_slot_processing.rs @@ -9,7 +9,7 @@ pub enum Error { /// Advances a state forward by one slot, performing per-epoch processing if required. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn per_slot_processing( state: &mut BeaconState, spec: &ChainSpec, diff --git a/eth2/types/src/attestation_data.rs b/eth2/types/src/attestation_data.rs index ad0ba608b8..e768950f05 100644 --- a/eth2/types/src/attestation_data.rs +++ b/eth2/types/src/attestation_data.rs @@ -8,7 +8,7 @@ use tree_hash_derive::TreeHash; /// The data upon which an attestation is based. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash, Encode, Decode, TreeHash, TestRandom, )] diff --git a/eth2/types/src/attester_slashing.rs b/eth2/types/src/attester_slashing.rs index 5a040fae88..7284a453d3 100644 --- a/eth2/types/src/attester_slashing.rs +++ b/eth2/types/src/attester_slashing.rs @@ -7,7 +7,7 @@ use tree_hash_derive::TreeHash; /// Two conflicting attestations. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] #[serde(bound = "T: EthSpec")] pub struct AttesterSlashing { diff --git a/eth2/types/src/beacon_block.rs b/eth2/types/src/beacon_block.rs index f4b1233000..4c8fb0110d 100644 --- a/eth2/types/src/beacon_block.rs +++ b/eth2/types/src/beacon_block.rs @@ -10,7 +10,7 @@ use tree_hash_derive::{SignedRoot, TreeHash}; /// A block of the `BeaconChain`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq, @@ -36,7 +36,7 @@ pub struct BeaconBlock { impl BeaconBlock { /// Returns an empty block to be used during genesis. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn empty(spec: &ChainSpec) -> Self { BeaconBlock { slot: spec.genesis_slot, @@ -67,7 +67,7 @@ impl BeaconBlock { /// Returns the `signed_root` of the block. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn canonical_root(&self) -> Hash256 { Hash256::from_slice(&self.signed_root()[..]) } @@ -79,7 +79,7 @@ impl BeaconBlock { /// /// Note: performs a full tree-hash of `self.body`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn block_header(&self) -> BeaconBlockHeader { BeaconBlockHeader { slot: self.slot, @@ -92,7 +92,7 @@ impl BeaconBlock { /// Returns a "temporary" header, where the `state_root` is `Hash256::zero()`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn temporary_block_header(&self) -> BeaconBlockHeader { BeaconBlockHeader { state_root: Hash256::zero(), diff --git a/eth2/types/src/beacon_block_body.rs b/eth2/types/src/beacon_block_body.rs index cacff446d5..6319b14603 100644 --- a/eth2/types/src/beacon_block_body.rs +++ b/eth2/types/src/beacon_block_body.rs @@ -10,7 +10,7 @@ use tree_hash_derive::TreeHash; /// The body of a `BeaconChain` block, containing operations. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] #[serde(bound = "T: EthSpec")] pub struct BeaconBlockBody { diff --git a/eth2/types/src/beacon_block_header.rs b/eth2/types/src/beacon_block_header.rs index 453184b842..0b61bed500 100644 --- a/eth2/types/src/beacon_block_header.rs +++ b/eth2/types/src/beacon_block_header.rs @@ -10,7 +10,7 @@ use tree_hash_derive::{SignedRoot, TreeHash}; /// A header of a `BeaconBlock`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq, @@ -35,14 +35,14 @@ pub struct BeaconBlockHeader { impl BeaconBlockHeader { /// Returns the `tree_hash_root` of the header. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn canonical_root(&self) -> Hash256 { Hash256::from_slice(&self.signed_root()[..]) } /// Given a `body`, consumes `self` and returns a complete `BeaconBlock`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn into_block(self, body: BeaconBlockBody) -> BeaconBlock { BeaconBlock { slot: self.slot, diff --git a/eth2/types/src/beacon_state.rs b/eth2/types/src/beacon_state.rs index 95c479e9be..2dd35bcc9c 100644 --- a/eth2/types/src/beacon_state.rs +++ b/eth2/types/src/beacon_state.rs @@ -99,7 +99,7 @@ impl BeaconTreeHashCache { /// The state of the `BeaconChain` at some slot. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq, @@ -199,7 +199,7 @@ impl BeaconState { /// /// Not a complete genesis state, see `initialize_beacon_state_from_eth1`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn new(genesis_time: u64, eth1_data: Eth1Data, spec: &ChainSpec) -> Self { BeaconState { // Versioning @@ -252,7 +252,7 @@ impl BeaconState { /// Returns the `tree_hash_root` of the state. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn canonical_root(&self) -> Hash256 { Hash256::from_slice(&self.tree_hash_root()[..]) } @@ -281,7 +281,7 @@ impl BeaconState { /// The epoch corresponding to `self.slot`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn current_epoch(&self) -> Epoch { self.slot.epoch(T::slots_per_epoch()) } @@ -290,7 +290,7 @@ impl BeaconState { /// /// If the current epoch is the genesis epoch, the genesis_epoch is returned. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn previous_epoch(&self) -> Epoch { let current_epoch = self.current_epoch(); if current_epoch > T::genesis_epoch() { @@ -302,7 +302,7 @@ impl BeaconState { /// The epoch following `self.current_epoch()`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn next_epoch(&self) -> Epoch { self.current_epoch() + 1 } @@ -339,7 +339,7 @@ impl BeaconState { /// /// Does not utilize the cache, performs a full iteration over the validator registry. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_active_validator_indices(&self, epoch: Epoch) -> Vec { get_active_validator_indices(&self.validators, epoch) } @@ -357,7 +357,7 @@ impl BeaconState { /// Get the Beacon committee at the given slot and index. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_beacon_committee( &self, slot: Slot, @@ -382,7 +382,7 @@ impl BeaconState { /// Compute the proposer (not necessarily for the Beacon chain) from a list of indices. /// - /// Spec v0.9.0 + /// Spec v0.9.1 // NOTE: be sure to test this bad boy. pub fn compute_proposer_index( &self, @@ -421,7 +421,7 @@ impl BeaconState { /// Returns the beacon proposer index for the `slot` in the given `relative_epoch`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_beacon_proposer_index(&self, slot: Slot, spec: &ChainSpec) -> Result { let epoch = slot.epoch(T::slots_per_epoch()); let seed = self.get_beacon_proposer_seed(slot, spec)?; @@ -432,7 +432,7 @@ impl BeaconState { /// Compute the seed to use for the beacon proposer selection at the given `slot`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_beacon_proposer_seed(&self, slot: Slot, spec: &ChainSpec) -> Result, Error> { let epoch = slot.epoch(T::slots_per_epoch()); let mut preimage = self @@ -445,7 +445,7 @@ impl BeaconState { /// Safely obtains the index for latest block roots, given some `slot`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_latest_block_roots_index(&self, slot: Slot) -> Result { if (slot < self.slot) && (self.slot <= slot + self.block_roots.len() as u64) { Ok(slot.as_usize() % self.block_roots.len()) @@ -456,7 +456,7 @@ impl BeaconState { /// Return the block root at a recent `slot`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_block_root(&self, slot: Slot) -> Result<&Hash256, BeaconStateError> { let i = self.get_latest_block_roots_index(slot)?; Ok(&self.block_roots[i]) @@ -464,7 +464,7 @@ impl BeaconState { /// Return the block root at a recent `epoch`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 // NOTE: the spec calls this get_block_root pub fn get_block_root_at_epoch(&self, epoch: Epoch) -> Result<&Hash256, BeaconStateError> { self.get_block_root(epoch.start_slot(T::slots_per_epoch())) @@ -472,7 +472,7 @@ impl BeaconState { /// Sets the block root for some given slot. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn set_block_root( &mut self, slot: Slot, @@ -490,7 +490,7 @@ impl BeaconState { /// Safely obtains the index for `randao_mixes` /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_randao_mix_index( &self, epoch: Epoch, @@ -512,7 +512,7 @@ impl BeaconState { /// /// See `Self::get_randao_mix`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn update_randao_mix(&mut self, epoch: Epoch, signature: &Signature) -> Result<(), Error> { let i = epoch.as_usize() % T::EpochsPerHistoricalVector::to_usize(); @@ -525,7 +525,7 @@ impl BeaconState { /// Return the randao mix at a recent ``epoch``. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_randao_mix(&self, epoch: Epoch) -> Result<&Hash256, Error> { let i = self.get_randao_mix_index(epoch, AllowNextEpoch::False)?; Ok(&self.randao_mixes[i]) @@ -533,7 +533,7 @@ impl BeaconState { /// Set the randao mix at a recent ``epoch``. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn set_randao_mix(&mut self, epoch: Epoch, mix: Hash256) -> Result<(), Error> { let i = self.get_randao_mix_index(epoch, AllowNextEpoch::True)?; self.randao_mixes[i] = mix; @@ -542,7 +542,7 @@ impl BeaconState { /// Safely obtains the index for latest state roots, given some `slot`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_latest_state_roots_index(&self, slot: Slot) -> Result { if (slot < self.slot) && (self.slot <= slot + Slot::from(self.state_roots.len())) { Ok(slot.as_usize() % self.state_roots.len()) @@ -553,7 +553,7 @@ impl BeaconState { /// Gets the state root for some slot. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_state_root(&self, slot: Slot) -> Result<&Hash256, Error> { let i = self.get_latest_state_roots_index(slot)?; Ok(&self.state_roots[i]) @@ -561,7 +561,7 @@ impl BeaconState { /// Gets the oldest (earliest slot) state root. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_oldest_state_root(&self) -> Result<&Hash256, Error> { let i = self.get_latest_state_roots_index(self.slot - Slot::from(self.state_roots.len()))?; @@ -570,7 +570,7 @@ impl BeaconState { /// Sets the latest state root for slot. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn set_state_root(&mut self, slot: Slot, state_root: Hash256) -> Result<(), Error> { let i = self.get_latest_state_roots_index(slot)?; self.state_roots[i] = state_root; @@ -579,7 +579,7 @@ impl BeaconState { /// Safely obtain the index for `slashings`, given some `epoch`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_slashings_index( &self, epoch: Epoch, @@ -599,14 +599,14 @@ impl BeaconState { /// Get a reference to the entire `slashings` vector. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_all_slashings(&self) -> &[u64] { &self.slashings } /// Get the total slashed balances for some epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_slashings(&self, epoch: Epoch) -> Result { let i = self.get_slashings_index(epoch, AllowNextEpoch::False)?; Ok(self.slashings[i]) @@ -614,7 +614,7 @@ impl BeaconState { /// Set the total slashed balances for some epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn set_slashings(&mut self, epoch: Epoch, value: u64) -> Result<(), Error> { let i = self.get_slashings_index(epoch, AllowNextEpoch::True)?; self.slashings[i] = value; @@ -623,7 +623,7 @@ impl BeaconState { /// Get the attestations from the current or previous epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_matching_source_attestations( &self, epoch: Epoch, @@ -639,7 +639,7 @@ impl BeaconState { /// Generate a seed for the given `epoch`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_seed( &self, epoch: Epoch, @@ -670,7 +670,7 @@ impl BeaconState { /// Return the effective balance (also known as "balance at stake") for a validator with the given ``index``. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_effective_balance( &self, validator_index: usize, @@ -684,7 +684,7 @@ impl BeaconState { /// Return the epoch at which an activation or exit triggered in ``epoch`` takes effect. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn compute_activation_exit_epoch(&self, epoch: Epoch, spec: &ChainSpec) -> Epoch { epoch + 1 + spec.max_seed_lookahead } @@ -693,7 +693,7 @@ impl BeaconState { /// /// Uses the epoch cache, and will error if it isn't initialized. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_churn_limit(&self, spec: &ChainSpec) -> Result { Ok(std::cmp::max( spec.min_per_epoch_churn_limit, @@ -707,7 +707,7 @@ impl BeaconState { /// /// Note: Utilizes the cache and will fail if the appropriate cache is not initialized. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_attestation_duties( &self, validator_index: usize, @@ -720,7 +720,7 @@ impl BeaconState { /// Return the combined effective balance of an array of validators. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_total_balance( &self, validator_indices: &[usize], diff --git a/eth2/types/src/beacon_state/committee_cache.rs b/eth2/types/src/beacon_state/committee_cache.rs index 7544cb6a1d..063242806f 100644 --- a/eth2/types/src/beacon_state/committee_cache.rs +++ b/eth2/types/src/beacon_state/committee_cache.rs @@ -22,7 +22,7 @@ pub struct CommitteeCache { impl CommitteeCache { /// Return a new, fully initialized cache. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn initialized( state: &BeaconState, epoch: Epoch, @@ -87,7 +87,7 @@ impl CommitteeCache { /// /// Always returns `&[]` for a non-initialized epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn active_validator_indices(&self) -> &[usize] { &self.shuffling } @@ -96,7 +96,7 @@ impl CommitteeCache { /// /// Always returns `&[]` for a non-initialized epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn shuffling(&self) -> &[usize] { &self.shuffling } @@ -179,7 +179,7 @@ impl CommitteeCache { /// /// Always returns `usize::default()` for a non-initialized epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn active_validator_count(&self) -> usize { self.shuffling.len() } @@ -188,7 +188,7 @@ impl CommitteeCache { /// /// Always returns `usize::default()` for a non-initialized epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn epoch_committee_count(&self) -> usize { self.committees_per_slot as usize * self.slots_per_epoch as usize } @@ -199,7 +199,7 @@ impl CommitteeCache { /// Returns a slice of `self.shuffling` that represents the `index`'th committee in the epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn compute_committee(&self, index: usize) -> Option<&[usize]> { Some(&self.shuffling[self.compute_committee_range(index)?]) } @@ -210,7 +210,7 @@ impl CommitteeCache { /// /// Will also return `None` if the index is out of bounds. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn compute_committee_range(&self, index: usize) -> Option> { let count = self.epoch_committee_count(); if count == 0 || index >= count { @@ -237,7 +237,7 @@ impl CommitteeCache { /// Returns a list of all `validators` indices where the validator is active at the given /// `epoch`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub fn get_active_validator_indices(validators: &[Validator], epoch: Epoch) -> Vec { let mut active = Vec::with_capacity(validators.len()); @@ -256,7 +256,7 @@ pub fn get_active_validator_indices(validators: &[Validator], epoch: Epoch) -> V /// Returns the count of all `validators` indices where the validator is active at the given /// `epoch`. /// -/// Spec v0.9.0 +/// Spec v0.9.1 fn get_active_validator_count(validators: &[Validator], epoch: Epoch) -> usize { validators.iter().filter(|v| v.is_active_at(epoch)).count() } diff --git a/eth2/types/src/chain_spec.rs b/eth2/types/src/chain_spec.rs index 16e785eab3..fc4a71b07c 100644 --- a/eth2/types/src/chain_spec.rs +++ b/eth2/types/src/chain_spec.rs @@ -5,7 +5,7 @@ use utils::{u8_from_hex_str, u8_to_hex_str}; /// Each of the BLS signature domains. /// -/// Spec v0.9.0 +/// Spec v0.9.1 pub enum Domain { BeaconProposer, BeaconAttester, @@ -16,7 +16,7 @@ pub enum Domain { /// Holds all the "constants" for a BeaconChain. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(PartialEq, Debug, Clone, Serialize, Deserialize)] #[serde(default)] pub struct ChainSpec { @@ -91,7 +91,7 @@ pub struct ChainSpec { impl ChainSpec { /// Get the domain number, unmodified by the fork. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_domain_constant(&self, domain: Domain) -> u32 { match domain { Domain::BeaconProposer => self.domain_beacon_proposer, @@ -104,7 +104,7 @@ impl ChainSpec { /// Get the domain number that represents the fork meta and signature domain. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_domain(&self, epoch: Epoch, domain: Domain, fork: &Fork) -> u64 { let domain_constant = self.get_domain_constant(domain); @@ -119,7 +119,7 @@ impl ChainSpec { /// Returns a `ChainSpec` compatible with the Ethereum Foundation specification. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn mainnet() -> Self { Self { /* @@ -196,7 +196,7 @@ impl ChainSpec { /// /// https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/configs/constant_presets/minimal.yaml /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn minimal() -> Self { // Note: bootnodes to be updated when static nodes exist. let boot_nodes = vec![]; diff --git a/eth2/types/src/checkpoint.rs b/eth2/types/src/checkpoint.rs index 4fe09b1f1b..d1fa49becd 100644 --- a/eth2/types/src/checkpoint.rs +++ b/eth2/types/src/checkpoint.rs @@ -7,7 +7,7 @@ use tree_hash_derive::TreeHash; /// Casper FFG checkpoint, used in attestations. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, Clone, diff --git a/eth2/types/src/deposit.rs b/eth2/types/src/deposit.rs index 42d17c019a..c75ea713df 100644 --- a/eth2/types/src/deposit.rs +++ b/eth2/types/src/deposit.rs @@ -9,7 +9,7 @@ use tree_hash_derive::TreeHash; /// A deposit to potentially become a beacon chain validator. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] pub struct Deposit { pub proof: FixedVector, diff --git a/eth2/types/src/deposit_data.rs b/eth2/types/src/deposit_data.rs index 85f1927280..11d159bb94 100644 --- a/eth2/types/src/deposit_data.rs +++ b/eth2/types/src/deposit_data.rs @@ -11,7 +11,7 @@ use tree_hash_derive::{SignedRoot, TreeHash}; /// The data supplied by the user to the deposit contract. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq, @@ -35,7 +35,7 @@ pub struct DepositData { impl DepositData { /// Generate the signature for a given DepositData details. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn create_signature( &self, secret_key: &SecretKey, diff --git a/eth2/types/src/eth1_data.rs b/eth2/types/src/eth1_data.rs index 7271d576b3..83fcae6561 100644 --- a/eth2/types/src/eth1_data.rs +++ b/eth2/types/src/eth1_data.rs @@ -8,7 +8,7 @@ use tree_hash_derive::TreeHash; /// Contains data obtained from the Eth1 chain. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq, Clone, Default, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom, )] diff --git a/eth2/types/src/eth_spec.rs b/eth2/types/src/eth_spec.rs index faa35dae6d..7c7c70b181 100644 --- a/eth2/types/src/eth_spec.rs +++ b/eth2/types/src/eth_spec.rs @@ -61,7 +61,7 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq { /// Note: the number of committees per slot is constant in each epoch, and depends only on /// the `active_validator_count` during the slot's epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn get_committee_count_per_slot(active_validator_count: usize, spec: &ChainSpec) -> usize { let slots_per_epoch = Self::SlotsPerEpoch::to_usize(); @@ -85,28 +85,28 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq { /// Returns the `SLOTS_PER_EPOCH` constant for this specification. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn slots_per_epoch() -> u64 { Self::SlotsPerEpoch::to_u64() } /// Returns the `SLOTS_PER_HISTORICAL_ROOT` constant for this specification. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn slots_per_historical_root() -> usize { Self::SlotsPerHistoricalRoot::to_usize() } /// Returns the `EPOCHS_PER_HISTORICAL_VECTOR` constant for this specification. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn epochs_per_historical_vector() -> usize { Self::EpochsPerHistoricalVector::to_usize() } /// Returns the `SLOTS_PER_ETH1_VOTING_PERIOD` constant for this specification. /// - /// Spec v0.9.0 + /// Spec v0.9.1 fn slots_per_eth1_voting_period() -> usize { Self::EpochsPerHistoricalVector::to_usize() } @@ -122,7 +122,7 @@ macro_rules! params_from_eth_spec { /// Ethereum Foundation specifications. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)] pub struct MainnetEthSpec; @@ -155,7 +155,7 @@ pub type FoundationBeaconState = BeaconState; /// /// https://github.com/ethereum/eth2.0-specs/blob/v0.8.0/configs/constant_presets/minimal.yaml /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)] pub struct MinimalEthSpec; diff --git a/eth2/types/src/fork.rs b/eth2/types/src/fork.rs index 48e1b65c86..95cde7b1da 100644 --- a/eth2/types/src/fork.rs +++ b/eth2/types/src/fork.rs @@ -9,7 +9,7 @@ use tree_hash_derive::TreeHash; /// Specifies a fork of the `BeaconChain`, to prevent replay attacks. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, Clone, PartialEq, Default, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom, )] @@ -30,7 +30,7 @@ pub struct Fork { impl Fork { /// Initialize the `Fork` from the genesis parameters in the `spec`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn genesis(genesis_epoch: Epoch) -> Self { Self { previous_version: [0; 4], @@ -41,7 +41,7 @@ impl Fork { /// Return the fork version of the given ``epoch``. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn get_fork_version(&self, epoch: Epoch) -> [u8; 4] { if epoch < self.epoch { return self.previous_version; diff --git a/eth2/types/src/historical_batch.rs b/eth2/types/src/historical_batch.rs index 17461b0ade..8158ba3737 100644 --- a/eth2/types/src/historical_batch.rs +++ b/eth2/types/src/historical_batch.rs @@ -9,7 +9,7 @@ use tree_hash_derive::TreeHash; /// Historical block and state roots. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] pub struct HistoricalBatch { pub block_roots: FixedVector, diff --git a/eth2/types/src/indexed_attestation.rs b/eth2/types/src/indexed_attestation.rs index 6097facc1e..32bd134da6 100644 --- a/eth2/types/src/indexed_attestation.rs +++ b/eth2/types/src/indexed_attestation.rs @@ -34,14 +34,14 @@ pub struct IndexedAttestation { impl IndexedAttestation { /// Check if ``attestation_data_1`` and ``attestation_data_2`` have the same target. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn is_double_vote(&self, other: &Self) -> bool { self.data.target.epoch == other.data.target.epoch && self.data != other.data } /// Check if ``attestation_data_1`` surrounds ``attestation_data_2``. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn is_surround_vote(&self, other: &Self) -> bool { self.data.source.epoch < other.data.source.epoch && other.data.target.epoch < self.data.target.epoch diff --git a/eth2/types/src/pending_attestation.rs b/eth2/types/src/pending_attestation.rs index 0f9d2876ea..8b6c0022c7 100644 --- a/eth2/types/src/pending_attestation.rs +++ b/eth2/types/src/pending_attestation.rs @@ -8,7 +8,7 @@ use tree_hash_derive::TreeHash; /// An attestation that has been included in the state but not yet fully processed. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] pub struct PendingAttestation { pub aggregation_bits: BitList, diff --git a/eth2/types/src/proposer_slashing.rs b/eth2/types/src/proposer_slashing.rs index cef048911d..678458e7e8 100644 --- a/eth2/types/src/proposer_slashing.rs +++ b/eth2/types/src/proposer_slashing.rs @@ -8,7 +8,7 @@ use tree_hash_derive::TreeHash; /// Two conflicting proposals from the same proposer (validator). /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] pub struct ProposerSlashing { pub proposer_index: u64, diff --git a/eth2/types/src/relative_epoch.rs b/eth2/types/src/relative_epoch.rs index 14a4beec94..65971ef2f5 100644 --- a/eth2/types/src/relative_epoch.rs +++ b/eth2/types/src/relative_epoch.rs @@ -9,7 +9,7 @@ pub enum Error { /// Defines the epochs relative to some epoch. Most useful when referring to the committees prior /// to and following some epoch. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, PartialEq, Clone, Copy)] pub enum RelativeEpoch { /// The prior epoch. @@ -23,7 +23,7 @@ pub enum RelativeEpoch { impl RelativeEpoch { /// Returns the `epoch` that `self` refers to, with respect to the `base` epoch. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn into_epoch(self, base: Epoch) -> Epoch { match self { // Due to saturating nature of epoch, check for current first. @@ -40,7 +40,7 @@ impl RelativeEpoch { /// - `EpochTooLow` when `other` is more than 1 prior to `base`. /// - `EpochTooHigh` when `other` is more than 1 after `base`. /// - /// Spec v0.9.0 + /// Spec v0.9.1 pub fn from_epoch(base: Epoch, other: Epoch) -> Result { // Due to saturating nature of epoch, check for current first. if other == base { diff --git a/eth2/types/src/validator.rs b/eth2/types/src/validator.rs index 14dca8272d..70c3a69d97 100644 --- a/eth2/types/src/validator.rs +++ b/eth2/types/src/validator.rs @@ -7,7 +7,7 @@ use tree_hash_derive::TreeHash; /// Information about a `BeaconChain` validator. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode, TestRandom, TreeHash)] pub struct Validator { pub pubkey: PublicKey, diff --git a/eth2/types/src/voluntary_exit.rs b/eth2/types/src/voluntary_exit.rs index e5457fe313..b99b309833 100644 --- a/eth2/types/src/voluntary_exit.rs +++ b/eth2/types/src/voluntary_exit.rs @@ -9,7 +9,7 @@ use tree_hash_derive::{SignedRoot, TreeHash}; /// An exit voluntarily submitted a validator who wishes to withdraw. /// -/// Spec v0.9.0 +/// Spec v0.9.1 #[derive( Debug, PartialEq,