> ## 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).

***

<Info>
  This method is served by nanoreth, the HyperEVM archive client, because the Hyperliquid node does not implement it.
</Info>

## **Parameters**

None.

## **Returns**

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

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

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "hash": "0x355ddc4e7c08ada079e8696bd3bcefe2bbf6b9297d1506e76007478a18652cb1",
            "reason": "block gas used mismatch: got 40908151, expected 40907831; gas spent by each tran...",
            "rlp": "0xf9...",
            "block": {
                "number": "0x188c350",
                "hash": "0x355ddc4e7c08ada079e8696bd3bcefe2bbf6b9297d1506e76007478a18652cb1",
                "parentHash": "0xb40a3a7f0084c3ee28f36474745e7e14f18d35fd3007efd01e3dd5fc5b0d614b",
                "gasUsed": "0x2703437",
                "gasLimit": "0x393868e",
                "timestamp": "0x6a7c9f1b",
                "stateRoot": "0xeac39cf6cd965cc80c77213976df4af4d4967c401c434f99d7a6da6a7c45142b",
                "transactions": [
                    "0x..."
                ]
            }
        }
    ]
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.hyperliquid.validationcloud.io/v1/<YOUR_API_KEY_HERE>/evm \
      -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.