Summary
The event ingestion pipeline can receive the same event more than once if the Horizon cursor is reset or a worker restarts mid-batch. The deduplication guard should detect already-processed events by their (txHash, eventIndex) composite key and skip them without writing a duplicate row.
Scope
- Test an event with a new
(txHash, eventIndex) pair is inserted successfully
- Test an event with an already-seen
(txHash, eventIndex) is skipped and returns { skipped: true }
- Test two events sharing the same
txHash but different eventIndex values are both inserted
- Test the deduplication check is performed before any other processing (no side effects on skip)
- Assert the total event count in the database is unchanged after processing a duplicate
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The event ingestion pipeline can receive the same event more than once if the Horizon cursor is reset or a worker restarts mid-batch. The deduplication guard should detect already-processed events by their
(txHash, eventIndex)composite key and skip them without writing a duplicate row.Scope
(txHash, eventIndex)pair is inserted successfully(txHash, eventIndex)is skipped and returns{ skipped: true }txHashbut differenteventIndexvalues are both insertedAcceptance Criteria
{ skipped: true }ETA: 12 hours
Coordinate on Telegram