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

Governance drep and vote command groups #191

Merged
merged 13 commits into from
Aug 21, 2023

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Aug 20, 2023

Changelog

- description: |
    Governance `drep` and `vote` command groups
# 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

This changes the conway governance command structure to look like this:

conway governance
conway governance action
conway governance action create-constitution
conway governance action create-new-committee
conway governance action create-no-confidence
conway governance action create-protocol-parameters-update
conway governance action create-treasury-withdrawal
conway governance committee
conway governance committee create-cold-key-resignation-certificate
conway governance committee create-hot-key-authorization-certificate
conway governance committee key-gen-cold
conway governance committee key-gen-hot
conway governance committee key-hash
conway governance drep
conway governance drep delegation-certificate
conway governance drep key-gen
conway governance drep registration-certificate
conway governance vote create

Some types and functions in affected conway governance modules were moved out of those modules to facilitate code sharing of those types between those modules.

See the cli files for details.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • round trip tests
    • integration tests
      See Running tests for more details
  • The version bounds in .cabal files are updated
  • 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-8.10.7 and ghc-9.2.7
  • The changelog section in the PR is updated to describe the change
  • Self-reviewed the diff

@newhoggy newhoggy marked this pull request as ready for review August 20, 2023 01:13
@@ -0,0 +1,31 @@
Usage: cardano-cli allegra governance drep delegation-certificate
Copy link
Contributor

@carbolymer carbolymer Aug 21, 2023

Choose a reason for hiding this comment

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

I was told this is wrong, so I'm not sure if governance drep should appear everywhere: https://input-output-rnd.slack.com/archives/G011N23CEAE/p1691759918638949?thread_ts=1691691053.122579&cid=G011N23CEAE
cc: @CarlosLopezDeLara

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm following the "Cardano-CLI Feature Requirements to support Voltaire" document.

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely Dreps only exist in Conway. Not in previous eras.

AnyEraDeciderConwayOnwards cOn ->
GovernanceDRepRegistrationCertificateCmd . ConwayOnwardRegTarget cOn
<$> asum [ RegisterStakePool cOn
<$> pStakePoolRegistrationParserRequirements envCli'
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 not just a DRep command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Will revisit this after finding more about this requirement.

pStakeTarget cOnwards =
asum
[ TargetStakePool cOnwards <$> pStakePoolVerificationKeyOrHashOrFile
, TargetVotingDrep cOnwards <$> pDRepVerificationKeyOrHashOrFile
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, it's not just a DRep command

@newhoggy newhoggy force-pushed the newhoggy/governance-drep-command-group branch from dbc39f0 to 7cfbd6b Compare August 21, 2023 13:54
@newhoggy newhoggy added this pull request to the merge queue Aug 21, 2023
@newhoggy newhoggy mentioned this pull request Aug 21, 2023
10 tasks
Merged via the queue into main with commit dce9584 Aug 21, 2023
@newhoggy newhoggy deleted the newhoggy/governance-drep-command-group branch August 21, 2023 15:58
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.

5 participants