Comments (5)
- review
adjust_witness_votes()
to identify potential issues
I believe the required changes may be as simple as changing this line into:
w.virtual_position = std::min(VIRTUAL_SCHEDULE_LAP_LENGTH, w.virtual_position + w.votes.value * (wso.current_virtual_time - w.virtual_last_update));
Or whatever the fc::uint128
version of std::min
is.
from steem.
I think the solution I would adopt is to iterate through the active witness set and recalculate the virtual scheduled time. We want to ensure that the top 19 are ignored when selecting the runner up.
from steem.
Assuming you are in the top 19 and get voted out before your block production slot, then when you are paid it will update your virtual scheduled time. So this bug only impacts witnesses that are in the active round and get voted out after they have produced in the round.
As soon as any one of your supporters converts steem to vests then you will be rescheduled. This means any other witness voting for you, any miner voting for you, or any poster.
I think we can implement a fix for this to happen at the next hardfork, but we will not schedule a hardfork just because of this.
from steem.
Assuming you are in the top 19 and get voted out before your block production slot, then when you are paid it will update your virtual scheduled time. So this bug only impacts witnesses that are in the active round and get voted out after they have produced in the round.
Found an issue in adjust_witness_votes()
. The fix suggested by @arhag in an earlier comment would work.
While a witness is voted in, she will never be scheduled for time sharing, so virtual_position
keeps increasing. After virtual_position
> VIRTUAL_SCHEDULE_LAP_LENGTH
, with this code:
w.virtual_scheduled_time = w.virtual_last_update + (VIRTUAL_SCHEDULE_LAP_LENGTH - w.virtual_position)/(w.votes.value+1);
the virtual scheduled time will be set to a very large value which is converted from a negative value as unit128
. As a result, she will never be scheduled after been voted out of top 19.
from steem.
It's best to keep virtual_scheduled_time
, virtual_last_update
and virtual_position
consistent, otherwise there would be any unexpected behavior.
Some issues about latest commit of tag 0.3.0
:
- overflow at L934 of database.cpp when
wo.votes
is 0 (thanks to arhag) - lack of a update to
wo.virtual_last_update
in L922-L937 of database.cpp - lack of an reset to
sitr
in database.cpp before L940, in addition please make surenew_virtual_time
is initialized
from steem.
Related Issues (20)
- --replay-blockchain so much slowly...
- moha20
- You know stealing is wrong HOT 7
- 170,000 Steem was removed from my account. HOT 5
- v0.23.0 Incomplete release notes
- errors when building steemit on Mac HOT 1
- Memory needed to build and run steem HOT 1
- I know why everyone turned interest rate to zero :p
- how to replay block_log after running steem in docker HOT 2
- Request to remove account from search engines HOT 6
- Block Reward
- Compile error on Ubuntu 18.04
- block_log-latest is no longer download-able HOT 3
- Vulnerability Report- 2FA Code Bypass HOT 10
- https://steemit.com//example.com/?r=
- Chainbase revision does not match head block num #345
- Sign up phone validation failed HOT 1
- Request code problem HOT 2
- Value of Steem on my post is always $0.00 HOT 1
- The api.steemit.com returns incorrect number of accounts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steem.