Repository navigation
Simulate apply configs now support parallel apply - #5255
Merged
marta-lokhova merged 1 commit intoMay 7, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts testing/simulation-only configuration and application-time sleep injection to work correctly with parallel ledger apply, and removes the now-obsolete MODE_STORES_HISTORY_MISC toggle.
Changes:
- Move
OP_APPLY_SLEEP_TIME_*_FOR_TESTINGconfig fields/parsing/validation behind#ifdef BUILD_TESTS. - Update ledger-apply sleep simulation to use a local PRNG (instead of
getGlobalRandomEngine()) to avoid main-thread-only RNG assumptions under parallel apply. - Remove
MODE_STORES_HISTORY_MISCand make related history/SCP-history persistence unconditional (with existing internal gating such aspublishEnabled()still applying where relevant).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/Config.h | Gates OP-apply sleep testing config behind BUILD_TESTS; removes MODE_STORES_HISTORY_MISC; exposes processOpApplySleepTimeForTestingConfigs() under tests. |
| src/main/Config.cpp | Gates OP-apply sleep parsing/initialization/processing behind BUILD_TESTS; removes MODE_STORES_HISTORY_MISC defaulting/handling. |
| src/main/CommandLine.cpp | Removes special-case behavior that toggled MODE_STORES_HISTORY_MISC based on OP-apply sleep settings. |
| src/main/ApplicationImpl.cpp | Removes config validation tied to MODE_STORES_HISTORY_MISC vs writable history archives. |
| src/ledger/LedgerManagerImpl.h | Adds local PRNG member (tests only) for sleep simulation. |
| src/ledger/LedgerManagerImpl.cpp | Switches sleep simulation RNG source; makes appendTransactionSet unconditional; calls sleep simulation under BUILD_TESTS. |
| src/herder/HerderImpl.cpp | Makes SCP history persistence unconditional by removing the MODE_STORES_HISTORY_MISC guard. |
marta-lokhova
force-pushed
the
simulateApplyMultiThread
branch
from
May 6, 2026 23:04
683f9ff to
49e1c0e
Compare
dmkozh
approved these changes
May 7, 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.
This change is needed to properly simulate apply time in overlay-only mode with Soroban tx profiles. We haven't used these flags in a while, so they broke overtime. This change fixes them, and also performs some cleanup (such as removing obsolete MODE_STORES_HISTORY mode).