getHighestSnapshotSlot
Returns the highest slot information that the node has snapshots for.
Common use cases
| Bootstrap new nodes from optimal snapshot sources | When initializing validators or RPC nodes, query this method against multiple peers to find which nodes have the most recent snapshots available, then select the best source for download to minimize initial sync time and avoid stale snapshot sources. |
| Plan disk space and ledger pruning strategies | Calculate how much transaction history exists beyond the latest snapshot by comparing this method's result with current slot, helping operators estimate disk requirements and configure appropriate pruning intervals for archival or non-archival nodes. |
| Build block explorers with complete ledger coverage maps | Combine this method with getFirstAvailableBlock to determine the full range of queryable ledger data, identifying any gaps in historical availability and informing users about the earliest reliably indexed transactions on the node. |
Parameters
No parameters required.
Request
- cURL
- JavaScript
- Python
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": "getHighestSnapshotSlot"
}'
// Using fetch
const response = await fetch('https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "getHighestSnapshotSlot"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = 'https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
data = {
"jsonrpc": "2.0",
"id": 1,
"method": "getHighestSnapshotSlot"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Replace mainnet with devnet in the URL to query devnet instead.
Response
{
"jsonrpc": "2.0",
"result": {
"full": 100,
"incremental": 110
},
"id": 1
}
FAQ and Troubleshooting
Why would incremental be null in the response?
The incremental field is null when the node only has full snapshots available and no incremental snapshots have been created yet based on that full snapshot. This is common on freshly started nodes or during early ledger history.
Can I use this method to get the current slot?
No - this returns the highest snapshot slot (stored ledger states), not the current processing slot. Use getSlot for current slot number. Snapshot slots are always behind the current slot.
How often do snapshot slots update?
Snapshot slot values change based on the node's configured snapshot generation intervals (typically full snapshots every N slots, incremental snapshots more frequently). Check the node's snapshot config for specific intervals.
Do all RPC nodes support this method?
Only nodes running solana-core v1.9+ support getHighestSnapshotSlot. Check your node version with getVersion before using this method.
Related Methods
getSlot
Returns the current slot being processed by the node - different from snapshot slots which represent stored ledger states and always lag behind current slot.
minimumLedgerSlot
Returns the lowest slot the node has ledger information for - complements getHighestSnapshotSlot to determine complete ledger range available on the node.
getFirstAvailableBlock
Returns the oldest confirmed block the node has available - similar ledger boundary query but at block level instead of snapshot slot level.
getVersion
Returns the node's solana-core version - use this to verify node version compatibility.
External Resources
- Solana Official Documentation
- Agave Validator Bootstrap Source Code - Real-world implementation showing how validators use this method to find snapshot sources during node initialization and peer discovery.
- Agave Snapshot Utilities Reference - Internal snapshot management functions including highest snapshot detection algorithms used by the RPC server implementation.