[][src]Struct beacon::BeaconState

pub struct BeaconState<C: Config> {
    pub genesis_time: Uint,
    pub slot: Uint,
    pub fork: Fork,
    pub latest_block_header: BeaconBlockHeader,
    pub block_roots: VecArray<H256, C::SlotsPerHistoricalRoot>,
    pub state_roots: VecArray<H256, C::SlotsPerHistoricalRoot>,
    pub historical_roots: MaxVec<H256, C::HistoricalRootsLimit>,
    pub eth1_data: Eth1Data,
    pub eth1_data_votes: MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>,
    pub eth1_deposit_index: Uint,
    pub validators: MaxVec<Validator, C::ValidatorRegistryLimit>,
    pub balances: MaxVec<Uint, C::ValidatorRegistryLimit>,
    pub start_shard: Uint,
    pub randao_mixes: VecArray<H256, C::EpochsPerHistoricalVector>,
    pub active_index_roots: VecArray<H256, C::EpochsPerHistoricalVector>,
    pub compact_committees_roots: VecArray<H256, C::EpochsPerHistoricalVector>,
    pub slashings: VecArray<Uint, C::EpochsPerSlashingsVector>,
    pub previous_epoch_attestations: MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>,
    pub current_epoch_attestations: MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>,
    pub previous_crosslinks: VecArray<Crosslink, C::ShardCount>,
    pub current_crosslinks: VecArray<Crosslink, C::ShardCount>,
    pub justification_bits: VecArray<bool, JustificationBitsLength>,
    pub previous_justified_checkpoint: Checkpoint,
    pub current_justified_checkpoint: Checkpoint,
    pub finalized_checkpoint: Checkpoint,
}

Beacon state.

Fields

genesis_time: Uint

Genesis time as Unix timestamp.

slot: Uint

Current slot.

fork: Fork

Fork version.

latest_block_header: BeaconBlockHeader

Latest blokc header.

block_roots: VecArray<H256, C::SlotsPerHistoricalRoot>

Past block roots.

state_roots: VecArray<H256, C::SlotsPerHistoricalRoot>

Past state roots.

historical_roots: MaxVec<H256, C::HistoricalRootsLimit>

Past historical roots.

eth1_data: Eth1Data

Last accepted eth1 data.

eth1_data_votes: MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>

Votes on eth1 data.

eth1_deposit_index: Uint

Eth1 data deposit index.

validators: MaxVec<Validator, C::ValidatorRegistryLimit>

Validator registry.

balances: MaxVec<Uint, C::ValidatorRegistryLimit>

Balance of the validators.

start_shard: Uint

Start shard for shuffling.

randao_mixes: VecArray<H256, C::EpochsPerHistoricalVector>

Past randao mixes.

active_index_roots: VecArray<H256, C::EpochsPerHistoricalVector>

Past active index roots.

compact_committees_roots: VecArray<H256, C::EpochsPerHistoricalVector>

Past compact committees roots.

slashings: VecArray<Uint, C::EpochsPerSlashingsVector>

Past slashings.

previous_epoch_attestations: MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>

Attestations on previous epoch.

current_epoch_attestations: MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>

Attestations on current epoch.

previous_crosslinks: VecArray<Crosslink, C::ShardCount>

Previous crosslinks.

current_crosslinks: VecArray<Crosslink, C::ShardCount>

Current crosslinks.

justification_bits: VecArray<bool, JustificationBitsLength>

Justification bits for Casper.

previous_justified_checkpoint: Checkpoint

Previous justified checkpoint.

current_justified_checkpoint: Checkpoint

Current justified checkpoint.

finalized_checkpoint: Checkpoint

Last finalized checkpoint.

Methods

impl<C: Config> BeaconState<C>[src]

pub fn is_valid_indexed_attestation<BLS: BLSConfig>(
    &self,
    indexed_attestation: &IndexedAttestation<C>
) -> bool
[src]

Check if indexed_attestation has valid indices and signature.

impl<C: Config> BeaconState<C>[src]

pub fn current_epoch(&self) -> Epoch[src]

Get current epoch.

pub fn previous_epoch(&self) -> Epoch[src]

Get previous epoch.

pub fn block_root(&self, epoch: Epoch) -> Result<H256, Error>[src]

Get block root of the start slot of an epoch.

pub fn block_root_at_slot(&self, slot: Slot) -> Result<H256, Error>[src]

Get block root at slot.

pub fn randao_mix(&self, epoch: Epoch) -> H256[src]

Get the randao mix at epoch.

pub fn active_validator_indices(&self, epoch: Uint) -> Vec<ValidatorIndex>[src]

Get active validator indices at epoch.

pub fn validator_churn_limit(&self) -> Uint[src]

Get churn limit for validator exits.

pub fn seed(&self, epoch: Epoch) -> H256[src]

Get the random seed for epoch.

pub fn committee_count(&self, epoch: Epoch) -> Uint[src]

Get committee count for epoch.

Get the crosslink committee.

pub fn start_shard(&self, epoch: Epoch) -> Result<Shard, Error>[src]

Get start shard for shuffling at epoch.

pub fn shard_delta(&self, epoch: Epoch) -> Uint[src]

Get shard delta for epoch.

pub fn beacon_proposer_index(&self) -> Result<ValidatorIndex, Error>[src]

Get the current beacon proposer index.

pub fn attestation_data_slot(
    &self,
    attestation: &AttestationData
) -> Result<Slot, Error>
[src]

Get attestation data slot.

pub fn compact_committees_root(&self, epoch: Uint) -> Result<H256, Error>[src]

Get compact committees root at epoch.

pub fn total_balance(&self, indices: &[ValidatorIndex]) -> Gwei[src]

Get total balance of validator indices.

pub fn total_active_balance(&self) -> Gwei[src]

Get total balance of active validators.

pub fn domain(&self, domain_type: Uint, message_epoch: Option<Uint>) -> Uint[src]

Get signing domain, given domain type and message epoch.

pub fn indexed_attestation(
    &self,
    attestation: Attestation<C>
) -> Result<IndexedAttestation<C>, Error>
[src]

Convert an attestation to indexed attestation.

pub fn attesting_indices(
    &self,
    attestation_data: &AttestationData,
    bitfield: &[bool]
) -> Result<Vec<ValidatorIndex>, Error>
[src]

Get attesting indices of given attestation.

impl<C: Config> BeaconState<C>[src]

pub fn increase_balance(&mut self, index: ValidatorIndex, delta: Gwei)[src]

Increase validator balance.

pub fn decrease_balance(&mut self, index: ValidatorIndex, delta: Gwei)[src]

Decrease validator balance.

pub fn initiate_validator_exit(&mut self, index: ValidatorIndex)[src]

Initiate validator exit.

pub fn slash_validator(
    &mut self,
    slashed_index: ValidatorIndex,
    whistleblower_index: Option<ValidatorIndex>
) -> Result<(), Error>
[src]

Slash validator.

impl<C: Config> BeaconState<C>[src]

pub fn process_block_header<'a, 'b, B: Block, BLS: BLSConfig>(
    &'a mut self,
    block: &'b B
) -> Result<(), Error> where
    UnsealedBeaconBlock<C>: From<&'b B>, 
[src]

Process a block header.

impl<C: Config> BeaconState<C>[src]

pub fn process_randao<BLS: BLSConfig>(
    &mut self,
    body: &BeaconBlockBody<C>
) -> Result<(), Error>
[src]

Process randao information given in a block.

impl<C: Config> BeaconState<C>[src]

pub fn process_eth1_data(&mut self, body: &BeaconBlockBody<C>)[src]

Process eth1 data vote given in a block.

impl<C: Config> BeaconState<C>[src]

pub fn process_proposer_slashing<BLS: BLSConfig>(
    &mut self,
    proposer_slashing: ProposerSlashing
) -> Result<(), Error>
[src]

Push a new ProposerSlashing to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_attester_slashing<BLS: BLSConfig>(
    &mut self,
    attester_slashing: AttesterSlashing<C>
) -> Result<(), Error>
[src]

Push a new AttesterSlashing to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_attestation<BLS: BLSConfig>(
    &mut self,
    attestation: Attestation<C>
) -> Result<(), Error>
[src]

Push a new Attestation to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_deposit<BLS: BLSConfig>(
    &mut self,
    deposit: Deposit
) -> Result<(), Error>
[src]

Push a new Deposit to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_voluntary_exit<BLS: BLSConfig>(
    &mut self,
    exit: VoluntaryExit
) -> Result<(), Error>
[src]

Push a new VoluntaryExit to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_transfer<BLS: BLSConfig>(
    &mut self,
    transfer: Transfer
) -> Result<(), Error>
[src]

Push a new Transfer to the state.

impl<C: Config> BeaconState<C>[src]

pub fn process_operations<BLS: BLSConfig>(
    &mut self,
    body: &BeaconBlockBody<C>
) -> Result<(), Error>
[src]

Process block operations.

impl<C: Config> BeaconState<C>[src]

pub fn process_block<'a, 'b, B: Block<Config = C>, BLS: BLSConfig>(
    &'a mut self,
    block: &'b B
) -> Result<(), Error> where
    UnsealedBeaconBlock<C>: From<&'b B>, 
[src]

Process a block, assuming we are at given slot.

impl<C: Config> BeaconState<C>[src]

pub fn matching_source_attestations(
    &self,
    epoch: Epoch
) -> Result<Vec<PendingAttestation<C>>, Error>
[src]

Get attestations with matching source at given epoch.

pub fn matching_target_attestations(
    &self,
    epoch: Epoch
) -> Result<Vec<PendingAttestation<C>>, Error>
[src]

Get attestations with matching target at given epoch.

pub fn matching_head_attestations(
    &self,
    epoch: Epoch
) -> Result<Vec<PendingAttestation<C>>, Error>
[src]

Get attestations with matching head at given epoch.

pub fn unslashed_attesting_indices(
    &self,
    attestations: &[PendingAttestation<C>]
) -> Result<Vec<ValidatorIndex>, Error>
[src]

Get indices of all unslashed validators within attestations.

pub fn attesting_balance(
    &self,
    attestations: &[PendingAttestation<C>]
) -> Result<Gwei, Error>
[src]

Get the total attesting balance given a list of attestations.

Get the winning crosslink and attesting indices.

impl<C: Config> BeaconState<C>[src]

pub fn process_justification_and_finalization(&mut self) -> Result<(), Error>[src]

Update casper justification and finalization.

impl<C: Config> BeaconState<C>[src]

Update crosslinks

impl<C: Config> BeaconState<C>[src]

pub fn process_rewards_and_penalties(&mut self) -> Result<(), Error>[src]

Process rewards and penalties

impl<C: Config> BeaconState<C>[src]

pub fn process_registry_updates(&mut self) -> Result<(), Error>[src]

Process registry updates

impl<C: Config> BeaconState<C>[src]

pub fn process_slashings(&mut self)[src]

Process slashings

impl<C: Config> BeaconState<C>[src]

pub fn process_final_updates(&mut self) -> Result<(), Error>[src]

Process final updates

impl<C: Config> BeaconState<C>[src]

pub fn process_epoch(&mut self) -> Result<(), Error>[src]

Process an epoch.

impl<C: Config> BeaconState<C>[src]

pub fn state_transition<B: Block<Config = C>, BLS: BLSConfig>(
    &mut self,
    block: &B
) -> Result<(), Error>
[src]

Execute state transition.

pub fn process_slots(&mut self, slot: Uint) -> Result<(), Error>[src]

Process slots, process epoch if at epoch boundary.

pub fn process_slot(&mut self)[src]

Advance slot

impl<C: Config> BeaconState<C>[src]

pub fn committee_assignment(
    &self,
    epoch: u64,
    validator_index: u64
) -> Result<Option<CommitteeAssignment>, Error>
[src]

Find committee assignment at slot.

pub fn validator_pubkey(&self, index: u64) -> Option<ValidatorId>[src]

Get validator public key.

pub fn validator_index(&self, pubkey: &ValidatorId) -> Option<u64>[src]

Get validator index from public key.

impl<C: Config> BeaconState<C>[src]

pub fn justified_active_validators(&self) -> Vec<u64>[src]

Get justified active validators from current state.

pub fn block_vote_targets(
    &self,
    block: &BeaconBlock<C>
) -> Result<Vec<(u64, H256)>, Error>
[src]

Get block attestation vote targets.

Trait Implementations

impl<C: Default + Config> Default for BeaconState<C> where
    C::SlotsPerHistoricalRoot: Default,
    C::SlotsPerHistoricalRoot: Default,
    C::HistoricalRootsLimit: Default,
    C::SlotsPerEth1VotingPeriod: Default,
    C::ValidatorRegistryLimit: Default,
    C::ValidatorRegistryLimit: Default,
    C::EpochsPerHistoricalVector: Default,
    C::EpochsPerHistoricalVector: Default,
    C::EpochsPerHistoricalVector: Default,
    C::EpochsPerSlashingsVector: Default,
    C::MaxAttestationsPerEpoch: Default,
    C::MaxAttestationsPerEpoch: Default,
    C::ShardCount: Default,
    C::ShardCount: Default
[src]

impl<C: PartialEq + Config> PartialEq<BeaconState<C>> for BeaconState<C> where
    C::SlotsPerHistoricalRoot: PartialEq,
    C::SlotsPerHistoricalRoot: PartialEq,
    C::HistoricalRootsLimit: PartialEq,
    C::SlotsPerEth1VotingPeriod: PartialEq,
    C::ValidatorRegistryLimit: PartialEq,
    C::ValidatorRegistryLimit: PartialEq,
    C::EpochsPerHistoricalVector: PartialEq,
    C::EpochsPerHistoricalVector: PartialEq,
    C::EpochsPerHistoricalVector: PartialEq,
    C::EpochsPerSlashingsVector: PartialEq,
    C::MaxAttestationsPerEpoch: PartialEq,
    C::MaxAttestationsPerEpoch: PartialEq,
    C::ShardCount: PartialEq,
    C::ShardCount: PartialEq
[src]

impl<C: Clone + Config> Clone for BeaconState<C> where
    C::SlotsPerHistoricalRoot: Clone,
    C::SlotsPerHistoricalRoot: Clone,
    C::HistoricalRootsLimit: Clone,
    C::SlotsPerEth1VotingPeriod: Clone,
    C::ValidatorRegistryLimit: Clone,
    C::ValidatorRegistryLimit: Clone,
    C::EpochsPerHistoricalVector: Clone,
    C::EpochsPerHistoricalVector: Clone,
    C::EpochsPerHistoricalVector: Clone,
    C::EpochsPerSlashingsVector: Clone,
    C::MaxAttestationsPerEpoch: Clone,
    C::MaxAttestationsPerEpoch: Clone,
    C::ShardCount: Clone,
    C::ShardCount: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<C: Eq + Config> Eq for BeaconState<C> where
    C::SlotsPerHistoricalRoot: Eq,
    C::SlotsPerHistoricalRoot: Eq,
    C::HistoricalRootsLimit: Eq,
    C::SlotsPerEth1VotingPeriod: Eq,
    C::ValidatorRegistryLimit: Eq,
    C::ValidatorRegistryLimit: Eq,
    C::EpochsPerHistoricalVector: Eq,
    C::EpochsPerHistoricalVector: Eq,
    C::EpochsPerHistoricalVector: Eq,
    C::EpochsPerSlashingsVector: Eq,
    C::MaxAttestationsPerEpoch: Eq,
    C::MaxAttestationsPerEpoch: Eq,
    C::ShardCount: Eq,
    C::ShardCount: Eq
