Calculate a Solana validator’s block-production ratio

A validator may be online without producing a block in every assigned slot. Its production record supplies both the assignments and the successful blocks.

Query the validator identity

Replace the placeholder with the validator identity public key. Without a range, the query covers the current epoch up to the selected commitment. Save the first and last slots from value.range together with the byIdentity entry.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockProduction",
  "params": [
    {
      "commitment": "finalized",
      "identity": "VALIDATOR_IDENTITY"
    }
  ]
}

Interpret the pair of counters

A pair [80,76] means 80 leader slots and 76 produced blocks. Four assignments did not produce a block, giving a production ratio of 95 percent. If the first counter is zero there is no ratio to report. Comparing two validators fairly requires a common slot range.

Repeated full-epoch reads overlap. To compute a fresh interval, request explicit non-overlapping ranges or subtract cumulative readings with the same starting slot after checking their endpoints.

Documentation