Skip to content

Misc apply load improvements#5196

Open
dmkozh wants to merge 2 commits intostellar:masterfrom
dmkozh:apply_load_upd
Open

Misc apply load improvements#5196
dmkozh wants to merge 2 commits intostellar:masterfrom
dmkozh:apply_load_upd

Conversation

@dmkozh
Copy link
Copy Markdown
Contributor

@dmkozh dmkozh commented Mar 25, 2026

Description

  • Added a new mode for simply benchmarking closing ledgers with N model transactions (currently only SAC transfer supported). This is faster and less noisy than max TPS test and should serve better for quick feedback for perf experiments.
  • Use genesis accounts to dramatically speed up the setup (especially for high TPS)
  • Validate SAC transactions to also prime signature cache
  • Block benchmark on resolving hot archive BL futures (might be relevant when hot archive is involved)
  • Moved all the command line params to config to simplify the runs
  • Add more logging, including logging the build and config info for the proper comparison between builds/runs
  • Update and streamline the sample configs.

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

Copilot AI review requested due to automatic review settings March 25, 2026 18:05
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 improves the apply-load benchmarking harness to be faster to set up, add a fixed-size “benchmark” mode for model transactions, and make runs more reproducible by moving mode selection into config and logging build/config snapshots.

Changes:

  • Added BENCHMARK_MODEL_TX mode and shifted apply-load mode/model selection into Config (APPLY_LOAD_MODE, APPLY_LOAD_MODEL_TX).
  • Switched apply-load setup to use genesis accounts (avoids account-creation transactions) and added extra validation/logging around benchmarking runs.
  • Updated CLI/docs/sample configs accordingly; improved Visual Studio Rust build script caching and project file completeness.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/test/TxTests.cpp Adjusted genesis-account helper assertion behavior.
src/simulation/test/LoadGeneratorTests.cpp Updated apply-load acceptance tests for config-driven mode selection; added benchmark test.
src/simulation/ApplyLoad.h Constructor now reads mode from config; added benchmark-mode API surface.
src/simulation/ApplyLoad.cpp Genesis-account setup, benchmark-model-tx implementation, added environment/config logging, extra validations.
src/main/Config.h Introduced test-only enums + apply-load config fields; added loaded-TOML snapshot storage.
src/main/Config.cpp Added parsing for new apply-load config keys; persisted loaded TOML text.
src/main/CommandLine.h Exposed writeVersionInfo(std::ostream&) for reuse.
src/main/CommandLine.cpp Removed --mode flag; apply-load now driven by config; refactored version printing.
docs/software/commands.md Documented config-based apply-load mode selection and new benchmark mode.
docs/apply-load-max-sac-tps.cfg Updated sample to config-driven mode + refreshed parameters/boilerplate.
docs/apply-load-limits-for-model-tx.cfg Updated sample to config-driven mode + refreshed parameters/boilerplate.
docs/apply-load-ledger-limits.cfg Updated sample to config-driven mode + refreshed parameters/boilerplate.
docs/apply-load-for-meta.cfg Updated sample to config-driven mode + refreshed parameters/boilerplate.
docs/apply-load-benchmark.cfg New sample config for fixed-size benchmark mode.
Builds/VisualStudio/stellar-core.vcxproj.filters Added missing main/BannedAccountsPersistor files to VS filters.
Builds/VisualStudio/stellar-core.vcxproj Added missing main/BannedAccountsPersistor files to VS project.
Builds/VisualStudio/build_rust.bat Extended protocol range and added incremental rebuild logic for protocol libs.

dmkozh added 2 commits March 30, 2026 13:24
- Fix the project
- Improve the Rust build: avoid stale builds and skip unnecessary builds.
- Added a new mode for simply benchmarking closing ledgers with N model transactions (currently only SAC transfer supported). This is faster and less noisy than max TPS test and should serve better for quick feedback for perf experiments.
- Use genesis accounts to dramatically speed up the setup (especially for high TPS)
- Validate SAC transactions to also prime signature cache
- Block benchmark on resolving hot archive BL futures (might be relevant when hot archive is involved)
- Moved all the command line params to config to simplify the runs
- Add more logging, including logging the build and config info for the proper comparison between builds/runs
- Update and streamline the sample configs.
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.

2 participants