[][src]Trait store::beacon_state::EthSpec

pub trait EthSpec: 'static + Send + Sync + PartialEq<Self> + Clone + Default + Debug {
    type JustificationBitsLength: Send + Sync + PartialEq<Self::JustificationBitsLength> + Clone + Default + Debug + Unsigned;
    type ShardCount: Send + Sync + PartialEq<Self::ShardCount> + Clone + Debug + Unsigned;
    type MaxValidatorsPerCommittee: Send + Sync + PartialEq<Self::MaxValidatorsPerCommittee> + Clone + Debug + Unsigned;
    type GenesisEpoch: Send + Sync + PartialEq<Self::GenesisEpoch> + Clone + Debug + Unsigned;
    type SlotsPerEpoch: Send + Sync + PartialEq<Self::SlotsPerEpoch> + Clone + Debug + Unsigned;
    type SlotsPerEth1VotingPeriod: Send + Sync + PartialEq<Self::SlotsPerEth1VotingPeriod> + Clone + Debug + Unsigned;
    type SlotsPerHistoricalRoot: Send + Sync + PartialEq<Self::SlotsPerHistoricalRoot> + Clone + Debug + Unsigned;
    type EpochsPerHistoricalVector: Send + Sync + PartialEq<Self::EpochsPerHistoricalVector> + Clone + Debug + Unsigned;
    type EpochsPerSlashingsVector: Send + Sync + PartialEq<Self::EpochsPerSlashingsVector> + Clone + Debug + Unsigned;
    type HistoricalRootsLimit: Send + Sync + PartialEq<Self::HistoricalRootsLimit> + Clone + Debug + Unsigned;
    type ValidatorRegistryLimit: Send + Sync + PartialEq<Self::ValidatorRegistryLimit> + Clone + Debug + Unsigned;
    type MaxProposerSlashings: Send + Sync + PartialEq<Self::MaxProposerSlashings> + Clone + Debug + Unsigned;
    type MaxAttesterSlashings: Send + Sync + PartialEq<Self::MaxAttesterSlashings> + Clone + Debug + Unsigned;
    type MaxAttestations: Send + Sync + PartialEq<Self::MaxAttestations> + Clone + Debug + Unsigned;
    type MaxDeposits: Send + Sync + PartialEq<Self::MaxDeposits> + Clone + Debug + Unsigned;
    type MaxVoluntaryExits: Send + Sync + PartialEq<Self::MaxVoluntaryExits> + Clone + Debug + Unsigned;
    type MaxTransfers: Send + Sync + PartialEq<Self::MaxTransfers> + Clone + Debug + Unsigned;
    type MaxPendingAttestations: Send + Sync + PartialEq<Self::MaxPendingAttestations> + Clone + Debug + Unsigned;
    fn default_spec() -> ChainSpec;

    fn genesis_epoch() -> Epoch { ... }
fn get_committee_count(
        active_validator_count: usize,
        target_committee_size: usize
    ) -> usize { ... }
fn get_shard_delta(
        active_validator_count: usize,
        target_committee_size: usize
    ) -> u64 { ... }
fn minimum_validator_count() -> usize { ... }
fn slots_per_epoch() -> u64 { ... }
fn shard_count() -> usize { ... }
fn slots_per_historical_root() -> usize { ... }
fn epochs_per_historical_vector() -> usize { ... }
fn slots_per_eth1_voting_period() -> usize { ... } }

Associated Types

type JustificationBitsLength: Send + Sync + PartialEq<Self::JustificationBitsLength> + Clone + Default + Debug + Unsigned

type ShardCount: Send + Sync + PartialEq<Self::ShardCount> + Clone + Debug + Unsigned

type MaxValidatorsPerCommittee: Send + Sync + PartialEq<Self::MaxValidatorsPerCommittee> + Clone + Debug + Unsigned

type GenesisEpoch: Send + Sync + PartialEq<Self::GenesisEpoch> + Clone + Debug + Unsigned

type SlotsPerEpoch: Send + Sync + PartialEq<Self::SlotsPerEpoch> + Clone + Debug + Unsigned

type SlotsPerEth1VotingPeriod: Send + Sync + PartialEq<Self::SlotsPerEth1VotingPeriod> + Clone + Debug + Unsigned

type SlotsPerHistoricalRoot: Send + Sync + PartialEq<Self::SlotsPerHistoricalRoot> + Clone + Debug + Unsigned

type EpochsPerHistoricalVector: Send + Sync + PartialEq<Self::EpochsPerHistoricalVector> + Clone + Debug + Unsigned

type EpochsPerSlashingsVector: Send + Sync + PartialEq<Self::EpochsPerSlashingsVector> + Clone + Debug + Unsigned

type HistoricalRootsLimit: Send + Sync + PartialEq<Self::HistoricalRootsLimit> + Clone + Debug + Unsigned

type ValidatorRegistryLimit: Send + Sync + PartialEq<Self::ValidatorRegistryLimit> + Clone + Debug + Unsigned

type MaxProposerSlashings: Send + Sync + PartialEq<Self::MaxProposerSlashings> + Clone + Debug + Unsigned

type MaxAttesterSlashings: Send + Sync + PartialEq<Self::MaxAttesterSlashings> + Clone + Debug + Unsigned

type MaxAttestations: Send + Sync + PartialEq<Self::MaxAttestations> + Clone + Debug + Unsigned

type MaxDeposits: Send + Sync + PartialEq<Self::MaxDeposits> + Clone + Debug + Unsigned

