Repository navigation
Accept the cardano-config layout of the node configuration - #23
Merged
Merged
Conversation
carbolymer
force-pushed
the
mgalazyn/feature/bump-chap-deps
branch
from
November 16, 2026 14:01
2892161 to
bd9a974
Compare
carbolymer
force-pushed
the
mgalazyn/feature/cardano-config-envelope
branch
from
November 16, 2026 14:01
a232eb7 to
3058ac6
Compare
carbolymer
marked this pull request as ready for review
November 16, 2026 14:02
This was referenced Nov 16, 2026
Jimbo4350
approved these changes
Nov 17, 2026
carbolymer
force-pushed
the
mgalazyn/feature/bump-chap-deps
branch
from
November 23, 2026 19:33
bd9a974 to
e9ff22e
Compare
carbolymer
force-pushed
the
mgalazyn/feature/cardano-config-envelope
branch
from
November 23, 2026 19:47
3058ac6 to
6b5b1d3
Compare
carbolymer
force-pushed
the
mgalazyn/feature/bump-chap-deps
branch
from
November 23, 2026 19:47
e9ff22e to
b9fe60e
Compare
Kupo read ByronGenesisFile and ShelleyGenesisFile only at the top level of --node-config. The configuration that cardano-node 11.2 and cardano-testnet write nests them under Configuration and then Protocol, so Kupo exited at start-up with "Failed to configure network parameters". Read the keys under Configuration and Protocol when the file has a Configuration object, and at the top level otherwise. Both layouts name the genesis files relative to the configuration file. Fixes #22
carbolymer
force-pushed
the
mgalazyn/feature/cardano-config-envelope
branch
from
November 23, 2026 20:51
6b5b1d3 to
b4445d5
Compare
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.
Fixes #22.
Summary
Kupo exited at start-up with
Failed to configure network parameterswhen--node-configpointed to the configuration file that cardano-node 11.2 andcardano-testnet11.2 write. That file uses thecardano-configlayout (Version: 2), which nestsByronGenesisFileandShelleyGenesisFileunderConfigurationand thenProtocol. Kupo now reads the two keys there when the file has aConfigurationobject, and at the top level otherwise, so the flat files of mainnet, preprod and preview keep working. Both layouts name the genesis files relative to the configuration file, as before.Kupo reads only these two keys from the node configuration, so this PR looks them up itself and adds no dependency on the
cardano-configlibrary.Stack
This PR is based on #18 (CHaP bump), which is based on master. The base branch is
mgalazyn/feature/bump-chap-deps, and the one commit on top of it is new in this PR. #19 is based on this PR.Changes
parseNetworkParametersreads the genesis file names from either layout.ConfigurationSpecgains a test with a nested configuration file that names the mainnet genesis files with relative paths.Verification
The unit tests run 415 examples with 0 failures, and the build has no GHC warnings. The nested layout was checked against a configuration file written by
cardano-testnet create-envfrom the cardano-node 11.2.0 release. Kupo has not yet been started against a running 11.2 node with this change.