Skip to content

Write the Event Indexing Guide #464

Description

@codebestia

Document how to build a reliable off-chain indexer over Shade's events — the foundation for dashboards, notifications, reporting, and reconciliation — including how to handle reorgs, gaps, and backfills.

Proposed steps:

  • Create docs/guides/indexing-events.md.
  • Document the data sources: RPC getEvents, the pagination/cursor model, and retention limits that force periodic backfills from an archive.
  • Provide a recommended relational schema for merchants, invoices, payments, refunds, subscriptions, and tickets derived from the event stream.
  • Document the ingestion loop: cursor persistence, batching, idempotent upserts keyed by ledger sequence and event index, and gap detection.
  • Document reconciliation: periodically comparing indexed state against on-chain reads (get_invoice, get_merchant_analytics) and how to repair drift.
  • Document reorg and failed-transaction handling.
  • Include a worked minimal indexer example for one event type.

Acceptance criteria:

  • docs/guides/indexing-events.md exists.
  • A concrete schema and ingestion loop are specified.
  • Idempotency, gap detection, and backfill strategies are documented.
  • A reconciliation procedure against on-chain state is included.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions