Teminife ObafemiBackend engineer · Nairobi

Unreliable chain webhooks

The iTRY backend ran on chain events delivered as webhooks. They repeated, arrived out of order, went missing, and a reorg could reverse them.

Break the webhooks with the buttons below, then switch the sweeper on and watch the mismatch count.

Mismatches
0
Copies ignored
0
Late, filed in place
0
Fixed by the sweep
0
  • Matches the chain
  • Matches, could still change
  • Missing or wrong

Most of the iTRY backend reacted to chain events delivered as webhooks. We saw duplicates, out-of-order delivery and gaps, and a reorganization could roll back an event already marked confirmed.

The handler

Each event was a pointer, not a fact. The handler verified the signature, checked the schema and read current state from the chain before writing anything. An event’s identity was its position in chain history, and events were applied in that order, which made duplicates and late deliveries no-ops. Irreversible actions waited until a rollback could no longer reach them.

The sweep

A and diffed it against our records to catch what the webhooks missed. The stream gives speed; the poll behind it gives correctness. Temporal ships this machinery. On iTRY I wrote it by hand.