cardano-testnet: Enforce SPOs come first and split node list into SPO and relay#6563
Merged
cardano-testnet: Enforce SPOs come first and split node list into SPO and relay#6563
Conversation
9 tasks
9ca8af4 to
77fa7d8
Compare
carbolymer
reviewed
May 7, 2026
carbolymer
approved these changes
May 7, 2026
def6fd7 to
393ad15
Compare
Co-authored-by: Mateusz Galazyn <228866+carbolymer@users.noreply.github.com>
393ad15 to
eb5f40e
Compare
Jimbo4350
reviewed
May 7, 2026
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
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.Follow-up PR: #6559 (adds
--nodesflag for per-node binary configuration on top of this)I would recommend looking at the diff with white-space disabled.
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