Resolve the Current Epoch's Leader Schedule
A 5-step recipe with Solana. We can help you get access.
Recipe · 5 steps
Resolve the Current Epoch's Leader Schedule
with Solana
Resolve who leads now and who leads next in the current epoch.
- Read the current epoch, the absolute slot, and the position inside the epoch, which anchors every schedule lookup that follows.
- Read the schedule that maps slots onto epochs, including the warmup period and the offset at which a leader schedule is published ahead of its epoch.
- Fetch the leader schedule for the current epoch, keyed by validator identity with the slot indices each one is assigned.
- Identify the validator leading the current slot, the node a client would forward a transaction to right now.
- List the leaders for the slots immediately ahead of the current one, which is what lets a client pre-connect to the next producer instead of the current one.
What you'll need to have ready
- upcomingLeaderCount: How many upcoming slot leaders to list, starting at the current slot.
For your developer
Arazzo workflow solana:leader-schedule, 5 operations: getEpochInfo → getEpochSchedule → getLeaderSchedule → getSlotLeader → getSlotLeaders. Specs on APIs.io.