Skip to content

Fix Stellar transaction replay with sequence number guard - #561

Open
Vivian-04 wants to merge 3 commits into
Heliobond:mainfrom
Vivian-04:fix-stellar-replay
Open

Fix Stellar transaction replay with sequence number guard#561
Vivian-04 wants to merge 3 commits into
Heliobond:mainfrom
Vivian-04:fix-stellar-replay

Conversation

@Vivian-04

Copy link
Copy Markdown

PR #540 Prevent Stellar transaction replay with sequence number guard

Description

This PR addresses issue #540 where concurrent submissions of identical transactions or slow RPC responses could cause sequence number conflicts, resulting in multiple confirmable duplicated transactions on-chain.

Changes

  • Extracted the initially targeted transaction sequence inside _attemptSubmit.
  • Added staleness check against the localSequenceTracker both before and after updating it from chain.
  • If the target sequence is older than or equal to the tracked sequence, the system correctly halts and throws a Stale sequence number detected error instead of silently rebuilding and submitting the transaction.

Acceptance Criteria Met

  • Local sequence number tracked after first account fetch.
  • Sequence incremented on successful submission.
  • Stale sequence numbers rejected with a clear error.
  • Concurrent submissions handled safely.

Closes #540

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Vivian-04 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent Stellar transaction replay with sequence number guard

1 participant