Skip to content

[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

Merged
merged 5 commits into from
Sep 17, 2020
Merged

[FIX] fast sync fix #652

merged 5 commits into from
Sep 17, 2020

Conversation

KonradStaniec
Copy link
Contributor

No description provided.

@ntallar ntallar changed the base branch from phase/etc_forks to develop September 7, 2020 18:59
// 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)
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

@mirkoAlic mirkoAlic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mirkoAlic mirkoAlic merged commit db81a4d into develop Sep 17, 2020
@mirkoAlic mirkoAlic deleted the fix/fast_sync branch September 17, 2020 14:52
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

Successfully merging this pull request may close these issues.

2 participants