-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix syncing issue #1225
Fix syncing issue #1225
Conversation
A block request can result an empty response if the requested hight is too high, which shouldn't resulting the peer get banned just becuase it is behind
|
It looks like @xlc signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
|
Ideally peers should not be requesting past |
|
I only have standard logs, which doesn't contain much useful details. |
|
This does have an issue that is one of the peer is very behind (in erroneous state), it will keep trying to find common ancestor block with linear algorithm, which going to take very very long time (#1229) |
|
Right, with the state pruning the node can only resolve forks up to a certain length. This needs to be checked before attempting ancestry search.
Logs are only needed if you run into issues. |
| None => { | ||
| if n > As::sa(0) { | ||
| trace!(target:"sync", "Ancestry block not found for peer {}: block #{}", who, n); | ||
| let n = n - As::sa(1); |
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.
One::one() is more idiomatic.
| let n = n - As::sa(1); | |
| let n = n - One::one(); |
|
This should be fixed by #1235 |
A block request can result an empty response if the requested hight is too high, which shouldn't resulting the peer get banned just because it is behind
I have a 3 node network setup running for two days, today one of the node is lagging behind and it is not able to catch up. Some logs: