* add_incarnation_to_acc_root_in_ih
* merge cached resolver into stateful resolver
* - move account root set to "post iteration" of resolver
- rename "cache" to IntermediateHash
* remove blockNR and bucket params from walker
* fix out of range panic
* calc acc.Root on the fly
* remove fieldSet field from resolver, make logic of root - lazy
* remove 2 parameters
* working version of forward-only walk over Acc and Storage
* improve test
* rebase master
* save progress - more tests for PrepareResolveParams, add dedicated ResolveSet for storage.
Problem: See duplicates in ResolveSet hexes. Next test failing: oracle_test.go
* skip old incarnations
* don't rebuild when 0 requests
* fix tests
* start from account key when need resolve storage
* Error: stateless prototype faced hashNode when extracting witness
* Statless works: copy touches
* Remove getAccRoot function
* Remove "isAccount" parameter from resolver signature
* Fix: use correct storageResolveSet in finaliseStorageRoot
* Fix: when startKey changed - reset storage buffers also
* Fix: if account incarnation=0 - set EmptyRoot
* Fix: remove account roots by default from IntermediateHash bucket
* Fix: skip abandoned storage - which appeared just after startKey
* Fix: did reset acc key incorrectly
* Fix: clean previous key if receive IH
* Fix: IH observer - subscribe only to branch nodes (was subscribed to value nodes also)
* Add DISABLE_IH and STORE_ACCOUNT_ROOT env variables for tests
* Remove accNode from IH cycle
* Fix flags
* Fix: reset succStorage also
* Fix: skip IH if it has wrong incarnation
* Fix: skip IH if it has wrong incarnation
* Fix: skip IH if it has wrong incarnation
* Fix: use rssStorage to HashOnly check
* Fix: remove termination symbol from resolveRequest
* cleanup
* Fix: skip abandoned storage after IH
* Debug
This reverts commit 9c5eb69465f25607d546b03359b2cbcb1bd46689.
* Fix linters
* add_incarnation_to_acc_root_in_ih
* merge cached resolver into stateful resolver
* - move account root set to "post iteration" of resolver
- rename "cache" to IntermediateHash
* remove blockNR and bucket params from walker
* fix out of range panic
* calc acc.Root on the fly
* remove fieldSet field from resolver, make logic of root - lazy
* remove 2 parameters
* working version of forward-only walk over Acc and Storage
* improve test
* rebase master
* save progress - more tests for PrepareResolveParams, add dedicated ResolveSet for storage.
Problem: See duplicates in ResolveSet hexes. Next test failing: oracle_test.go
* skip old incarnations
* don't rebuild when 0 requests
* fix tests
* start from account key when need resolve storage
* Error: stateless prototype faced hashNode when extracting witness
* Statless works: copy touches
* Remove getAccRoot function
* Remove "isAccount" parameter from resolver signature
* Fix: use correct storageResolveSet in finaliseStorageRoot
* Fix: when startKey changed - reset storage buffers also
* Fix: if account incarnation=0 - set EmptyRoot
* Fix: remove account roots by default from IntermediateHash bucket
* Fix: skip abandoned storage - which appeared just after startKey
* Fix: did reset acc key incorrectly
* Fix: clean previous key if receive IH
* Fix: IH observer - subscribe only to branch nodes (was subscribed to value nodes also)
* Add DISABLE_IH and STORE_ACCOUNT_ROOT env variables for tests
* Remove accNode from IH cycle
* Fix flags
* Fix: reset succStorage also
* Fix: skip IH if it has wrong incarnation
* Fix: skip IH if it has wrong incarnation
* Fix: skip IH if it has wrong incarnation
* Fix: use rssStorage to HashOnly check
* Fix: remove termination symbol from resolveRequest
* cleanup
* Fix: skip abandoned storage after IH
* remove inc
* remove inc from rss
* tr.succStorage.Reset()
* remove inc from rss
* Remove hard-coding
* succ.Reset
* Enable CalcTrieRoots
* Proper dumping of the trie
* Debug
* Fix for CalcTrieRoot
* Fix another inteference bug
* Temp
* Fix test
* Cleanup
* remove STORE_ACCOUNT_ROOT=true flag
* Fix linter
* Fix linter
* Disable getnodedata by default
* Fix test
* Fix test
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
* add_incarnation_to_acc_root_in_ih
* return true from walk functions - fix bug when walk stopped after 1 account only.
* rename interface
* fix comment
* add context
* extract chain events
* run commit in goroutines
* mine only on canonical
* typo
* linters
* fmt
* mark unused methods
* restore stress test
* test single miner
* remove unsafe Trie storage
* remove locks from miner
* restore interrupt
* remove result goroutine
* remove unconfirmedBlocks
* cherry-pick 04a1d475ff1a36ad8f92fec80385df18c52bdc1f
* extract uncles
* one miner succeeded
* restore context cancel
* cleanup
* skip an unstable test
* remove pending state
* use context instead of interrupt func
* calculate sealHash only once
* comment out unstable test
* after merge
* fix after merge
Co-authored-by: ledgerwatch <akhounov@gmail.com>
* core: reinit chain from freezer in batches
* core/rawdb: concurrent database reinit from freezer dump
* core/rawdb: reinit from freezer in sequential order
* core, eth: some fixes for freezer
* vendor, core/rawdb, cmd/geth: add db inspector
* core, cmd/utils: check ancient store path forceily
* cmd/geth, common, core/rawdb: a few fixes
* cmd/geth: support windows file rename and fix rename error
* core: support ancient plugin
* core, cmd: streaming file copy
* cmd, consensus, core, tests: keep genesis in leveldb
* core: write txlookup during ancient init
* core: bump database version
* all: freezer style syncing
core, eth, les, light: clean up freezer relative APIs
core, eth, les, trie, ethdb, light: clean a bit
core, eth, les, light: add unit tests
core, light: rewrite setHead function
core, eth: fix downloader unit tests
core: add receipt chain insertion test
core: use constant instead of hardcoding table name
core: fix rollback
core: fix setHead
core/rawdb: remove canonical block first and then iterate side chain
core/rawdb, ethdb: add hasAncient interface
eth/downloader: calculate ancient limit via cht first
core, eth, ethdb: lots of fixes
* eth/downloader: print ancient disable log only for fast sync
* core, eth, trie: bloom filter for trie node dedup during fast sync
* eth/downloader, trie: address review comments
* core, ethdb, trie: restart fast-sync bloom construction now and again
* eth/downloader: initialize fast sync bloom on startup
* eth: reenable eth/62 until we properly remove it
* core: lookup txs by block number instead of block hash
Transaction hashes now store a reference to their corresponding
block number as opposed to their hash. In benchmarks this was
shown to reduce storage by over 12 GB.
The main limitation of this approach is that transactions on
non-canonical blocks could never be looked up, however that is
currently not supported.
The database version has been upgraded to version 5 and the
transaction lookup process is backwards-compatible with the
prior two transaction lookup formats prexisting in the
database instance. Tests have been added to ensure this.
* core/rawdb: tiny review nit fixes
This PR is a more advanced form of the dirty-to-clean cacher (#18995),
where we reuse previous database write batches as datasets to uncache,
saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.