EpochSchedule class

Epoch Schedule

Inheritance

Constructors

EpochSchedule.new({required u64 slotsPerEpoch, required u64 leaderScheduleSlotOffset, required bool warmup, required u64 firstNormalEpoch, required u64 firstNormalSlot})
Epoch schedule information from a cluster's genesis config.
const
EpochSchedule.fromJson(Map<String, dynamic> json)
Creates an instance of this class from the constructor parameters defined in the json object.
factory

Properties

firstNormalEpoch u64
The first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM_SLOTS_PER_EPOCH).
final
firstNormalSlot u64
MINIMUM_SLOTS_PER_EPOCH * (2.pow(firstNormalEpoch) - 1).
final
hashCode int
The hash code for this object.
no setterinherited
leaderScheduleSlotOffset u64
The number of slots before beginning an epoch to calculate a leader schedule for that epoch.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slotsPerEpoch u64
The maximum number of slots in each epoch.
final
warmup bool
Whether epochs start short and grow.
final

Methods

getEpoch(u64 slot) u64
getEpochAndSlotIndex(u64 slot) List<u64>
getFirstSlotInEpoch(u64 epoch) u64
getLastSlotInEpoch(u64 epoch) u64
getSlotsInEpoch(u64 epoch) u64
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialises this class into a JSON object.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

tryFromJson(Map<String, dynamic>? json) EpochSchedule?
Creates an instance of this class from the constructor parameters defined in the json object.
override

Constants

minimumSlotPerEpoch → const int
The minimum number of slots per epoch.