Polygon
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Polygon
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.
Cette méthode ne prend aucun paramètre. Passez un tableau vide [].
| Type | Description |
|---|---|
| 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.
| Code | Message | Cause |
|---|---|---|
-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.