cardano-testnet: Add --nodes flag for per-node binary configuration#6559
Open
cardano-testnet: Add --nodes flag for per-node binary configuration#6559
Conversation
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.
Description
Adds a
--nodesCLI flag tocardano-testnetthat allows specifying the role (SPO or relay) and optionally a customcardano-nodebinary for each node in the testnet. This enables running testnets with mixed node versions, which is needed for testing compatibility across node releases.The new flag coexists with the existing
--num-pool-nodesvia<|>in the parser, so either can be used:At creation time, custom binaries are validated by running
--versionand the result is recorded in a YAML env file (node-data/nodeN/env). At runtime, the env file is read to resolve the binary, falling back to the default resolution when no env file exists.The
NodeOptiontype was refactored from a sum type (SpoNodeOptions | RelayNodeOptions) into a record, and a newTestnetNodeOptionscontainer enforces at the type level that there is at least one SPO (NonEmpty) and that SPOs come before relays (by structure). The parser also validates this ordering.readNodeOptionsFromEnvnow validates that node directories are consecutively numbered and that SPOs come before relays, matching the assumptions made bycardanoTestnet.Checklist
See Running tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12