📌 Description
internal/soroban/rpc.go Call issues a single JSON-RPC request with no retry, and PollTransactionStatus polls on a hardcoded 2-second interval. Only the Horizon submit path in internal/soroban/tx.go (submitWithRetry) has backoff; the RPC layer (used by simulation and status reads) has none, so a transient RPC blip fails the whole operation.
💡 Why it matters: Soroban RPC endpoints are flaky under load; retrying idempotent reads and configurable poll intervals make on-chain operations far more reliable.
🧩 Requirements and context
- Add bounded retry-with-backoff (reusing
DefaultRetryConfig in internal/soroban/types.go) to Call for retryable RPC failures only.
- Make
PollTransactionStatus interval and total timeout configurable rather than hardcoded 2s.
- Respect context cancellation on every attempt; never retry past the context deadline.
- Do not retry non-idempotent submit calls.
- Add tests with a mock RPC server returning transient-then-success.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b feat/soroban-rpc-retry
2. Implement changes
- Write/modify the relevant source:
internal/soroban/rpc.go, internal/soroban/types.go
- Write comprehensive tests:
internal/soroban/rpc_test.go
- Add documentation: GoDoc on retry semantics
- Include GoDoc comments distinguishing retryable vs non-retryable
- Validate security assumptions: cap retries to bound resource use
3. Test and commit
go test ./internal/soroban/...
- Cover edge cases: transient error, permanent error, context cancelled mid-retry
- Include test output and security notes in the PR description.
Example commit message
feat(soroban): add retry/backoff and configurable polling to RPC layer
✅ Acceptance criteria
🔒 Security notes
Only idempotent reads/simulations are retried; submit must never be retried to avoid double-spend.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
internal/soroban/rpc.goCallissues a single JSON-RPC request with no retry, andPollTransactionStatuspolls on a hardcoded 2-second interval. Only the Horizon submit path ininternal/soroban/tx.go(submitWithRetry) has backoff; the RPC layer (used by simulation and status reads) has none, so a transient RPC blip fails the whole operation.🧩 Requirements and context
DefaultRetryConfigininternal/soroban/types.go) toCallfor retryable RPC failures only.PollTransactionStatusinterval and total timeout configurable rather than hardcoded 2s.Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
internal/soroban/rpc.go,internal/soroban/types.gointernal/soroban/rpc_test.go3. Test and commit
go test ./internal/soroban/...Example commit message
✅ Acceptance criteria
Callretries retryable RPC errors with bounded backoff🔒 Security notes
Only idempotent reads/simulations are retried; submit must never be retried to avoid double-spend.
📋 Guidelines