Skip to content
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

eth: only disable fast sync after success #16062

Merged
merged 1 commit into from
Feb 11, 2018

Conversation

karalabe
Copy link
Member

With the trie pruning PR (#15857), we're redefined fast sync to not hard reset to block 0 if downloading the pivot fails 10 times. This is a subsequent change along the same line to not revert to full sync if fast sync fails, only if it succeeds.

This code path was hit by Rinkeby miners which insta-mined a block on startup, started fast sync, failed, and switched to full sync because of the sole mined block at height 1. This change ensures that blocks mined locally don't disable fast sync.

@karalabe karalabe added this to the 1.8.0 milestone Feb 11, 2018
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

The change means that we never fall back to full-sync when fast-sync fails, right ? I'm ok with that

@karalabe
Copy link
Member Author

Yes, but that part was implemented in the trie rework PR already. This just fixes an omission for miners to do the same.

@karalabe
Copy link
Member Author

This last logic here only triggered if you mined a block and fast sync subsequently failed.

@karalabe karalabe merged commit 62ffec1 into ethereum:master Feb 11, 2018
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