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: add --drep-keys flag #565

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Jan 12, 2024

Changelog

- description: |
    Add --drep-keys flag to --create-testnet-data
# 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
  # - improvement    # QoL changes e.g. refactoring
  # - 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

We cannot yet create the registration and the delegation for the dreps, but we'll need to generate keys when we do, and this first step will already help us remove some code in cardano-node here.

How to trust this PR

  • The command calls the correct key-gen backend
  • The existing test is augmented

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-drep-keys-1 branch from 69e1847 to b434814 Compare January 12, 2024 16:03
@@ -26,22 +39,16 @@ tree root = do
subTrees <- mapM tree subs
return $ files ++ concat subTrees

-- | This test tests the non-transient case, i.e. it maximizes the files
-- that can be written to disk. Execute this test with:
-- @cabal test cardano-cli-golden --test-options '-p "/golden create testnet data/'@
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. I always forget how this is done... Maybe we should add this to the CONTRIBUTING.md?

Copy link
Contributor

@carbolymer carbolymer Jan 12, 2024

Choose a reason for hiding this comment

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

I agree that we should add it somewhere too. I think this is the best place: https://github.com/input-output-hk/cardano-node-wiki/wiki/Running-tests
We can link from CONTRIBUTING.md to it then.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -54,6 +54,8 @@ hprop_golden_create_testnet_data =

H.diffVsGoldenFile generated'' "test/cardano-cli-golden/files/golden/conway/create-testnet-data.out"

-- | This test tests the non-transient case, i.e. it generates strictly
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean it tests the transient case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, good catch 👍 Fixed 👍

@@ -11,6 +11,7 @@

module Cardano.CLI.EraBased.Run.Governance.DRep
( runGovernanceDRepCmds
, runGovernanceDRepKeyGenCmd
Copy link
Contributor

Choose a reason for hiding this comment

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

overindented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

runGovernanceDRepKeyGenCmd
Cmd.GovernanceDRepKeyGenCmdArgs
{ vkeyFile
, skeyFile
} = firstExceptT GovernanceCmdWriteFileError $ do
} = do
Copy link
Contributor

Choose a reason for hiding this comment

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

underindented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed 👍

@smelc smelc force-pushed the smelc/create-testnet-data-drep-keys-1 branch from b434814 to d0c54e2 Compare January 15, 2024 14:52
@smelc smelc enabled auto-merge January 15, 2024 14:53
@smelc smelc force-pushed the smelc/create-testnet-data-drep-keys-1 branch from d0c54e2 to 1695d07 Compare January 15, 2024 14:53
@smelc smelc added this pull request to the merge queue Jan 15, 2024
Merged via the queue into main with commit f6e7226 Jan 15, 2024
16 checks passed
@smelc smelc deleted the smelc/create-testnet-data-drep-keys-1 branch January 15, 2024 16:07
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.

4 participants