Skip to content

Bug: buildBatchTransactions pre-assigns sequential sequence numbers with no gap recovery #518

Description

@Jaydbrown

src/batch-tx.ts:296-307 — every transaction in the batch is built with sequence + index, then all are simulated and assembled. The returned XDRs must be submitted strictly in order, each consuming exactly one sequence number.

If any single transaction is dropped, rejected, or fails at submission, every later transaction in the batch now has a sequence number with a gap below it and fails with txBAD_SEQ. There is no re-sequencing, no "resume from N", and ConduitBatcher returns all XDRs up front with no submission coordination.

Impact

A batch is all-or-nothing in practice, but presented as independent transactions — one flaky RPC response on operation 3 silently kills operations 4..N.

Suggested fix

Either submit-and-confirm sequentially, re-fetching the sequence on failure, or expose a helper that submits the batch in order and stops/reports at the first gap.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingpriority: mediumMissing feature or UX issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions