Skip to content

Add an option to dump/load configuration sandbox in cardano-testnet #6239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 25, 2025

Conversation

nbacquey
Copy link
Contributor

@nbacquey nbacquey commented Jun 4, 2025

Description

This PR introduces a new create-env sub-command to cardano-testnet, which creates a sandboxed environment with default parameters, which can then be modified by hand and passed to the main cardano subcommand with the --node-env option.

This PR should be reviewed commit by commit.

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 Runnings tests for more details
  • 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

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.

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

Yes this is looking good 👍 . I am more concerned with getting everything working. My comments about factoring out functions etc are not important now.

@@ -164,46 +165,22 @@ cardanoTestnet :: ()
=> HasCallStack
=> CardanoTestnetOptions -- ^ The options to use
-> GenesisOptions
-> UserProvidedData ShelleyGenesis
Copy link
Contributor

Choose a reason for hiding this comment

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

💪

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, I had to put those back: some tests use it to create an env with custom parameters. Maybe I should modify the config files on disk since that's now possible?

@nbacquey nbacquey force-pushed the nbacquey/dump_config branch 9 times, most recently from ea046e0 to f86dc4b Compare June 19, 2025 16:20
@nbacquey nbacquey marked this pull request as ready for review June 19, 2025 17:18
@nbacquey nbacquey requested a review from a team as a code owner June 19, 2025 17:18
@nbacquey nbacquey force-pushed the nbacquey/dump_config branch from f86dc4b to 3f192d1 Compare June 19, 2025 17:33
@nbacquey nbacquey requested a review from Jimbo4350 June 23, 2025 13:46
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM! A couple of comments.

@@ -106,17 +106,17 @@ hprop_gov_no_confidence = integrationWorkspace "no-confidence" $ \tempAbsBasePat

let conwayGenesisWithCommittee = defaultConwayGenesis { L.cgCommittee = committee }

createTestnetEnv
Copy link
Contributor

Choose a reason for hiding this comment

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

💪

@nbacquey nbacquey enabled auto-merge June 23, 2025 16:52
@nbacquey nbacquey added this pull request to the merge queue Jun 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 24, 2025
@nbacquey nbacquey added this pull request to the merge queue Jun 24, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 24, 2025
Add an option to dump/load configuration sandbox in `cardano-testnet`
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 24, 2025
@nbacquey nbacquey added this pull request to the merge queue Jun 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 24, 2025
@nbacquey nbacquey added this pull request to the merge queue Jun 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 25, 2025
nbacquey added 4 commits June 25, 2025 14:43
This disables checking for hashes when loading individual genesis files,
which in turn allows for on-the-fly configuration modifications, without
having to recompute the hashes each time.
@nbacquey nbacquey force-pushed the nbacquey/dump_config branch from fb0c257 to ba03c10 Compare June 25, 2025 12:44
@nbacquey nbacquey enabled auto-merge June 25, 2025 12:44
@nbacquey nbacquey added this pull request to the merge queue Jun 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 25, 2025
@nbacquey nbacquey added this pull request to the merge queue Jun 25, 2025
Merged via the queue into master with commit 4abab28 Jun 25, 2025
22 of 24 checks passed
@nbacquey nbacquey deleted the nbacquey/dump_config branch June 25, 2025 18:25
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.

None yet

2 participants