OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

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.

ParameterTypeRequiredDescription
configobjectOptionalConfiguration object (see fields below)
config.commitmentstringOptionalCommitment level: processed | confirmed | finalized. Default: finalized
config.identitystringOptionalReturn results only for this validator identity (base-58 encoded pubkey)
config.rangeobjectOptionalSlot range to query. Defaults to the current epoch if omitted
config.range.firstSlotu64Required*First slot to include in the range, inclusive
config.range.lastSlotu64OptionalLast slot to include in the range, inclusive. Defaults to the current slot

commitment values

ValueDescription
processedReturn 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.
confirmedReturn 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.
finalizedReturn 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.

FieldTypeDescription
slotu64Slot at which the node evaluated this request.
apiVersionstringRPC API version reported by the node. May be omitted by older nodes.

value

FieldTypeDescription
byIdentityobjectDictionary keyed by validator identity pubkey. Each value is a two-element array: [leaderSlotsAssigned, blocksProduced].
rangeobjectSlot range covered by the returned block-production data.
range.firstSlotu64First slot in the returned block-production range, inclusive.
range.lastSlotu64Last 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:

IndexTypeDescription
0usizeNumber of leader slots assigned to that validator in the requested range.
1usizeNumber of blocks that validator actually produced in that range.