getBlockProduction
Returns block-production counts for validator identities in the requested slot range. If no range is provided, the RPC node returns counts for the current epoch.
Request
{ "jsonrpc": "2.0", "id": 1, "method": "getBlockProduction", "params": [ { "commitment": "finalized" } ]}Parameters
All parameters are passed inside a single optional configuration object. If the object is omitted entirely the node defaults to finalized commitment and the current epoch's slot range.
| Parameter | Type | Required | Description |
|---|---|---|---|
| config | object | Optional | Configuration object (see fields below) |
| config.commitment | string | Optional | Commitment level: processed | confirmed | finalized. Default: finalized |
| config.identity | string | Optional | Return results only for this validator identity (base-58 encoded pubkey) |
| config.range | object | Optional | Slot range to query. Defaults to the current epoch if omitted |
| config.range.firstSlot | u64 | Required* | First slot to include in the range, inclusive |
| config.range.lastSlot | u64 | Optional | Last slot to include in the range, inclusive. Defaults to the current slot |
commitment values
| Value | Description |
|---|---|
| processed | Return data from the highest slot this node has processed on the fork it currently considers best. Newest view, but can still change if the cluster switches forks. |
| confirmed | Return data from the highest slot that at least two-thirds of active stake has directly voted to confirm. More stable than processed, but weaker than finalized. |
| finalized | Return data from the highest slot that the cluster recognizes as finalized — reached maximum vote lockout and recognized by at least two-thirds of active stake. Strongest commitment level. |
identity example
{ "identity": "85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr" }range example
{ "firstSlot": 100, "lastSlot": 200 }Response
{ "jsonrpc": "2.0", "result": { "context": { "apiVersion": "3.1.8", "slot": 9887 }, "value": { "byIdentity": { "85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr": [9888, 9886] }, "range": { "firstSlot": 0, "lastSlot": 9887 } } }, "id": 1}context
Slot and API version the node used to answer this request.
| Field | Type | Description |
|---|---|---|
| slot | u64 | Slot at which the node evaluated this request. |
| apiVersion | string | RPC API version reported by the node. May be omitted by older nodes. |
value
| Field | Type | Description |
|---|---|---|
| byIdentity | object | Dictionary keyed by validator identity pubkey. Each value is a two-element array: [leaderSlotsAssigned, blocksProduced]. |
| range | object | Slot range covered by the returned block-production data. |
| range.firstSlot | u64 | First slot in the returned block-production range, inclusive. |
| range.lastSlot | u64 | Last slot in the returned block-production range, inclusive. |
byIdentity tuple indexes
Each entry in byIdentity is keyed by a validator identity pubkey (base-58 encoded string) and contains a two-element array:
| Index | Type | Description |
|---|---|---|
| 0 | usize | Number of leader slots assigned to that validator in the requested range. |
| 1 | usize | Number of blocks that validator actually produced in that range. |