> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# debug_getBadBlocks

Returns the most recent blocks the node received from the network that failed validation, with the reason each one was rejected. Returns an empty array when the node has not seen any bad blocks since it started.

This method will use `80` [Compute Units](/nodeapi/about/billing).

***

## **Parameters**

None.

## **Returns**

`array` - An array of bad block objects, each containing:

* `hash` - string - The hash of the rejected block
* `rlp` - string - The RLP-encoded block, as a hexadecimal string
* `block` - object - The decoded block, with the same fields as [eth\_getBlockByHash](/nodeapi/unichain/execution-api/eth_getblockbyhash)

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": []
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.unichain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":1}'
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.