Skip to content

API Reference / EpochSchedule

Class: EpochSchedule

Defined in: internal.d.ts:202

Configuration for epochs and slots.

Constructors

Constructor

new EpochSchedule(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot): EpochSchedule

Defined in: internal.d.ts:210

Parameters

slotsPerEpoch

bigint

leaderScheduleSlotOffset

bigint

warmup

boolean

Whether epochs start short and grow.

firstNormalEpoch

bigint

firstNormalSlot

bigint

Returns

EpochSchedule

Accessors

firstNormalEpoch

Get Signature

get firstNormalEpoch(): bigint

Defined in: internal.d.ts:228

The first epoch after the warmup period.

Basically: log2(slots_per_epoch) - log2(MINIMUM_SLOTS_PER_EPOCH).

Returns

bigint

Set Signature

set firstNormalEpoch(val): void

Defined in: internal.d.ts:229

Parameters
val

bigint

Returns

void


firstNormalSlot

Get Signature

get firstNormalSlot(): bigint

Defined in: internal.d.ts:235

The first slot after the warmup period.

Basically: MINIMUM_SLOTS_PER_EPOCH * (2.pow(first_normal_epoch) - 1).

Returns

bigint

Set Signature

set firstNormalSlot(val): void

Defined in: internal.d.ts:236

Parameters
val

bigint

Returns

void


leaderScheduleSlotOffset

Get Signature

get leaderScheduleSlotOffset(): bigint

Defined in: internal.d.ts:218

A number of slots before beginning of an epoch to calculate a leader schedule for that epoch.

Returns

bigint

Set Signature

set leaderScheduleSlotOffset(val): void

Defined in: internal.d.ts:219

Parameters
val

bigint

Returns

void


slotsPerEpoch

Get Signature

get slotsPerEpoch(): bigint

Defined in: internal.d.ts:212

The maximum number of slots in each epoch.

Returns

bigint

Set Signature

set slotsPerEpoch(val): void

Defined in: internal.d.ts:213

Parameters
val

bigint

Returns

void


warmup

Get Signature

get warmup(): boolean

Defined in: internal.d.ts:221

Whether epochs start short and grow.

Returns

boolean

Set Signature

set warmup(val): void

Defined in: internal.d.ts:222

Parameters
val

boolean

Returns

void