Docs

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

FieldTypeDescription
resultarrayArray of bad block objects, or an empty array if no bad blocks have been recorded.

Each bad block object may contain:

FieldTypeDescription
hashstringThe block hash.
blockobjectThe block header and body.
rlpstringRLP-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.