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

all: recommit genesis state for 0 rewinding target #24450

Closed
wants to merge 2 commits into from

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Feb 22, 2022

Geth will try to rewind its head to a lower point if the corresponding state is not found.
But in order to avoid the unnecessary disk load, if the block is lower than pivot point, then
the state won't be checked, instead genesis block will be used as the destination directly.

In the current code base, the assumption is held that genesis state is always existent in the
disk. However, in the new state scheme(path based), state will always be overwritten and
genesis state can be gone in this case.

This PR wants to get rid of the assumption, but recommit the genesis state instead. theoretically
it should make no difference right now, but this logic can be merged first before the big state PR.

Warning: most of the changes are in the test!

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.

1 participant