Skip to content

feat(soroban): enforce RPC timeout and bounded retry wrapper (#1276) - #2089

Open
huangji6693-max wants to merge 1 commit into
Arena1X:mainfrom
huangji6693-max:feat/soroban-rpc-timeout-retry-1276
Open

huangji6693-max wants to merge 1 commit into
Arena1X:mainfrom
huangji6693-max:feat/soroban-rpc-timeout-retry-1276

Conversation

@huangji6693-max

Copy link
Copy Markdown

Closes #1276

Summary

  • Enforced configurable per-call timeout (SOROBAN_RPC_TIMEOUT_MS, default 10,000ms) and bounded retry wrapper (SOROBAN_RPC_MAX_RETRIES, default 2, with configurable SOROBAN_RPC_RETRY_BASE_DELAY_MS, default 250ms) across outbound Soroban RPC operations in SorobanService (backend/src/soroban/soroban.service.ts), including pauseMarket and resumeMarket on-chain confirmation flows.
  • Ensured idempotent read operations retry up to SOROBAN_RPC_MAX_RETRIES times on timeout/connection errors with exponential backoff, while transaction submissions never blind-retry and always verify getTransaction(txHash) before any resend.
  • Surfaced typed SorobanUnavailableError when RPC retries are exhausted so callers can distinguish RPC outages from contract-level permanent failures (SorobanPermanentError).
  • Documented SOROBAN_RPC_TIMEOUT_MS, SOROBAN_RPC_MAX_RETRIES, and SOROBAN_RPC_RETRY_BASE_DELAY_MS in backend/.env.example.
  • Added unit tests in backend/src/soroban/soroban.service.spec.ts covering read timeout retry recovery, exhausted retry SorobanUnavailableError propagation, and non-blind transaction submission under timeout.

Verification

  • npx jest src/soroban/ (2/2 test suites passed, 31/31 tests passed)

@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
insight-arena-4rll Error Error Oct 26, 2026 6:31pm UTC

This branch had an error being deployed

1 failed deployment
Preview — 626bd367 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] — Timeout and Bounded Retry Wrapper for Soroban RPC Calls

1 participant