Skip to content

fix(scripts): handle genesis extraConfig from cardano-cli 11.2 - #153

Merged
mkoura merged 1 commit into
masterfrom
fix/genesis-extra-config-compat
Aug 13, 2026
Merged

fix(scripts): handle genesis extraConfig from cardano-cli 11.2#153
mkoura merged 1 commit into
masterfrom
fix/genesis-extra-config-compat

Conversation

@mkoura

@mkoura mkoura commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

cardano-cli >= PR #1384 writes initial funds and staking into the new "extraConfig" field (ledger's streaming data injection) and leaves the legacy "initialFunds"/"staking" fields empty. Nodes built with cardano-ledger-shelley < 1.19 silently ignore "extraConfig", so the cluster would start with an empty UTxO set.

Detect "extraConfig" support in the node binary and move the data back to the legacy fields when the node cannot parse it. The slow (Byron funds) setup drops "extraConfig" unconditionally, as it never wants Shelley initial funds.

cardano-cli >= PR #1384 writes initial funds and staking into the new
"extraConfig" field (ledger's streaming data injection) and leaves the
legacy "initialFunds"/"staking" fields empty. Nodes built with
cardano-ledger-shelley < 1.19 silently ignore "extraConfig", so the
cluster would start with an empty UTxO set.

Detect "extraConfig" support in the node binary and move the data back
to the legacy fields when the node cannot parse it. The slow (Byron
funds) setup drops "extraConfig" unconditionally, as it never wants
Shelley initial funds.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a compatibility shim to keep common-start-fast/common-start-slow working with newer cardano-cli output where Shelley genesis initial funds / staking may be emitted under extraConfig, while older nodes may silently ignore it.

Changes:

  • common-start-fast: detect whether the cardano-node binary supports Shelley genesis extraConfig injection and, if not, downgrade embedded injection data back into legacy initialFunds / staking fields.
  • common-start-slow: explicitly drop extraConfig from Shelley genesis (in addition to clearing initialFunds) since slow setup funds come from Byron.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/cardonnay_scripts/scripts/common/common-start-slow Clears initialFunds and deletes .extraConfig in the generated Shelley genesis for the slow setup.
src/cardonnay_scripts/scripts/common/common-start-fast Adds node feature detection and a jq-based downgrade path from .extraConfig to legacy Shelley genesis fields for older ledgers.

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

@mkoura
mkoura merged commit d89b75e into master Aug 13, 2026
5 checks passed
@mkoura
mkoura deleted the fix/genesis-extra-config-compat branch August 13, 2026 05:29
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.

2 participants