Skip to content

Implement bulk account operations with partial-failure recovery #515

Description

@Just-Bamford

Description

Problem

Applications managing large numbers of Stellar accounts currently need to execute account operations individually. This increases network overhead and makes error handling difficult when only part of a batch succeeds.

There is no unified batch execution model for trustline creation, payments, or account key rotation.

Solution

Implement batch account operation utilities with bounded concurrency, operation grouping, progress tracking, and partial-failure handling.

The batch executor should distinguish successful, failed, skipped, and retried operations. A failure in one account should not automatically invalidate unrelated operations.

Acceptance Criteria

  • bulkCreateTrustlines(accounts, assets) is implemented.
  • bulkSendPayments(transactions) is implemented.
  • bulkRotateKeys(accounts, newKeys) is implemented where supported by existing account APIs.
  • Batch size and concurrency limits are configurable.
  • Individual operation results are tracked independently.
  • Partial failures do not discard successful operations.
  • Retryable failures can be retried without duplicating completed operations.
  • Batch execution exposes progress information.
  • Tests cover successful batches, partial failures, retries, and concurrency limits.
  • Performance is benchmarked against sequential execution.
  • Exported through src/account/index.ts and src/index.ts.

Note for Contributors

The implementation must be idempotency-aware. Never blindly retry an operation that may already have been submitted successfully.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / SDK logicenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions