Go theorytheory 0/50 · 0%
Blockchain · hard

43. Indexers and Event Processing

Logs, reorgs and idempotency.

An indexer subscribes to or polls for logs, decodes them with the ABI, and writes to a database. Handle reorgs by tracking block hashes and rolling back orphaned data, and make writes idempotent keyed on transaction hash and log index so replays are safe.

Check your understanding

  1. 1. Which key makes log writes idempotent?

  2. 2. Reorg handling requires tracking…