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:

FieldTypeDescription
solana-corestringSoftware version of solana-core
feature-setu32Unique identifier of the current feature set

Code Examples

cURL

1curl http://[IP_ADDRESS]:[PORT] -X POST -H "Content-Type: application/json" -d '{
2  "jsonrpc": "2.0",
3  "id": 1,
4  "method": "getVersion",
5  "params": []
6}'

TypeScript

1const response = await fetch("http://[IP_ADDRESS]:[PORT]", {
2  method: "POST",
3  headers: { "Content-Type": "application/json" },
4  body: JSON.stringify({
5    jsonrpc: "2.0",
6    id: 1,
7    method: "getVersion",
8    params: []
9  }),
10});
11const { result } = await response.json();
12console.log("Version:", result["solana-core"]);

Python

1import requests
2
3response = requests.post("http://[IP_ADDRESS]:[PORT]", json={
4    "jsonrpc": "2.0",
5    "id": 1,
6    "method": "getVersion",
7    "params": []
8})
9result = response.json()["result"]
10print(f"Version: {result['solana-core']}")

Rust

1use reqwest::Client;
2use serde_json::json;
3
4#[tokio::main]
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6    let client = Client::new();
7    let res = client.post("http://[IP_ADDRESS]:[PORT]")
8        .json(&json!({
9            "jsonrpc": "2.0",
10            "id": 1,
11            "method": "getVersion",
12            "params": []
13        }))
14        .send().await?
15        .text().await?;
16    println!("{}", res);
17    Ok(())
18}

Example Response

1{
2  "jsonrpc": "2.0",
3  "result": {
4    "solana-core": "1.18.15",
5    "feature-set": 4215500110
6  },
7  "id": 1
8}