Skip to content

feat: add Stellar RPC retry handling#15

Closed
kaycke1337 wants to merge 1 commit into
wraith-protocol:developfrom
kaycke1337:add-stellar-rpc-retry
Closed

feat: add Stellar RPC retry handling#15
kaycke1337 wants to merge 1 commit into
wraith-protocol:developfrom
kaycke1337:add-stellar-rpc-retry

Conversation

@kaycke1337

Copy link
Copy Markdown

Summary

  • Add a shared Stellar retry helper with exponential backoff, ±25% jitter, retry telemetry, AbortSignal support, and StellarRetryExhaustedError
  • Wrap Stellar Horizon/Soroban fetches and Soroban SDK calls in retry handling
  • Surface exhausted network retries as "Network unstable — try again." with retry buttons in Stellar send/receive flows
  • Add Vitest unit coverage for transient HTTP retries, non-retryable 4xx behavior, JSON parse retries, exhausted retries, and aborted signals

Closes #2

Validation

  • npx prettier --check .
  • npx vitest run
  • npx tsc --noEmit
  • npx vite build
  • npx pnpm@10 test
  • npx pnpm@10 build
  • git diff --check

Note: Vite build emits existing dependency chunk/PURE annotation warnings, but exits successfully.

@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown

@kaycke1337 is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@truthixify truthixify changed the base branch from main to develop May 27, 2026 17:15
@truthixify

Copy link
Copy Markdown
Contributor

Heads up — we've just set up a develop branch as the integration target for all Drips × Stellar Wave contributions, and I've retargeted this PR's base from main to develop on your behalf. The diff is unchanged; nothing to do on your end.

Going forward, please branch from and target develop. We'll periodically merge developmain as we cut releases. Thanks for contributing!

@truthixify

Copy link
Copy Markdown
Contributor

Retry primitive (src/lib/stellar/retry.ts + tests) is exactly what issue #2 asked for. Conflict appeared after #13 (input validation) just merged, both touch StellarSend.tsx.

Rebase:

git fetch origin
git rebase origin/develop
git push --force-with-lease

When resolving StellarSend.tsx, keep #13's validation constants and balance-debounce logic, then wrap your retry hooks around the network calls. Thanks @kaycke1337.

@truthixify

Copy link
Copy Markdown
Contributor

The retry primitive itself (src/lib/stellar/retry.ts + tests) and the integration into the network call sites are exactly what issue #2 asked for.

Real merge conflicts now in:

  • package.json
  • pnpm-lock.yaml
  • src/components/StellarSend.tsx
  • src/components/StellarReceive.tsx

These came from #13, #29, #30, #34, #35, #37 (and a few others) landing on develop since you opened this. Each one touched StellarSend or StellarReceive directly.

git fetch origin
git rebase origin/develop
git push --force-with-lease

When resolving StellarSend.tsx and StellarReceive.tsx, keep what develop has (validation constants, sponsored withdrawal, name resolution, web worker integration, activity recording, payment-link consumption) and graft your retryFetch / retryFetchJson / withRetry wrappers around the network calls. For package.json / pnpm-lock.yaml, accept develop's versions then re-add your dependency entries if any.

Thanks @kaycke1337.

@truthixify

Copy link
Copy Markdown
Contributor

Closing as we wrap up this round of the Wraith × Drips × Stellar Wave program.

Thanks for the contribution. The work and review history stays on this PR for reference. A new set of issues will go up shortly under the same Stellar Wave label if you want to pick something fresh next round.

If you specifically want to land the work that's already in this PR (post-wave), feel free to reopen and rebase against develop. Otherwise, no action needed.

@truthixify truthixify closed this Jun 18, 2026
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.

Retry + exponential backoff for Soroban RPC

2 participants