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

CIP-1694 API - Part 1 #41

Merged
merged 11 commits into from Jun 27, 2023
Merged

CIP-1694 API - Part 1 #41

merged 11 commits into from Jun 27, 2023

Conversation

newhoggy
Copy link
Collaborator

@newhoggy newhoggy commented Jun 6, 2023

Description

CIP-1694

  • Incorporate the ability to specify votes and governance actions in transactions
  • Introduce TxVotes and TxGovernanceActions types
  • This is still a work in progress

Changelog

- description: |
    - Conway related
    - Incorporate the ability to specify votes and governance actions in transactions
    - Introduce TxVotes and TxGovernanceActions types
  compatibility: breaking
  type: feature

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
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • 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
  • 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.

@newhoggy newhoggy changed the title Newhoggy/cip 1694 api CIP-1694 API Jun 6, 2023
( CommitteeDelegationCertificate
(CommitteeColdKeyHash _ckh)
(CommitteeHotKeyHash _hkh)
) = error "TODO CIP-1694 Need ledger types for CommitteeDelegationCertificate"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO

toShelleyCertificate
( CommitteeHotKeyUnregistrationCertificate
(CommitteeColdKeyHash _ckh)
) = error "TODO CIP-1694 Need ledger types for CommitteeHotKeyUnregistrationCertificate"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO

@newhoggy newhoggy force-pushed the newhoggy/cip-1694-api branch 3 times, most recently from c724b58 to 4c5c174 Compare June 6, 2023 13:26
@Jimbo4350 Jimbo4350 force-pushed the newhoggy/cip-1694-api branch 10 times, most recently from e21d8be to d690e02 Compare June 23, 2023 20:06
CommitteeDelegationCertificate{} -> "Constitution Committee key delegation"
CommitteeHotKeyUnregistrationCertificate{} -> "Constitution Committee hot key unregistration"
CommitteeDelegationCertificate{} -> "Constitution committee member key delegation"
CommitteeHotKeyDeregistrationCertificate{} -> "Constitution committee member hot key deregistration"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is actually called "unregister" instead of "deregister" in the ledger. A future version of the ledger will call it "resign" instead. See https://input-output-rnd.slack.com/archives/C057E9CJTPH/p1685008671862099?thread_ts=1684866116.549819&cid=C057E9CJTPH

MaryEra -> no
AlonzoEra -> no
BabbageEra -> no
ConwayEra -> yes OnChainGovernanceInConwayEra
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are adding multiple types. Instead of adding a feature per introduced era sensitive type, we could use a single feature OnChainGovernanceFeature.

This has a number of advantages:

  • We don't have to add lots of *SupportedInEra types as we go. Just the one OnChainGovernanceFeature will do.
  • We get a free generator for FeatureValue OnChainGovernanceFeature a provided we have a generator for a. This will help us get our generators more uniform. We have not handle era-sensitive types consistently in the past.
  • Our types can be simpler. For instance TxGovernanceAction and TxVote are regular product types, not GADTs.
  • We don't have to plural types like TxGovernanceActions or TxVotes. Both of these were needed because it's the list that is era-sensitive. Using FeatureValue OnChainGovernanceFeature [a] we don't have to wrap lists anymore.

@Jimbo4350 Jimbo4350 force-pushed the newhoggy/cip-1694-api branch 6 times, most recently from 1b097b5 to f88f82f Compare June 26, 2023 20:21
* CommitteeColdKey
* CommitteeDelegationCertificate
* CommitteeHotKey
* CommitteeHotKeyUnregistrationCertificate
* GenesisKeyDelegationCertificate
* makeCommitteeDelegationCertificate
* makeCommitteeHotKeyUnregistrationCertificate
* `Cardano.Api.DRepMetadata`
* `DRepMetadata`
* `DRepMetadataReference`
* `DRepMetadataValidationError`
* `DRepKey`
* `validateAndHashDRepMetadata`
@Jimbo4350 Jimbo4350 changed the title CIP-1694 API CIP-1694 API - Part 1 Jun 27, 2023
@Jimbo4350 Jimbo4350 marked this pull request as ready for review June 27, 2023 14:15
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jun 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2023
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jun 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2023
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jun 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2023
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jun 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2023
@Jimbo4350 Jimbo4350 merged commit f3469ab into main Jun 27, 2023
18 of 19 checks passed
@Jimbo4350 Jimbo4350 deleted the newhoggy/cip-1694-api branch June 27, 2023 16:25
newhoggy added a commit that referenced this pull request Mar 11, 2024
Fix stylish haskell in github action workflow
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