core: improve snapshot journal recovery (#21594)
* core/state/snapshot: introduce snapshot journal version
* core: update the disk layer in an atomic way
* core: persist the disk layer generator periodically
* core/state/snapshot: improve logging
* core/state/snapshot: forcibly ensure the legacy snapshot is matched
* core/state/snapshot: add debug logs
* core, tests: fix tests and special recovery case
* core: polish
* core: add more blockchain tests for snapshot recovery
* core/state: fix comment
* core: add recovery flag for snapshot
* core: add restart after start-after-crash tests
* core/rawdb: fix imports
* core: fix tests
* core: remove log
* core/state/snapshot: fix snapshot
* core: avoid callbacks in SetHead
* core: fix setHead cornercase where the threshold root has state
* core: small docs for the test cases
Co-authored-by:
Péter Szilágyi <peterke@gmail.com>
Showing
- core/blockchain.go 79 additions, 13 deletionscore/blockchain.go
- core/blockchain_repair_test.go 265 additions, 53 deletionscore/blockchain_repair_test.go
- core/blockchain_sethead_test.go 272 additions, 52 deletionscore/blockchain_sethead_test.go
- core/blockchain_snapshot_test.go 732 additions, 0 deletionscore/blockchain_snapshot_test.go
- core/rawdb/accessors_snapshot.go 57 additions, 0 deletionscore/rawdb/accessors_snapshot.go
- core/rawdb/schema.go 6 additions, 0 deletionscore/rawdb/schema.go
- core/state/snapshot/disklayer_test.go 76 additions, 0 deletionscore/state/snapshot/disklayer_test.go
- core/state/snapshot/generate.go 1 addition, 0 deletionscore/state/snapshot/generate.go
- core/state/snapshot/journal.go 206 additions, 20 deletionscore/state/snapshot/journal.go
- core/state/snapshot/snapshot.go 97 additions, 20 deletionscore/state/snapshot/snapshot.go
- tests/state_test_util.go 1 addition, 1 deletiontests/state_test_util.go
Loading
Please register or sign in to comment