Skip to content

Implement robust retry mechanism for failed contract syncs #143

Description

@wagmiiii

Repo context. accensa-app is the off-chain half of Accensa — the merchant back-office for x402 sellers on Stellar. Three workspace packages matter: apps/web (Next.js dashboard and the indexer at src/app/api/sync), packages/sdk (@accensa/sdk), and apps/demo-merchant. The Soroban contracts live in accensa-contracts.

🟢 Unblocked. Indexer sync logic can be updated independently of contract state.

Problem

The indexer occasionally misses events due to transient RPC failures. Without a retry mechanism, missed events require a full resync to recover data.

What to build

  • In , add exponential backoff logic for RPC calls.
  • Store the last successfully processed ledger cursor persistently.
  • Implement a fallback polling routine if the primary event stream disconnects.

Acceptance criteria

  • RPC failures trigger a retry with exponential backoff.
  • Indexer seamlessly recovers from temporary network drops without missing events.
  • Logs clearly indicate when retries are occurring.

Contact & Support

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions