Skip to main content

getBlockCommitment

Returns commitment for particular block

Common use cases
Monitor Validator Voting ParticipationTrack which validators are actively voting on blocks to assess network participation and cluster health. Useful for validator operators verifying their node's voting behavior and infrastructure teams monitoring consensus participation rates.
Analyze Network Consensus DepthExamine stake distribution across commitment depths (lockout history indices) to understand consensus strength and detect potential fork risks. Infrastructure monitoring tools use this to assess how deeply the network has confirmed recent blocks.
Audit Block Confirmation ProgressVerify how much stake has voted on a specific block before it reaches finalized status. Block explorers display real-time consensus progress showing the percentage of total stake committed at each confirmation depth.

Parameters

slot number (u64, required)

Block number, identified by Slot.

Request

curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockCommitment",
"params": [
5
]
}'
Network Selection

Replace mainnet with devnet in the URL to query devnet instead.

Response

{
"jsonrpc": "2.0",
"result": {
"commitment": [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 10, 32
],
"totalStake": 42
},
"id": 1
}

Response Fields

commitment (array | null)

Array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 to MAX_LOCKOUT_HISTORY.

totalStake (number)

Total active stake, in lamports, of the current epoch.

FAQ and Troubleshooting

Why does commitment return null for older blocks?

The commitment array only exists for recent blocks. Once a block is finalized and moves past MAX_LOCKOUT_HISTORY slots, the detailed voting record is no longer maintained. The method is designed for monitoring recent consensus, not historical data.

What do the array indices in the commitment field represent?

Each index represents a lockout depth from 0 to MAX_LOCKOUT_HISTORY. The value at each index is the amount of stake (in lamports) that has voted on the block at that confirmation depth. Higher indices indicate deeper confirmation with longer lockout periods.

How is this different from commitment levels (processed/confirmed/finalized)?

Commitment levels are boolean states indicating whether a slot has reached a specific confirmation threshold. getBlockCommitment provides granular detail about the exact stake voting distribution at each lockout depth, useful for detailed consensus analysis rather than simple transaction confirmation.

Does this method accept a commitment parameter?

No, unlike most RPC methods, getBlockCommitment only takes a slot number. It returns the current consensus state for that slot without filtering by commitment level. This makes it ideal for retrieving raw voting data.

getSlot
Get the current slot number. Use together with getBlockCommitment to monitor commitment on the latest slot.

getBlock
Get full block data including transactions. Use getBlockCommitment for lightweight commitment checks before fetching heavy block details.

getBlockHeight
Get the current block height. Pair with getBlockCommitment to correlate block production rate with consensus depth.

getBlockTime
Get the estimated production time of a block. Use alongside getBlockCommitment to analyze consensus timing patterns.

getEpochInfo
Get information about the current epoch. The totalStake field in getBlockCommitment represents stake from the current epoch returned by getEpochInfo.

External Resources