[Go to site: main page, start]

debug_getBadBlocks - Robinhood

debug_getBadBlocks. Returns a list of the most recent "bad" (invalid) blocks the client has encountered.

debug_getBadBlocks - robinhood [Value: 20CU]
Returns the most recent blocks that the node rejected as invalid, along with the full block data and the reason each was rejected
Use cases
Use cases
  • Diagnose why a node forked or rejected a block during import
  • Monitor node health for consensus or validation problems
  • Feed bad-block data into alerting or incident-response tooling
Constraints
Constraints
  • Only returns blocks the connected node has observed and rejected
  • The number of retained bad blocks is limited by the node's local cache
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://lb.drpc.live/robinhood/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_getBadBlocks",
    "params":[],
    "id":1,
    "jsonrpc":"2.0"}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "hash": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238",
      "block": {
        "number": "0x1530a5e",
        "hash": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238",
        "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
        "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25"
      },
      "rlp": "0xf90236a0..."
    }
  ]
}
Copy
Request params
idinteger
jsonrpcstring
methodstring
Parametersarray
Response
200
An array of the bad blocks the node has encountered, or an empty array if none are recorded
Response params
object
idinteger
jsonrpcstring
resultarray_of_objects
An array of bad block objects.
object
hashstring
The hash of the rejected block.
blockobject
The full block data as it was received.
rlpstring
The RLP-encoded bytes of the rejected block.