Add new mode to apply load for tx set validation - #5404
Merged
Conversation
SirTyson
requested review from
dmkozh and
marta-lokhova
and
a balanced review from Copilot
August 4, 2026 20:33
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional apply-load benchmark path covering tx-set decoding, validation, local consensus, and ledger application.
Changes:
- Adds configurable validation-and-apply timing.
- Records phase timings and signature-cache metrics.
- Documents the mode and new validation metric.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/simulation/ApplyLoad.h |
Declares timing paths and phase statistics. |
src/simulation/ApplyLoad.cpp |
Implements consensus-backed benchmarking. |
src/main/Config.h |
Defines timing configuration. |
src/main/Config.cpp |
Parses timing configuration. |
src/herder/HerderSCPDriver.h |
Declares validation timer. |
src/herder/HerderSCPDriver.cpp |
Instruments tx-set validation. |
docs/software/commands.md |
Documents apply-load timing paths. |
docs/metrics.md |
Documents the validation metric. |
docs/apply-load-benchmark-sac.cfg |
Adds example timing configuration. |
dmkozh
reviewed
Aug 4, 2026
Contributor
Author
|
Should have addressed all the comments, sorry for the delay, I've been in bug finding mode... |
dmkozh
approved these changes
Aug 13, 2026
dmkozh
left a comment
Contributor
There was a problem hiding this comment.
LGTM, but I'm not sure if master is open yet.
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
This adds a new mode to apply load, allowing us for more "end to end" simulations. In the new mode, we time and simulate ballot phase through the end of apply, but in a single node network such that SCP state transitions occur instantly. This is useful, as it allows us to benchmark the processing overhead associated with consensus, as well as measure cache performance and dedup similar work done during tx set validation and the later application of this transaction set.
The motivation for this test was from my recent block latency experiments. I noticed how optimizations in network calls, reducing bandwidth, etc were not moving the needle on actual block latency. It turned out that consensus latency was greatly affected by CPU based bottlenecks, not just network calls. On supercluster, it's challenging to benchmark CPU costs of concensus, as you can't easily run tracy or profilers and have limited visibility to single node performance. This test allows us to much more easily measure and improve the processing heavy aspects of concensus. In overlay-v2-shared for a block with 6K SAC transfers, we saw about 300 ms of non-network "ingestion" time when receiving a tx set and 500 ms of apply. Imo this was a significant blind spot in our single node apply load tests previously.
Note that the actual number produced by this test is meaningless, as consensus without a network tells us very little about overall performance. However, the reported phase timings are very useful in identifying bottlenecks and comparing solutions. This simulates the processing done by a non-leader node. In the future, it may also be helpful to add a mode for block construction as well.
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)