[][src]Struct types::chain_spec::ChainSpec

pub struct ChainSpec {
    pub far_future_epoch: Epoch,
    pub base_rewards_per_epoch: u64,
    pub deposit_contract_tree_depth: u64,
    pub seconds_per_day: u64,
    pub target_committee_size: usize,
    pub min_per_epoch_churn_limit: u64,
    pub churn_limit_quotient: u64,
    pub shuffle_round_count: u8,
    pub min_genesis_active_validator_count: u64,
    pub min_genesis_time: u64,
    pub min_deposit_amount: u64,
    pub max_effective_balance: u64,
    pub ejection_balance: u64,
    pub effective_balance_increment: u64,
    pub genesis_slot: Slot,
    pub bls_withdrawal_prefix_byte: u8,
    pub milliseconds_per_slot: u64,
    pub min_attestation_inclusion_delay: u64,
    pub min_seed_lookahead: Epoch,
    pub activation_exit_delay: u64,
    pub min_validator_withdrawability_delay: Epoch,
    pub persistent_committee_period: u64,
    pub max_epochs_per_crosslink: u64,
    pub min_epochs_to_inactivity_penalty: u64,
    pub base_reward_factor: u64,
    pub whistleblower_reward_quotient: u64,
    pub proposer_reward_quotient: u64,
    pub inactivity_penalty_quotient: u64,
    pub min_slashing_penalty_quotient: u64,
    pub eth1_follow_distance: u64,
    pub boot_nodes: Vec<String>,
    pub network_id: u8,
    pub genesis_fork: Fork,
    // some fields omitted
}

Holds all the "constants" for a BeaconChain.

Spec v0.8.1

Fields

far_future_epoch: Epochbase_rewards_per_epoch: u64deposit_contract_tree_depth: u64seconds_per_day: u64target_committee_size: usizemin_per_epoch_churn_limit: u64churn_limit_quotient: u64shuffle_round_count: u8min_genesis_active_validator_count: u64min_genesis_time: u64min_deposit_amount: u64max_effective_balance: u64ejection_balance: u64effective_balance_increment: u64genesis_slot: Slotbls_withdrawal_prefix_byte: u8milliseconds_per_slot: u64min_attestation_inclusion_delay: u64min_seed_lookahead: Epochactivation_exit_delay: u64min_validator_withdrawability_delay: Epochpersistent_committee_period: u64max_epochs_per_crosslink: u64min_epochs_to_inactivity_penalty: u64base_reward_factor: u64whistleblower_reward_quotient: u64proposer_reward_quotient: u64inactivity_penalty_quotient: u64min_slashing_penalty_quotient: u64eth1_follow_distance: u64boot_nodes: Vec<String>network_id: u8genesis_fork: Fork

Methods

impl ChainSpec[src]

pub fn get_domain(&self, epoch: Epoch, domain: Domain, fork: &Fork) -> u64[src]

Get the domain number that represents the fork meta and signature domain.

Spec v0.8.1

pub fn get_deposit_domain(&self) -> u64[src]

Get the domain for a deposit signature.

Deposits are valid across forks, thus the deposit domain is computed with the fork zeroed.

Spec v0.8.1

pub fn mainnet() -> Self[src]

Returns a ChainSpec compatible with the Ethereum Foundation specification.

Spec v0.8.1

pub fn minimal() -> Self[src]

Ethereum Foundation minimal spec, as defined here:

https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/configs/constant_presets/minimal.yaml

Spec v0.8.1

pub fn interop() -> Self[src]

Interop testing spec

This allows us to customize a chain spec for interop testing.

Trait Implementations

impl Default for ChainSpec[src]

impl Clone for ChainSpec[src]

impl PartialEq<ChainSpec> for ChainSpec[src]

impl Debug for ChainSpec[src]

impl Serialize for ChainSpec[src]

impl<'de> Deserialize<'de> for ChainSpec where
    ChainSpec: Default
[src]

Auto Trait Implementations

impl Send for ChainSpec

impl Unpin for ChainSpec

impl Sync for ChainSpec

impl UnwindSafe for ChainSpec

impl RefUnwindSafe for ChainSpec

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized