Votes not being recorded on Hive - Request for support

in HiveDevs2 years ago (edited)

image.png
update: ecency shows the vote count capped at 1000 and peakd shows the full count at over 1000.. so it looks like there is a cap to the total number of votes at 1000. however, the systems lack correct notifications to handle this as no info is provided about this at all when voting or when displaying votes. do we even need a limit at all?

Does anyone know why we are unable to vote on some posts on Hive? Sometimes @resonator votes on a post (such as this one) and when we view it again, the vote is missing. If we then vote a second or third time, the vote is still missing if the page is refreshed.

Pretty sure this has been tested in PeakD and Hive.blog, with the same result in both.

We check the usage of our vote power and it looks like the vote power does get reduced when we cast the vote but the vote is not visible anywhere in the UIs or in the predicted post payouts for the posts voted on.

This could be a serious bug because posts are not receiving the support they should be and maybe curators are losing votes/rewards without knowing. I think that casting more than one vote on the same post results in all curation rewards being lost, so if this is happening without people knowing then maybe a lot of rewards are being misdirected.

Thanks,

@resonator

Sort:  

TL:DR As others have indicated, it works correctly, just does not show up on the list in PeakD due to limitation of API used.

Full version There are a lot of steps that the vote needs to pass to be recorded and then show up in the front-end. First it needs to reach the block. See this article if you are interested in technical details, but long story short: the transaction is first sent to some node and after it is validated, it becomes part of "the future" for that node (pending transaction). The node broadcasts that transaction further to other nodes.

Here is first moment when something can go wrong - the node might be separated from the rest of the network and transaction won't reach other nodes.

When transaction reaches witness node, when witness produces block, it becomes part of that block.

In case of high traffic transaction might never make it to the block, especially if it has short expiration time, because there are limits of how many transactions can fit in the block. If there is too many, they have to wait for their turn, and in some cases they wait too long.

Once transaction becomes part of block, it is distributed in the network along with the block.

Nodes might disagree about "the present", when there are competing forks. Even if transaction is part of correctly produced block, it might be part of losing fork. If that happens, it is reverted during fork switch and becomes pending again, therefore it might happen that it already expired or will expire before it can become part of another block.

At some point the block that contained the transaction becomes irreversible. It means that majority of witnesses agreed the block was valid. It takes 45 seconds or more now, but is almost instantenous in normal situation with OBI enables (after HF26). At this point you can be sure the transaction became part of "the past" and won't be reverted.

That is the case here. Your vote was properly processed. You can observe the state of your transaction with use of transaction_status_api.find_transaction (or your wallet should be doing that for you).

Above was "blockchain reality". But front-ends don't use blockchain directly. They use intermediary services, most likely Hivemind. Hivemind uses its own database to store its view of what happened on the blockchain.

Old Hivemind, as opposed to the one based on HAF, does not properly handle forks, therefore it could happen that it has some data on transactions that were reverted. Very rare case but possible nonetheless.

Even if Hivemind database correctly recorded transaction, front-end might still not show it, if it asks for it with wrong API. Hivemind APIs, especially condenser_api that should be removed long ago, carry some legacy problems. One of those problems is frequent lack of support for paging. That is the source of the problem in your case. PeakD apparently uses condenser_api.get_active_votes that has this problem. It can only return up to 1000 votes and there is no way for front-end to use it to ask for more (there are other APIs that have paging capability though). It is simply "good enough" most of the time, so front-ends still use it, because they used it in the past and there is no strong push to change it.

Thanks for the detailed clarification. So unless the front ends change their code to fix the issue, the best that curators can do is check a block explorer to make sure the vote was recorded and then to not re-vote?

For the time being there seems to be no other way. If you are sending your votes through the script, you could add calls to transaction_status_api to wait in a loop at least until your vote becomes part of some block. According to my sources (@gtg to be specific), that API is too sparsely used, even though it is an old API designed specifically for that purpose.

But exerting pressure on front-end devs (f.e. by filing an issue) might bear fruits in the future - without it how would they know some improvements are needed :o)

I haven't seen any Hive documentation to describe these parts of the system to developers and so it isn't surprising that front ends don't work in the optimal way. There is clearly a need for some kind of global reporting mechanism for Hive to make sure that developers are all up to speed with best practice.

There is some documentation here, although I'm not sure how up to date it is.

Currently there will probably be more pressure to drop old APIs with HAF approach which kind of allows everyone to build their own customized API, however in case of front-ends it is actually beneficial to have something common like Hivemind (less repeated work and also ability for users to switch to different server in case the one they are using has difficulties). Current Hivemind APIs have many problems though, especially with efficiency, so it might finally be the time to design something new from scratch.

Thank you for explaining @andablackwindow.

Did you check a block explorer? E.g. https://www.hiveblockexplorer.com/@resonator

There might be something wrong with the way the vote is shown on front-ends, while it is actually recorded on the blockchain. Or it might take more than 3 seconds when blocks are full. I do see the vote you mentioned, see the screenshot.
upvote.png

The same might happen to YouTube or Twitter, because they use multiple serves, and it takes a few seconds to synchronize them all. And Reddit implements 'vote fuzzing' on purpose.

in this case the blockchain is meant to be universally syncd across nodes

thanks for checking the block explorer, the vote and its effect never shows up in the front ends, so either there is an issue with the processing of the vote in the backend and/or middleware or the front ends are using the same erroneous code as each other.

I think 1000 votes is the total cap of the post.

The post from Roeland that was linked has more than 1000 votes visible in PeakD.

that seems to be part of the issue.. the uis provide no feedback on this cap and display the votes differently to each other. i updated the original post.

I don't think this is an issue for https://d.buzz yet, but we can work to address it once it becomes an issue for our frontend.

I think Ecency should update the vote count to original numbers. It seems some sort of coding issue. Better be informed to Ecency. Thanks

Hi @lordshah it's nice running into you here 😃

LOL, where did you find this 8 month old post? It won't as it all depends on the coding.

I was roaming around on #Hive and bam, I saw you and thought:

What are the odds? 😅

Posted via D.Buzz

Unbelievable, it's a small world.

Ah, that’s strange... It is sometimes it don’t appears on different front ends, but most of the time the vote is casted. Does it happen a lot for you ?

Unfortunately, I’m not good enough about those technical issues to provide a proper solution !

I hope you’ll find about a get answers that will resolve this...

Wow I have never hear of such happening before but if it is a little problem I think it can be resolved

Congratulations @resonator! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 37000 HP as payout for your posts, comments and curation.
Your next payout target is 38000 HP.
The unit is Hive Power equivalent because post and comment rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out the last post from @hivebuzz:

HiveFest⁷ Meetings Contest
HiveFest⁷ - Participate in the Balls of Steel tournament and get a new badge
Support the HiveBuzz project. Vote for our proposal!

I've never encountered anything like this before, but I'm certain that things will be resolved shortly. However, it would be inconvenient to lose out on one's curation reward owing to this issue. Thank you for bringing this up @resonator .

Strange...honestly we never encou ter such problem...and hopefully the devs will find it out a solution. This seems to be account specific as it never heard such instances before

Is it maybe just a UI appearance bug?

It also shows me the UI as if I hadnt voted, only after some minutes and a few refreshs peakd finally shows the blue heart.. and my vote :)

greets!

there is a delay on most votes of a few seconds, yes, but this is different because the vote never shows up after any length of time

Hmm weird.
How should voting be prevented?

It needed a few minutes, not only one, for my peakd to show my vote/ blue heart on your post.

This is strange and never had such issues. Because vo is reduced to possibly vote is casted. Could be an issues with front end. Hope it gets sorted out soon.

I think that casting more than one vote on the same post results in all curation rewards being lost

It won't allow you, if you are not casting a higher vote. If its same, it would tell, your current vote is identical to existing, bla bla...

I have experienced this, can't say, if its a bug or not.

no error message is ever displayed here throughout the process of voting and revoting

So I voted this comment first, and it still does not reflect, but then if I vote again, this is what I get.

image.png

Yes, that is a different scenario. The problem that needs to be addressed affects posts that have had 1000 or more votes.

This is very vital information and I have been in a while in the platform and was never aware of such. Though I may not be able to proffer solutions to the problem I hope and believe that everything is resolved as soon as possible. Good to know about this.

Thanks for letting me know, that's why I had my doubts about posting the same day as the hard fork. Even so, I published because it seemed to me that they had everything very controlled.

I suppose it won't take much longer to correct it and that we can all receive a fair reward, according to the effort that each one of us makes to contribute valuable content to the Hive platform 😀

The issue highlighted in this post is not connected to the Hard Fork, it was found to only apply to posts that have received over 1000 votes.

ah ok I understand, so it's not my case my publications so far have never reached that number, but I hope that with the passage of time it will be possible for my articles to reach more people.

greetings 😉

Maybe this might be the more reason why am not receiving votes.. could this be fixed boss?

This problem only occurs when a post receives more than 1000 votes, as stated in the other comments here.

Okay boss, thanks for the clarification.

Do you accept delegation boss?

This is very new to me i did not know such things happens in the hive Blockchain. So does that mean that vote can disappear, I am scared right now but wait can it be resolved or it's untreatable, Although the only one i noticed in the Blockchain is the hive we have on our post reduces sometimes and I don't even know the cause of that but i am assuming that is caused by the fall of cryptocurrency, Thanks @resonator for creating this awareness about the votes in Blockchain.

As you can see in the other comments, this problem only happens when a post receives 1000+ votes.

Yes, I saw well I haven't gotten to that stage and i am anticipating on that soon.

Hi @resonator,

You upvoted the post about our Hive Proposal.

https://peakd.com/proposals/263

May I kindly ask if you are interested in voting for our Proposal?

Thank you.

Vote cast!

Thank you!

Posted via D.Buzz

Thanks so much @resonator I really appreciate your support for my family. My especially my wife. God bless

I'm lucky to get a couple hundred votes, when I should have gone viral six years ago...

Saludos @resonator , soy nueva en hive y te invito a visitar mi perfil 😊