-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor!: move v1beta2 gov types into types dir #10763
Conversation
message TallyParams { | ||
// Minimum percentage of total stake needed to vote for a result to be | ||
// considered valid. | ||
bytes quorum = 1; | ||
string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
|
||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | ||
bytes threshold = 2; | ||
string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
|
||
// Minimum value of Veto votes to Total votes ratio for proposal to be | ||
// vetoed. Default value: 1/3. | ||
bytes veto_threshold = 3; | ||
string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
} |
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.
To reviewers: This is one of the major changes made in this PR
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.
This might need a migration, we can add one in another PR
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.
Yup. I plan to write up a migration for proposals so I can couple it with this as well
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.
LGTM overall, have some questions that don't need to be answered in this PR.
My biggest concern is if it's worth generating coins into []*sdk.Coins
. I prefer to keep []sdk.Coins
even though that means we still use gogoproto in v1beta2.
message TallyParams { | ||
// Minimum percentage of total stake needed to vote for a result to be | ||
// considered valid. | ||
bytes quorum = 1; | ||
string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
|
||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | ||
bytes threshold = 2; | ||
string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
|
||
// Minimum value of Veto votes to Total votes ratio for proposal to be | ||
// vetoed. Default value: 1/3. | ||
bytes veto_threshold = 3; | ||
string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
} |
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.
This might need a migration, we can add one in another PR
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.
lgtm, thanks!
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.
lgtm!
This error is a bit concerning, as it touches signing (so consensus). I think it's due to some json tags changes (maybe I believe there's no risk of simply updating the v1beta2 test (as long as the v1beta1 test doesn't change). |
Yeah it seems the failing test is only when proposal id is 0. When set to non zero it works fine. I'm not sure if there are any tags I need to change. I've added a validity check in genesis that proposal id can never be zero to avoid this case |
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.
let's actually keep 0
! With 1
we wouldn't have caught this bug.
I think it's fine like this. I just reverted the test back to use |
closes #9865
To be merged after #10748
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change