Skip to content

Replace manual node config checking with a call to readNodeConfig - #1475

Merged
palas merged 6 commits into
masterfrom
config-dedup
Oct 23, 2026
Merged

palas merged 6 commits into
masterfrom
config-dedup

Conversation

@palas

@palas palas commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Context

This PR replaces the manual node config checking with a call to readNodeConfig from cardano-api.

Build on this PR: IntersectMBO/cardano-api#1379

How to trust this PR

It is quite straightforward, just a lot of code replaced with the call to readNodeConfig.

Nevertheless there are a couple of side-effects of the change:

  • Configurations in the new cardano-config format are accepted.
  • A configuration without genesis hashes is rejected (before, only the hashes present were checked).
  • Every genesis file is decoded, not just hashed. The Conway genesis test fixture was invalid (233 PlutusV3 cost model values, the ledger expects 251), so it is replaced with the mainnet one.
  • DebugNodeConfigWrongGenesisHashCmdError is replaced by DebugNodeConfigReadCmdError.

In addition to that, the PR includes a couple of fixes to get the CI to work in the different platforms.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

@palas palas self-assigned this Oct 16, 2026
Copilot AI balanced review requested due to automatic review settings October 16, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The unreleased API pin and platform-specific toolchain workarounds need cross-platform CI confirmation and human review.

0 open findings

What changed in this PR

Replaces manual node configuration checks with cardano-api’s readNodeConfig, supporting the new configuration format and stricter genesis validation.

Changes:

  • Delegates validation and updates error reporting.
  • Refreshes genesis fixtures, assertions, and breaking-change documentation.
  • Updates dependencies and adds macOS and Windows build workarounds.
File Description
flake.nix Adds Windows C runtime linking workaround.
flake.lock Updates the package repository pin.
cardano-cli/​test/​cardano-cli-test/​Test/​Cli/​CheckNodeConfiguration.hs Updates expected validation errors.
cardano-cli/​test/​cardano-cli-test/​files/​input/​check-node-configuration/​node-config.yaml Updates Conway genesis hash.
cardano-cli/​test/​cardano-cli-test/​files/​input/​check-node-configuration/​node-config.json Updates hash and removes obsolete configuration flag.
cardano-cli/​test/​cardano-cli-test/​files/​input/​check-node-configuration/​genesis.conway.spec.json Replaces invalid fixture with mainnet genesis.
cardano-cli/​src/​Cardano/​CLI/​Type/​Error/​DebugCmdError.hs Introduces configuration-reading error.
cardano-cli/​src/​Cardano/​CLI/​EraIndependent/​Debug/​CheckNodeConfiguration/​Run.hs Delegates checks to readNodeConfig.
cabal.project Updates package index and temporarily pins API source.
.github/​workflows/​haskell.yml Aligns macOS SDK with Xcode toolchain.
.changes/​20261015_022558_cardano-cli_palas_check_node_configuration_cardano_config.yml Documents breaking validation changes.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/haskell.yml Outdated
Comment thread cardano-cli/src/Cardano/CLI/EraIndependent/Debug/CheckNodeConfiguration/Run.hs Outdated
Comment thread cardano-cli/src/Cardano/CLI/EraIndependent/Debug/CheckNodeConfiguration/Run.hs Outdated
Comment thread cardano-cli/src/Cardano/CLI/Type/Error/DebugCmdError.hs Outdated
Comment thread cardano-cli/src/Cardano/CLI/Type/Error/DebugCmdError.hs Outdated
Comment thread cardano-cli/test/cardano-cli-test/Test/Cli/CheckNodeConfiguration.hs Outdated
Comment thread cardano-cli/test/cardano-cli-test/Test/Cli/CheckNodeConfiguration.hs Outdated
Comment thread flake.nix Outdated
Comment thread .github/workflows/haskell.yml Outdated
johnalotoski pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 22, 2026
cardano-api 11.10.0.0 carries the readNodeConfig rewrite that reads both the
flat and the cardano-config enveloped formats, so it comes from CHaP and the
local bounds move to ^>= 11.10.

cardano-cli's matching change is still open as IntersectMBO/cardano-cli#1475,
so it stays a source-repository-package until that releases.

plutus-scripts-bench caps cardano-api at ^>=11.8 and is not ours to edit, hence
the allow-newer.
johnalotoski pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 22, 2026
cardano-api 11.10.0.0 carries the readNodeConfig rewrite that reads both the
flat and the cardano-config enveloped formats, so it comes from CHaP and the
local bounds move to ^>= 11.10.

cardano-cli's matching change is still open as IntersectMBO/cardano-cli#1475,
so it stays a source-repository-package until that releases.

plutus-scripts-bench caps cardano-api at ^>=11.8 and is not ours to edit, hence
the allow-newer.
johnalotoski pushed a commit to IntersectMBO/cardano-node that referenced this pull request Oct 22, 2026
cardano-api 11.10.0.0 carries the readNodeConfig rewrite that reads both the
flat and the cardano-config enveloped formats, so it comes from CHaP and the
local bounds move to ^>= 11.10.

cardano-cli's matching change is still open as IntersectMBO/cardano-cli#1475,
so it stays a source-repository-package until that releases.

plutus-scripts-bench caps cardano-api at ^>=11.8 and is not ours to edit, hence
the allow-newer.
@palas
palas force-pushed the config-dedup branch 2 times, most recently from c2485e2 to 42b515e Compare October 23, 2026 00:00
@palas
palas enabled auto-merge October 23, 2026 01:07
@palas
palas added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 1608ebb Oct 23, 2026
30 of 32 checks passed
@palas
palas deleted the config-dedup branch October 23, 2026 02:08
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.

3 participants