Description: The event ingestion worker occasionally processes Stellar ledgers out of chronological order under heavy network load, leading to race conditions where a Swap event is recorded before the corresponding pool's Mint or initialization event.
Context / Motivation: Out-of-order event ingestion corrupts historical balance tracking and displays inaccurate TVL metrics on the client dashboard. We must guarantee strict sequential processing based on ledger sequence numbers.
Acceptance Criteria:
Description: The event ingestion worker occasionally processes Stellar ledgers out of chronological order under heavy network load, leading to race conditions where a
Swapevent is recorded before the corresponding pool'sMintor initialization event.Context / Motivation: Out-of-order event ingestion corrupts historical balance tracking and displays inaccurate TVL metrics on the client dashboard. We must guarantee strict sequential processing based on ledger sequence numbers.
Acceptance Criteria:
Technical Pointers: Review the ingestion polling loop. Instead of triggering unawaited
asyncmapping loops over an array of blocks, resolve them sequentially using a strictfor...ofloop or an ordered transaction pipeline.