Parameters
number
required
Start slot number
number
required
Number of slot leaders to return
Response
array
Array of slot leader public keys (base-58 encoded)
Code Examples
Basic Request
Using web3.js
Notes
- Returns the slot leaders for a given range of slots
- The slot leaders are responsible for producing blocks
- The response is immediate as it reads from the current state
- The slot leaders are determined by the network’s leader schedule
- The range must be within the current epoch
Best Practices
- Use appropriate start slot and limit based on your needs
- Cache results when appropriate to reduce RPC load
- Monitor for changes in the leader schedule
- Consider using websocket subscription for real-time updates
- Handle network errors and retry when appropriate
Common Errors
Use Cases
-
Leader Schedule Analysis
-
Leader Schedule Monitoring
-
Leader Schedule Planning