Igor Mandrigin
fd77eaf86a
Staged Sync: Execution phase should use "plain state" ( #548 )
...
* 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.
2020-05-15 08:52:45 +01:00
Andrew Ashikhmin
39a37f2dd9
Don't check root in accountsEqual, that's covered by storageChanged anyway. (Fixing checkChangeSets for contract 0xe2942418b2d87a1d88cce66d0b11c7ef16a72971 in block 1467584.) ( #519 )
2020-05-06 09:58:12 +01:00
Andrew Ashikhmin
7b40cbb6fa
Incarnation should be read by StateReader, not StateWriter ( #506 )
...
* 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
2020-05-02 19:00:42 +01:00
ledgerwatch
e1cda82eb8
Fix canonical hashes in staged bodies sync ( #487 )
...
* Fix canonical hashes
Remove changes in hack.go
* incarnations and db_state_reader
* Fix compilation
* Fix linter
* Test fixes
2020-04-26 22:58:26 +01:00
Igor Mandrigin
acbf8bcbdf
Enable thin history by default ( #456 )
...
* Enable thin history by default
* remove thin history flags
* remove from tests
* fix test compile error
* test fixups
* fix more stuff
2020-04-15 12:33:22 +03:00
ledgerwatch
ad64ae2085
[THIN_HISTORY] Decouple changesets and history from ethdb.Database (mutation/bolt_db/badger_db) ( #432 )
...
* Prepare for refactoring
* Decoupling
* Further cleanup of mutation
* Further cleanup of mutation
* Remove some tests (temporarily)
* Fix linter
* Fix lint
* Fix lint
* Fix lint
* Fix lint
* Fix lint
* Fix lint
* Recover mutation_test cases
* Fix lint
* Fix WalkAsOf test
* Fix lint
* Fix TODO, linter
* Fix lint
* Fix lint
* Fix tests for THIN_HISTORY
* Fix lint
* Fix lint
* Reduce visibility of DecodeStorage
* Revert "Reduce visibility of DecodeStorage"
This reverts commit 2e11e16ea095b75a62cdddb77b9477eabc259e67.
2020-04-09 18:23:29 +01:00
Andrew Ashikhmin
82b80c2ebe
Thin history: Fix an error in mutation.getNoLock ( #409 )
...
* CheckChangeSets and thin history
* small code de-duplication
* small code clean-up
* Fix an error in mutation.getNoLock
* CheckChangeSets: truly make historyfile = chaindata by default
2020-03-26 21:52:22 +00:00
Andrew Ashikhmin
aeed1657c7
Issue #340 : Re-execute all historical transaction in read-only mode and check ChangeSets ( #388 )
...
* Clean up code duplication between IntraBlockState's FinalizeTx & CommitBlock
* checkChangeSets command
* linter
* First attempt at checking account changes
* Reuse runBlock in CheckChangeSets
* linter
* linter
* Optionally include no-changes in the ChangeSets
* linter
* Detect storage changes for account change sets
* Fix post-merge compilation errors
* Use database format compatible with !debug.IsThinHistory()
* PrintChangedAccounts in ChangeSetWriter
* Avoid out-of-bounds access
* Storage changes
* hack FirstContractIncarnation
* Call ChangeSetWriter only once per block
2020-03-11 16:54:09 +01:00