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

Modify PParams to use similar naming to ProtocolParams in cardano-api #4129

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

palas
Copy link
Contributor

@palas palas commented Feb 27, 2024

Description

This PR modifies FromJSON and ToJSON instances for PParams of all eras so that they match those of ProtocolParams. That way cardano-api can move to use PParams directly.
See the corresponding cardano-api PR.

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

@palas palas self-assigned this Feb 27, 2024
@palas palas force-pushed the unify-json-instances branch 3 times, most recently from 85ad4c3 to 01f523c Compare February 27, 2024 21:36
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.

Very much in favor of this change. Few important notes on the PR:

@palas palas force-pushed the unify-json-instances branch 7 times, most recently from 5edcee4 to 90ef09b Compare February 29, 2024 04:05
@palas palas marked this pull request as ready for review February 29, 2024 04:53
@palas palas requested review from lehins and Jimbo4350 February 29, 2024 04:53
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.

This looks great. There are only two problems left to resolve. We need some input from @Jimbo4350 for one of them

eras/conway/impl/src/Cardano/Ledger/Conway/PParams.hs Outdated Show resolved Hide resolved
eras/shelley/impl/src/Cardano/Ledger/Shelley/PParams.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

Looking good so far. I agree with @lehins wrt not including deprecated protocol parameters. cardano-api incorrectly rendered deprecated protocol parameters.

eras/babbage/impl/src/Cardano/Ledger/Babbage/PParams.hs Outdated Show resolved Hide resolved
eras/shelley/impl/src/Cardano/Ledger/Shelley/PParams.hs Outdated Show resolved Hide resolved
@palas palas force-pushed the unify-json-instances branch 3 times, most recently from 9ea3db6 to 6f24134 Compare February 29, 2024 21:05
@palas palas enabled auto-merge (squash) February 29, 2024 23:44
@palas palas changed the title Unify JSON instances between PParams and ProtocolParams Modify PParams to use similar naming to ProtocolParams in cardano-api Feb 29, 2024
@palas palas requested a review from lehins February 29, 2024 23:44
@lehins lehins force-pushed the unify-json-instances branch from 6f24134 to e4e0d47 Compare March 5, 2024 13:33
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!

@lehins lehins disabled auto-merge March 5, 2024 13:36
@lehins lehins enabled auto-merge (squash) March 5, 2024 13:37
@lehins lehins force-pushed the unify-json-instances branch from e4e0d47 to 198786e Compare March 5, 2024 18:12
@lehins lehins merged commit 17c101b into master Mar 5, 2024
16 checks passed
@palas palas deleted the unify-json-instances branch March 6, 2024 01:22
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