Skip to content

Bench/genesis#6544

Draft
fmaste wants to merge 19 commits into
masterfrom
bench/genesis
Draft

Bench/genesis#6544
fmaste wants to merge 19 commits into
masterfrom
bench/genesis

Conversation

@fmaste

@fmaste fmaste commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description

Add your description here, if it fixes a particular issue please provide a
link
to the issue.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Running tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@fmaste fmaste force-pushed the bench/genesis branch 3 times, most recently from a023ad9 to 1eaa705 Compare April 27, 2026 14:34
@fmaste fmaste force-pushed the bench/genesis branch 9 times, most recently from c24ca3d to fc69ed3 Compare May 29, 2026 19:55
@fmaste fmaste force-pushed the bench/genesis branch 18 times, most recently from 247e461 to 5dc42e6 Compare June 3, 2026 18:04
@fmaste fmaste force-pushed the bench/genesis branch 8 times, most recently from 14eec17 to 0472d6f Compare June 10, 2026 03:57
fmaste added 16 commits June 10, 2026 12:05
Both genesis backends, "jq" and "modular", now live in the same file. Extract unmodified the code of each to new files.
Resolve `$genesis_backend` once at source time and replace all the 'if WB_MODULAR_GENESIS' with a single `"X-$genesis_backend" "$@"`.

Applies to `profile-cache-key-input`, `profile-cache-key`, `spec` and `pool-relays`.

Also, the decision between `create-testnet-data` and `create-staked` (WB_CREATE_TESTNET_DATA), now lives in the "jq" backend
(the "modular" backend only implements spec, pool-relays, byron and cache key functions, not the create-testnet-data call).
Function `derive-from-cache` becomes a backend implementation.

Both `derive-from-cache` and `finalise-cache-entry` are merged and inlined into `derive-from-cache-jq` (`derive-from-cache-modular` delegates to "jq").
Replaces 'cardano-cli byron genesis genesis'.

This introduces changes to the cache output so the directory entry now has the "v2" suffix.

Removes genesis-byron-{jq,modular} and the genesis-byron dispatcher.
…e-testnet-data`

Was converging to `create-staked` output, keep `create-testnet-data` layout:
- pools-keys/poolN/{cold,kes,vrf,opcert}.{skey,vkey,cert,counter}
- stake-delegators/delegatorN/{payment,staking}.{skey,vkey}
- drep-keys/drepN/drep.{skey,vkey}
- utxo-keys/utxoN/utxo.{skey,vkey}
- genesis-keys/genesisN/key.{skey,vkey}
- delegate-keys/delegateN/{key,kes,vrf,opcert}.{skey,vkey,cert,counter}
- byron-gen-command/

Normalises genesis files names. Every era's genesis file is now genesis.<era>.json everywhere:
- genesis.byron.json
- genesis.shelley.json
- genesis.alonzo.json
- genesis.conway.json
- genesis.dijkstra.json

Details:
- create-testnet-data drops its symlink-creation block and the `link_keys` helper (no longer needed under the native layout).
- Removes `Massage_the_key_file_layout_to_match_AWS`, `key_depl` and `key_genesis`.

Genesis file names are unchanged here.
The pool relays were wrote into the Shelley genesis (via `pool-relays.json` and `cardano-cli ... --relays` / `--relay-specification-file`) are only consumed by ledger-peer discovery.

With ledger peers off and `publicRoots` empty, the relay records in genesis are never read.

Every workbench topology disables it:
- the supervisor (local / 127.0.0.1) backend gets `useLedgerAfterSlot: -1` from `cardano-topology projection-for`.
- the Nomad backend hardcodes the same value (nix/workbench/backend/nomad-job.nix).
Were removed when the node started only considering valid what mainnet shipped with
- Structure: Separates cost models from the rest of the parameters.
- Consistency: Shelley genesis is the full object, no only the "protocolParams" field.
- Consistency: Uses everywhere an object for the cost model, no arrays.
- Cost model names are updated.
Going forward, the only way to inject cost models with any number of parameters is through Alonzo genesis "extraConfig" field.
Based on a mainnet db-sync and mainnet genesis files we reconstructed the timeline with no cardano-profile implementation specifics
Remove the "genesis spec" workbench command that was used for `create-testnet-data --spec-*` and instead use what cardano-profile provides.

The profile may have null "conway" or "dijkstra" genesis fields but the node still needs valid files, use a "zero" genesis in those cases.
@fmaste fmaste force-pushed the bench/genesis branch 2 times, most recently from 526a44a to 0ae5bd3 Compare June 10, 2026 15:14
fmaste added 3 commits June 10, 2026 15:59
The info banner sat inside the genesis() function body, so it fired once per `wb genesis <op>` dispatch
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.

1 participant