Skip to main content

getSlotLeader

Returns the current slot leader

Common use cases
Identifying Block Producers for Transaction RoutingApplications use getSlotLeader to identify which validator is currently producing blocks, enabling optimized transaction routing by sending transactions directly to the active leader's TPU endpoint for faster confirmation times.
Monitoring Leader Transitions for Network AnalysisNetwork monitoring tools and analytics platforms track slot leaders across epochs to analyze validator participation, detect leader schedule patterns, and measure block production performance metrics across the network.
Verifying Leader Schedule CorrectnessValidators and infrastructure operators query the current slot leader to verify their local leader schedule computation matches the network consensus, ensuring proper block production coordination during epoch transitions.

Parameters

config (object, optional)

Configuration object containing the following fields:

Fields:

  • commitment (string): The commitment describes how finalized a block is at that point in time. See Configuring State Commitment.
  • minContextSlot (number): The minimum slot that the request can be evaluated at

Request

curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlotLeader",
"params": [
{
"commitment": "finalized"
}
]
}'
Network Selection

Replace mainnet with devnet in the URL to query devnet instead.

Response

{
"jsonrpc": "2.0",
"result": "ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS",
"id": 1
}

Response Fields

Return value: string

Node identity Pubkey as base-58 encoded string

FAQ and Troubleshooting

How often does the slot leader change?

The slot leader changes every slot (approximately 400ms). Each validator is assigned multiple consecutive slots during their scheduled leader periods within an epoch.

Can I predict future slot leaders?

Yes, use getSlotLeaders to fetch the leader schedule for a range of future slots. The schedule is deterministic and computed at the start of each epoch based on validator stake weights.

Why does getSlotLeader return a pubkey instead of full validator info?

The method returns only the validator's identity pubkey for efficiency. Use getClusterNodes to resolve the pubkey to full connection details (IP, ports, TPU endpoints) if needed for direct communication.

getSlot
Returns the current slot number, essential for determining which slot to query for its leader

getSlotLeaders
Fetches leader schedule for a range of slots, useful for predicting future leaders and batch processing

getClusterNodes
Provides full validator connection info (TPU endpoints) needed after identifying the slot leader for direct transaction routing

getEpochInfo
Returns epoch timing details including slots per epoch, helpful for understanding leader schedule rotation periods

External Resources