Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Uncle blocks — also called ommers — are valid blocks that were mined at the same height as a canonical block but did not make it onto the main chain. They are a feature of Ethereum's old proof-of-work design, where two miners frequently solved a block at nearly the same time and the protocol rewarded the "losing" valid block to compensate for propagation delay and discourage centralization. Polygon PoS does not work this way. Blocks on chain 137 are produced by a rotating set of Bor validators on a deterministic schedule rather than by a mining race, so there is no competition to win a block slot and therefore no stream of stale-but-valid sibling blocks to fold back in. The practical answer for Polygon developers is: uncle blocks effectively do not occur, and the uncle-related RPC fields exist only for Ethereum compatibility. The rest of this guide explains what that means and how the uncle methods behave when you call them against https://polygon.therpc.io/YOUR_API_KEY.
calculateUncleRate example will return 0 across any normal block range because Bor blocks carry no uncles. If you want a health metric, monitor reorg depth and checkpoint timing rather than uncle rate, which conveys no information here.block.uncles to be an empty array and eth_getUncleCountByBlock* to return zero on Polygon. Write block-parsing code that handles an empty uncle list gracefully and does not assume web3.eth.getUncle will ever return data on chain 137 — treating a missing uncle as the normal case keeps your Ethereum-compatible code correct without special-casing failures.