Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_getBadBlocks asks a Polygon PoS node for every block its Bor client has seen on the wire but refused to accept as part of the canonical chain. Because Polygon settles MATIC-denominated transactions roughly every 2 seconds and finalizes through Heimdall validators and periodic L1 checkpoints, a block that fails Bor's validation is dropped rather than imported — this method surfaces that rejection log. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It returns the list of invalid blocks the node has observed and rejected since it last started, each with its hash, decoded header, and raw RLP.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| 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 Polygon playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node, or client does not implement this method. |
-32601 means the namespace is off, not that the chain is broken.