Description
Add retry logic to the keeper script so transient failures (network errors, ledger congestion, temporary RPC issues) do not silently drop a scheduled charge. Currently a failed charge() call has no retry mechanism.
Requirements and Context
- keeper.js currently calls charge() on due subscriptions but does not distinguish between a permanent failure (insufficient allowance, cancelled subscription) and a transient one (RPC timeout, network blip)
- Retries must not double-charge a subscriber - the keeper must confirm a charge did not succeed before retrying
- Uses @stellar/stellar-sdk for all chain interaction
Suggested Execution
Branch name: feat/keeper-retry-logic
Files to touch:
- keeper/keeper.js
- keeper/retry.js (new - retry/backoff helper)
Example commit message: feat(keeper): add retry logic with exponential backoff for failed charges
Test and Commit
Guidelines
Complexity
High - 200 points
Description
Add retry logic to the keeper script so transient failures (network errors, ledger congestion, temporary RPC issues) do not silently drop a scheduled charge. Currently a failed charge() call has no retry mechanism.
Requirements and Context
Suggested Execution
Branch name: feat/keeper-retry-logic
Files to touch:
Example commit message: feat(keeper): add retry logic with exponential backoff for failed charges
Test and Commit
Guidelines
Complexity
High - 200 points