Skip to content

apply-load: use the operator-configured NETWORK_PASSPHRASE - #5319

Merged
dmkozh merged 3 commits into
stellar:masterfrom
tamirms:fix/apply-load-honor-network-passphrase
Jun 5, 2026
Merged

dmkozh merged 3 commits into
stellar:masterfrom
tamirms:fix/apply-load-honor-network-passphrase

Conversation

@tamirms

@tamirms tamirms commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

apply-load overrides NETWORK_PASSPHRASE with 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 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.

Copilot AI review requested due to automatic review settings June 5, 2026 04:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-load benchmark boilerplate config into a shared configureApplyLoad(Config&) helper without overriding NETWORK_PASSPHRASE.
  • Adds a regression test to ensure NETWORK_PASSPHRASE remains operator-configured when applying the apply-load configuration.
  • Updates several example apply-load config files to explicitly set NETWORK_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

Comment thread src/main/CommandLine.cpp Resolved
Comment thread src/main/CommandLine.h Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/main/CommandLine.cpp Resolved
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]>
@tamirms
tamirms force-pushed the fix/apply-load-honor-network-passphrase branch from b22966b to 7f697ea Compare June 5, 2026 04:19
Comment thread src/main/CommandLine.cpp Resolved
Comment thread docs/apply-load-benchmark-sac.cfg Resolved
Comment thread docs/apply-load-benchmark-sac.cfg Resolved
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]>
@tamirms

tamirms commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@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")

@dmkozh
dmkozh enabled auto-merge June 5, 2026 18:36
@dmkozh
dmkozh added this pull request to the merge queue Jun 5, 2026
Merged via the queue into stellar:master with commit 9bab97a Jun 5, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants