getEpochSchedule
Learn getEpochSchedule use cases, code examples, request parameters, response structure, and tips.
The getEpochSchedule RPC method returns information about the epoch schedule configuration from the cluster’s genesis settings. It outlines how epochs are structured, including slot counts and leader scheduling mechanics. This data is essential for aligning application logic with Solana’s timing model.
✅ Common Use Cases
Predict Epoch Boundaries Determine the number of slots in an epoch to estimate how soon the current epoch will end and when the next will begin.
Understand Leader Schedule Offsets Retrieve the
leaderScheduleSlotOffsetto know how far in advance validator leader schedules are generated.Analyze Network Initialization Identify whether the network used a warmup phase, and if so, when full-length epochs began (via
firstNormalEpochandfirstNormalSlot).Build Monitoring and Analytics Tools Use epoch timing details to visualize epoch transitions and validate synchronization behaviors across clusters.
🛠 Request Parameters
This method does not require any parameters.
📦 Response Structure
The response object contains the following fields:
slotsPerEpoch
u64
Number of slots in a full epoch (post-warmup).
leaderScheduleSlotOffset
u64
Number of slots before an epoch when its leader schedule is generated.
warmup
bool
true if the cluster had shorter initial epochs that ramped up gradually.
firstNormalEpoch
u64
First epoch with full-length slots (slotsPerEpoch).
firstNormalSlot
u64
The slot at which firstNormalEpoch begins.
💡 Example: Get Epoch Schedule
Code Examples
Example Response
🧠 Developer Tips
Epoch Schedule Is Static This data comes from the cluster’s genesis configuration and typically does not change unless there’s a protocol upgrade or network reset.
Cluster-Specific Behavior Parameters like
slotsPerEpochandwarmupvary between Mainnet, Testnet, and Devnet. Always query the correct environment.Warmup Epoch Calculations If
warmupistrue, early epochs use exponentially increasing lengths:where
Nis the epoch index, starting from 0.MINIMUM_SLOTS_PER_EPOCHis usually 32.Use for Time Estimation Combine with
getEpochInfoto estimate time remaining in the current epoch or project when epoch transitions will occur.
Last updated