Learn getLeaderSchedule use cases, code examples, request parameters, response structure, and tips.
getLeaderSchedule
RPC method returns the assignment of block production leadership to validators for a specific epoch. Understanding the leader schedule can be useful for network analysis, predicting which validator will produce blocks at certain times, or for tools that interact with specific leaders.
slot
(u64, optional): A slot number. If provided, the leader schedule for the epoch containing this slot will be fetched. If null
or omitted, the leader schedule for the current epoch is fetched.config
(object, optional): A configuration object that can contain:
commitment
(string, optional): Specifies the commitment level. If not provided, the node’s default commitment is used.identity
(string, optional): A base-58 encoded public key of a validator. If provided, the returned schedule will only include slots assigned to this specific validator.result
field of the JSON-RPC response will be:
null
: If the epoch corresponding to the requested slot
(or current epoch if no slot is provided) is not found or its leader schedule is not available (e.g., for a future, uncalculated epoch).1000
and a validator has [0, 1, 5]
in its schedule, it means that validator is the leader for slots 1000
, 1001
, and 1005
.
200000
.
getEpochInfo
to find the start and end slots of an epoch.null
if the network hasn’t calculated it yet.getLeaderSchedule
to query block producer assignments for any given epoch on the Solana network.