Skip to content

[performance/infrastructure] High-Availability Real-Time Soroban Event Indexer Pipeline with PostgreSQL Read Models & WebSockets #309

Description

@jotel-dev

Labels: infrastructure, event-sourcing, postgresql, typescript, stellar, difficulty: hard
Context & Problem Statement
The API currently queries Horizon / Soroban RPC nodes directly to fetch escrow and transaction statuses. High RPC query latency impairs UI response times, and Stellar network RPC rate limits can cause API downtime during network spikes.

Requirements & Technical Implementation
Soroban Event Ingestion Engine:
Build a lightweight node service (or Rust worker) that connects to Stellar RPC ingest streams and listens for topics emitted by Velo contracts (Escrow Created, Funds Released, Dispute Opened).
Reorg-Resilient PostgreSQL Indexer:
Store ingested events in PostgreSQL using an append-only event-sourcing pattern with block ledger tracking.
Implement automatic chain reorg rollbacks: If Stellar ledger sequences fork/reorg, rollback database state to the last valid checkpoint.
GraphQL & WebSocket Delta Feed:
Expose a high-performance GraphQL API and WebSocket subscription interface for mobile clients to observe real-time escrow state changes without polling.
Acceptance Criteria
Indexing throughput of $> 500$ events/sec with $< 100\text{ms}$ latency from Stellar block confirmation to database write.
Unit and integration tests simulating RPC disconnects, re-indexing from past ledger checkpoints, and database failover.

Metadata

Metadata

Assignees

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