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

Switch ShelleyGenesis parameterization on era in favor of crypto #3224

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Dec 27, 2022

Description

This PR:

  • Switch ShelleyGenesis era -> ShelleyGenesis c, which means that PParams in the type are restricted to PParams (ShelleyEra c), instead of ShelleyParams era. This is necessary, because we do in fact want the pparams from the Shelley era, instead of any other era that uses the same type.
  • Removes TranslateEra instance for Shelleygenesis, since it makes no sense to upgrade a type that is not parameterized by an era. It was wrong to add that instance to begin with.
  • Improves CanStartFromGenesis class, by abstracting the PParam abstract logic with fromShelleyPParams, which is the only part that is different between eras.
  • Fixes ConwayGenesis, by adding AlonzoGenesis, which is needed for the ability to upgrade PParams all the way from ShelleyEra.
  • Removed Cardano.Ledger.Babbage.Genesis module, since now it is completely empty, because duplicated logic for upgrading PParams was removed.

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with ormolu (which can be run with scripts/ormolise.sh
  • Self-reviewed the diff

@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from f7c3bc0 to 2c2c266 Compare December 27, 2022 22:01
@lehins lehins requested a review from JaredCorduan December 27, 2022 22:04
@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from 2c2c266 to 1af5dbb Compare December 28, 2022 07:32
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

this looks really nice! let's just check with @bartfrenk before we merge it, to make sure we are not working against their plans to separate the genesis data from the can start data.

@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from 1af5dbb to 9bb8971 Compare December 28, 2022 13:33
@Soupstraw Soupstraw self-requested a review December 28, 2022 16:48
@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from 9bb8971 to 4eb5fb3 Compare December 29, 2022 14:22
Copy link
Contributor

@Soupstraw Soupstraw left a comment

Choose a reason for hiding this comment

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

Looks good

@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from 4eb5fb3 to 6df8c5d Compare January 4, 2023 14:13
@lehins lehins force-pushed the lehins/ShelleyGenesis-on-crpyto branch from 6df8c5d to 05b7621 Compare January 5, 2023 01:49
@lehins lehins merged commit 598ad55 into master Jan 5, 2023
@iohk-bors iohk-bors bot deleted the lehins/ShelleyGenesis-on-crpyto branch January 5, 2023 11:30
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.

3 participants