[src]

impl<C: Debug + Config> Debug for BeaconState<C> where
    C::SlotsPerHistoricalRoot: Debug,
    C::SlotsPerHistoricalRoot: Debug,
    C::HistoricalRootsLimit: Debug,
    C::SlotsPerEth1VotingPeriod: Debug,
    C::ValidatorRegistryLimit: Debug,
    C::ValidatorRegistryLimit: Debug,
    C::EpochsPerHistoricalVector: Debug,
    C::EpochsPerHistoricalVector: Debug,
    C::EpochsPerHistoricalVector: Debug,
    C::EpochsPerSlashingsVector: Debug,
    C::MaxAttestationsPerEpoch: Debug,
    C::MaxAttestationsPerEpoch: Debug,
    C::ShardCount: Debug,
    C::ShardCount: Debug
[src]

impl<C: Config> Serialize for BeaconState<C> where
    C: Serialize
[src]

impl<'de, C: Config> Deserialize<'de> for BeaconState<C> where
    C: Deserialize<'de>, 
[src]

impl<C: Config> Encode for BeaconState<C> where
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    MaxVec<H256, C::HistoricalRootsLimit>: Encode,
    MaxVec<H256, C::HistoricalRootsLimit>: Encode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Encode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Encode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Encode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Encode,
    MaxVec<Uint, C::ValidatorRegistryLimit>: Encode,
    MaxVec<Uint, C::ValidatorRegistryLimit>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<Uint, C::EpochsPerSlashingsVector>: Encode,
    VecArray<Uint, C::EpochsPerSlashingsVector>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode
[src]

fn encode(&self) -> Vec<u8>[src]

Convert self to an owned vector.

fn using_encoded<R, F>(&self, f: F) -> R where
    F: FnOnce(&[u8]) -> R, 
[src]

Convert self to a slice and then invoke the given closure with it.

impl<C: Config> Decode for BeaconState<C> where
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    MaxVec<H256, C::HistoricalRootsLimit>: Decode,
    MaxVec<H256, C::HistoricalRootsLimit>: Decode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Decode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Decode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Decode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Decode,
    MaxVec<Uint, C::ValidatorRegistryLimit>: Decode,
    MaxVec<Uint, C::ValidatorRegistryLimit>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<Uint, C::EpochsPerSlashingsVector>: Decode,
    VecArray<Uint, C::EpochsPerSlashingsVector>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode
[src]

impl<C: Config> Encode for BeaconState<C> where
    Uint: Encode,
    Uint: Encode,
    Fork: Encode,
    BeaconBlockHeader: Encode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Encode,
    MaxVec<H256, C::HistoricalRootsLimit>: Encode,
    Eth1Data: Encode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Encode,
    Uint: Encode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Encode,
    CompactRef<'a, MaxVec<Uint, C::ValidatorRegistryLimit>>: Encode,
    Uint: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Encode,
    CompactRef<'a, VecArray<Uint, C::EpochsPerSlashingsVector>>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode,
    VecArray<Crosslink, C::ShardCount>: Encode,
    CompactRef<'a, VecArray<bool, JustificationBitsLength>>: Encode,
    Checkpoint: Encode,
    Checkpoint: Encode,
    Checkpoint: Encode
[src]

fn encode(&self) -> Vec<u8>[src]

Convert self to an owned vector.

impl<C: Config> Codec for BeaconState<C> where
    Uint: Codec,
    Uint: Codec,
    Fork: Codec,
    BeaconBlockHeader: Codec,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Codec,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Codec,
    MaxVec<H256, C::HistoricalRootsLimit>: Codec,
    Eth1Data: Codec,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Codec,
    Uint: Codec,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Codec,
    MaxVec<Uint, C::ValidatorRegistryLimit>: Codec,
    Uint: Codec,
    VecArray<H256, C::EpochsPerHistoricalVector>: Codec,
    VecArray<H256, C::EpochsPerHistoricalVector>: Codec,
    VecArray<H256, C::EpochsPerHistoricalVector>: Codec,
    VecArray<Uint, C::EpochsPerSlashingsVector>: Codec,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Codec,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Codec,
    VecArray<Crosslink, C::ShardCount>: Codec,
    VecArray<Crosslink, C::ShardCount>: Codec,
    VecArray<bool, JustificationBitsLength>: Codec,
    Checkpoint: Codec,
    Checkpoint: Codec,
    Checkpoint: Codec
[src]

impl<C: Config> Decode for BeaconState<C> where
    Uint: Decode,
    Uint: Decode,
    Fork: Decode,
    BeaconBlockHeader: Decode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    VecArray<H256, C::SlotsPerHistoricalRoot>: Decode,
    MaxVec<H256, C::HistoricalRootsLimit>: Decode,
    Eth1Data: Decode,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: Decode,
    Uint: Decode,
    MaxVec<Validator, C::ValidatorRegistryLimit>: Decode,
    Compact<MaxVec<Uint, C::ValidatorRegistryLimit>>: Decode,
    Uint: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    VecArray<H256, C::EpochsPerHistoricalVector>: Decode,
    Compact<VecArray<Uint, C::EpochsPerSlashingsVector>>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode,
    VecArray<Crosslink, C::ShardCount>: Decode,
    Compact<VecArray<bool, JustificationBitsLength>>: Decode,
    Checkpoint: Decode,
    Checkpoint: Decode,
    Checkpoint: Decode
[src]

impl<C: Config> IntoTree for BeaconState<C> where
    Uint: IntoTree,
    Uint: IntoTree,
    Fork: IntoTree,
    BeaconBlockHeader: IntoTree,
    VecArray<H256, C::SlotsPerHistoricalRoot>: IntoTree,
    VecArray<H256, C::SlotsPerHistoricalRoot>: IntoTree,
    MaxVec<H256, C::HistoricalRootsLimit>: IntoTree,
    Eth1Data: IntoTree,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: IntoTree,
    Uint: IntoTree,
    MaxVec<Validator, C::ValidatorRegistryLimit>: IntoTree,
    CompactRef<'a, MaxVec<Uint, C::ValidatorRegistryLimit>>: IntoTree,
    Uint: IntoTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: IntoTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: IntoTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: IntoTree,
    CompactRef<'a, VecArray<Uint, C::EpochsPerSlashingsVector>>: IntoTree,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: IntoTree,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: IntoTree,
    VecArray<Crosslink, C::ShardCount>: IntoTree,
    VecArray<Crosslink, C::ShardCount>: IntoTree,
    CompactRef<'a, VecArray<bool, JustificationBitsLength>>: IntoTree,
    Checkpoint: IntoTree,
    Checkpoint: IntoTree,
    Checkpoint: IntoTree
[src]

impl<C: Config> FromTree for BeaconState<C> where
    Uint: FromTree,
    Uint: FromTree,
    Fork: FromTree,
    BeaconBlockHeader: FromTree,
    VecArray<H256, C::SlotsPerHistoricalRoot>: FromTree,
    VecArray<H256, C::SlotsPerHistoricalRoot>: FromTree,
    MaxVec<H256, C::HistoricalRootsLimit>: FromTree,
    Eth1Data: FromTree,
    MaxVec<Eth1Data, C::SlotsPerEth1VotingPeriod>: FromTree,
    Uint: FromTree,
    MaxVec<Validator, C::ValidatorRegistryLimit>: FromTree,
    Compact<MaxVec<Uint, C::ValidatorRegistryLimit>>: FromTree,
    Uint: FromTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: FromTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: FromTree,
    VecArray<H256, C::EpochsPerHistoricalVector>: FromTree,
    Compact<VecArray<Uint, C::EpochsPerSlashingsVector>>: FromTree,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: FromTree,
    MaxVec<PendingAttestation<C>, C::MaxAttestationsPerEpoch>: FromTree,
    VecArray<Crosslink, C::ShardCount>: FromTree,
    VecArray<Crosslink, C::ShardCount>: FromTree,
    Compact<VecArray<bool, JustificationBitsLength>>: FromTree,
    Checkpoint: FromTree,
    Checkpoint: FromTree,
    Checkpoint: FromTree
