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

Allow voting up to expiration time #477

Merged
merged 6 commits into from
Nov 26, 2022

Conversation

nlipartiia-hacken
Copy link
Contributor

Closes #463.

@0xekez
Copy link
Contributor

0xekez commented Sep 2, 2022

hey! thanks for putting this together! skimmed this and it looks good. we're really busy trying to get v2 released here so might be a couple days before i can get to a proper review. <3

@blue-note
Copy link
Contributor

apologies for the delay in reviewing here -- lets push this through! Also, for the integration test failure, rebasing on main should fix it.

@nlipartiia-hacken
Copy link
Contributor Author

thanks for the review! I rebased over main, hope it fixes the failure

Copy link
Contributor

@0xekez 0xekez left a comment

Choose a reason for hiding this comment

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

thanks for the PR! i think this would be a really nice change to do some fuzzing on. specifically, the assertion we're making here that:

if a proposal's outcome has been determined, no sequence of additional votes will cause that outcome to change.

you could probably fuzz this pretty easily by manually selecting a number of interesting "passed" vote counts, generating a sequence of random votes, casting those votes, and then making sure the proposal's outcome has not changed.

if you'd like some example code to build this on top of, i did something pretty similar recently to fuzz a rate limiter here.

any time we change vote casting code, it is pretty high risk. testing this really well would make me feel good about these changes.

contracts/cw-proposal-single/src/contract.rs Outdated Show resolved Hide resolved
@0xekez
Copy link
Contributor

0xekez commented Nov 17, 2022

closing this for now. @NinoLipartiia if you have plans for picking this up feel free to just push to this branch and we'll reopen and do more review :) just want to clear the pr queue.

@0xekez 0xekez closed this Nov 17, 2022
@0xekez 0xekez reopened this Nov 17, 2022
@bekauz
Copy link
Collaborator

bekauz commented Nov 17, 2022

I'll pick this up

@bekauz bekauz force-pushed the voting-up-to-expiration-time branch from 758588e to 44739a5 Compare November 20, 2022 20:33
@bekauz bekauz force-pushed the voting-up-to-expiration-time branch from 3e3e889 to 3feb0bd Compare November 26, 2022 17:13
Copy link
Member

@JakeHartnell JakeHartnell left a comment

Choose a reason for hiding this comment

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

Great work! Thanks for helping this get across the finish line for v2.

Copy link
Contributor

@0xekez 0xekez left a comment

Choose a reason for hiding this comment

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

amazing work. thank you @bekauz !

@0xekez 0xekez merged commit a6e01ea into DA0-DA0:main Nov 26, 2022
JakeHartnell pushed a commit that referenced this pull request Dec 13, 2023
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.

Allow voting on all proposals up to expiration time.
5 participants