getHighestSnapshotSlot — Solana RPC Method
getHighestSnapshotSlot returns the highest slot for which the node has generated a full snapshot and, if available, the highest incremental snapshot. Snapshots are periodic checkpoints of the entire account state that allow new validators to bootstrap quickly.
Parameters
This method takes no parameters.
Request
curl -X POST https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getHighestSnapshotSlot",
"params": []
}'
TypeScript (@solana/kit)
import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const snapshot = await rpc.getHighestSnapshotSlot().send();
console.log(`Full snapshot: slot ${snapshot.full}`);
if (snapshot.incremental !== null) {
console.log(`Incremental snapshot: slot ${snapshot.incremental}`);
}
Response
{
"jsonrpc": "2.0",
"result": {
"full": 341100000,
"incremental": 341195000
},
"id": 1
}
| Field | Type | Description |
|---|---|---|
full | u64 | Highest slot for which a full snapshot exists. |
incremental | u64 or null | Highest slot for which an incremental snapshot exists, or null if no incremental snapshot is available. |
Full vs. incremental snapshots
- Full snapshot: a complete dump of all account state at a specific slot. Large (tens of GB on mainnet) and generated infrequently (typically once per epoch).
- Incremental snapshot: contains only the accounts that changed since the last full snapshot. Smaller and generated more frequently (every few thousand slots, depending on configuration).
A new validator starting up downloads the latest full snapshot and optionally the latest incremental snapshot on top of it, then replays the remaining ledger entries to reach the current slot.
Common errors
- No snapshot available — if the node has not yet generated any snapshots (e.g., it just started), an error is returned instead of a result.
Performance
This method reads local node metadata and returns immediately. The response is always a small, fixed-size object. Safe to call periodically for monitoring node state.
FAQ
What are snapshots used for? Snapshots allow new validators and RPC nodes to bootstrap quickly without replaying the entire ledger from genesis. A node downloads the latest snapshot, restoring the full account state at that slot, then replays only the slots after the snapshot.
How often are full snapshots generated?
By default, validators generate a full snapshot once per epoch (approximately every 2 days). The exact frequency depends on the node’s --full-snapshot-interval-slots configuration.
Why might incremental be null? The node either has incremental snapshots disabled or has not generated one since the last full snapshot. Not all node configurations produce incremental snapshots.
How do I use this for monitoring?
Compare the full slot with the current slot from getEpochInfo. If the full snapshot is more than one epoch old, the node may have issues generating snapshots. The incremental snapshot should be relatively recent if enabled.
Updated: