-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
Snap sync leads to corrupted state #22534
Comments
This problem seem to be more prone to happen when the node is totally clean, i.e, also has do download bodies. This causes the snap-part of the sync to complete before the block-part, and that seems to sometimes trigger this behaviour. |
On
|
Looks like it's the expected behavior.
In theory, it can be wrong in this case. The generation target is the pivot point trie and all the updates of the following blocks will be handled by |
What kicks it off is that the pivot is committed, but the downloader has another chunk of blocks But the downloader doesn't exit until after importing the But I don't see anything important that we actually do around "Fast sync complete" that is very important, other than log the message. So I still don't see why this would lead to data corruption. |
* eth/protocols/snap: fix snap sync * eth/protocols/snap: fix tests * eth: fix tiny * eth: update tests * eth: update tests * core/state/snapshot: testcase for #22534 * eth/protocols/snap: fix boundary loss on full-but-proven range * core/state/snapshot: lintfix * eth: address comment * eth: fix handler Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]>
As far as we know, this is solved by #22553 |
* eth/protocols/snap: fix snap sync * eth/protocols/snap: fix tests * eth: fix tiny * eth: update tests * eth: update tests * core/state/snapshot: testcase for ethereum#22534 * eth/protocols/snap: fix boundary loss on full-but-proven range * core/state/snapshot: lintfix * eth: address comment * eth: fix handler Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Péter Szilágyi <[email protected]>
This was against
Geth/v1.10.0-unstable-8f03e3b1-20210220/linux-amd64/go1.16
. I have the full logs, with TRACE on some portions of it.We've seen this on @MariusVanDerWijden 's node aswell, and something similar recently happened on one of the benchmarkers.
Interesting parts of the logs:
Terminates snapshot sync cycle, pending is
0
:It then continues downloading headers/bodies for another five minutes, and then it decides that snapshot sync is already completed:
And it starts generating the snapshot. However, after another
9
minutes, it finally reportsSnap sync complete
-- by which time the generator has already been at work for a while.And eventually
The text was updated successfully, but these errors were encountered: