[Busy] Voting percentage update problem - cause and fix

in utopian-io •  6 years ago  (edited)

Project Information

[EN/KR] Busy voting Independence Day! - now it's completely independent of steemdb



I've opened the issue and submitted the PR. While the PR is waiting for being merged, I'm pretty confident with the cause and due to the temporary measure that I like to introduce (and you guys will like :), I submit this post without waiting any further.

Expected behavior

Busy voting (by @busy.pay) percentage should be updated based on the sum of followers' SP.

Actual behavior

Busy voting percentage isn't updated unless users haven't made a post for more than 3 days.

How to reproduce

This happens to all users who's been writing at least once per three days since the end of Jan, including me @blockchainstudio. See the details in Cause and Fix

Cause and Fix

@busy.pay's voting percentage is determined by the sum of the followers' SP, about 1% for every 1 million SP. But this sum of the followers' SP can't be calculated quickly using normal API (imagine that you need to find for ned who has more than 26k followers). Thus it should be cached and steemdb.com (run by jesta) had provided the information. However, it was often unstable.

Since its introduction of the "independence" from steemdb.com a month ago, the original intention was to have its own cache. The current configuration is 3 days, which is defined as VESTS_CACHE_SECONDS as follows:

https://github.com/busyorg/busy-bot/blob/master/src/constants.js#L3

While its original intention was to update if the last update is more than 3 days old, the current code updates the cache every time as follows.

I've submitted the PR: https://github.com/busyorg/busy-bot/pull/10

Currently, queue.setAccountFollowersVests(username, vests) is called every time and this is why VESTS_CACHE_SECONDS never expires. So unless a user hasn't written a post for more than 3 days, the cache never expires, which is also proven below (data is from @steemsql, but this small task can be done with steem api).

@busy.pay's voting pct for @blockchainstudio (a user who has written at least once per 3 days => no update since its introduction a month ago)

another user who hadn't written for more than 3 days => update

Hope this will be resolved soon so that users could get more voting and Busy also could get more curation rewards. Currently, VP is being wasted (reach 100%) quite often.

Temporary solution

If you wanna get updated, don't write for 3 days :) Of course, strictly speaking, don't use 'busy' tag for 3 days. Mine is finally updated :)

  • App version: 2.5.6 (or any version)
  • Browser/App version: Any
  • Operating system: Any

Recording Of The Bug

@busy.pay's voting pct for @blockchainstudio (a user who has written at least once per 3 days => no update)

GitHub Account

https://github.com/economicstudio

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!