Skip to content

API Reference / EpochSchedule

Class: EpochSchedule

Defined in: internal.d.ts:206

Configuration for epochs and slots.

Constructors

Constructor

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

Defined in: internal.d.ts:214

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:232

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:233

Parameters
val

bigint

Returns

void


firstNormalSlot

Get Signature

get firstNormalSlot(): bigint

Defined in: internal.d.ts:239

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:240

Parameters
val

bigint

Returns

void


leaderScheduleSlotOffset

Get Signature

get leaderScheduleSlotOffset(): bigint

Defined in: internal.d.ts:222

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:223

Parameters
val

bigint

Returns

void


slotsPerEpoch

Get Signature

get slotsPerEpoch(): bigint

Defined in: internal.d.ts:216

The maximum number of slots in each epoch.

Returns

bigint

Set Signature

set slotsPerEpoch(val): void

Defined in: internal.d.ts:217

Parameters
val

bigint

Returns

void


warmup

Get Signature

get warmup(): boolean

Defined in: internal.d.ts:225

Whether epochs start short and grow.

Returns

boolean

Set Signature

set warmup(val): void

Defined in: internal.d.ts:226

Parameters
val

boolean

Returns

void