Blocks & Slots
getBlockProduction
Returns recent block production information from the current or previous epoch
Parameters
Configuration object containing the following optional fields:
Response
Code Examples
Basic Request
Request with Range and Identity
Using web3.js
Notes
- Without parameters, returns production for all validators in the current epoch
- The
range
parameter can span multiple epochs - Block production statistics are used to track validator performance
- Results include both assigned leader slots and actual blocks produced
Best Practices
- Use
range
to limit data when querying historical information - Use
identity
to track specific validator performance - Compare
leader_slots
toblocks_produced
to evaluate validator reliability - Cache results when appropriate to reduce RPC load
Common Errors
Code | Message | Solution |
---|---|---|
-32602 | Invalid param: WrongSize | Verify validator identity is valid |
-32602 | Invalid param: not base58 encoded string | Ensure validator identity is base58 encoded |
-32602 | Invalid param: slot range too large | Reduce the slot range size |
-32007 | Block production not available | Node may be bootstrapping or range is too old |