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

[bug] The number of votes differs from the actual number. #66

Open
lgsyukisugiyama opened this issue Sep 16, 2021 · 2 comments
Open

[bug] The number of votes differs from the actual number. #66

lgsyukisugiyama opened this issue Sep 16, 2021 · 2 comments

Comments

@lgsyukisugiyama
Copy link

Summary of Bug

1, The number of votes differs from the actual number.
Each total number of Proposition 1 of Nibiru-2000 is different.
The correct number for "No" is 346989.501865.
The correct number for "No With Veto" is 10.000000.
Therefore, the Total GAME will be different.
https://nibiru-2000.game-explorer.io/proposals/1
test

2, The voter figures are different.
When a voter changes a voting item, the number of votes is increased while the voting item before the change remains.
The image is just an example.
In this image, two of the same delegator addresses exist and are accounted for.
The same phenomenon occurs for "yes", "No", "No with veto", and "Abstain".
test2

Version

latest master(d28f664)

Steps to Reproduce

1, The number of votes differs from the actual number.
You can check the correct values in the following query execution result.

# nibirud q gov tally 1 --chain-id=nibiru-2000
abstain: "124419000010"
"no": "346989501865"
no_with_veto: "10000000"
"yes": "244073001000"

2, The voter figures are different.
You can see the status of each voter in the following query results.
According to this, the number of "ALL" is 9.
The number of "yes" and "no" is 3.
There is one "No With Veto".
"Abstain" is 2 people.
I think it would be easier to understand if the explorer displayed the results like this.

# nibirud q gov votes 1
pagination:
  next_key: null
  total: "0"
votes:
- option: VOTE_OPTION_YES
  proposal_id: "1"
  voter: nibiru1qmhuaq0f78q93k58ma8jmq65dzx2n889w7mhg6
- option: VOTE_OPTION_NO
  proposal_id: "1"
  voter: nibiru1pzs7dnhp9n0yaulr6hvdwhav6my55lk082mcgx
- option: VOTE_OPTION_NO
  proposal_id: "1"
  voter: nibiru1pyf0djx0sevym42y8gyvum3l7rdxj9ql0md4u5
- option: VOTE_OPTION_ABSTAIN
  proposal_id: "1"
  voter: nibiru1z9u3cftn89jdqpfm8993r4z7d398auc7tajkgf
- option: VOTE_OPTION_YES
  proposal_id: "1"
  voter: nibiru19sw98d9uvaqwhd4hgdu5mzpes7zfx3vr3lgw5d
- option: VOTE_OPTION_ABSTAIN
  proposal_id: "1"
  voter: nibiru195ua2gnseuv3d5jtwypujef0feym05devxkak6
- option: VOTE_OPTION_YES
  proposal_id: "1"
  voter: nibiru1uqfal9sqazj3w6h8kcezkymwt0p22nyrffc3m0
- option: VOTE_OPTION_NO_WITH_VETO
  proposal_id: "1"
  voter: nibiru1u5spl60f9y9cj0z8r69lvcesu74a3ct9qfcd85
- option: VOTE_OPTION_NO
  proposal_id: "1"
  voter: nibiru1l94c5al6t3ak9yx6zxwsrxnfy9d5dgupq8qq95

@EG-easy
Copy link
Contributor

EG-easy commented Sep 27, 2021

  1. NoWithVeto returns 0
    mongoDB has correct value (10000000), so API problem I think.

  2. Voter can change their opinion
    When saving the vote, we need to check the voter has already voted or not.
    And if the voter already voted, we need to change vote status(ex. from yes to no).

@padi-dev-hoangpa
Copy link
Contributor

I fixed issue 1 @EG-easy

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

No branches or pull requests

3 participants