erigon-pulse/core/state
Alex Sharov af4a99b977
Merge account and storage resolvers (#504)
* 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>
2020-05-02 19:00:57 +01:00
..
contracts up syntax of solidity pragma (#498) 2020-04-29 11:51:07 +01:00
change_set_writer.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
database_test.go Add incarnation to acc.root in IH (#470) 2020-04-20 11:35:12 +01:00
database_writer.go Add "execute blocks" stage to the staged sync. (#486) 2020-04-26 17:02:38 +01:00
database.go Merge account and storage resolvers (#504) 2020-05-02 19:00:57 +01:00
db_state_reader.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
db_state_writer.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
dump.go Index bits to mark creation of accounts or storage items (#483) 2020-04-25 15:50:32 +01:00
helper.go Don't store RLPs in valueNodes (except tests). 2019-11-13 20:08:20 +01:00
history_test.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
intermediate_hashes.go Merge account and storage resolvers (#504) 2020-05-02 19:00:57 +01:00
intra_block_state_test.go Remove error param from NewTrieDbState (#408) 2020-03-26 16:21:15 +03:00
intra_block_state.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
journal.go geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
readonly.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00
state_object_test.go build: use golangci-lint (#20295) 2019-12-03 13:38:59 +01:00
state_object.go Tx pool use triedbstate, fixes to GetNodeData and move it to experimental (#364) 2020-02-10 17:05:32 +00:00
state_test.go Account range crash fix (#481) 2020-04-23 10:35:43 +01:00
stateless.go Incarnation should be read by StateReader, not StateWriter (#506) 2020-05-02 19:00:42 +01:00