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

Change how SPO votes are counted #4659

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Change how SPO votes are counted #4659

merged 2 commits into from
Oct 4, 2024

Conversation

Lucsanszky
Copy link
Contributor

@Lucsanszky Lucsanszky commented Oct 2, 2024

Description

Resolves #4645

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • 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)
  • 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)
  • 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

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 is looking good

eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Ratify.hs Outdated Show resolved Hide resolved
@Lucsanszky Lucsanszky force-pushed the ldan/spo-vote-counting branch 8 times, most recently from b180989 to 6f7f84a Compare October 3, 2024 03:01
@Lucsanszky Lucsanszky marked this pull request as ready for review October 3, 2024 13:39
@Lucsanszky Lucsanszky requested a review from a team as a code owner October 3, 2024 13:39
@Lucsanszky
Copy link
Contributor Author

Lucsanszky commented Oct 3, 2024

I had to disable the ratify conformance test until IntersectMBO/formal-ledger-specifications#578 is resolved, since now the spec and the implementation differs with regards to the SPO vote counts. I managed to tweak the SPO votes for conformance tests to make the tests pass until the spec is up-to-date. I'll probably add some more comments why I needed to adjust some of the stake amounts in pools for the tests (electBasicCommittee registers a stake pool and with the vote count changes we didn't always reach the threshold post-bootstrap). Other than that, this is ready for review and I'll add some tests in a separate PR.

Copy link
Contributor

@teodanciu teodanciu 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 to me, but will let @lehins approve since this is is performance-sensitive Umap stuff.

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!
We'll definitely need to a few Imp tests for this and re-enable RATIFY conformance test once spec catches up.
But, it is definitely OK to postpone that work until after this PR is merged.

eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Ratify.hs Outdated Show resolved Hide resolved
@Lucsanszky Lucsanszky force-pushed the ldan/spo-vote-counting branch from 6f7f84a to a7d50fe Compare October 3, 2024 20:55
@Lucsanszky Lucsanszky force-pushed the ldan/spo-vote-counting branch from a7d50fe to 138fcde Compare October 3, 2024 23:04
@Lucsanszky
Copy link
Contributor Author

This looks great! We'll definitely need to a few Imp tests for this and re-enable RATIFY conformance test once spec catches up. But, it is definitely OK to postpone that work until after this PR is merged.

Sounds good! I managed to tweak the conformance tests to filter for Abstain votes for SPOs, which is slightly better than disabling the RATIFY conformance tests altogether.

@Lucsanszky Lucsanszky enabled auto-merge October 3, 2024 23:29
@Lucsanszky Lucsanszky merged commit 4189bdc into master Oct 4, 2024
153 of 154 checks passed
@Lucsanszky Lucsanszky deleted the ldan/spo-vote-counting branch October 4, 2024 01:38
@Lucsanszky Lucsanszky mentioned this pull request Nov 2, 2024
9 tasks
Lucsanszky added a commit that referenced this pull request Nov 14, 2024
Test SPO vote counting

Follow-up for #4659
Resolves #4617, #4727
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.

Change to how SPO votes are counted
3 participants