Skip to content
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

create-testnet-data: take optional node configuration file as input and check/add genesis hashes and paths #908

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Sep 20, 2024

Changelog

- description: |
    `create-testnet-data` now takes a node configuration file as input. If a file is given, it is augmented with the hashes (and paths) of the genesis files, or if the hashes/paths are present; they are checked.
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

How to trust this PR

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 4b6d12c to b75da64 Compare September 24, 2024 12:16
Base automatically changed from smelc/test-create-cardano to main September 24, 2024 17:02
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 6723d62 to 5181d0a Compare September 25, 2024 14:03
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 5181d0a to 37e4c0c Compare September 26, 2024 10:20
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 37e4c0c to d0ae0cd Compare September 26, 2024 12:24
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch 4 times, most recently from 7efbed3 to 1c55a7c Compare September 26, 2024 18:46
@smelc smelc changed the title create-testnet-data: take optional node configuration file as input or generate it create-testnet-data: take optional node configuration file as input and check/add genesis hashes and paths Sep 26, 2024
@smelc smelc marked this pull request as ready for review September 26, 2024 18:49
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch 3 times, most recently from 072a26a to 95ffdc8 Compare September 27, 2024 08:38
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 28738b1 to 1fad533 Compare September 27, 2024 13:32
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from c367d39 to 6a7e7f6 Compare September 30, 2024 12:52
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 6a7e7f6 to e697e94 Compare September 30, 2024 12:55
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from e697e94 to 8bea6eb Compare September 30, 2024 12:59
@smelc smelc force-pushed the smelc/create-testnet-data-create-node-config-file branch from 8bea6eb to ce9f979 Compare September 30, 2024 13:05
@smelc smelc added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit e4e1d1b Sep 30, 2024
25 checks passed
@smelc smelc deleted the smelc/create-testnet-data-create-node-config-file branch September 30, 2024 13:41
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.

This functionality should exist as a separate command

liftIO $ LBS.writeFile alonzoGenesisPath $ Aeson.encodePretty alonzoGenesis

case specNodeConfig of
Nothing -> {- Don't do anything for now -} pure ()
Copy link
Contributor

@Jimbo4350 Jimbo4350 Oct 7, 2024

Choose a reason for hiding this comment

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

What is the use case for having these overrides? We are bundling too many things into a single command. addOrCheckHash gives us a hint that this can and should exist as separate command to check the node configuration file is correct and simply leave create-testnet-data to be responsible for creating a node configuration file. Otherwise we have all this additional logic that makes things unnecessarily more complex. This grows with the more "overrides" we put into a command.

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.

create-testnet-data: create node-config
3 participants