pub struct ConsensusConstants {
pub confirmation_depth_k: BlockNumber,
pub block_authoring_delay: SlotNumber,
pub pot: PotConsensusConstants,
pub retarget_interval: BlockNumber,
pub slot_probability: (u64, u64),
pub slot_duration: SlotDuration,
pub recent_segments: HistorySize,
pub recent_history_fraction: (HistorySize, HistorySize),
pub min_sector_lifetime: HistorySize,
pub max_block_timestamp_drift: BlockTimestamp,
pub shard_rotation_interval: BlockNumber,
pub shard_rotation_delay: BlockNumber,
}Expand description
Consensus constants
Fields§
§confirmation_depth_k: BlockNumberDepth K after which a block enters the recorded history
Number of slots between slot arrival and when the corresponding block can be produced
pot: PotConsensusConstantsProof-of-time consensus constants
retarget_interval: BlockNumberPeriod of time in blocks after which the solution range is adjusted
slot_probability: (u64, u64)Slot probability
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 segments
max_block_timestamp_drift: BlockTimestampMax block timestamp drift allowed
shard_rotation_interval: BlockNumberNumber of beacon chain blocks between shard rotations.
Every this number of beacon chain blocks PoT entropy is taken to calculate the next shard assignment.
shard_rotation_delay: BlockNumberDelay in beacon chain blocks for the next shard rotation.
Delay after shard assignment is revealed before it actually takes effect (essentially the amount of time for a node to sync the corresponding shard).
Trait Implementations§
Source§impl Clone for ConsensusConstants
impl Clone for ConsensusConstants
Source§fn clone(&self) -> ConsensusConstants
fn clone(&self) -> ConsensusConstants
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConsensusConstants
impl Debug for ConsensusConstants
Source§impl PartialEq for ConsensusConstants
impl PartialEq for ConsensusConstants
impl Copy for ConsensusConstants
impl Eq for ConsensusConstants
impl StructuralPartialEq for ConsensusConstants
Auto Trait Implementations§
impl Freeze for ConsensusConstants
impl RefUnwindSafe for ConsensusConstants
impl Send for ConsensusConstants
impl Sync for ConsensusConstants
impl Unpin for ConsensusConstants
impl UnwindSafe for ConsensusConstants
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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