getVersion
Returns the current Solana version running on the node, including the software version string and feature set identifier. This is useful for verifying node compatibility, ensuring clients connect to nodes running expected versions, and monitoring upgrade rollouts across the cluster. The feature set hash uniquely identifies the set of protocol features active on the node.
Parameters
This method does not accept any parameters.
Response
Returns an object:
| Field | Type | Description |
|---|---|---|
solana-core | string | Software version of solana-core |
feature-set | u32 | Unique identifier of the current feature set |
Code Examples
cURL
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion",
"params": []
}'TypeScript
const response = await fetch("http://88.216.36.108:7999", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getVersion",
params: []
}),
});
const { result } = await response.json();
console.log("Version:", result["solana-core"]);Python
import requests
response = requests.post("http://88.216.36.108:7999", json={
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion",
"params": []
})
result = response.json()["result"]
print(f"Version: {result['solana-core']}")Rust
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client.post("http://88.216.36.108:7999")
.json(&json!({
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion",
"params": []
}))
.send().await?
.text().await?;
println!("{}", res);
Ok(())
}Example Response
{
"jsonrpc": "2.0",
"result": {
"solana-core": "1.18.15",
"feature-set": 4215500110
},
"id": 1
}