Skip to content

fix(network): harden Horizon transaction parser and listeners #15

Description

@enny791

Summary

Our integration with the Stellar Horizon network relies on real-time transaction parsing, but the current implementation lacks resilience against malformed memos or unexpected asset types (like Liquidity Pool shares). We've observed several unhandled promise rejections causing the listener process to silently die, which results in stalled deposits for merchants.

We need to fundamentally rewrite the parsing module to aggressively validate incoming transaction schemas before attempting to process them. This includes wrapping the SSE (Server-Sent Events) listener in an exponential backoff retry wrapper to gracefully handle transient network disconnects from the Stellar public nodes.

Acceptance Criteria

  • Add strict schema validation for incoming Horizon payloads.
  • Implement exponential backoff for the SSE listener connection.
  • Write extensive unit tests covering edge cases (e.g., missing memos, unsupported operations).
  • Add explicit error logging for dead-letter transactions.

Tech Stack

TypeScript (Node.js 24), stellar-sdk. Use Jest for mock-driven testing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions