-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Proposal tally not increasing after voting #2859
Comments
That's not what TallyResult is for! It's the result of the vote and takes into account the staked weights of the voter. The TallyResult in state is only filled in once the voting is finished. If the proposal is still in the VotingPeriod, using the Tally querier endpoint, it doesn't read from state, but rather runs a tally at the current time, based on current stake weights (the stake weight may change by the time the real tally is run. |
I'll reopen this bc I still think it needs further discussion. Maybe we can implement a workaround without rallying on the tally endpoint. cc: @jackzampolin @johnmcdowall @alexanderbez @faboweb |
|
So right now if the proposal is on voting period the only way to get the current tally is using the
|
I agree in that I think it'll be a better UX if it's directly updated in the proposal. When I was playing around with proposals, I'd vote and query the proposal directly after and saw no updates to the tally...I thought that to be strange and it's not directly obvious to me that there is a tally endpoint/command. |
Yes this was another point of API ergonomics that surprised me as well. Again, naming seems to be the issue here. I think the field in the proposal response should be called Again though, we've chosen to store the final tally result here AND have an API which also will give you the final tally after the voting period, but we won't store the proposer address... EDIT: I don't think we should get rid of the |
Thinking on this a bit more I agree with @fedekunze. Since the |
I like this idea.
This also works, but I prefer @johnmcdowall's proposal above because running a pseudo tally is a "somewhat expensive" operation, so I don't want to run it every time a proposal is queried. I think
Yep, this was the intention of this endpoint.
The governance tallying only takes into account the stake weighting at the end of the VotingPeriod, when the final tally takes place. Otherwise, I could delegate to one validator, they vote, then I redelegate my stake to another validator and they vote. Now my stake got double counted. The |
I personally think it's completely unnecessary since you can only use it when the proposal is on Voting Period. The other option could be getting rid of the |
@fedekunze What do you think about the suggestion:
|
I completely agree with that, it's just that having if-else checks for which way to query the partial result or the final result is not good. I like the idea of the |
This is what it already currently does. |
Cool ! then I fully agree on your proposal |
So is the actionable item here to simply rename the field |
Is that really it? |
I think so. |
Summary of Bug
The proposal Tally Result is not increasing after submitting a vote.
Ref: luniehq/lunie#1591
Steps to Reproduce
Added a test case on
lcd_test.go
and failed.We are not increasing the proposal tally after voting:
cosmos-sdk/x/gov/keeper.go
Lines 288 to 309 in 6e813ab
Actionable Item(s):
tally_result
=>final_tally_result
For Admin Use
The text was updated successfully, but these errors were encountered: