Struct sp_consensus_babe::BabeConfigurationV1 
source · pub struct BabeConfigurationV1 {
    pub slot_duration: u64,
    pub epoch_length: u64,
    pub c: (u64, u64),
    pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>,
    pub randomness: Randomness,
    pub secondary_slots: bool,
}Expand description
Configuration data used by the BABE consensus engine.
Fields§
§slot_duration: u64The slot duration in milliseconds for BABE. Currently, only the value provided by this type at genesis will be used.
Dynamic slot duration may be supported in the future.
epoch_length: u64The duration of epochs in slots.
c: (u64, u64)A constant value that is used in the threshold calculation formula.
Expressed as a rational where the first member of the tuple is the
numerator and the second is the denominator. The rational should
represent a value between 0 and 1.
In the threshold formula calculation, 1 - c represents the probability
of a slot being empty.
The authorities for the genesis epoch.
randomness: RandomnessThe randomness for the genesis epoch.
secondary_slots: boolWhether this chain should run with secondary slots, which are assigned in round-robin manner.
Trait Implementations§
source§impl Clone for BabeConfigurationV1
 
impl Clone for BabeConfigurationV1
source§fn clone(&self) -> BabeConfigurationV1
 
fn clone(&self) -> BabeConfigurationV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for BabeConfigurationV1
 
impl Debug for BabeConfigurationV1
source§impl Decode for BabeConfigurationV1
 
impl Decode for BabeConfigurationV1
source§fn decode<__CodecInputEdqy: Input>(
    __codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
 
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
§fn decode_into<I>(
    input: &mut I,
    dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
    I: Input,
 
fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
    I: Input,
 
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
§fn encoded_fixed_size() -> Option<usize>
 
fn encoded_fixed_size() -> Option<usize>
source§impl Encode for BabeConfigurationV1
 
impl Encode for BabeConfigurationV1
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
    &self,
    __codec_dest_edqy: &mut __CodecOutputEdqy
)
 
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
    F: FnOnce(&[u8]) -> R,
 
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
§fn encoded_size(&self) -> usize
 
fn encoded_size(&self) -> usize
source§impl From<BabeConfigurationV1> for BabeConfiguration
 
impl From<BabeConfigurationV1> for BabeConfiguration
source§fn from(v1: BabeConfigurationV1) -> Self
 
fn from(v1: BabeConfigurationV1) -> Self
source§impl PartialEq<BabeConfigurationV1> for BabeConfigurationV1
 
impl PartialEq<BabeConfigurationV1> for BabeConfigurationV1
source§fn eq(&self, other: &BabeConfigurationV1) -> bool
 
fn eq(&self, other: &BabeConfigurationV1) -> bool
self and other values to be equal, and is used
by ==.impl EncodeLike<BabeConfigurationV1> for BabeConfigurationV1
impl Eq for BabeConfigurationV1
impl StructuralEq for BabeConfigurationV1
impl StructuralPartialEq for BabeConfigurationV1
Auto Trait Implementations§
impl RefUnwindSafe for BabeConfigurationV1
impl Send for BabeConfigurationV1
impl Sync for BabeConfigurationV1
impl Unpin for BabeConfigurationV1
impl UnwindSafe for BabeConfigurationV1
Blanket Implementations§
source§impl<T> CheckedConversion for T
 
impl<T> CheckedConversion for T
§impl<T> DecodeAll for Twhere
    T: Decode,
 
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
 
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
    T: Decode,
 
impl<T> DecodeLimit for Twhere T: Decode,
source§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
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, Outer> IsWrappedBy<Outer> for Twhere
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>,
 
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> KeyedVec for Twhere
    T: Codec,
 
impl<T> KeyedVec for Twhere T: Codec,
§impl<T> Pointable for T
 
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
 
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
    Self: UniqueSaturatedFrom<T>,
 
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
    Self: UniqueSaturatedInto<T>,
 
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
    T: UncheckedFrom<S>,
 
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
 
fn unchecked_into(self) -> T
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
    T: Bounded,
    S: TryInto<T>,
 
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
 
fn unique_saturated_into(self) -> T
T.