pub enum ChainConstants {
V0 {
confirmation_depth_k: BlockNumber,
block_authoring_delay: Slot,
era_duration: BlockNumber,
slot_probability: (u64, u64),
slot_duration: SlotDuration,
recent_segments: HistorySize,
recent_history_fraction: (HistorySize, HistorySize),
min_sector_lifetime: HistorySize,
},
}
Expand description
Subspace blockchain constants.
Variants§
V0
V0 of the chain constants.
Fields
confirmation_depth_k: BlockNumber
Depth K
after which a block enters the recorded history.
Number of slots between slot arrival and when corresponding block can be produced.
era_duration: BlockNumber
Era duration in blocks.
slot_duration: SlotDuration
The slot duration in milliseconds.
recent_segments: HistorySize
Number of latest archived segments that are considered “recent history”.
recent_history_fraction: (HistorySize, HistorySize)
Fraction of pieces from the “recent history” (recent_segments
) in each sector.
min_sector_lifetime: HistorySize
Minimum lifetime of a plotted sector, measured in archived segment.
Implementations§
source§impl ChainConstants
impl ChainConstants
sourcepub fn confirmation_depth_k(&self) -> BlockNumber
pub fn confirmation_depth_k(&self) -> BlockNumber
Depth K
after which a block enters the recorded history.
sourcepub fn era_duration(&self) -> BlockNumber
pub fn era_duration(&self) -> BlockNumber
Era duration in blocks.
Number of slots between slot arrival and when corresponding block can be produced.
sourcepub fn slot_probability(&self) -> (u64, u64)
pub fn slot_probability(&self) -> (u64, u64)
Slot probability.
sourcepub fn slot_duration(&self) -> SlotDuration
pub fn slot_duration(&self) -> SlotDuration
The slot duration in milliseconds.
sourcepub fn recent_segments(&self) -> HistorySize
pub fn recent_segments(&self) -> HistorySize
Number of latest archived segments that are considered “recent history”.
sourcepub fn recent_history_fraction(&self) -> (HistorySize, HistorySize)
pub fn recent_history_fraction(&self) -> (HistorySize, HistorySize)
Fraction of pieces from the “recent history” (recent_segments
) in each sector.
sourcepub fn min_sector_lifetime(&self) -> HistorySize
pub fn min_sector_lifetime(&self) -> HistorySize
Minimum lifetime of a plotted sector, measured in archived segment.
Trait Implementations§
source§impl Clone for ChainConstants
impl Clone for ChainConstants
source§fn clone(&self) -> ChainConstants
fn clone(&self) -> ChainConstants
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChainConstants
impl Debug for ChainConstants
source§impl Decode for ChainConstants
impl Decode for ChainConstants
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 ChainConstants
impl Encode for ChainConstants
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
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) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl PartialEq for ChainConstants
impl PartialEq for ChainConstants
source§impl TypeInfo for ChainConstants
impl TypeInfo for ChainConstants
impl Copy for ChainConstants
impl EncodeLike for ChainConstants
impl Eq for ChainConstants
impl StructuralPartialEq for ChainConstants
Auto Trait Implementations§
impl Freeze for ChainConstants
impl RefUnwindSafe for ChainConstants
impl Send for ChainConstants
impl Sync for ChainConstants
impl Unpin for ChainConstants
impl UnwindSafe for ChainConstants
Blanket Implementations§
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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 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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.