debug_getBadBlocks - Bittensor RPC Method
Return bad blocks encountered by the Bittensor node. Debug method, may require special node configuration.
Returns a list of "bad" blocks that the node has encountered during import or execution. Bad blocks are blocks that failed validation, execution, or consensus checks. This method is part of the EVM-compatible debug namespace provided by the Frontier EVM layer on Bittensor and mirrors the Ethereum debug_getBadBlocks method.
Parameters
None.
Response
| Field | Type | Description |
|---|---|---|
result | array | Array of bad block objects, or an empty array if no bad blocks have been recorded. |
Each bad block object may contain:
| Field | Type | Description |
|---|---|---|
hash | string | The block hash. |
block | object | The block header and body. |
rlp | string | RLP-encoded block data. |
Code Examples
Use Cases
- Node diagnostics -- Identify blocks that failed import or execution to diagnose consensus issues or runtime bugs.
- Network health monitoring -- Detect whether bad blocks are being produced on the Bittensor EVM layer.
- Forensic analysis -- Examine the contents of bad blocks to understand why they were rejected.
Notes
- This method is often disabled on public RPC endpoints. It may require the node to be started with debug flags or
--rpc-methods unsafe. - On a healthy network, the result is typically an empty array.
- This is an EVM debug method provided by the Frontier compatibility layer. It operates on the EVM view of blocks, not the Substrate view.
Related Methods
debug_getRawBlock-- Get raw block data by numberdebug_getRawHeader-- Get raw header data by numberdebug_getRawTransaction-- Get raw transaction data by hasheth_getBlockByNumber-- Get an EVM block by number