getHighestSnapshotSlot – Solana
The getHighestSnapshotSlot JSON-RPC method retrieves the highest slot information that the node has snapshots for.
This method is only available in solana-core v1.9 or newer. For solana-core v1.8 and below, use the getSnapshotSlot method instead.
The getHighestSnapshotSlot RPC Solana method returns the highest full snapshot slot and, if available, the highest incremental snapshot slot based on the full snapshot slot. This allows validators and nodes to determine the most recent snapshot they can use for ledger restoration and fast bootstrapping.
Supported Networks
This method is accessible through Solana API endpoints:
Mainnet
Devnet
Parameters
This method does not require any parameters.
Request Example
API Endpoints
cURL Example
Response
A successful getHighestSnapshotSlot example response returns the highest snapshot slots available on the node.
The response includes:
full (u64): The highest full snapshot slot available.
incremental (u64|null): The highest incremental snapshot slot based on the full snapshot slot.
Example Response (when a snapshot exists)
Example Response (when no snapshot exists)
Error Handling
Common getHighestSnapshotSlot error scenarios:
No snapshot available: The node does not currently have any snapshots.
Network connectivity issues: The request fails due to API unavailability.
Invalid node state: The node is not configured to store snapshots.
Use Cases
The Solana getHighestSnapshotSlot method is essential for:
Validators: Checking the latest available snapshot slots for fast synchronization.
Blockchain explorers: Displaying snapshot data for node operators.
Web3 applications: Ensuring dApps interact with up-to-date nodes.
Infrastructure management: Monitoring snapshot availability for scaling node operations.
Code Example – Web3 getHighestSnapshotSlot Integration
Integration with Web3
Integrate the getHighestSnapshotSlot API with Solana’s Core API to monitor snapshot availability dynamically. By leveraging JSON-RPC parameters and endpoints, developers can efficiently track snapshots, enabling optimized blockchain synchronization and reduced downtime for validators and nodes.
Last updated