[][src]Trait beacon::Config

pub trait Config {
    type Hasher: Hasher<Out = H256>;
    fn shard_count(&self) -> usize;
fn target_committee_size(&self) -> usize;
fn max_balance_churn_quotient(&self) -> Gwei;
fn max_indices_per_slashable_vote(&self) -> usize;
fn max_exit_dequeues_per_epoch(&self) -> usize;
fn shuffle_round_count(&self) -> usize;
fn deposit_contract_tree_depth(&self) -> usize;
fn min_deposit_amount(&self) -> Gwei;
fn max_deposit_amount(&self) -> Gwei;
fn fork_choice_balance_increment(&self) -> Gwei;
fn ejection_balance(&self) -> Gwei;
fn genesis_fork_version(&self) -> Version;
fn genesis_slot(&self) -> Slot;
fn genesis_start_shard(&self) -> Shard;
fn bls_withdrawal_prefix_byte(&self) -> u8;
fn seconds_per_slot(&self) -> u64;
fn min_attestation_inclusion_delay(&self) -> Slot;
fn slots_per_epoch(&self) -> Slot;
fn min_seed_lookahead(&self) -> Epoch;
fn activation_exit_delay(&self) -> Epoch;
fn epochs_per_eth1_voting_period(&self) -> Epoch;
fn slots_per_historical_root(&self) -> usize;
fn min_validator_withdrawability_delay(&self) -> Epoch;
fn persistent_committee_period(&self) -> Epoch;
fn latest_randao_mixes_length(&self) -> usize;
fn latest_active_index_roots_length(&self) -> usize;
fn latest_slashed_exit_length(&self) -> usize;
fn base_reward_quotient(&self) -> Gwei;
fn whistleblower_reward_quotient(&self) -> Gwei;
fn attestation_inclusion_reward_quotient(&self) -> Gwei;
fn inactivity_penalty_quotient(&self) -> Gwei;
fn min_penalty_quotient(&self) -> Gwei;
fn max_proposer_slashings(&self) -> usize;
fn max_attester_slashings(&self) -> usize;
fn max_attestations(&self) -> usize;
fn max_deposits(&self) -> usize;
fn max_voluntary_exits(&self) -> usize;
fn max_transfers(&self) -> usize;
fn domain_beacon_block(&self) -> u64;
fn domain_randao(&self) -> u64;
fn domain_attestation(&self) -> u64;
fn domain_deposit(&self) -> u64;
fn domain_voluntary_exit(&self) -> u64;
fn domain_transfer(&self) -> u64;
fn far_future_epoch(&self) -> Epoch;
fn domain_id(&self, fork: &Fork, epoch: Epoch, typ: u64) -> u64;
fn bls_verify(
        &self,
        pubkey: &ValidatorId,
        message: &H256,
        signature: &Signature,
        domain: u64
    ) -> bool;
fn bls_aggregate_pubkeys(
        &self,
        pubkeys: &[ValidatorId]
    ) -> Option<ValidatorId>;
fn bls_verify_multiple(
        &self,
        pubkeys: &[ValidatorId],
        messages: &[H256],
        signature: &Signature,
        domain: u64
    ) -> bool; fn genesis_epoch(&self) -> Epoch { ... }
fn hash(&self, seed: &[u8]) -> H256 { ... }
fn hash2(&self, seed: &[u8], a: &[u8]) -> H256 { ... }
fn hash3(&self, seed: &[u8], a: &[u8], b: &[u8]) -> H256 { ... }
fn slot_to_epoch(&self, slot: Slot) -> Epoch { ... }
fn epoch_start_slot(&self, epoch: Epoch) -> Slot { ... }
fn permuted_index(&self, index: usize, seed: &H256, len: usize) -> usize { ... }
fn compute_committee(
        &self,
        validators: &[ValidatorIndex],
        seed: &H256,
        index: usize,
        total_committees: usize
    ) -> Vec<ValidatorIndex> { ... }
fn epoch_committee_count(&self, active_validator_count: usize) -> usize { ... } }

Constants used in beacon block.

Associated Types

type Hasher: Hasher<Out = H256>

Hash function.

Loading content...

Required methods

fn shard_count(&self) -> usize

Shard count.

fn target_committee_size(&self) -> usize

Target committee size.

fn max_balance_churn_quotient(&self) -> Gwei

Maximum balance churn quotient.

fn max_indices_per_slashable_vote(&self) -> usize

Maximum indices per slashable vote.

fn max_exit_dequeues_per_epoch(&self) -> usize

Maximum exit dequeues per epoch.

fn shuffle_round_count(&self) -> usize

Shuffle round count.

fn deposit_contract_tree_depth(&self) -> usize

Deposit contract tree depth.

fn min_deposit_amount(&self) -> Gwei

Minimum deposit amount.

fn max_deposit_amount(&self) -> Gwei

Maximum deposit amount.

fn fork_choice_balance_increment(&self) -> Gwei

Fork choice balance increment.

fn ejection_balance(&self) -> Gwei

Ejection balance.

fn genesis_fork_version(&self) -> Version

Genesis fork version.

fn genesis_slot(&self) -> Slot

Genesis slot.

fn genesis_start_shard(&self) -> Shard

