-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat!: expedited proposals #240
Conversation
f1a9094
to
e74b6ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far I've just reviewed the proto changes, they look great apart from a few messed up field numbers (see comments). Will continue reviewing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. Looks great! Can't see any major flaws. Let's fix the proto stuff.
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean implementation 🔥 Just some minor nit comments and should be good to merge!
* Add simple changelog * Update x/gov/spec/01_concepts.md Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Matt, Park <[email protected]>
Co-authored-by: Matt, Park <[email protected]>
Merging this to avoid having to continuously sync it with As for the current status of this as a whole, #254 needs to be completed and merged before we create a gov prop. The gov prop is already written up and ready to go on-chain once #254 is in |
Sweet! lmk once #254 is r4r! |
* feat: expedited proposals h/t osmosis-labs#240 * fix: correctly generate random threshold params * fix: update randomised genesis state tests
* feat: custom proposal-based voting periods (#1) h/t osmosis-labs#239 * feat: expedited proposals (#2) * feat: expedited proposals h/t osmosis-labs#240 * fix: correctly generate random threshold params * fix: update randomised genesis state tests * feat: allow protocol stakers and delegators to vote (#3) * feat: expedited deposits (#4) h/t osmosis-labs#254 * fix: still include custom voting periods * fix: fallback to custom voting periods
Closes: #XXX
What is the purpose of the change
Feature: 2/3 Majority Emergency Voting Periods
Original Spec: osmosis-labs/osmosis#1517
Description
This change introduces an option for any existing proposal to be expedited. If a proposal is expedited, it uses a shorter voting duration and a higher tally threshold. If a the higher threshold is not met under shorter voting duration, the proposal is converted as if it was a regular proposal and tallied / voted on under regular rules.
The distinction is achieved by having an
IsExpedited
flag on the proposal struct. When a proposal is converted from expedited to regular, this flag is flipped andVotingEndTime
is extended. The rest of the fields, including theProposalId
remain the same. As a result, all existing votes are preserved.Differences from the Spec:
ExpeditedDuration
is implemented on theVotingParams
as opposed toProposal
structBrief Changelog
IsExpedited
flag to protos of all proposal content typesExpeditedVotingPeriod
to protos of gov voting parametersExpeditedThreshold
to protos of gov tally parametersEndBlocker
ofx/gov
to move expedited proposals to regular (with extended voting period) once voting period ends with proposal not meetingExpeditedThreshold
Testing and Verifying
This change is a trivial rework / code cleanup without any test coverage.
This change is already covered by existing tests, such as :
x/gov
This change added tests and can be verified as follows:
go test -timeout 30s -run ^TestExpeditedProposal_PassAndConversionToRegular$ github.com/cosmos/cosmos-sdk/x/gov
go test -timeout 30s -run ^TestProposalPassedEndblocker$ github.com/cosmos/cosmos-sdk/x/gov
go test -timeout 30s -run ^TestTickPassedVotingPeriod$ github.com/cosmos/cosmos-sdk/x/gov
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no