getClusterNodes
Learn getClusterNodes use cases, code examples, request parameters, response structure, and tips.
The getClusterNodes RPC method returns a list of all known nodes currently participating in the Solana cluster, as seen from the perspective of the RPC node you’re querying. This is a valuable tool for network discovery, cluster diagnostics, and understanding node connectivity.
✅ Common Use Cases
Network Topology Mapping Get a real-time view of the nodes active in the cluster, including their identity keys and network endpoints.
Discover RPC Endpoints Identify nodes that advertise public RPC interfaces, which may be used as alternative access points (availability and rate limits may vary).
Monitor Node Versions Observe software version distribution across cluster participants for insights into network upgrade progress or compatibility.
🛠 Request Parameters
This method does not accept any parameters.
📦 Response Structure
The result will be an array of objects, each representing a node and containing the following fields:
pubkey
string
Base58-encoded public key (identity) of the node.
gossip
string | null
Gossip address used for cluster communication.
tpu
string | null
TPU (Transaction Processing Unit) address used for submitting transactions.
rpc
string | null
JSON-RPC endpoint address if advertised.
version
string | null
Software version reported by the node.
featureSet
u32 | null
Identifier of the node’s current feature set.
shredVersion
u16 | null
Shred version used by the node (affects data encoding).
Code Examples
Example Response
🧠 Developer Tips
Results Depend on Node Perspective The node list reflects what the queried RPC node sees. Different RPC providers (e.g., CoinVera) may have slightly different views of the cluster due to synchronization state or network partitions.
RPC Field Is Optional Not all nodes expose their RPC endpoint. Even if the
rpcfield is present, the endpoint may be unavailable or restricted.Expect Dynamic Results The cluster is constantly changing—nodes join, leave, or restart frequently. Always treat this list as real-time and transient.
Large Output on Mainnet On Solana Mainnet Beta, the response can include hundreds or even thousands of nodes. Be prepared to paginate, filter, or cache results for performance.
Last updated