circle-infogetSlotLeaders

Learn about getSlotLeaders—including its use cases, code examples, request parameters, response structure, and helpful tips.

The getSlotLeaders RPC method in CoinVera allows you to retrieve a list of validator public keys scheduled to produce blocks for a specific range of slots. This method is helpful when analyzing or predicting short-term leader activity on the Solana network.


✅ Common Use Cases

  • Predicting Near-Term Block Producers Identify which validators are expected to lead block production in upcoming slots.

  • Analyzing Leader Distribution Examine how leadership is distributed across a segment of an epoch.

  • Network Monitoring & Analysis Tools that track validator activity or block propagation can use this method to understand validator participation in upcoming slots.


🧾 Request Parameters

  • startSlot (u64) – Required The first slot (inclusive) from which to begin fetching leader assignments.

  • limit (u64) – Required The number of consecutive slot leaders to return (must be between 1 and 5,000).


📦 Response Structure

Returns an array of base-58 encoded public keys, one for each slot in the requested range, in order.

{
  "result": [
    "5Y6g8zWcR9GVoHqGnBbPmgzUdu1tHuCVDRKLv7fP5Xed",
    "2ABgfX2pRzAGhLkYwPYTeJNXREtxNUb1mC17hCwF41hD",
    ...
  ]
}

Each public key corresponds to the validator scheduled to produce a block for that slot.


🧪 Example

Get Slot Leaders for a Specific Range

Fetches leaders for the next 5 slots starting at a specified slot number.


Code Examples

Example Response


💡 Developer Tips

  • Limit Parameter You can retrieve up to 5,000 slot leaders in one request, which allows insight into a sizable segment of the leader schedule within an epoch.

  • Epoch Boundaries The schedule is fixed per epoch. If your requested range crosses into a new epoch, only slots from the current epoch (where startSlot resides) will be returned—up to the limit or the end of the schedule, depending on node configuration.

  • Supports Future Slot Lookups You can query upcoming (future) slots. The RPC node uses the current leader schedule to project future leaders.

  • High Accuracy Since the leader schedule is deterministic and set at the beginning of an epoch, returned values are reliable unless major network events occur.

  • Difference from getLeaderSchedule

    • getSlotLeaders: Returns a flat, ordered list of leader public keys for a specific slot range.

    • getLeaderSchedule: Returns the full epoch schedule, mapping each validator to all slots they're scheduled to lead.


Use getSlotLeaders when you need a concise, sequential list of upcoming block producers for a well-defined slot range—ideal for validator analysis, staking dashboards, or block propagation modeling.

Last updated