go-ethereum/core/state/snapshot
rjl493456442 a11b4bebcb
Revert "core/state/snapshot: simplify snapshot rebuild (#30772)" (#30810)
This reverts commit 23800122b3.

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.
2024-11-26 11:33:59 +01:00
..
context.go all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-10-20 14:41:51 +03:00
conversion.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
difflayer.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
difflayer_test.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
disklayer.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
disklayer_test.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
generate.go core, trie, triedb: minor changes from snapshot integration (#30599) 2024-10-18 17:06:31 +02:00
generate_test.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
holdable_iterator.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
holdable_iterator_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
iterator.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
iterator_binary.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
iterator_fast.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
iterator_test.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
journal.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
metrics.go all: fix spelling mistakes (#25961) 2022-10-11 09:37:00 +02:00
snapshot.go Revert "core/state/snapshot: simplify snapshot rebuild (#30772)" (#30810) 2024-11-26 11:33:59 +01:00
snapshot_test.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00
utils.go core, triedb: remove destruct flag in state snapshot (#30752) 2024-11-22 16:55:43 +08:00