type MaxVoluntaryExits: Send + Sync + PartialEq<Self::MaxVoluntaryExits> + Clone + Debug + Unsigned

type MaxTransfers: Send + Sync + PartialEq<Self::MaxTransfers> + Clone + Debug + Unsigned

type MaxPendingAttestations: Send + Sync + PartialEq<Self::MaxPendingAttestations> + Clone + Debug + Unsigned

The length of the {previous,current}_epoch_attestations lists.

Must be set to MaxAttestations * SlotsPerEpoch

Loading content...

Required methods

fn default_spec() -> ChainSpec

Loading content...

Provided methods

fn genesis_epoch() -> Epoch

fn get_committee_count(
    active_validator_count: usize,
    target_committee_size: usize
) -> usize

Return the number of committees in one epoch.

Spec v0.8.1

fn get_shard_delta(
    active_validator_count: usize,
    target_committee_size: usize
) -> u64

Return the number of shards to increment state.start_shard by in a given epoch.

Spec v0.8.1

fn minimum_validator_count() -> usize

Returns the minimum number of validators required for this spec.

This is the absolute minimum, the number required to make the chain operate in the most basic sense. This count is not required to provide any security guarantees regarding decentralization, entropy, etc.

fn slots_per_epoch() -> u64

Returns the SLOTS_PER_EPOCH constant for this specification.

Spec v0.8.1

fn shard_count() -> usize

Returns the SHARD_COUNT constant for this specification.

Spec v0.8.1

fn slots_per_historical_root() -> usize

Returns the SLOTS_PER_HISTORICAL_ROOT constant for this specification.

Spec v0.8.1

fn epochs_per_historical_vector() -> usize

Returns the EPOCHS_PER_HISTORICAL_VECTOR constant for this specification.

Spec v0.8.1

fn slots_per_eth1_voting_period() -> usize

Returns the SLOTS_PER_ETH1_VOTING_PERIOD constant for this specification.

Spec v0.8.1

Loading content...

Implementors

impl EthSpec for InteropEthSpec[src]

type ShardCount = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

type SlotsPerEpoch = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

type SlotsPerHistoricalRoot = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type SlotsPerEth1VotingPeriod = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

type EpochsPerHistoricalVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type EpochsPerSlashingsVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type MaxPendingAttestations = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type JustificationBitsLength = <MainnetEthSpec as EthSpec>::JustificationBitsLength

type MaxValidatorsPerCommittee = <MainnetEthSpec as EthSpec>::MaxValidatorsPerCommittee

type GenesisEpoch = <MainnetEthSpec as EthSpec>::GenesisEpoch

type HistoricalRootsLimit = <MainnetEthSpec as EthSpec>::HistoricalRootsLimit

type ValidatorRegistryLimit = <MainnetEthSpec as EthSpec>::ValidatorRegistryLimit

type MaxProposerSlashings = <MainnetEthSpec as EthSpec>::MaxProposerSlashings

type MaxAttesterSlashings = <MainnetEthSpec as EthSpec>::MaxAttesterSlashings

type MaxAttestations = <MainnetEthSpec as EthSpec>::MaxAttestations

type MaxDeposits = <MainnetEthSpec as EthSpec>::MaxDeposits

type MaxVoluntaryExits = <MainnetEthSpec as EthSpec>::MaxVoluntaryExits

type MaxTransfers = <MainnetEthSpec as EthSpec>::MaxTransfers

impl EthSpec for MainnetEthSpec[src]

type JustificationBitsLength = UInt<UInt<UInt<UTerm, B1>, B0>, B0>

type ShardCount = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type MaxValidatorsPerCommittee = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type GenesisEpoch = UTerm

type SlotsPerEpoch = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type SlotsPerEth1VotingPeriod = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type SlotsPerHistoricalRoot = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type EpochsPerHistoricalVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type EpochsPerSlashingsVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type HistoricalRootsLimit = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type ValidatorRegistryLimit = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type MaxProposerSlashings = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

type MaxAttesterSlashings = UInt<UTerm, B1>

type MaxAttestations = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type MaxDeposits = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

type MaxVoluntaryExits = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

type MaxTransfers = UTerm

type MaxPendingAttestations = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

impl EthSpec for MinimalEthSpec[src]

type ShardCount = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

type SlotsPerEpoch = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

type SlotsPerEth1VotingPeriod = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

type SlotsPerHistoricalRoot = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type EpochsPerHistoricalVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type EpochsPerSlashingsVector = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

type MaxPendingAttestations = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>

type JustificationBitsLength = <MainnetEthSpec as EthSpec>::JustificationBitsLength

type MaxValidatorsPerCommittee = <MainnetEthSpec as EthSpec>::MaxValidatorsPerCommittee

type GenesisEpoch = <MainnetEthSpec as EthSpec>::GenesisEpoch

type HistoricalRootsLimit = <MainnetEthSpec as EthSpec>::HistoricalRootsLimit

type ValidatorRegistryLimit = <MainnetEthSpec as EthSpec>::ValidatorRegistryLimit

type MaxProposerSlashings = <MainnetEthSpec as EthSpec>::MaxProposerSlashings

type MaxAttesterSlashings = <MainnetEthSpec as EthSpec>::MaxAttesterSlashings

type MaxAttestations = <MainnetEthSpec as EthSpec>::MaxAttestations

type MaxDeposits = <MainnetEthSpec as EthSpec>::MaxDeposits

type MaxVoluntaryExits = <MainnetEthSpec as EthSpec>::MaxVoluntaryExits

type MaxTransfers = <MainnetEthSpec as EthSpec>::MaxTransfers

Loading content...