getBlockProduction
Last updated:
`getBlockProduction` reports how many leader slots each validator was assigned and how many of those slots actually produced a block, over a slot range within the current (or previous) epoch. It is the canonical way to measure a validator's **skip rate** — the gap between `slotsAssigned` and `blocksProduced` — and to inspect overall leader-schedule performance.
The result is returned as an `RpcResponse` envelope: a `context` with the slot the data was evaluated against, and a `value` containing a `byIdentity` map (keyed by validator identity pubkey) plus the `range` the figures cover.
By default the call returns data for every validator over the current epoch so far. Narrow it with the optional `config`: pass `identity` to restrict the result to a single validator pubkey, and `range` (`firstSlot` / `lastSlot`) to bound the slot window. When `range` is omitted, the range starts at the first slot of the current epoch and ends at the highest slot the node has reached.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| config | GetBlockProductionConfig | No |
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getBlockProduction","params":["<config>"]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "getBlockProduction",
"params": [
"<config>"
],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"getBlockProduction","params":["<config>"],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet, devnet, testnet.
- Credit cost: 1 per call.
FAQ
- What does getBlockProduction do?
- Returns recent block-production information for the current or previous epoch, broken down per validator.
- How many credits does getBlockProduction cost?
- getBlockProduction costs 1 credit(s) per call on Triport by default.
- Is getBlockProduction available over WebSocket?
- getBlockProduction is an HTTP JSON-RPC method.