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

Revert "core/state/snapshot: simplify snapshot rebuild (#30772)" #30810

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Nov 26, 2024

This reverts commit 2380012.

The original pull request introduces a bug and some flaky tests are detected because of this flaw.

--- FAIL: TestRecoverSnapshotFromWipingCrash (0.27s)
    blockchain_snapshot_test.go:158: The disk layer is not integrated snapshot is not constructed
{"pc":0,"op":88,"gas":"0x7148","gasCost":"0x2","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PC"}
{"pc":1,"op":255,"gas":"0x7146","gasCost":"0x1db0","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SELFDESTRUCT"}
{"output":"","gasUsed":"0x0"}
{"output":"","gasUsed":"0x1db2"}
{"pc":0,"op":116,"gas":"0x13498","gasCost":"0x3","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH21"}

Before the original PR, the snapshot would block the function until the disk layer
was fully generated under the following conditions:

(a) explicitly required by users with AsyncBuild = false.
(b) the snapshot was being fully rebuilt or the disk layer generation had resumed.

Unfortunately, with the changes introduced in that PR, the snapshot no longer waits
for disk layer generation to complete if the generation is resumed. It brings lots of
uncertainty and breaks this tiny debug feature.

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

LGTM

@MariusVanDerWijden
Copy link
Member

cc @ARR4N we had to revert your commit, since it changed the logic a bit

@ARR4N
Copy link
Contributor

ARR4N commented Nov 26, 2024

Sorry!

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.

LGTM

@holiman holiman merged commit a11b4be into ethereum:master Nov 26, 2024
3 checks passed
@holiman holiman added this to the 1.14.13 milestone Nov 26, 2024
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.

4 participants