Learn getEpochSchedule use cases, code examples, request parameters, response structure, and tips.
getEpochSchedule
RPC method returns the epoch schedule information from the cluster’s genesis configuration. This data defines how epochs are structured, including their length and how the leader schedule is determined relative to an epoch’s start.
Understanding the epoch schedule is crucial for applications that need to align with network events, predict epoch boundaries, or understand the leader rotation mechanism.
leaderScheduleSlotOffset
to know how far in advance leader schedules are generated for an upcoming epoch.warmup
, firstNormalEpoch
, and firstNormalSlot
to understand the initial ramp-up phase of the cluster’s epoch lengths if applicable.result
field of the JSON-RPC response will be an object containing the following fields:
slotsPerEpoch
(u64): The maximum number of slots in each epoch (after the warmup period, if any).leaderScheduleSlotOffset
(u64): The number of slots before the start of an epoch for which the leader schedule for that epoch is generated.warmup
(boolean): A boolean indicating whether the cluster has a warmup period where epochs start shorter and gradually increase in length.firstNormalEpoch
(u64): The first epoch number that has the full slotsPerEpoch
length. This is relevant if warmup
is true.firstNormalSlot
(u64): The slot index of the first slot in the firstNormalEpoch
. This is relevant if warmup
is true.slotsPerEpoch
and warmup parameters, can differ significantly between Mainnet Beta, Testnet, and Devnet. Always query the specific cluster you are interested in.warmup
is true
, epochs before firstNormalEpoch
will have fewer slots than slotsPerEpoch
. The exact calculation for warmup epoch lengths is 2^N * MINIMUM_SLOTS_PER_EPOCH
where N is the epoch number (starting from 0) up until firstNormalEpoch
is reached. The MINIMUM_SLOTS_PER_EPOCH
is typically 32.getEpochSchedule
RPC method to understand the fundamental timing and structure of epochs within a Solana cluster.