Skip to content

wb | standardise on create-testnet-data, rework era plumbing, normalise genesis layout#6544

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

wb | standardise on create-testnet-data, rework era plumbing, normalise genesis layout#6544
fmaste wants to merge 21 commits into
masterfrom
bench/genesis

Conversation

@fmaste

@fmaste fmaste commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Workbench genesis

Standardise on create-testnet-data, rework era plumbing, normalise genesis layout

Summary

  • Add cardano-profile support for PV 11 (preview / dijkstra) and cost-model injection through Alonzo extraConfig. Align epoch-timeline.json with mainnet.
  • Add a new "ripper" genesis backend that separates the dataset from the protocol, and consolidate the genesis dispatch under one place.
  • Drop create-staked and converge the genesis flow on cardano-cli latest genesis create-testnet-data, including byron.
  • Normalise on-disk genesis filenames everywhere to genesis.<era>.json and align the cache/run directory layout with what create-testnet-data actually produces.
  • Make era a first-class workbench-level input (--era-name on wb start / wb run allocate), embed it in the run tag, and write it directly into meta.json as .meta.era.
  • Switch wb run allocate to all-named-flags and derive the profile name from profile.json to remove the positional-args contract.
  • Keep analysis of pre-existing runs working: wb analyse and the analysis-side helpers fall back to the old genesis filenames / top-level layout when the new ones are absent.

@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 3 times, most recently from b6eb614 to 3bc9201 Compare June 17, 2026 22:17
@fmaste fmaste changed the title Bench/genesis wb | standardise on create-testnet-data, rework era plumbing, normalise genesis layout Jun 18, 2026
@fmaste fmaste force-pushed the bench/genesis branch 3 times, most recently from 5f9bd5c to b4c0fe3 Compare June 18, 2026 15:24
fmaste added 5 commits June 19, 2026 14:47
Bundling it into the tar doubled the upload
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").
Move the preset-dispatch branch out of the per-call helpers so the "from preset" path is resolved once at source time,
matching the other backend-dispatch consolidations.
fmaste added 16 commits June 19, 2026 17:48
`create-testnet-data` is now the only supported path.
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 file 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`.

The names `create-testnet-data` itself emits are unchanged and the workbench's downstream consumers are updated to read the normalised form.
The pool relays written 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).
The "ripper" backend assembles a run's genesis by combining:
- a cached **dataset**: UTXO, delegators, DReps, pool/staking keys
- a cached **protocol**: everything else

The existing "jq" backend stays as the default
These cost models were removed when the node started accepting only what mainnet shipped with.
- Structure: cost models are separated from the rest of the parameters.
- Consistency: Shelley genesis is the full object, not only the "protocolParams" field.
- Consistency: cost models are an object everywhere, 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, reconstruct the timeline without baking in cardano-profile-specific assumptions.
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.
cardano-profile recognises the pparamsEpoch values that target PV 11 and adds a dijkstra zero stub and a v11-preview overlay so profiles can opt in.
Era was previously inferred from .era inside profile.json. Promote it to a first-class workbench-level input.
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