pub struct EpochConfig {Show 14 fields
pub epoch_length: BlockHeightDelta,
pub num_block_producer_seats: NumSeats,
pub num_block_producer_seats_per_shard: Vec<NumSeats>,
pub avg_hidden_validator_seats_per_shard: Vec<NumSeats>,
pub block_producer_kickout_threshold: u8,
pub chunk_producer_kickout_threshold: u8,
pub validator_max_kickout_pledge_perc: u8,
pub online_min_threshold: Rational32,
pub online_max_threshold: Rational32,
pub fishermen_threshold: Balance,
pub minimum_pledge_divisor: u64,
pub protocol_upgrade_pledge_threshold: Rational32,
pub shard_layout: ShardLayout,
pub validator_selection_config: ValidatorSelectionConfig,
}Expand description
Epoch config, determines validator assignment for given epoch. Can change from epoch to epoch depending on the sharding and other parameters, etc.
Fields§
§epoch_length: BlockHeightDeltaEpoch length in block heights.
num_block_producer_seats: NumSeatsNumber of seats for block producers.
num_block_producer_seats_per_shard: Vec<NumSeats>Number of seats of block producers per each shard.
Expected number of hidden validator seats per each shard.
block_producer_kickout_threshold: u8Criterion for kicking out block producers.
chunk_producer_kickout_threshold: u8Criterion for kicking out chunk producers.
validator_max_kickout_pledge_perc: u8Max ratio of validators that we can kick out in an epoch
online_min_threshold: Rational32Online minimum threshold below which validator doesn’t receive reward.
online_max_threshold: Rational32Online maximum threshold above which validator gets full reward.
fishermen_threshold: BalancePledge threshold for becoming a fisherman.
minimum_pledge_divisor: u64The minimum pledge required for staking is last seat price divided by this number.
protocol_upgrade_pledge_threshold: Rational32Threshold of pledge that needs to indicate that they ready for upgrade.
shard_layout: ShardLayoutShard layout of this epoch, may change from epoch to epoch
validator_selection_config: ValidatorSelectionConfigAdditional config for validator selection algorithm
Trait Implementations§
Source§impl Clone for EpochConfig
impl Clone for EpochConfig
Source§fn clone(&self) -> EpochConfig
fn clone(&self) -> EpochConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EpochConfig
impl Debug for EpochConfig
Source§impl PartialEq for EpochConfig
impl PartialEq for EpochConfig
impl Eq for EpochConfig
impl StructuralPartialEq for EpochConfig
Auto Trait Implementations§
impl Freeze for EpochConfig
impl RefUnwindSafe for EpochConfig
impl Send for EpochConfig
impl Sync for EpochConfig
impl Unpin for EpochConfig
impl UnwindSafe for EpochConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more