[src]

Auto Trait Implementations

impl<C> Sync for BeaconState<C> where
    <C as Config>::EpochsPerHistoricalVector: Sync,
    <C as Config>::EpochsPerSlashingsVector: Sync,
    <C as Config>::HistoricalRootsLimit: Sync,
    <C as Config>::MaxAttestationsPerEpoch: Sync,
    <C as Config>::MaxValidatorsPerCommittee: Sync,
    <C as Config>::ShardCount: Sync,
    <C as Config>::SlotsPerEth1VotingPeriod: Sync,
    <C as Config>::SlotsPerHistoricalRoot: Sync,
    <C as Config>::ValidatorRegistryLimit: Sync

impl<C> Unpin for BeaconState<C> where
    <C as Config>::EpochsPerHistoricalVector: Unpin,
    <C as Config>::EpochsPerSlashingsVector: Unpin,
    <C as Config>::HistoricalRootsLimit: Unpin,
    <C as Config>::MaxAttestationsPerEpoch: Unpin,
    <C as Config>::MaxValidatorsPerCommittee: Unpin,
    <C as Config>::ShardCount: Unpin,
    <C as Config>::SlotsPerEth1VotingPeriod: Unpin,
    <C as Config>::SlotsPerHistoricalRoot: Unpin,
    <C as Config>::ValidatorRegistryLimit: Unpin

impl<C> Send for BeaconState<C> where
    <C as Config>::EpochsPerHistoricalVector: Send,
    <C as Config>::EpochsPerSlashingsVector: Send,
    <C as Config>::HistoricalRootsLimit: Send,
    <C as Config>::MaxAttestationsPerEpoch: Send,
    <C as Config>::MaxValidatorsPerCommittee: Send,
    <C as Config>::ShardCount: Send,
    <C as Config>::SlotsPerEth1VotingPeriod: Send,
    <C as Config>::SlotsPerHistoricalRoot: Send,
    <C as Config>::ValidatorRegistryLimit: Send

impl<C> UnwindSafe for BeaconState<C> where
    <C as Config>::EpochsPerHistoricalVector: UnwindSafe,
    <C as Config>::EpochsPerSlashingsVector: UnwindSafe,
    <C as Config>::HistoricalRootsLimit: UnwindSafe,
    <C as Config>::MaxAttestationsPerEpoch: UnwindSafe,
    <C as Config>::MaxValidatorsPerCommittee: UnwindSafe,
    <C as Config>::ShardCount: UnwindSafe,
    <C as Config>::SlotsPerEth1VotingPeriod: UnwindSafe,
    <C as Config>::SlotsPerHistoricalRoot: UnwindSafe,
    <C as Config>::ValidatorRegistryLimit: UnwindSafe

impl<C> RefUnwindSafe for BeaconState<C> where
    <C as Config>::EpochsPerHistoricalVector: RefUnwindSafe,
    <C as Config>::EpochsPerSlashingsVector: RefUnwindSafe,
    <C as Config>::HistoricalRootsLimit: RefUnwindSafe,
    <C as Config>::MaxAttestationsPerEpoch: RefUnwindSafe,
    <C as Config>::MaxValidatorsPerCommittee: RefUnwindSafe,
    <C as Config>::ShardCount: RefUnwindSafe,
    <C as Config>::SlotsPerEth1VotingPeriod: RefUnwindSafe,
    <C as Config>::SlotsPerHistoricalRoot: RefUnwindSafe,
    <C as Config>::ValidatorRegistryLimit: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self