Skip to content

Accept the cardano-config layout of the node configuration - #23

Merged
carbolymer merged 1 commit into
masterfrom
mgalazyn/feature/cardano-config-envelope
Nov 23, 2026
Merged

carbolymer merged 1 commit into
masterfrom
mgalazyn/feature/cardano-config-envelope

Conversation

@carbolymer

@carbolymer carbolymer commented Nov 16, 2026 •

Copy link
Copy Markdown

Fixes #22.

Summary

Kupo exited at start-up with Failed to configure network parameters when --node-config pointed to the configuration file that cardano-node 11.2 and cardano-testnet 11.2 write. That file uses the cardano-config layout (Version: 2), which nests ByronGenesisFile and ShelleyGenesisFile under Configuration and then Protocol. Kupo now reads the two keys there when the file has a Configuration object, 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-config library.

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

  • parseNetworkParameters reads the genesis file names from either layout.
  • ConfigurationSpec gains a test with a nested configuration file that names the mainnet genesis files with relative paths.
  • The changelog describes the new behaviour.

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-env from the cardano-node 11.2.0 release. Kupo has not yet been started against a running 11.2 node with this change.

@carbolymer carbolymer self-assigned this Nov 16, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/feature/bump-chap-deps branch from 2892161 to bd9a974 Compare November 16, 2026 14:01
@carbolymer
carbolymer force-pushed the mgalazyn/feature/cardano-config-envelope branch from a232eb7 to 3058ac6 Compare November 16, 2026 14:01
@carbolymer
carbolymer marked this pull request as ready for review November 16, 2026 14:02
@carbolymer
carbolymer force-pushed the mgalazyn/feature/bump-chap-deps branch from bd9a974 to e9ff22e Compare November 23, 2026 19:33
@carbolymer
carbolymer force-pushed the mgalazyn/feature/cardano-config-envelope branch from 3058ac6 to 6b5b1d3 Compare November 23, 2026 19:47
@carbolymer
carbolymer force-pushed the mgalazyn/feature/bump-chap-deps branch from e9ff22e to b9fe60e Compare November 23, 2026 19:47
Base automatically changed from mgalazyn/feature/bump-chap-deps to master November 23, 2026 20:15
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
carbolymer force-pushed the mgalazyn/feature/cardano-config-envelope branch from 6b5b1d3 to b4445d5 Compare November 23, 2026 20:51
@carbolymer
carbolymer merged commit ec168ee into master Nov 23, 2026
7 checks passed
@carbolymer
carbolymer deleted the mgalazyn/feature/cardano-config-envelope branch November 23, 2026 21: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.

Read the configuration format of cardano-node 11.2

2 participants