* db based version of PrefixByCumulativeWitnessSize
* db based version of PrefixByCumulativeWitnessSize
* retain all in Trie by default
* fix WitnessLen logic in calcTrie roots
* Rename IntermediateTrieWitnessLenBucket to IntermediateWitnessLenBucket
* handle corner cases in WL
* Use correct incarnation for IH bucket
* use name WitnessSize
* save progress towards db-only witness estimation
* results from trie and from db are still different
* less recursion
* correct incarnation in CumulativeSearch
* reuse results from previous Tick, separate concepts of parent and startKey
* experiment: if not including trie structure to WitnessSize will reduce cumulative error
* tool to generate all IH and tool to calculate assessment of cumulative error
* tool to generate all IH
* Calculate totalWitnessSize based on DB data - then schedule will not overrun state during MGR cycle
* better stats
* Calculate totalWitnessSize based on DB data - then schedule will not overrun state during MGR cycle
* Calculate totalWitnessSize based on DB data - then schedule will not overrun state during MGR cycle
* calculate ticks size distribution
* estimate cumulative error
* fix linter
* resetIH from scratch if needed
* cleanup
* fix test
* fix test
* Not hash, keep the files
* Calculate savings
* Fix
* Fix
* Fix
* Fix
* RestAPI to support local boltdb
* Not error on read-only db
* Changes so far
* Continue
* More
* Roll back a bit
* Restore newline
* something compiles
* Fix restapi
* Fix block number
* Fix reads
* Use plain writer
* Maps for storage reads and writes
* Clean up coersions
* Fix accounts/abi/bind
* Fix tests
* More fixes
* more fixes
* More fixes
* Fixes
* Fixed core/state
* Fixed eth tests
* Move code, fix linter
* Fix test
* Fix linter
* Fix linter
* Fix linter, badger_db to support AbstractKV
* Increase IdealBatchSize for badger
* Fix linter
* Fix linter
* save state
* add current index feature
* fix test
* remove logs
* Only execute 1000 blocks
* Reset history index
* Correct action
* Increase batch size
* Increase chunk size, print memory stats
* Fix linter
* Remove unused from
* Split into 2 staged
* Use storage history gen
* remove log
* Not to run tx_cacher in staged mode
* Not to recover during stage 2
* Not to recover during stage 2
* Remove counter
Co-authored-by: b00ris <b00ris@mail.ru>
* rpc flags related to starting http server renamed to http
* old rpc flags aliased and still functional
* pprof flags fixed
* renames gpo related flags
* linted
* renamed rpc flags for consistency and clarity
* added warn logs
* added more warn logs for all deprecated flags for consistency
* moves legacy flags to separate file, hides older flags under show-deprecated-flags command
* legacy prefix and moved some more legacy flags to legacy file
* fixed circular import
* added docs
* fixed imports lint error
* added notes about when flags were deprecated
* cmd/utils: group flags by deprecation date + reorder by date,
* modified deprecated comments for consistency, added warn log for --rpc
* making sure deprecated flags are still functional
* show-deprecated-flags command cleaned up
* fixed lint errors
* corrected merge conflict
* IsSet --> GlobalIsSet
* uncategorized flags, if not deprecated, displayed under misc
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
# cmd/geth/main.go
# cmd/geth/usage.go
# internal/debug/flags.go
Rather than just closing the underlying network listener to stop our
HTTP servers, use the graceful shutdown procedure, waiting for any
in-process requests to finish.
* all: seperate consensus error and evm internal error
There are actually two types of error will be returned when
a tranaction/message call is executed: (a) consensus error
(b) evm internal error. The former should be converted to
a consensus issue, e.g. The sender doesn't enough asset to
purchase the gas it specifies. The latter is allowed since
evm itself is a blackbox and internal error is allowed to happen.
This PR emphasizes the difference by introducing a executionResult
structure. The evm error is embedded inside. So if any error
returned, it indicates consensus issue happens.
And also this PR improve the `EstimateGas` API to return the concrete
revert reason if the transaction always fails
* all: polish
* accounts/abi/bind/backends: add tests
* accounts/abi/bind/backends, internal: cleanup error message
* all: address comments
* core: fix lint
* accounts, core, eth, internal: address comments
* accounts, internal: resolve revert reason if possible
* accounts, internal: address comments
# Conflicts:
# accounts/abi/abi.go
# accounts/abi/bind/backends/simulated.go
# cmd/geth/retesteth.go
# core/state/snapshot/difflayer_test.go
# core/state/snapshot/disklayer_test.go
# core/state/snapshot/iterator_test.go
# core/state_processor.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/instructions.go
# core/vm/jump_table.go
# eth/api_tracer.go
# internal/ethapi/api.go
# les/odr_test.go
# light/odr_test.go
# tests/state_test_util.go
* core/vm: improve jumpdest lookup
* Use uint256 in EVM implementation (kudos to Pawel Bylica)
* Safety precaution in opMulmod
Co-authored-by: Martin Holst Swende <martin@swende.se>
* introduce PlainStateReader with fallbacks
* no 10.000 changes in tests
* even less iterations
* remove even more iterations
* add `go run ./cmd/geth --syncmode staged --plainstate` flag
* fix serialization calls
* make a more sensible file default
doesn’t affect anything, because this flag is always overriden when parsing CLI. but still.
* Splitting up into interations
* Some fixes
* Fixes
* Fix linter
* Fix linter
* Improvements after review
* Add more diagnostics
* Fix and better printing
* 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>
* GetCurrentAccountIncarnation
* Incarnation should be read by StateReader, not StateWriter
* Use GetHistoricalAccountIncarnation in DbState
* RemoteReader ReadAccountIncarnation
* Handle the case where a contract has self-destructed, then Eth sent to it, then it got recreated again