Skip to content

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

Open
palas wants to merge 3 commits intomove-testnet-paths-to-nodefrom
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 intomove-testnet-paths-to-nodefrom
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.

Two orthogonal merge flags (--fill-defaults/--no-fill-defaults, --force-infra/--no-force-infra) control how discovered config is merged with user-provided JSON — see #6510 for the full design.

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

What's new:

  • Cardano.TxGenerator.Setup.TestnetDiscovery module — scans testnet dir, detects era from configuration.yaml via npcTestStartingEra, merges with user config at JSON level
  • 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 with randomised user configs and all flag combinations, covering merge correctness for infra, required, and optional fields

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
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