Skip to content

Build an Idempotent, Reorg-Safe Soroban Event Ingestion Pipeline #163

Description

@meshackyaro

Description

This issue aims to address the implementation of Build an Idempotent, Reorg-Safe Soroban Event Ingestion Pipeline.

The core objective is to: Ingest escrow and dispute contract events exactly-once with ledger-cursor checkpointing, so chain reorgs and RPC retries never double-apply or drop events.

By completing this feature, we will ensure that the TrustFlow protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Backend architecture and adherence to the existing project conventions.

When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.

Component

Backend

Difficulty

🔴 Hard

Tasks

  • Review Node.js API architecture in backend/
  • Implement logic for: Build an Idempotent, Reorg-Safe Soroban Event Ingestion Pipeline
  • Write unit tests for the new endpoints using Supertest
  • Update Swagger terminology / OpenAPI specs
  • Verify PostgreSQL queries are optimized
  • Run npm run lint

Acceptance Criteria

  • Feature accurately implements the objective: Ingest escrow and dispute contract events exactly-once with ledger-cursor checkpointing, so chain reorgs and RPC retries never double-apply or drop events.
  • Any PR that introduces TypeScript errors is automatically blocked
  • CI pipeline runs in under 3 minutes per PR
  • Code is properly reviewed and approved by codeowners

Estimated Time

3-5 days

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions