Skip to content

Indexer: add cursor checkpoint integrity checks #560

@Otaiki1

Description

@Otaiki1

Build location

Work primarily in indexer/src/ingestor/cursor-manager.service.ts. Keep related tests/docs beside that package unless this issue explicitly calls for a cross-package update.

Why this matters

Cursor state is critical and should include ledger hash, sequence, processed event count, and monotonicity checks.

What to build

  • Extend cursor manager validation before save and on startup.
  • Detect ledger hash mismatch and sequence regression.
  • Expose checkpoint details in status command.

Acceptance criteria

  • Tests cover normal advance, duplicate ledger, hash mismatch, and regression.
  • Invalid cursor state sends ingestion to safe paused/degraded mode.

Suggested verification

cd indexer && npm run lint && npm run test && npm run build

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions