-
Notifications
You must be signed in to change notification settings - Fork 20.9k
eth: switch to full sync before genesis block #31805
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
base: master
Are you sure you want to change the base?
Conversation
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.
Would it always trigger a full sync if the database is empty?
The answer is Yes, when the user start with snap sync and the database is empty, it will use full sync for the genesis block and then switch to snap sync for the reset of the chain. |
Ah, why do we need to sync the genesis in the first place? Isn't it defined by the local chain config? |
This reverts commit a1b0272.
@rjl493456442 Thanks for your advice. I've reviewed the fix again and realized the previous solution was incorrect. |
Why should we switch to full sync if the genesis block is in the future? Is there a problem that you are trying to solve with this? |
This reverts commit 093f63c.
Sorry for the incorrect fix, I took a closer look and I think we only need to check at the moment of node startup to determine if the genesis block is in the future. Then, we can simply configure it as full sync. Please help review this again. |
WHY do you want to do this? |
Just fix the issue, and there is a tag named ‘help wanted’ |
Fix and close #28222