Skip to content

Conversation

nbacquey
Copy link
Contributor

@nbacquey nbacquey commented Aug 21, 2025

Starting a testnet in an era different than Conway has not been possible for a while, since the options to do so have been removed from cardano-cli. This PR therefore removes those options from cardano-testnet as well, along wih their respective code paths.

This PR also removes leftover golden files.

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
  • Any changes are noted in the CHANGELOG.md for affected package
  • 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

@nbacquey nbacquey requested a review from a team as a code owner August 21, 2025 15:20
@nbacquey nbacquey force-pushed the nb/clean_cli branch 5 times, most recently from 671b114 to 9725a00 Compare August 25, 2025 13:53
@nbacquey nbacquey requested review from a team as code owners August 25, 2025 13:53
@nbacquey nbacquey changed the base branch from master to nb/remove_broken_link August 25, 2025 13:55
let genesis = Api.alonzoGenesisDefaults (toCardanoEra sbe)
defaultAlonzoGenesis :: Either AlonzoGenesisError AlonzoGenesis
defaultAlonzoGenesis = do
let genesis = Api.alonzoGenesisDefaults ConwayEra
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine for now but we should parameterize everything on Era era instead. Era era tracks only the latest eras.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Saved in #6317 to keep it in mind

Copy link
Contributor

@carbolymer carbolymer Aug 27, 2025

Choose a reason for hiding this comment

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

This is fine for now

@Jimbo4350 I'm not sure that it is. In order to reintroduce parametrisation on Era era again, we'd have to revert this PR basically. Is it possible to do this now and keep the parameterisation?

@carbolymer
Copy link
Contributor

@@ -197,13 +192,13 @@ createSPOGenesisAndFiles
H.note_ $ "Number of stake delegators: " <> show numStakeDelegators
H.note_ $ "Number of seeded UTxO keys: " <> show numSeededUTxOKeys

let era = toCardanoEra sbe
let era = toCardanoEra ConwayEra
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this place may be hard to find, where the era is hardcoded. Also It will be useful to still be able to override this value, since we're starting work on the next era now.

Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

I see two problems here:

  1. Conway era is hardcoded in multiple places (as a protocol version too) (also in comments), it should be hardcoded in at most one place if we want to move forward with this change.
  2. We're losing parametrisation on era. This is especially useful when working two eras at the same time: when one era is on mainnet and the other one is in the works. To restore the parametrisation we'd have to basically revert most of this PR. Can we keep the parametrisation, but just use a default era and not expose it to the user for example?

My hard requirement is nr 1, but let's discuss nr 2.

Starting a testnet in an era different than Conway has not been possible
for a while, since the options to do so have been removed from
`cardano-cli`. This commit therefore removes those options from
`cardano-testnet` as well.

This commit also removes leftover golden files.
@nbacquey
Copy link
Contributor Author

nbacquey commented Aug 28, 2025

@carbolymer your comments have been addressed. Basically I only changed the parser, and added a single hardcoded value in Defaults.hs

@nbacquey
Copy link
Contributor Author

Needs an update of golden files: https://github.com/IntersectMBO/cardano-node/pull/6314/checks?check_run_id=48999840783

I don't understand where that's coming from: I did regenerate the golden files, and that one exists: https://github.com/IntersectMBO/cardano-node/pull/6314/files#diff-bcd54a52a6f758e10284e243ba0830249a2d15898ce60d606ceead57c74941e3

Base automatically changed from nb/remove_broken_link to master August 28, 2025 17:09
@carbolymer
Copy link
Contributor

carbolymer commented Aug 29, 2025

I don't understand where that's coming from: I did regenerate the golden files, and that one exists: https://github.com/IntersectMBO/cardano-node/pull/6314/files#diff-bcd54a52a6f758e10284e243ba0830249a2d15898ce60d606ceead57c74941e3

@nbacquey Ah right, it's green in GHA. We have hardcoded paths in nix code, so you have to update those as well:
https://github.com/search?q=repo%3AIntersectMBO%2Fcardano-node+default_config.json+language%3ANix&type=code&l=Nix

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