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

Constitutional Committee Ratification #3745

Merged
merged 8 commits into from
Sep 23, 2023
Merged

Constitutional Committee Ratification #3745

merged 8 commits into from
Sep 23, 2023

Conversation

teodanciu
Copy link
Contributor

@teodanciu teodanciu commented Sep 20, 2023

Description

Adds constitutional committee ratification as a mandatory check in Ratify.
Closes #3701
Closes #3444

The structure of the code is very similar to drep` ratification, so we could abstract it.

Missing:

  • Fix ConwayFeatures test EDIT: Fixed
  • voting no when the committee is too small (CC vote always No, when the committee is too small #3444)
  • there is a contradiction between a comment on the issue and (what I think I see in ) the spec EDIT: clarified

    This means that expired and resigned committee members still contribute to the ratio calculation, despite that their votes do not count.

  • some unseemly duplication in the test, should find a better way to set expired or resigned members with less noise EDIT: refactored to remove the duplication!

Might be just a problem of semantics, but in this PR, I wouldn't say that expired and resigned "contribute to the ratio" (unless we interpret that as: because they're expired or resigned we don't count them at all..)

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

@teodanciu teodanciu changed the title Td/cc ratification Constitutional Committee Ratification Sep 20, 2023
@teodanciu teodanciu force-pushed the td/cc-ratification branch 2 times, most recently from d9ca00d to 9b951e5 Compare September 20, 2023 07:44
@lehins
Copy link
Contributor

lehins commented Sep 20, 2023

there is a contradiction betweenhttps://github.com//issues/3701#issuecomment-1706790738 and (what I think I see in ) the spec:

Yeah, that comment on the ticket was wrong. I've fixed it. All expired and resigned CC members are considered as if they abstained:

https://github.com/input-output-hk/formal-ledger-specifications/blob/5feb58cd4f43aa331748503a2bfc9d2a04a1f015/src/Ledger/Ratify.lagda#L258-L261

@teodanciu teodanciu force-pushed the td/cc-ratification branch 2 times, most recently from a335e65 to 1a68ef9 Compare September 20, 2023 12:23
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.

Majority of my comments are about how the test suite can be improved.

From what I can see nothing is blocking this PR from being merged.

Great work!!!

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.

Spoke too soon 😁

Latest changes made it wrong After looking a bit closer, they are actually fine.

eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs Outdated Show resolved Hide resolved
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.

Looks great. Thank you for doing this work!

eras/conway/impl/CHANGELOG.md 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/Gov.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Ratify.hs Outdated Show resolved Hide resolved
in order to ratify committee votes
as a mandatory check in `Ratify` rule
@teodanciu teodanciu enabled auto-merge (rebase) September 23, 2023 15:58
@teodanciu teodanciu merged commit d883cf7 into master Sep 23, 2023
12 checks passed
@iohk-bors iohk-bors bot deleted the td/cc-ratification branch September 23, 2023 18:21
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.

Count Constitutional Committee votes during Ratification CC vote always No, when the committee is too small
2 participants