oursky / likedao

Apache License 2.0
1 stars 4 forks source link

[Bug] Proposal tally is negative during voting #246

Open elise-ng opened 2 years ago

elise-ng commented 2 years ago

image.png

https://dao-staging.testnet.like.co/proposals/12

elise-ng commented 2 years ago

image.png correct stats from lunie ^^^

seems turnout is incorrect as well

mitchellchou commented 2 years ago

The value are all 0 while they shouldn't be 0

https://mainnet.likedao-dev.pandawork.com/proposals/52 image.png

https://testnet.likedao-dev.pandawork.com/proposals/15 image.png

hochiw commented 2 years ago

The data is indeed 0 on db but query from rpc shows otherwise, except for when I provide a height param indicated on db for when the tally result of proposal 52 was last updated. 🤔

$ liked q gov tally 52 --node https://mainnet-node-rpc.like.co:443
abstain: "600041343889653"
"no": "2669484386222"
no_with_veto: "0"
"yes": "339065657332550214"
$ liked q gov tally 52 --node https://mainnet-node-rpc.like.co:443 --height 4679289
abstain: "0"
"no": "0"
no_with_veto: "0"
"yes": "0"
$ liked q gov tally 52 --node https://mainnet-node-rpc.like.co:443 --height 4793484
abstain: "600041343889653"
"no": "2669484386222"
no_with_veto: "0"
"yes": "339065657332550214"
hochiw commented 2 years ago

For proposal 15 on testnet it seems to indeed be 0, as that one vote doesn't have anything staked

$ ./liked q gov tally 15 --node http://likecoin-public-testnet-5.oursky.dev:26657
abstain: "0"
"no": "0"
no_with_veto: "0"
"yes": "0"
$ ./liked q staking delegations like1lgdk4868np0zf8gmngs3s6fuey9tp7hhujlvy7 --node http://likecoin-public-testnet-5.oursky.dev:26657
delegation_responses: []
pagination:
  next_key: null
  total: "0"

As for the mainnet, there is some issues with the mainnet websocket node which causes bdjuno to crash.

pinging wss://mainnet-node.like.co/rpc/websocket via postman returns 400 whereas pinging wss://rpc.cosmos.network/websocket works (just to confirm I am doing it right)

I have asked them on Discord and is awaiting a response, will work on other issues first

Update: I have also tried submitting a test proposal on testnet last night and it seems to be counting and showing votes correctly, so it's likely a crawling problem.

mitchellchou commented 2 years ago

Need to have stake, noted.

Is that our voting power too small to have a turnout rate more than 0?

https://testnet.likedao-dev.pandawork.com/proposals/20 image.png

(It's also 0 in https://likecoin-public-testnet-5.netlify.app/proposals/20) image.png

hochiw commented 2 years ago

Need to have stake, noted.

if you stake 1 LIKE to a validator with 99 LIKE and that validator votes and you don't, the validator will vote on your behalf so the vote will have 100 LIKE power

and if you decide to vote for another option, say validator voted for YES and you vote for NO then 1 LIKE will be deduced from the validator's yes vote for your no vote, so validator will have a 99 LIKE vote for yes and you have a 1 LIKE vote for NO

so yes you will need to stake to get power

Is that our voting power too small to have a turnout rate more than 0?

since it's 1100* 10^9 / 280924801873069809994 * 100 it would be some where around 0.0000003915%

mitchellchou commented 2 years ago

Use Oursky validator 26657 port harddisk around 2TB