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

Split Crypto into Crypto and HeaderCrypto #3388

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yogeshsajanikar
Copy link
Contributor

@yogeshsajanikar yogeshsajanikar commented Apr 20, 2023

  • Split Crypto class into Crypto (DSIGN, ADDRHASH) and HeaderCrypto (KES, VRF)
  • Move HeaderCrypto into Cardano.Protocol
  • Use PoolStakeVRF and GenesisVRF as a proxy to VRF in ledger code
  • Parametrize TPrao protcol code with Crypto and HeaderCrypto Many functions are parametrized by Era and HeaderCrypto as Era implicitly implies Crypto (Crypto Era).
  • ALl the ledger code is separated from header crypto (KES/VRF)
  • Proxy VRFs are PoolStakeVRF and GenesisVRF

Description

  • Added a small library 'cardano-protocol-core' to solve the problem with cabal (it does not handle dependencies at the component level, but does it at the cabal file level).
  • It wasn't possible to remove 'AllowAmbiguousTypes' for most of the files where it was already there (too much change). I did manage to take care of some instances by adding "Proxy" types in the argument.
  • The changes is to remove VRF, and KES from the Crypto and move it to a separate HeaderCrypto class.
  • Added PoolstakeVRF and GenesisVRF as a proxy type for getting rid of precise VRF type in Hash key.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files 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

@yogeshsajanikar
Copy link
Contributor Author

  • Fixing the formatting errors and build warnings

- Split Crypto class into Crypto (DSIGN, ADDRHASH) and HeaderCrypto (KES, VRF)
- Move HeaderCrypto into Cardano.Protocol
- Use PoolStakeVRF and GenesisVRF as a proxy to VRF in ledger code
- Parametrize TPrao protcol code with Crypto and HeaderCrypto
  Many functions are parametrized by Era and HeaderCrypto as Era implicitly
  implies Crypto (Crypto Era).
- ALl the ledger code is separated from header crypto (KES/VRF)
- Proxy VRFs are PoolStakeVRF and GenesisVRF

Signed-off-by: Yogesh Sajanikar <[email protected]>
@lehins
Copy link
Collaborator

lehins commented Oct 25, 2024

Relevant PR on the consensus side: https://github.com/IntersectMBO/ouroboros-network/pull/4311/files

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