[][src]Trait types::eth_spec::EthSpec

pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq {
    type JustificationBitsLength: Unsigned + Clone + Sync + Send + Debug + PartialEq + Default;
    type ShardCount: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxValidatorsPerCommittee: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type GenesisEpoch: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type SlotsPerEpoch: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type SlotsPerEth1VotingPeriod: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type SlotsPerHistoricalRoot: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type EpochsPerHistoricalVector: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type EpochsPerSlashingsVector: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type HistoricalRootsLimit: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type ValidatorRegistryLimit: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxProposerSlashings: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxAttesterSlashings: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxAttestations: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxDeposits: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxVoluntaryExits: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxTransfers: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    type MaxPendingAttestations: Unsigned + Clone + Sync + Send + Debug + PartialEq;
    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: Unsigned + Clone + Sync + Send + Debug + PartialEq + Default

type ShardCount: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxValidatorsPerCommittee: Unsigned + Clone + Sync + Send + Debug + PartialEq

type GenesisEpoch: Unsigned + Clone + Sync + Send + Debug + PartialEq

type SlotsPerEpoch: Unsigned + Clone + Sync + Send + Debug + PartialEq

type SlotsPerEth1VotingPeriod: Unsigned + Clone + Sync + Send + Debug + PartialEq

type SlotsPerHistoricalRoot: Unsigned + Clone + Sync + Send + Debug + PartialEq

type EpochsPerHistoricalVector: Unsigned + Clone + Sync + Send + Debug + PartialEq

type EpochsPerSlashingsVector: Unsigned + Clone + Sync + Send + Debug + PartialEq

type HistoricalRootsLimit: Unsigned + Clone + Sync + Send + Debug + PartialEq

type ValidatorRegistryLimit: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxProposerSlashings: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxAttesterSlashings: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxAttestations: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxDeposits: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxVoluntaryExits: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxTransfers: Unsigned + Clone + Sync + Send + Debug + PartialEq

type MaxPendingAttestations: Unsigned + Clone + Sync + Send + Debug + PartialEq

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]

impl EthSpec for MainnetEthSpec[src]

impl EthSpec for MinimalEthSpec[src]

Loading content...