Genesis start shard.

fn bls_withdrawal_prefix_byte(&self) -> u8

BLS withdrawal prefix byte.

fn seconds_per_slot(&self) -> u64

Seconds per slot.

fn min_attestation_inclusion_delay(&self) -> Slot

Minimum attestation inclusion delay.

fn slots_per_epoch(&self) -> Slot

Slots per epoch.

fn min_seed_lookahead(&self) -> Epoch

Minimum seed lookahead.

fn activation_exit_delay(&self) -> Epoch

Activation exit delay.

fn epochs_per_eth1_voting_period(&self) -> Epoch

Epoch per eth1 voting period.

fn slots_per_historical_root(&self) -> usize

Slots per historical root.

fn min_validator_withdrawability_delay(&self) -> Epoch

Minimal validator withdrawability delay.

fn persistent_committee_period(&self) -> Epoch

Persistent committee period.

fn latest_randao_mixes_length(&self) -> usize

Latest randao mixes length.

fn latest_active_index_roots_length(&self) -> usize

Latest active index roots length.

fn latest_slashed_exit_length(&self) -> usize

Latest slashed exit length.

fn base_reward_quotient(&self) -> Gwei

Base reward quotient.

fn whistleblower_reward_quotient(&self) -> Gwei

Whistleblower reward quotient.

fn attestation_inclusion_reward_quotient(&self) -> Gwei

Attestation inclusion reward quotient.

fn inactivity_penalty_quotient(&self) -> Gwei

Inactivity penalty quotient.

fn min_penalty_quotient(&self) -> Gwei

Minimal penalty quotient.

fn max_proposer_slashings(&self) -> usize

Maximum proposer slashings per block.

fn max_attester_slashings(&self) -> usize

Maximum attester slashings per block.

fn max_attestations(&self) -> usize

Maximum attestations per block.

fn max_deposits(&self) -> usize

Maximum deposits per block.

fn max_voluntary_exits(&self) -> usize

Maximum voluntary exits per block.

fn max_transfers(&self) -> usize

Maximum transfers per block.

fn domain_beacon_block(&self) -> u64

Beacon block domain.

fn domain_randao(&self) -> u64

Randao domain.

fn domain_attestation(&self) -> u64

Attestation domain.

fn domain_deposit(&self) -> u64

Deposit domain.

fn domain_voluntary_exit(&self) -> u64

Voluntary exit domain.

fn domain_transfer(&self) -> u64

Transfer domain.

fn far_future_epoch(&self) -> Epoch

Far future epoch.

fn domain_id(&self, fork: &Fork, epoch: Epoch, typ: u64) -> u64

Get domain id for given fork, epoch and type.

fn bls_verify(
    &self,
    pubkey: &ValidatorId,
    message: &H256,
    signature: &Signature,
    domain: u64
) -> bool

Verify BLS signature.

fn bls_aggregate_pubkeys(&self, pubkeys: &[ValidatorId]) -> Option<ValidatorId>

Aggregate BLS public keys.

fn bls_verify_multiple(
    &self,
    pubkeys: &[ValidatorId],
    messages: &[H256],
    signature: &Signature,
    domain: u64
) -> bool

Verify multiple BLS signatures.

Loading content...

Provided methods

fn genesis_epoch(&self) -> Epoch

Genesis epoch.

fn hash(&self, seed: &[u8]) -> H256

Hash bytes with a hasher.

fn hash2(&self, seed: &[u8], a: &[u8]) -> H256

Hash two bytes with a hasher.

fn hash3(&self, seed: &[u8], a: &[u8], b: &[u8]) -> H256

Hash three bytes with a hasher.

fn slot_to_epoch(&self, slot: Slot) -> Epoch

Convert slot into epoch.

fn epoch_start_slot(&self, epoch: Epoch) -> Slot

Get start slot for an epoch.

fn permuted_index(&self, index: usize, seed: &H256, len: usize) -> usize

Get the permuted index.

fn compute_committee(
    &self,
    validators: &[ValidatorIndex],
    seed: &H256,
    index: usize,
    total_committees: usize
) -> Vec<ValidatorIndex>

Compute committee.

fn epoch_committee_count(&self, active_validator_count: usize) -> usize

Get epoch committee count.

Loading content...

Implementors

impl Config for NoVerificationConfig[src]

type Hasher = KeccakHasher

fn genesis_epoch(&self) -> Epoch[src]

fn hash(&self, seed: &[u8]) -> H256[src]

fn hash2(&self, seed: &[u8], a: &[u8]) -> H256[src]

fn hash3(&self, seed: &[u8], a: &[u8], b: &[u8]) -> H256[src]

fn slot_to_epoch(&self, slot: Slot) -> Epoch[src]

fn epoch_start_slot(&self, epoch: Epoch) -> Slot[src]

fn permuted_index(&self, index: usize, seed: &H256, len: usize) -> usize[src]

fn compute_committee(
    &self,
    validators: &[ValidatorIndex],
    seed: &H256,
    index: usize,
    total_committees: usize
) -> Vec<ValidatorIndex>
[src]

fn epoch_committee_count(&self, active_validator_count: usize) -> usize[src]

Loading content...