Polygon Null blockNumber Guard
Version: 1.0.0 Date: 2026-07-15
Goal: Prevent Polygon transactions still pending on-chain from being marked as confirmed in the database — proof records appeared valid while the transaction was never mined.
Solution: Add an explicit tx.blockNumber null check in PolygonService#verifyTransaction before calling getBlock().
Root cause:
getBlock(null)returned the latest blocklatestBlock - null + 1coercednullto0in JavaScript- Confirmations count exceeded
minConfirmationsincorrectly
Features:
- Pending TX stay in verification loop until mined or dropped
- Complements
TransactionDroppedErrorpath for mempool drops
Files Modified:
src/services/polygon/polygon.service.ts-blockNumberguard before confirmation arithmetic
Related: Consolidated with Polygon RBF & monitoring in the same release train.
Release fragment: fix-polygon-null-blockNumber