in-solana by Supanode

getIdentity — Solana RPC Method

getIdentity returns the identity public key of the node handling your RPC request. Each Solana node has a unique identity keypair. This method reveals which specific node is serving your request, which is useful for debugging and monitoring multi-node setups.

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": "getIdentity",
    "params": []
  }'

TypeScript (@solana/kit)

import { createSolanaRpc } from "@solana/kit";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const identity = await rpc.getIdentity().send();

console.log(`Node identity: ${identity.identity}`);

Response

{
  "jsonrpc": "2.0",
  "result": {
    "identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
  },
  "id": 1
}
FieldTypeDescription
identitystringBase-58 encoded public key of the node’s identity.

Common errors

This method has no parameters and reliably returns a result. Errors are limited to connectivity issues.

Performance

getIdentity reads a static value from the node’s configuration and returns immediately. The response is always a small, fixed-size object. The identity never changes while the node is running.

FAQ

What is the node identity? Every Solana node has an identity keypair generated when the node is first set up. The public key from this keypair uniquely identifies the node in the cluster. For validators, this is the same key used to sign votes and claim block rewards.

Why would I use getIdentity? To verify which node is handling your requests, especially when connecting through a load balancer. If you send the same request to different endpoints and get different identities, you know you are hitting different backend nodes.

Is the identity the same as the validator vote account? No. The identity key is the node’s primary keypair. Validators have a separate vote account with its own keypair. The identity key is the validator’s identity in the gossip network; the vote account is used for the consensus protocol.

Can the identity change? Not while the node is running. The identity is set at startup from the node’s keypair file. Restarting a node with a different keypair file would change its identity, but this is uncommon in production.

How do I match this to a validator? Look up the identity key in the result of getClusterNodes to find the full node info, or cross-reference with getBlockProduction to see the node’s block production stats.

Updated: