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

Follow up split of per era CertState #4896

Open
lehins opened this issue Feb 18, 2025 · 0 comments
Open

Follow up split of per era CertState #4896

lehins opened this issue Feb 18, 2025 · 0 comments
Assignees

Comments

@lehins
Copy link
Collaborator

lehins commented Feb 18, 2025

Move into Cardano.Ledger.[Era].State.CertState

We are slowly moving towards all state related functionality defined in Cardano.Ledger.[Era].State sub modules. This needs to be applied to CertState as well.

Create ConwayCertState

Move VState out of ShelleyCertState into the new ConwayCertState

Move VState into cardano-ledger-conway

VState has no business being defined in cardano-ledger-core and needs to migrate into cardano-ledger-conway package

mkCertState

We can't use mkCertState that accepts VState as an argument, because VState will not be available in shelley era.

This isn't really a problem since we can always construct it from an empty CertState, eg:

mkShelleyCertState pState dState = 
  def & certPStateL .~ pState
      & certDStateL .~ dState

Then we can use mkShelleyCertState to define mkConwayCertState

mkCertState pState dState vState = 
  mkShelleyCertState pState dState & certVStateL .~ vState

But those will have to be standalone functions and will not longer be part of the EraCertState type class.

Moreover in ledger rules we can always get away with modifying CertState, instead of constructing a new one.

Originally posted by @lehins in #4861 (comment)

@Lucsanszky Lucsanszky self-assigned this Feb 21, 2025
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

No branches or pull requests

2 participants