eth_getLogs over an overlap window supplies the source of truth after disconnects or reorgs.
Demo
Subscribe and Backfill
TypeScript worker
replaceRange as one database transaction: delete previously indexed rows in the overlap, insert the canonical logs returned now, and advance the cursor only after both operations succeed.
After a reconnect or short reorg, the overlap scan converges on the canonical confirmed logs without fulfilling the same log twice.
See Also
Verify a Payment
Validate each candidate transfer against its order.
Reconcile Payments
Produce settlement rows over a block range.