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

wrong powerdown amount due to 14-week powerdown bug #2159

Closed
economicstudio opened this issue Jan 23, 2019 · 0 comments
Closed

wrong powerdown amount due to 14-week powerdown bug #2159

economicstudio opened this issue Jan 23, 2019 · 0 comments

Comments

@economicstudio
Copy link
Collaborator

This bug is due to the 14-week powerdown bug: steemit/steem#3237 and I made the fix for steemd and another fix for busy.

Expected behavior

A weekly powerdown amount can't exceed the remaining powerdown amount.

Actual behavior

A weekly powerdown amount may exceeds the remaining powerdown amount; thus, voting value can be negative.

How to reproduce

Note that this kind of user may be hard to find, but one current example is Ned, as shown in the recording of the bug. Ned's 14-week powerdown will finish at 11:09pm on 24 Jan 2019, so you should find another example after that.

Recording Of The Bug

  • Voting value is negative
  • Powerdown amount is more than current SP, which is impossible.

Cause and Fix

This bug is due to the floor operation in the calculation of weekly powerdown amount, as explained in details in steemit/steem#3237 Due to this, the entire powerdown may take 14 weeks. Thus when calculating 14-week powerdown amount, it should be at most the remaining withdrawal.

While I fixed that bug at steemd level, until the fix is applied in production, any client (e.g., busy) should user their own fix. Thus, I made the fix.

After the fix is applied, voting value and powerdown amount (0 SP since it's 11 vests) are shown correctly.

economicstudio added a commit to economicstudio/busy that referenced this issue Jan 23, 2019
Sekhmet pushed a commit that referenced this issue Jan 23, 2019
economicstudio added a commit to economicstudio/esteem-surfer that referenced this issue Jan 30, 2019
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

1 participant