Skip to content

feat(stellar): add exponential backoff retry for transaction submissi…#584

Merged
Johnsmichael150 merged 1 commit into
Agri-fund:mainfrom
Malik6828:feat/solving-issues
May 31, 2026
Merged

feat(stellar): add exponential backoff retry for transaction submissi…#584
Johnsmichael150 merged 1 commit into
Agri-fund:mainfrom
Malik6828:feat/solving-issues

Conversation

@Malik6828
Copy link
Copy Markdown
Contributor

@Malik6828 Malik6828 commented May 29, 2026

PR Summary

feat(stellar): add exponential backoff retry for transaction submission (#343)

Branch: feat/solving-issues → main

What changed:

  • Added private submitWithRetry(tx) helper in StellarService that wraps server.submitTransaction with up
    to 3 retries using exponential backoff (1s → 2s → 4s delays).
  • Retries on HTTP 429 (rate limit), 503 (service unavailable), 504 (gateway timeout), and network timeout
    errors (ECONNABORTED).
  • After 3 failed attempts, the original error is re-thrown as a fatal error.
  • Replaced all 11 server.submitTransaction(...) call sites across createEscrowAccount, issueTradeToken,
    fundEscrow, transferTradeTokens, releaseEscrow, recordDocumentHash, closeAccount, recordMemo,
    submitTransaction, and clawbackToken

Closes

Closes #340
Closes #342
Closes #343
Closes #389

…on (Agri-fund#343)

- Add private submitWithRetry helper (max 3 retries, 1s/2s/4s delays)
- Retry on HTTP 429, 503, 504 and network timeout errors
- Replace all server.submitTransaction call sites with submitWithRetry
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Malik6828 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Johnsmichael150 Johnsmichael150 merged commit 81d5afd into Agri-fund:main May 31, 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

2 participants