getEpochSchedule

The getEpochSchedule method returns the epoch schedule information, which defines how epochs are structured and how they evolve over time on the Solana network. This configuration is set at genesis and determines the length of epochs and the warmup period for the network.

Solana's epoch schedule includes a "warmup" mechanism where early epochs are shorter and gradually increase to the full epoch length. This design helps the network stabilize during its initial operation. After the warmup period completes, all subsequent epochs have a consistent length defined by slotsPerEpoch. Understanding the epoch schedule is crucial for applications that need to calculate epoch boundaries, predict future epoch transitions, or implement time-based logic that spans multiple epochs.

The epoch schedule is a fundamental network constant that rarely changes, making it safe to cache this information. However, querying it explicitly ensures your application uses the correct values for the specific Solana cluster (mainnet, testnet, or devnet may have different schedules). This information is essential for building accurate epoch calculators, staking dashboards, and any application that needs to reason about network timing.


Parameters

parameter
type
description
config
object
Optional configuration object (currently no config options are available)
Return Object
field
type
description
slotsPerEpoch
number
The maximum number of slots in each epoch after warmup
leaderScheduleSlotOffset
number
The number of slots before the beginning of an epoch to calculate the leader schedule for that epoch
warmup
boolean
Whether the network uses epochs of increasing length during warmup (typically true)
firstNormalEpoch
number
The first epoch with the full slotsPerEpoch length (after warmup completes)
firstNormalSlot
number
The first slot of the first normal epoch
Request Example
Request
Response Example
Response

Tip: On Solana mainnet, slotsPerEpoch is typically 432,000 slots (approximately 2-3 days at 400ms per slot). This value can be safely cached as it doesn't change during network operation. Use this with getEpochInfo to calculate precise epoch boundaries.


Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?