getBlockProduction
The getBlockProduction method returns information about the recent block production by validators on the Solana network. This method provides valuable insights into validator performance by showing how many blocks each validator was expected to produce versus how many they actually produced during a specified slot range.
Solana's consensus mechanism assigns specific slots to validators as "leaders" who are responsible for producing blocks during those slots. If a validator fails to produce a block during their assigned slot (due to downtime, network issues, or other problems), that slot is skipped and the next leader takes over. This method helps monitor validator reliability by tracking their block production rate, which is crucial information for stakers choosing which validators to delegate their stake to.
The block production data is essential for validator monitoring tools, staking platforms, and network health dashboards. High block production rates indicate reliable validators, while low rates might suggest technical issues or poor validator performance. This information directly impacts staking rewards, as validators who miss blocks lose potential rewards and may be penalized.
Parameters
parameter | type | description |
|---|---|---|
config | object | Optional configuration object |
config.commitment | string | Level of commitment: 'processed', 'confirmed', or 'finalized' (default: 'finalized') |
config.range | object | Optional. Slot range to query. Contains 'firstSlot' (number) and optionally 'lastSlot' (number) |
config.identity | string | Optional. Only return results for this validator identity (base-58 encoded public key) |
Return Object
field | type | description |
|---|---|---|
context | object | RPC response context with slot information |
context.slot | number | The slot at which this data was retrieved |
value | object | Block production information object |
value.byIdentity | object | Map of validator identity public keys to their block production stats. Each entry contains an array [blocksProduced, blocksExpected] |
value.range | object | Block production slot range |
value.range.firstSlot | number | First slot of the block production range |
value.range.lastSlot | number | Last slot of the block production range |
Request Example
Response Example
Tip: Block production rate is calculated as blocksProduced / blocksExpected. A rate close to 100% indicates a reliable validator. Use the identity parameter to monitor specific validators. The default range is the current epoch if not specified, which can be large and slow to query.