Parameters

config
object

Configuration object containing the following optional fields:

Response

result
object

Code Examples

Basic Request

curl https://rpc.orbitflare.com -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockProduction"
}'

Request with Range and Identity

curl https://rpc.orbitflare.com -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockProduction",
  "params": [
    {
      "range": {
        "firstSlot": 100000000,
        "lastSlot": 100000100
      },
      "identity": "GH7ome3EiwEr17v3Fn6XY4RjS1YERxYzwXSW8kZ8kBYq"
    }
  ]
}'

Using web3.js

import { Connection } from '@solana/web3.js';

const connection = new Connection('https://rpc.orbitflare.com');

const blockProduction = await connection.getBlockProduction();
console.log('Block production:', blockProduction);

// Get production for specific range and validator
const config = {
  range: {
    firstSlot: 100000000,
    lastSlot: 100000100
  },
  identity: 'GH7ome3EiwEr17v3Fn6XY4RjS1YERxYzwXSW8kZ8kBYq'
};
const specificProduction = await connection.getBlockProduction(config);

Notes

  1. Without parameters, returns production for all validators in the current epoch
  2. The range parameter can span multiple epochs
  3. Block production statistics are used to track validator performance
  4. Results include both assigned leader slots and actual blocks produced

Best Practices

  1. Use range to limit data when querying historical information
  2. Use identity to track specific validator performance
  3. Compare leader_slots to blocks_produced to evaluate validator reliability
  4. Cache results when appropriate to reduce RPC load

Common Errors

CodeMessageSolution
-32602Invalid param: WrongSizeVerify validator identity is valid
-32602Invalid param: not base58 encoded stringEnsure validator identity is base58 encoded
-32602Invalid param: slot range too largeReduce the slot range size
-32007Block production not availableNode may be bootstrapping or range is too old