Skip to content

feat(indexer): handle unknown and future event versions without stalling - #1440

Open
aurorabini wants to merge 1 commit into
Akanimoh12:test-implement-dripsfrom
aurorabini:fix/issue-1261-unknown-events
Open

feat(indexer): handle unknown and future event versions without stalling#1440
aurorabini wants to merge 1 commit into
Akanimoh12:test-implement-dripsfrom
aurorabini:fix/issue-1261-unknown-events

Conversation

@aurorabini

Copy link
Copy Markdown

Summary

Handles events the indexer doesn't yet understand (issue #1261), so a new contract event type/version never silently drops data or crashes the pipeline.

  • Warn + count, never stall: projectEvent now logs unknown topics at warn and increments an indexer.unknown_events_total counter exposed on /metrics — a silent drop is impossible.
  • Store raw for later replay: the raw event is already persisted to EventLog (unique on txHash, topic, ledger) before dispatch, so a future decoder can replay it (pairs with [FRONTEND] Create ScrollToTop component for route changes #112).
  • Future-version tolerance: a version marker under a known topic is still projected.
  • Malformed payloads counted: unparseable known-event payloads also increment the counter.
  • Tests: unknown type, unknown version, malformed payload, dedupe — all in tests/unknown-events.test.ts.

Closes #1261

Unknown event types are already persisted raw to EventLog; this surfaces them
with a warn log, counts them in the /metrics indexer section (so a silent
drop is impossible), and treats a future version marker under a known topic as
a still-known projection. Covers unknown type, future version, malformed
payload, and dedupe in tests.

Closes Akanimoh12#1261
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@aurorabini Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle unknown and future event versions in the indexer

1 participant