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

Added RATIFY thresholds #3674

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Added RATIFY thresholds #3674

merged 2 commits into from
Aug 31, 2023

Conversation

Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Aug 24, 2023

Description

Implemented ratification thresholds. I used a free applicative to assign the fields of PParams into groups. The applicative adds some type safety in ensuring that all the fields are handled while also making it easy to gather all the modified groups in a PParamsUpdate.

closes #3524

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/ratify-thresholds branch 5 times, most recently from 707b6d3 to 3c7c027 Compare August 24, 2023 15:26
@Soupstraw Soupstraw marked this pull request as ready for review August 24, 2023 15:26
@Soupstraw Soupstraw force-pushed the jj/ratify-thresholds branch 8 times, most recently from 45b27bb to b18e2ac Compare August 28, 2023 09:46
@Soupstraw Soupstraw force-pushed the jj/ratify-thresholds branch 3 times, most recently from 6099ea7 to 5aa3316 Compare August 28, 2023 12:22
Copy link
Contributor

@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 is a clever trick with Ap. There is one minor issue with it, which I already mentioned during a meeting that implementation of pparamsGroup depends on the correct order of arguments, but we can solve it at a later point.

Overall looks great. Changes I suggested will be good in order to improve clarity and performance, despite that they slightly diverge from the spec.

eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Ratify.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Ratify.hs Outdated Show resolved Hide resolved
@Soupstraw Soupstraw force-pushed the jj/ratify-thresholds branch 2 times, most recently from a0de0f4 to 3d55d17 Compare August 29, 2023 09:53
@Soupstraw Soupstraw requested a review from lehins August 29, 2023 09:53
@Soupstraw Soupstraw force-pushed the jj/ratify-thresholds branch 3 times, most recently from b0c1d69 to b7688f5 Compare August 29, 2023 14:38
@Soupstraw Soupstraw enabled auto-merge (rebase) August 30, 2023 09:39
Copy link
Contributor

@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.

Few minor adjustments are still needed, but other than that it looks great. Thank you.

@Soupstraw Soupstraw force-pushed the jj/ratify-thresholds branch 2 times, most recently from 4bcee72 to 9aa10b4 Compare August 31, 2023 10:17
@Soupstraw Soupstraw closed this Aug 31, 2023
auto-merge was automatically disabled August 31, 2023 10:17

Pull request was closed

@Soupstraw Soupstraw reopened this Aug 31, 2023
@Soupstraw Soupstraw enabled auto-merge (rebase) August 31, 2023 13:04
@lehins lehins disabled auto-merge August 31, 2023 13:44
@lehins lehins enabled auto-merge (squash) August 31, 2023 13:44
@lehins lehins merged commit 302541b into master Aug 31, 2023
12 checks passed
@iohk-bors iohk-bors bot deleted the jj/ratify-thresholds branch August 31, 2023 14:09
TimSheard pushed a commit that referenced this pull request Sep 2, 2023
* Added RATIFY thresholds
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.

RATIFY thresholds
2 participants