Skip to content

[HARD][STELLAR INDEXER] Add contiguous checkpoints, dead-letter replay, and gap detection #129

Description

@Obiajulu-gif

Problem

lib/stellar/indexer.ts can advance to a later cursor after an earlier event in the page fails, permanently skipping financial data.

Scope

  • Persist raw envelopes first, keyed by network, stream, ledger, transaction, and event index.
  • Advance only through the highest contiguous successful sequence.
  • Add per-stream leases with fencing for multiple replicas.
  • Quarantine poison events with original payload and replay metadata.
  • Add bounded replay, backfill, and rebuild commands.
  • Detect missing ranges, wrong network/contract, stalls, and projection lag.
  • Use a transaction or recoverable inbox for event/checkpoint writes.

Acceptance criteria

  • Failure at N prevents checkpoint movement past N.
  • Restart at any boundary produces the same result.
  • Concurrent workers have single-writer semantics.
  • Replay never duplicates financial effects.
  • Health reports source, raw and projection checkpoints, lag, and oldest failure.

Required tests

Middle-page poison event, crash around every persistence step, lease race, full pagination, provider retry, and clean-rebuild equivalence.

Non-goals

Guarantee lossless ingestion; do not classify every Stellar operation.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions