Repository navigation
Parallelize transaction validation for transaction sets. - #5449
Merged
Merged
Conversation
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
September 9, 2026 21:42
12192a2 to
443a838
Compare
SirTyson
reviewed
Sep 11, 2026
5 of 6 tasks
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
September 17, 2026 22:44
443a838 to
ffe5411
Compare
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
October 14, 2026 23:53
ffe5411 to
0ba1f7a
Compare
dmkozh
marked this pull request as ready for review
October 14, 2026 23:56
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Shared transaction frames can be validated concurrently, causing a data race on mutable state.
1 open finding
What changed in this PR
Parallelizes transaction-set validation during nomination and incoming-set checks using the batch executor.
Changes:
- Adds parallel validation with sequential fallbacks.
- Combines fee accounting and invalid-transaction collection.
- Adds parallel-validation tests and updates fee-source expectations.
| File | Description |
|---|---|
| src/herder/TxSetUtils.cpp | Batches validation and updates fee checks. |
| src/herder/test/TxSetTests.cpp | Tests validation across task counts. |
| src/herder/test/HerderTests.cpp | Updates shared-fee-source coverage. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
October 15, 2026 15:53
0ba1f7a to
f455d51
Compare
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
October 15, 2026 16:15
f455d51 to
5b99e0e
Compare
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
November 20, 2026 20:06
5b99e0e to
39e87b2
Compare
SirTyson
requested changes
Nov 20, 2026
SirTyson
left a comment
Contributor
There was a problem hiding this comment.
Overall LGTM! A much smaller change than I was expecting tbh, I guess thanks to the last couple batches of refactors. I left a couple of nits and quesitons, only thing is I think the HerderTests family of unit tests doesn't actually hit the parallel case.
6 tasks
SirTyson
previously approved these changes
Nov 24, 2026
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
November 24, 2026 21:29
a1b4fc7 to
7e9b49d
Compare
dmkozh
enabled auto-merge
November 24, 2026 21:29
dmkozh
disabled auto-merge
November 24, 2026 21:30
This affects both nominating a new transaction set, and validating the incoming transaction set. Thanks to the fact that most of the time we're either applying the ledger, or validating a transaction set, we can use the efficient CPU-pinned batch executor for this. This speeds up the invalid transaction trimming step by ~20ms on large benchmarks, and in general should increase the transaction validation step proportionally to the number of cores.
dmkozh
force-pushed
the
txset_par_checkvalid
branch
from
November 24, 2026 21:33
7e9b49d to
c55bc6d
Compare
dmkozh
enabled auto-merge
November 24, 2026 21:33
SirTyson
approved these changes
Nov 24, 2026
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 affects both nominating a new transaction set, and validating the incoming transaction set. Thanks to the fact that most of the time we're either applying the ledger, or validating a transaction set, we can use the efficient CPU-pinned batch executor for this.
This speeds up the invalid transaction trimming step by ~20ms on large benchmarks, and in general should increase the transaction validation step proportionally to the number of cores.
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)