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

drep registration certificate mixed with spo registration (clean-up) #198

Closed
4 of 5 tasks
CarlosLopezDeLara opened this issue Aug 23, 2023 · 5 comments · Fixed by #330
Closed
4 of 5 tasks

drep registration certificate mixed with spo registration (clean-up) #198

CarlosLopezDeLara opened this issue Aug 23, 2023 · 5 comments · Fixed by #330

Comments

@CarlosLopezDeLara
Copy link
Contributor

CarlosLopezDeLara commented Aug 23, 2023

The drep registration certificate is mixed with the stake pool registration certificate. This needs to be cleaned up so that drep registration-certificate only has the options needed for pridcing the drep registration certificate

So we go from

Usage: cardano-cli conway governance drep registration-certificate
                                                                     ( ( --stake-pool-verification-key STRING
                                                                       | --cold-verification-key-file FILE
                                                                       )
                                                                       ( --vrf-verification-key STRING
                                                                       | --vrf-verification-key-file FILE
                                                                       )
                                                                       --pool-pledge LOVELACE
                                                                       --pool-cost LOVELACE
                                                                       --pool-margin RATIONAL
                                                                       ( --pool-reward-account-verification-key STRING
                                                                       | --pool-reward-account-verification-key-file FILE
                                                                       )
                                                                       ( --pool-owner-verification-key STRING
                                                                       | --pool-owner-stake-verification-key-file FILE
                                                                       )
                                                                       [ [--pool-relay-ipv4 STRING]
                                                                         [--pool-relay-ipv6 STRING]
                                                                         --pool-relay-port INT
                                                                       | --single-host-pool-relay STRING
                                                                         [--pool-relay-port INT]
                                                                       | --multi-host-pool-relay STRING
                                                                       ]
                                                                       [--metadata-url URL
                                                                         --metadata-hash HASH]
                                                                       ( --mainnet
                                                                       | --testnet-magic NATURAL
                                                                       )
                                                                     | ( --stake-verification-key STRING
                                                                       | --stake-verification-key-file FILE
                                                                       | --stake-script-file FILE
                                                                       | --stake-address ADDRESS
                                                                       )
                                                                       --key-reg-deposit-amt NATURAL
                                                                     | ( --drep-verification-key STRING
                                                                       | --drep-verification-key-file FILE
                                                                       | --drep-key-hash HASH
                                                                       )
                                                                       --key-reg-deposit-amt NATURAL
                                                                     )
                                                                     --out-file FILE

to

Usage: cardano-cli conway governance drep registration-certificate
                                                                       (
                                                                       | --drep-verification-key STRING
                                                                       | --drep-verification-key-file FILE
                                                                       | --drep-key-hash HASH
                                                                       )
                                                                       [
                                                                        --drep-metadata-url URL
                                                                        --drep-metadata-hash HASH
                                                                       ]
                                                                      --key-reg-deposit-amt NATURAL
                                                                     --out-file FILE

Roadmap:

@CarlosLopezDeLara CarlosLopezDeLara added this to the SanchoNet Phase 3 milestone Aug 23, 2023
@CarlosLopezDeLara CarlosLopezDeLara changed the title drep registration certificate mixed with spo registration drep registration certificate mixed with spo registration (clean-up) Sep 20, 2023
@smelc
Copy link
Contributor

smelc commented Sep 27, 2023

@CarlosLopezDeLara> as of the tip of #309, the API for drep registration-certificate is:

Usage: cardano-cli conway governance drep registration-certificate 
                                                                     ( --drep-verification-key STRING
                                                                     | --drep-verification-key-file FILE
                                                                     | --drep-key-hash HASH
                                                                     )
                                                                     --key-reg-deposit-amt NATURAL
                                                                     --out-file FILE

  Create a registration certificate.

Available options:
  --drep-verification-key STRING
                           DRep verification key (Bech32 or hex-encoded).
  --drep-verification-key-file FILE
                           Filepath of the DRep verification key.
  --drep-key-hash HASH     DRep verification key hash (either Bech32-encoded or
                           hex-encoded). Zero or more occurences of this option
                           is allowed.
  --key-reg-deposit-amt NATURAL
                           Key registration deposit amount.
  --out-file FILE          The output file.
  -h,--help                Show this help text

Which is slightly shorter than what you had written. Which leads me to the question: did I miss something? or was your description inaccurate? Please let me know 🙏

@CarlosLopezDeLara
Copy link
Contributor Author

CarlosLopezDeLara commented Sep 28, 2023

@smelc #309 is missing the ability to pass an optional anchor (url/metadata)
See https://github.com/input-output-hk/cardano-ledger/blob/48d661803c40306dc8f58ce77ab077aecf873338/eras/conway/test-suite/cddl-files/conway.cddl#L312

So it should look like this one

Usage: cardano-cli conway governance drep registration-certificate
                                                                       (
                                                                       | --drep-verification-key STRING
                                                                       | --drep-verification-key-file FILE
                                                                       | --drep-key-hash HASH
                                                                       )
                                                                       [
                                                                        --drep-metadata-url URL
                                                                        --drep-metadata-hash HASH
                                                                       ]
                                                                      --key-reg-deposit-amt NATURAL
                                                                     --out-file FILE

@smelc
Copy link
Contributor

smelc commented Sep 29, 2023

@CarlosLopezDeLara> OK I understand better now. We hardcode NOT passing the anchor in cardano-api right now: https://github.com/input-output-hk/cardano-api/blob/9b17a19b12f94677a1f21e86123e1806b7b32a96/cardano-api/internal/Cardano/Api/Certificate.hs#L598 which is why I wasn't seeing it from cardano-cli.

So to implement --drep-metadata-url and --drep-metadata-hash, I will first need to remove this hardcoding in cardano-api.

@smelc
Copy link
Contributor

smelc commented Oct 4, 2023

Update: there is a WIP branch for the follow-up that will close this issue: https://github.com/input-output-hk/cardano-cli/tree/smelc/drep-reg-certificate-add-metadata

@smelc
Copy link
Contributor

smelc commented Oct 4, 2023

Here is the ready-for-review PR to close this issue: #330

@smelc smelc closed this as completed in #330 Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants