get Leader Schedule
Returns the full slot-leader assignment for an epoch, grouped by validator identity.
getLeaderSchedule returns the leader schedule for the epoch containing a given slot: every validator identity mapped to the slots it leads. Returned slot numbers are epoch-relative indexes, not absolute; add the epoch's first slot to convert.
A single fetch per epoch supports looking up leaders locally, instead of calling getSlotLeader or getSlotLeaders per slot.
Parameters
params is a JSON array, with values in this order: slot, config.
Any slot within the target epoch. Omit (pass null) to use the current epoch.
Optional configuration.
Show propertiesProperties
Bank state to compute the schedule from.
finalizedconfirmedprocessedRestrict the result to a single validator identity, base-58 encoded. The response then contains at most one key.
Result
Map of validator identity to the epoch-relative slot indexes it leads, or null if the epoch's schedule can't be determined (for example, a future epoch too far ahead to have been computed yet).
Show one ofOne of
A dynamic map keyed by validator identity (base-58, not enumerable ahead of time), where each value is an array of integers: the epoch-relative slot indexes (0-based from the epoch's first slot) that identity leads.
Notes
- Slot numbers are indexes within the epoch (0 at its first slot); adding
getEpochInfo'sabsoluteSlot - slotIndexconverts one to an absolute slot. - A validator typically leads dozens to hundreds of 4-slot runs per 432,000-slot epoch, depending on stake weight; the example above is trimmed to 3 runs.
identityscopes the result to one validator; without it, the response enumerates every leader for the whole epoch.