# getBlockCommitment

Returns commitment for particular block.

This method will use `30` [Compute Units](/v1/about/billing.md).

***

## **Parameters**

* `block number` integer *<mark style="color:red;">Required</mark>*. The block number identified by the slot.

## Returns

* `result` object. A custom object with the following fields:
  * `commitment`. The commitment values for the block. It could be either:
    * `null`. Null if the block is unknown.
    * `array`. An 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 + 1
  * `totalStake`. The total number of lamports being used by validators to participate in the block production and voting process.

```bash
// Result
{
	"jsonrpc": "2.0",
	"result": {
		"commitment": [
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			311482914814158,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			384876486517217675
		],
		"totalStake": 385365171580261965
	},
	"id": 1
}		
```

{% tabs %}
{% tab title="mainnet" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl https://mainnet.solana.validationcloud.io/v1/&#x3C;YOUR_API_KEY_HERE> \
</strong>    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","id":1, "method":"getBlockCommitment","params":[319935753]}'
    
</code></pre>

{% endtab %}

{% tab title="devnet" %}

```bash
curl https://devnet.solana.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","id":1, "method":"getBlockCommitment","params":[319935753]}'
    
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validationcloud.io/v1/solana/http-methods/getblockcommitment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
