[Busy] Voting percentage update problem - cause and fix

in #utopian-io6 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

Sort:  

Hi @blockchainstudio, thanks for making this contribution

Glad to have you contributing again. As always you find the bugs and then you make it a duty to fix them. This report has been staff picked.

I see that you have proposed a fix for the issue and made a pull request towards that effect. I like the manner in which you analysed and explained the cause. I also must commend the measures you have taken towards implementing the fix.

This report adds significant value to the project and is reflected in my scoring.

Thanks again for this contribution. I look forward to more of these :)

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Hi @fego, thank you so much for your review and nice pick :) Yes, this is a very important, considering that Busy's VP is being wasted and their introduction of beneficiary. Thanks again!

Thank you for your review, @fego! Keep up the good work!

favcau님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
favcau님의 Suggestions category - Weekly report: #19

... blockchainstudio/td> 3 <td s...

sbi2님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
sbi2님의 Weekly Upvotes Report

...ini-par-me-chopper-cycliste-vs-auto-20190228t095739204z
blockchainstudio | 26.37% | busy-user-page-loading-fail-page-not-found
g...

In Korean: 간만에 아주 유용한 버그를 하나 찾아서 수정했습니다. (사실 수정은 제가 보기엔 맞는데 db계정을 생성해야 full test를 해볼수가 있어서 완전 테스트를 거치진 못했습니다만 원인은 확실합니다.) 나름 중요한(원하시는?) 내용이기도 하니 그냥 내일 따로 포스팅해드릴게요. 자기 전에 문득 필받아서 발견한거고 수정하느라 이미 너무 늦은 시간이네요ㅎㅎ

harry-heightz님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
harry-heightz님의 Esteem Surfer v2: Review of app updates. v2.0.5 & v2.0.6.

...de>New Effective power down amount (shout out to blockchainstudiofor PR)
  • Improved Votes popover vis...

    ckole님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
    favcau님의 Suggestions category - Weekly report: #19

    Hey blockchainstudio, thumbs up for winning the contest. I deeply love what favcau is doing in the idea category. Well done.


    @blockchainstudio님 곰돌이가 1.7배로 보팅해드리고 가요~! 영차~

    Congratulations @blockchainstudio! You received a personal award!

    Happy Birthday! - You are on the Steem blockchain for 1 year!

    Click here to view your Board

    Do not miss the last post from @steemitboard:

    Carnival Challenge - Collect badge and win 5 STEEM

    You can upvote this notification to help all Steem users. Learn how here!

    짱짱맨 호출에 응답하였습니다.

    완전 멋져용~♥♩♬ 박수~박수~박수~♩♬

    Posted using Partiko Android