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.
To reviewers: This is one of the major changes made in this PR
There was a problem hiding this comment.
This might need a migration, we can add one in another PR
There was a problem hiding this comment.
Yup. I plan to write up a migration for proposals so I can couple it with this as well
amaury1093
left a comment
There was a problem hiding this comment.
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.
This might need a migration, we can add one in another PR
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 |
amaury1093
left a comment
There was a problem hiding this comment.
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.mdReviewers 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