Ethereum
Ethereum
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_getBadBlocks reports the blocks a geth-style Ethereum node tried to import but rejected as invalid. On Ethereum mainnet (chain ID 1, native coin ETH), every proposed block must pass execution-layer validation before it joins the canonical chain; anything that fails — a bad state root, an unexecutable transaction, a header that breaks the rules — gets discarded and recorded here. Call it over the TheRPC endpoint at https://ethereum.therpc.io/YOUR_API_KEY. The response is the running list of those rejected blocks observed since the node last started, each carrying its hash, decoded header, and raw RLP bytes for inspection.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| array | Array of objects, each with `{hash, block, rlp}` — `block` contains the decoded header fields and `rlp` is the raw RLP-encoded block. Returns an empty array if no bad blocks have been seen. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node, or client does not implement this method. |
-32601 instead of implementing it.