Repository navigation
Misc apply load improvements - #5196
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_TXmode and shifted apply-load mode/model selection intoConfig(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. |
- 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.
marta-lokhova
approved these changes
Apr 1, 2026
tamirms
added a commit
to tamirms/stellar-core
that referenced
this pull request
Jun 5, 2026
runApplyLoad() force-set config.NETWORK_PASSPHRASE = "Apply Load", silently overriding whatever passphrase the operator configured. This was introduced in stellar#5196 (as part of "moved all the command line params to config") and breaks consumers of the emitted metadata: every transaction in METADATA_OUTPUT_STREAM is hashed under the "Apply Load" network ID instead of the configured one, so the standard ingestion reader -- which pairs transaction envelopes to their results by transaction hash -- rejects the meta with "unknown tx hash in LedgerCloseMeta". NETWORK_PASSPHRASE is an ordinary config field and nothing in apply-load needs it pinned (contract IDs and tx hashes derive from the network ID, which derives from whatever passphrase is set, so the run is self-consistent under any value). Remove the override so apply-load uses the configured passphrase, as it did before stellar#5196, and restore NETWORK_PASSPHRASE in the sample cfgs. Extract runApplyLoad()'s config setup into configureApplyLoad() and add a regression test that asserts the configured NETWORK_PASSPHRASE survives. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pull Bot
pushed a commit
to DIGIIX-Ltd/stellar-core
that referenced
this pull request
Jun 5, 2026
) `apply-load` overrides `NETWORK_PASSPHRASE` with a hardcoded `"Apply Load"`, ignoring whatever the operator configured (added in stellar#5196). This breaks the emitted meta: transactions end up hashed for the wrong network, so consumers that ingest it under the configured passphrase fail with `unknown tx hash in LedgerCloseMeta`. The passphrase doesn't need to be pinned in code — contract IDs and tx hashes derive from the network ID, so the run is self-consistent under whatever is configured. This drops the override and sets `NETWORK_PASSPHRASE="Apply Load"` in the sample and AWS apply-load templates, so their behavior is identical while operators can now override it from their own config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)