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
Update discovery and update time to get latest information - Closes #2073 #2074
Conversation
Since we have 10s window for forging, I think changing it to 5s is relevant. |
10 sec discovery time will be compatible with the 0.9.* version. |
Please open the similar issue to #1943 which will refer to discovery time directly. We are obtaining to have the transparent flow of changes we've made during Betanet tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please open the corresponding issue.
The process of updating information about peers, even with changes proposed in this PR - will still be less efficient than in So proposed changes:
|
I think that this should fix the issue with peer headers being out of date (which causes the consensus to be miscalculated) but we still have the deeper issue that currently every node needs to get a status update from every other node in the network every x seconds; this behaviour gets more expensive as more nodes are added to the network. Also, I'm not sure if updateMyself adds any value to our algorithm. What is the reason for having two different ways of sharing peer headers? I think that this PR is not harmful and there is a good chance that it will solve our current problem but we should also solve the root issue at some point. |
Created #2076, and changed the closing issue. As @4miners pointed, even if we change it back to 10s, it will not be the same result as 0.9.x, since protocol is totally different. Also, this is very inefficient and costly. However, as @jondubois pointed out, I believe this has good chance to "fix" it. but we definitely need to think about the root cause. Also,
I think I don't think we have good reason to keep it |
I've opened the issue #2078 that describes the headers propagation problem. The discovery process is still valid and I think it's important not to change its interval from 10 sec to 30 sec in 1.0.0 version without the solid argumentation. |
Close until #2080 solved. |
What was the problem?
Because peer information update only happens for random 100 peers, and only fetching the peer information every 30s, consensus calculation is most likely to be off.
It causes delegates not to be able to forge right away.
How did I fix it?
Revert the increased discovery time to 10s.
How to test it?
Observe update of peers happen every 10s.
Review checklist