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

Conway genesis DRep injection #3951

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Dec 20, 2023

Description

This PR adds cgDRepDelegs and cgInitialDReps fields to ConwayGenesis so the benchmark team can inject DReps and DRep delegations into the state.

The actual injection is done via registerDRepDelegs and registerInitialDReps, which are exported in the API.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • 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

@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch 3 times, most recently from 378160d to 9954538 Compare December 21, 2023 12:54
@Soupstraw Soupstraw changed the title WIP - Conway genesis DRep injection Conway genesis DRep injection Dec 21, 2023
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch 5 times, most recently from 3a781ec to a4e56b4 Compare December 21, 2023 15:06
@Soupstraw Soupstraw marked this pull request as ready for review December 21, 2023 15:07
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch from a4e56b4 to bff8a79 Compare December 21, 2023 15:08
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch from bff8a79 to 0f76765 Compare December 21, 2023 15: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.

Addition of new fields looks good for the most part. Injection is totally wrong. Please, let me know if you get stuck or if my comments are not clear enough.

eras/conway/impl/src/Cardano/Ledger/Conway/Genesis.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/DRep.hs Outdated Show resolved Hide resolved
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch 5 times, most recently from 14a3699 to dbc2d52 Compare December 22, 2023 13:35
@Soupstraw Soupstraw requested a review from lehins December 22, 2023 13:36
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch from dbc2d52 to 3bcab92 Compare December 22, 2023 15:47
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.

Looks great. Thank you!

eras/conway/impl/src/Cardano/Ledger/Conway/Genesis.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Transition.hs Outdated Show resolved Hide resolved
eras/shelley/impl/src/Cardano/Ledger/Shelley/Transition.hs Outdated Show resolved Hide resolved
@Soupstraw Soupstraw force-pushed the jj/era-transition-injection branch 5 times, most recently from 6156135 to 2de88a4 Compare January 3, 2024 10:39
@Soupstraw Soupstraw enabled auto-merge (rebase) January 3, 2024 10:41
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