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 extended key: add CastVerificationKeyRole #327

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Oct 19, 2023

Changelog

- description: |
    DRep extended key: add CastVerificationKeyRole
# 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

Required for IntersectMBO/cardano-cli#377. Should have been part of #320 but somehow I lost this part during my local rebases 🙃

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • NA 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
  • NA 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

$ vk
where
impossible =
error "castVerificationKey: byron and shelley key sizes do not match!"
Copy link
Contributor

Choose a reason for hiding this comment

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

I get that rawDeserialiseVerKeyDSIGN fails if psbFromByteStringCheck (which is a length check) fails. But the eras I don't understand.

Maybe the message should also say something about extended vs. non-extended DRep keys?

Copy link
Contributor

Choose a reason for hiding this comment

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

The error message is definitely a copy-paste. You will need to go code spelunking to figure out a sensible error message.

Copy link
Contributor Author

@smelc smelc Oct 20, 2023

Choose a reason for hiding this comment

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

Indeed it's a copy-paste, which I assumed safe since all other instances of CastVerificationKeyRole do the same.

@carlhammann> I did disambiguate the error message to mention DRep though. Could make our life easier to debug in the future 👍

Since you approved @Jimbo4350, I'm assuming this is good to go, and so I'm not digging into more details.

@smelc smelc force-pushed the smelc/drep-extended-key-missing-bit branch from 1bc2112 to d133e42 Compare October 20, 2023 13:40
@smelc smelc enabled auto-merge October 20, 2023 13:41
@smelc smelc added this pull request to the merge queue Oct 20, 2023
Merged via the queue into main with commit 2e299c1 Oct 20, 2023
20 checks passed
@smelc smelc deleted the smelc/drep-extended-key-missing-bit branch October 20, 2023 14:26
newhoggy added a commit that referenced this pull request Mar 11, 2024
…-are-not-golden-files-to-input-directory

Move files that are not golden files into `input` directory
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

3 participants