Skip to content

[tx-generator] Add --testnet-config-dir flag to json_highlevel#6529

Open
palas wants to merge 3 commits intomasterfrom
add-testnet-config-dir-to-tx-generator
Open

[tx-generator] Add --testnet-config-dir flag to json_highlevel#6529
palas wants to merge 3 commits intomasterfrom
add-testnet-config-dir-to-tx-generator

Conversation

@palas
Copy link
Copy Markdown
Contributor

@palas palas commented Apr 13, 2026

Description

Adds a --testnet-config-dir flag to tx-generator json_highlevel that auto-discovers infrastructure config (socket path, signing key, node config, target nodes) from a cardano-testnet output directory, using the shared path conventions from Cardano.Node.Testnet.Paths.

Discovered infrastructure always overrides any user-provided values for those fields. All other config fields must be supplied by the user.

Closes #6513 (part 2 of #6510). Depends on #6518 (part 1).

What's new:

  • Cardano.TxGenerator.Setup.TestnetDiscovery module — scans testnet dir for infrastructure config, merges with user config at JSON level (infrastructure always wins)
  • json_highlevel parser now accepts either a full config file (existing behaviour preserved) or --testnet-config-dir with an optional partial config overlay
  • Property-based test verifying infrastructure fields always override user-provided values, and that missing required non-infra fields cause failure

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • property tests
    • roundtrip tests
      See Running tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

@palas palas requested a review from a team as a code owner April 13, 2026 20:35
@palas palas self-assigned this Apr 13, 2026
@palas palas linked an issue Apr 13, 2026 that may be closed by this pull request
Base automatically changed from move-testnet-paths-to-node to master April 14, 2026 22:51
palas added 2 commits April 24, 2026 03:36
Add a `--testnet-config-dir` flag that auto-discovers the 4 infrastructure
parameters (socket path, signing key, node config file, target nodes) from
a `cardano-testnet` output directory.  Discovered infrastructure always
overrides user-provided values; all other config fields must be supplied
by the user.
@palas palas force-pushed the add-testnet-config-dir-to-tx-generator branch from e8b7377 to ffba8e5 Compare April 24, 2026 01:39
@palas palas force-pushed the add-testnet-config-dir-to-tx-generator branch from ffba8e5 to 0154393 Compare April 24, 2026 02:02
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.

Add --testnet-config-dir flag to tx-generator json_highlevel

1 participant