Repository navigation
apply-load: use the operator-configured NETWORK_PASSPHRASE - #5319
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR fixes a regression where the apply-load command could silently override NETWORK_PASSPHRASE, causing emitted transaction meta to be hashed for the wrong network.
Changes:
- Refactors
apply-loadbenchmark boilerplate config into a sharedconfigureApplyLoad(Config&)helper without overridingNETWORK_PASSPHRASE. - Adds a regression test to ensure
NETWORK_PASSPHRASEremains operator-configured when applying theapply-loadconfiguration. - Updates several example
apply-loadconfig files to explicitly setNETWORK_PASSPHRASE.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/simulation/test/LoadGeneratorTests.cpp | Adds regression test ensuring NETWORK_PASSPHRASE isn’t overridden by apply-load setup |
| src/main/CommandLine.h | Exposes configureApplyLoad(Config&) for reuse/testing |
| src/main/CommandLine.cpp | Implements configureApplyLoad and uses it from runApplyLoad (removes hardcoded passphrase) |
| docs/apply-load-max-sac-tps.cfg | Adds explicit NETWORK_PASSPHRASE |
| docs/apply-load-ledger-limits.cfg | Adds explicit NETWORK_PASSPHRASE |
| docs/apply-load-for-meta.cfg | Adds explicit NETWORK_PASSPHRASE |
| docs/apply-load-benchmark-token.cfg | Adds explicit NETWORK_PASSPHRASE |
| docs/apply-load-benchmark-sac.cfg | Adds explicit NETWORK_PASSPHRASE |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b22966b04a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
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]>
b22966b to
7f697ea
Compare
Drop the configureApplyLoad extraction, the regression test, and the .h change. The fix is just: remove the hardcoded NETWORK_PASSPHRASE override in runApplyLoad, and set NETWORK_PASSPHRASE="Apply Load" in the docs and AWS apply-load templates so their behavior is unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
@dmkozh I updated the PR to do the minimal diff (removed the regression test and updated all the templates to set NETWORK_PASSPHRASE as "Apply Load") |
apply-loadoverridesNETWORK_PASSPHRASEwith a hardcoded"Apply Load", ignoring whatever the operator configured (added in #5196). This breaks the emitted meta: transactions end up hashed for the wrong network, so consumers that ingest it under the configured passphrase fail withunknown 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.