POST
/
9de47db917d4f69168e3fed02217d15b
curl --request POST \
  --url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getBlockCommitment",
  "params": [
    166974442
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}

Solana getBlockCommitment method

The Solana getBlockCommitment method returns the commitment information for a given block.

This method provides detailed information about the number of cluster nodes that have voted on the block, and the total stake of those nodes. It is useful for determining the level of consensus for a block in the network.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • block — the height of the block to retrieve commitment information for.

Response

  • value — the block commitment information:
    • commitment — an array of 32 integers representing the commitment for the block.
    • totalStake — the total stake of all nodes that have voted on the block.

Use case

A practical use case for getBlockCommitment is to determine the level of consensus for a block in the network. This can be useful for block explorers, wallets, or other applications that need to display or make use of this information.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:getBlockCommitment
params
integer[]

The slot of the block

Response

200 - application/json
Block commitment details
jsonrpc
string
id
integer
result
object