The debug_getBadBlocks
method returns a list of invalid blocks that have been observed and rejected by the Ethereum node. This method is particularly valuable for developers, network operators, and security researchers who need to detect, analyze, and understand consensus flaws or network inconsistencies.
This method does not require any parameters and returns information about any invalid blocks detected by the node.
An array of invalid blocks with detailed information
The hash of the invalid block
The block object with full details
The base fee per gas in the block (post-EIP-1559)
The difficulty level of the block
Additional data included in the block
The maximum gas allowed in the block
Total gas used by all transactions in the block
The address of the miner who mined the block
Array of transaction objects in the block
The RLP-encoded block data for detailed analysis
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x4a62f91774346144245d80e21065ab1cbc807f43611b675966dced62a6e7f7a6",
"block": {
"parentHash": "0x825e81563696f5eb82fe94ad52526fec1c8937b28d36bd88051e33739281d85a",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x3daeee3e90d51acd79fe4446fe6962c4e0e78e9977f39cf731ed0d5b5418269b",
"stateRoot": "0xf2790a1421d95c8d3f3d1c8a8e2342a704aef457d3996a5df9a77a818f2c8fa5",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x1",
"number": "0xc9b44",
"gasLimit": "0x1c9c380",
"gasUsed": "0x0",
"timestamp": "0x65b131e7",
"extraData": "0xd983010a1d846765746888676f312e32312e30856c696e7578",
"mixHash": "0x9a7ab7c6c8fde86c8b9d6f49cd579bb2e9a868b8ff53bc3c3b767deaacc21c0a",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x12a05f200",
"transactions": []
},
"rlp": "0xf90226a0825e81563696f5eb82fe94ad52526fec1c8937b28d36bd88051e33739281d85aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943daeee3e90d51acd79fe4446fe6962c4e0e78e9977f39cf731ed0d5b5418269ba0f2790a1421d95c8d3f3d1c8a8e2342a704aef457d3996a5df9a77a818f2c8fa5a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083000c9b44831c9c38080846583135f11d983010a1d846765746888676f312e32312e30856c696e7578a09a7ab7c6c8fde86c8b9d6f49cd579bb2e9a868b8ff53bc3c3b767deaacc21c0a880000000000000000850212a05f200c0"
}
]
}
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
Invalid blocks can fail validation for various reasons:
The RLP (Recursive Length Prefix) encoded data provides the raw block representation: