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

core, cmd, trie: pbss fix release v1.13.6 and v1.13.8 #618

Conversation

@Francesco4203 Francesco4203 force-pushed the fix-release-v1.13.6 branch 4 times, most recently from 95e34d7 to af060c3 Compare November 5, 2024 04:53
@Francesco4203 Francesco4203 force-pushed the fix-release-v1.13.6 branch 2 times, most recently from b7e22b7 to 64cabd1 Compare November 8, 2024 08:08
@Francesco4203 Francesco4203 changed the title core, cmd, trie: pbss fix release v1.13.6 core, cmd, trie: pbss fix release v1.13.6 and v1.13.8 Nov 8, 2024
rjl493456442 and others added 2 commits November 9, 2024 18:00
This fixes a database corruption issue that could occur during state healing.
When sync is aborted while certain modifications were already committed, and a reorg occurs, the database would contain incorrect trie nodes stored by path.
These nodes need to detected/deleted in order to obtain a complete and fully correct state after state healing.

---------

Co-authored-by: Felix Lange <[email protected]>
Original problem was caused by #28595, where we made it so that as soon as we start to sync, the root of the disk layer is deleted. That is not wrong per se, but another part of the code uses the "presence of the root" as an init-check for the pathdb. And, since the init-check now failed, the code tried to re-initialize it which failed since a sync was already ongoing.

The total impact being: after a state-sync has begun, if the node for some reason is is shut down, it will refuse to start up again, with the error message: `Fatal: Failed to register the Ethereum service: waiting for sync.`.

This change also modifies how `geth removedb` works, so that the user is prompted for two things: `state data` and `ancient chain`. The former includes both the chaindb aswell as any state history stored in ancients.

---------

Co-authored-by: Martin HS <[email protected]>
@huyngopt1994
Copy link
Collaborator

let merge it.

@huyngopt1994 huyngopt1994 merged commit 834da7f into axieinfinity:path-base-implementing Nov 11, 2024
1 check passed
huyngopt1994 pushed a commit that referenced this pull request Nov 21, 2024
* trie: remove inconsistent trie nodes during sync in path mode (#28595)

This fixes a database corruption issue that could occur during state healing.
When sync is aborted while certain modifications were already committed, and a reorg occurs, the database would contain incorrect trie nodes stored by path.
These nodes need to detected/deleted in order to obtain a complete and fully correct state after state healing.

---------

Co-authored-by: Felix Lange <[email protected]>

* core, cmd, trie: fix the condition of pathdb initialization (#28718)

Original problem was caused by #28595, where we made it so that as soon as we start to sync, the root of the disk layer is deleted. That is not wrong per se, but another part of the code uses the "presence of the root" as an init-check for the pathdb. And, since the init-check now failed, the code tried to re-initialize it which failed since a sync was already ongoing.

The total impact being: after a state-sync has begun, if the node for some reason is is shut down, it will refuse to start up again, with the error message: `Fatal: Failed to register the Ethereum service: waiting for sync.`.

This change also modifies how `geth removedb` works, so that the user is prompted for two things: `state data` and `ancient chain`. The former includes both the chaindb aswell as any state history stored in ancients.

---------

Co-authored-by: Martin HS <[email protected]>

---------

Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin HS <[email protected]>
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.

3 participants