Skip to content

Fix TPS/TPL conversion for max-sac-tps.#5259

Open
dmkozh wants to merge 1 commit intostellar:masterfrom
dmkozh:max-sac-tps-fix
Open

Fix TPS/TPL conversion for max-sac-tps.#5259
dmkozh wants to merge 1 commit intostellar:masterfrom
dmkozh:max-sac-tps-fix

Conversation

@dmkozh
Copy link
Copy Markdown
Contributor

@dmkozh dmkozh commented May 7, 2026

Description

The search boundaries are defined as 'TPS', but in some places they were interpreted as TPL which led to assertion failures in some cases and always incorrect logging.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

The search boundaries are defined as 'TPS', but in some places they were interpreted as TPL which led to assertion failures in some cases and always incorrect logging.
Copilot AI review requested due to automatic review settings May 7, 2026 23:12
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 fixes unit mismatches in ApplyLoadMode::MAX_SAC_TPS where configuration boundaries expressed in TPS were sometimes treated as “transactions/transfers per ledger (TPL)”, causing incorrect logging and (in some cases) assertion failures during max-SAC-TPS search runs.

Changes:

  • Introduces a helper to convert TPS + target close time into an equivalent per-ledger count.
  • Updates MAX_SAC_TPS paths to use the conversion when sizing accounts and computing binary-search bounds.
  • Adjusts the MAX_SAC_TPS simulation test configuration to match the corrected unit handling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/simulation/ApplyLoad.cpp Adds TPS→per-ledger conversion helper and uses it in MAX_SAC_TPS account sizing, contract funding setup, and binary-search bound calculations.
src/simulation/test/LoadGeneratorTests.cpp Updates MAX_SAC_TPS test parameters to align with corrected TPS/TPL interpretation.

Comment thread src/simulation/ApplyLoad.cpp
Comment thread src/simulation/ApplyLoad.cpp
Comment thread src/simulation/ApplyLoad.cpp
@dmkozh dmkozh enabled auto-merge May 7, 2026 23:52
@dmkozh dmkozh added this pull request to the merge queue May 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 8, 2026
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