Polygon
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Polygon
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.
Este método não aceita parâmetros. Passe um array vazio [].
| Tipo | Descrição |
|---|---|
| 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.
| Código | Mensagem | Causa |
|---|---|---|
-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.