getLeaderSchedule | Solana

Solana getLeaderSchedule method

The Solana getLeaderSchedule method retrieves the leader schedule for an epoch.

This method provides the schedule of when each validator is expected to be the leader and produce blocks. It is useful for predicting block production and for network participants to prepare for their slot as a leader.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • epoch — (optional) the epoch for which the leader schedule should be returned. If not provided, the leader schedule for the current epoch is returned.
  • commitment — (optional) the level of commitment desired:
    • processed — the node has processed the block and the block may be on a fork.
    • confirmed — the block is confirmed by the cluster as not being on a fork.
    • finalized — the block is finalized by the cluster.

Response

  • value — the leader schedule:
    • A mapping of public keys to an array of slot indices, indicating when each validator is expected to be the leader.

Use case

A practical use case for getLeaderSchedule is for validators to know when they are expected to produce blocks and for participants to predict block production on the network.

Try the getLeaderSchedule RPC method yourself

Language
Click Try It! to start a request and see the response here!