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

Add GovRemovedVotes event #4661

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Conversation

kderme
Copy link
Contributor

@kderme kderme commented Oct 2, 2024

Description

An attempt for #4633.

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

@kderme kderme requested a review from a team as a code owner October 2, 2024 22:16
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.

It is a good first attempt, but there are a couple of things I don't quite like about it:

  • It makes the addition of votes quite a bit more complicated, which is a dangerous thing and could lead to bugs in the future. At the very least it makes the logic for addition of votes so much harder to read
  • It could affect performance of addition of votes, due to a more complex accumulator and some extra indirections

There is a better way to tackle this and we already have a very similar logic for figuring out known voters, which could be used for this purpose as well. I was not sure how to exactly suggest it, so I've just implemented it in this commit, so feel free to steal into your PR: 87e9c94

@kderme kderme force-pushed the kderme/removed-votes branch 2 times, most recently from d1623c8 to ba782e8 Compare October 3, 2024 21:00
@lehins lehins requested a review from teodanciu October 3, 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.

Looks great! 😃

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

@kderme kderme force-pushed the kderme/removed-votes branch 2 times, most recently from 741bca4 to 9399e3c Compare October 11, 2024 13:22
eras/conway/impl/CHANGELOG.md Outdated Show resolved Hide resolved
@kderme kderme requested a review from lehins October 11, 2024 13:26
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.

Unfortunately, this breaking change didn't make it into the latest 1.17.0.0 release, so we need to bump it to 1.18.0.0

eras/conway/impl/CHANGELOG.md Outdated Show resolved Hide resolved
@kderme kderme force-pushed the kderme/removed-votes branch 2 times, most recently from 3bea797 to 2420477 Compare October 15, 2024 08:15
@kderme kderme requested a review from lehins October 15, 2024 08:16
@kderme kderme force-pushed the kderme/removed-votes branch from 2420477 to bf7a978 Compare October 15, 2024 08:24
@lehins lehins force-pushed the kderme/removed-votes branch from bf7a978 to 2864130 Compare October 15, 2024 16: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.

Perfect. Thank you!

@lehins lehins enabled auto-merge October 15, 2024 16:37
@lehins lehins merged commit 156f568 into IntersectMBO:master Oct 15, 2024
153 of 155 checks passed
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