-
Notifications
You must be signed in to change notification settings - Fork 75
[FIX] fast sync fix #652
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
[FIX] fast sync fix #652
Conversation
// We could end in wrong fork and get blocked so we should rewind our state a little | ||
// we blacklist peer just in case we got malicious peer which would send us bad blocks, forcing us to rollback | ||
// to genesis | ||
log.info("Parent difficulty not found for block {}, not processing rest of headers", header.idTag) |
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.
maybe all this logs that end up in a blacklisting action could be used .warn
instead of info
, in that way we could easily search for them. WDYT?
log.debug("Parent difficulty not found for block {}, not processing rest of headers", header.number) | ||
processSyncing() | ||
// We could end in wrong fork and get blocked so we should rewind our state a little | ||
// we blacklist peer just in case we got malicious peer which would send us bad blocks, forcing us to rollback |
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.
sounds hardcore..i mean, we blacklist the Peer. but still we rewind to genesis? =S
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.
if we blacklist this peer and rewind state a little, we hopefully will get some blocks from other peer which will steer us to main chain.
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.
LGTM!
No description provided.