bsc/ethdb
John 476d5200f7
[R4R]offline block prune (#543)
* offline block prune

* update

* update

* update and add unit test

* addressed comments from walt

* Addressed comments from walt and Igor

* ensure MPT and snapshot matched

* add one more parameter to indicate blockprune

* update the logic of creating freezerDb

* update flag command description

* expose the function for db inspect the offset/startBlockNumber

* add flags to inspect prune info

* rename flag of reserved-recent-blocks to block-amount-reserved

* addressed comments from walt

* handle the case of command interruption

* refined goimports

* addressed comments from walt

* change the logic as restarting prune after interruption

* addressed comments

* reclaimed freezer logic

* introduce flag to enable/disable check between MPT and snapshot

* update the logic of frozen field in freezerDB

* update the code in all places related to freezer change

* addressed comments from dylan

* update the logic for backup block difficulty

* addressed comments from dylan
2022-01-19 18:07:49 +08:00
..
dbtest all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00
leveldb core, eth, ethdb, trie: simplify range proofs 2021-04-29 10:59:08 +03:00
memorydb core, eth, ethdb, trie: simplify range proofs 2021-04-29 10:59:08 +03:00
batch.go core, eth, ethdb, trie: simplify range proofs 2021-04-29 10:59:08 +03:00
database.go [R4R]offline block prune (#543) 2022-01-19 18:07:49 +08:00
iterator.go all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00