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

Add functions to convert hashes to and from VRFVerKeyHash #4790

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

neilmayhew
Copy link
Contributor

@neilmayhew neilmayhew commented Dec 9, 2024

Description

Downstream projects are using a different type for these hashes, and don't need to make the role distinctions that ledger does. However, they do need to provide hashes of this type when passing various records to ledger. Providing conversion functions makes the code cleaner and safer in the downstream projects, because they don't have to import Cardano.Crypto.Hash and call castHash. The conversion functions provide a type-specialized wrapping of it.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
  • Versions are updated in .cabal and CHANGELOG.md files.
  • The version bounds in .cabal files for all affected packages are updated.
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@neilmayhew neilmayhew force-pushed the nm/VRFVerKeyHash-conversion branch from c3e1728 to c27c0fa Compare December 9, 2024 17:08
@neilmayhew neilmayhew force-pushed the nm/VRFVerKeyHash-conversion branch from c27c0fa to 3fe0221 Compare December 9, 2024 19:07
@neilmayhew neilmayhew marked this pull request as ready for review December 9, 2024 19:12
@neilmayhew neilmayhew requested a review from a team as a code owner December 9, 2024 19:12
@neilmayhew neilmayhew requested review from lehins and removed request for a team December 9, 2024 19:12
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

👍

@lehins lehins enabled auto-merge December 9, 2024 19:34
@lehins lehins merged commit 12f6aa6 into master Dec 9, 2024
153 of 154 checks passed
@lehins lehins deleted the nm/VRFVerKeyHash-conversion branch December 9, 2024 21:16
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.

2 participants