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: BlockNumberDepth K after which a block enters the recorded history.
Number of slots between slot arrival and when corresponding block can be produced.
era_duration: BlockNumberEra duration in blocks.
slot_duration: SlotDurationThe slot duration in milliseconds.
recent_segments: HistorySizeNumber 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: HistorySizeMinimum 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,
§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<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§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.