Polygon
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Polygon
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.
Diese Methode erwartet keine Parameter. Übergib ein leeres Array [].
| Typ | Beschreibung |
|---|---|
| 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 | Meldung | Ursache |
|---|---|---|
-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.