On-Chain Event Indexing Pipeline

Block ingestion, ABI decoding, reorg-safe writes, and serving balances and history

On-Chain Event Indexing Pipeline Block ingestion, ABI decoding, reorg-safe writes, and serving balances and history 01 / Sources 02 / Ingest 03 / Decode + write 04 / Store 05 / Serve Chain Node · JSON-RPC / WS · 01 / Sources · blocks + logs Chain Node JSON-RPC / WS blocks + logs ABI Registry · contract schemas · 02 / Ingest · decode keys ABI Registry contract schemas decode keys Block Ingestor · poll + subscribe · 02 / Ingest · ordered Block Ingestor poll + subscribe ordered Log Decoder · ABI decode · 03 / Decode + write · typed events Log Decoder ABI decode typed events Reorg-Safe Writer · idempotent upsert · 03 / Decode + write · (block, logIdx) Reorg-Safe Writer idempotent upsert (block, logIdx) Reorg Detector · parent-hash check · 03 / Decode + write · fork guard Reorg Detector parent-hash check fork guard Index Store · events + balances · 04 / Store · finalized Index Store events + balances finalized Checkpoint · safe head · 04 / Store · resume Checkpoint safe head resume Query API · balances + history · 05 / Serve · read Query API balances + history read Application · wallet view · 05 / Serve · consumer Application wallet view consumer blocks + logs raw raw logs ordered contract ABIs schema join typed events decoded rollback range reorg parent hash fork check idempotent upsert keyed write checkpoint safe head balances query read model history serve Legend primary data policy / PII async batch data store

Primary Path

  • • Raw blocks and logs flow left to right into queryable state
  • • The decoder joins logs with contract ABIs to emit typed events
  • • Writes are keyed by (block, log index) so replays stay idempotent

Reorg Safety

  • • The detector compares parent hashes to spot forks
  • • A rollback range reverts writes above the fork point
  • • The checkpoint only advances past finalized blocks

Serving

  • • The query API reads a consistent, finalized index
  • • Balances and history are served from stored facts
  • • Consumers never see un-finalized or orphaned state