getVersion — Solana RPC Method
getVersion returns the software version and feature set of the Solana node handling your request. This is useful for checking compatibility and ensuring the node supports the features your application needs.
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": "getVersion",
"params": []
}'
TypeScript (@solana/kit)
import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const version = await rpc.getVersion().send();
console.log(`Solana version: ${version["solana-core"]}`);
console.log(`Feature set: ${version["feature-set"]}`);
Response
{
"jsonrpc": "2.0",
"result": {
"solana-core": "2.2.4",
"feature-set": 4215500110
},
"id": 1
}
| Field | Type | Description |
|---|---|---|
solana-core | string | Solana core software version (semver). |
feature-set | u32 | Unique identifier for the set of enabled features on this node. |
Performance
Returns two static values from the node’s configuration. Extremely lightweight. The version only changes when the node is updated, so caching is safe.
FAQ
What is the feature set? The feature set is a hash that uniquely identifies which features are enabled on the node. Nodes with different feature sets may behave differently for certain operations. All mainnet validators should have the same feature set.
How often does the Solana version change? The Solana validator software is updated periodically. Major upgrades happen several times a year, with patches more frequently. Node operators choose when to update.
Can different nodes run different versions? Yes. During upgrade rollouts, some validators update earlier than others. The cluster continues operating as long as enough stake is on compatible versions.
Why would I check the version? To verify that the RPC node supports features your application depends on, such as versioned transactions (v0) or specific RPC methods added in newer versions.
Updated: