Skip to content

Overlay-only mode fixes to prevent occasional banned transaction drops#5257

Merged
marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:loadgenSeqNumFixes
May 8, 2026
Merged

Overlay-only mode fixes to prevent occasional banned transaction drops#5257
marta-lokhova merged 1 commit into
stellar:masterfrom
marta-lokhova:loadgenSeqNumFixes

Conversation

@marta-lokhova
Copy link
Copy Markdown
Contributor

A fairly obscure edge case in overlay-only loadgen mode: because we don't update seqnums in the DB, it is possible to generate transactions that are duplicates of already applied transactions. Because we ban applied transactions, and pull mode rejects banned transactions, the network ends up not pulling some new transactions at all. This causes a few transactions per run to get dropped, and trips loadgen.

The fix is to avoid ever loading seq nums from DB during overlay-only mode, and always bump sequence number for every new transaction.

Copilot AI review requested due to automatic review settings May 7, 2026 22:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix an overlay-only loadgen edge case where sequence numbers can regress to stale DB values, causing regenerated transactions to duplicate already-applied transactions (which then get banned and can be dropped in pull-mode propagation).

Changes:

  • Introduces TxGenerator::maybeLoadAccountSequenceNumber() and uses it to avoid DB sequence-number reloads in overlay-only mode when generating Soroban-related transactions.
  • Tightens overlay-only assumptions in loadgen by asserting txBAD_SEQ recovery paths aren’t exercised in overlay-only mode.
  • Makes banned-transaction handling consistent in TransactionQueue::canAdd() (removing the overlay-only test-build bypass).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/simulation/TxGenerator.h Adds a helper declaration to conditionally reload account seqnums.
src/simulation/TxGenerator.cpp Uses the helper to skip DB seqnum reloads in overlay-only mode across several Soroban tx builders.
src/simulation/LoadGenerator.cpp Adds overlay-only assertion on txBAD_SEQ handling and changes how pregenerated txs affect local seq tracking.
src/herder/TransactionQueue.cpp Simplifies banned-tx handling to always return TRY_AGAIN_LATER (also in test overlay-only).

Comment thread src/simulation/LoadGenerator.cpp
@marta-lokhova marta-lokhova requested a review from dmkozh May 7, 2026 23:45
@marta-lokhova marta-lokhova added this pull request to the merge queue May 8, 2026
Merged via the queue into stellar:master with commit 735f72b May 8, 2026
71 checks passed
@marta-lokhova marta-lokhova deleted the loadgenSeqNumFixes branch May 8, 2026 03:14
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.

3 participants