Mgr schedule iterator (#566)
* 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
Showing
- cmd/hack/hack.go 267 additions, 54 deletionscmd/hack/hack.go
- cmd/restapi/apis/intermediate_data_len_api.go 1 addition, 1 deletioncmd/restapi/apis/intermediate_data_len_api.go
- common/dbutils/bucket.go 2 additions, 2 deletionscommon/dbutils/bucket.go
- common/dbutils/composite_keys.go 19 additions, 1 deletioncommon/dbutils/composite_keys.go
- common/dbutils/helper.go 31 additions, 20 deletionscommon/dbutils/helper.go
- core/state/database.go 202 additions, 0 deletionscore/state/database.go
- core/state/intermediate_hashes.go 6 additions, 7 deletionscore/state/intermediate_hashes.go
- eth/backend.go 0 additions, 1 deletioneth/backend.go
- eth/downloader/modes.go 10 additions, 2 deletionseth/downloader/modes.go
- eth/handler.go 23 additions, 9 deletionseth/handler.go
- eth/mgr.go 76 additions, 0 deletionseth/mgr.go
- eth/mgr/mgr.go 48 additions, 86 deletionseth/mgr/mgr.go
- eth/mgr/mgr_test.go 6 additions, 21 deletionseth/mgr/mgr_test.go
- ethdb/bolt_db.go 4 additions, 0 deletionsethdb/bolt_db.go
- internal/debug/flags.go 13 additions, 15 deletionsinternal/debug/flags.go
- internal/ethapi/get_proof.go 1 addition, 1 deletioninternal/ethapi/get_proof.go
- trie/flatdb_sub_trie_loader.go 28 additions, 42 deletionstrie/flatdb_sub_trie_loader.go
- trie/flatdb_sub_trie_loader_test.go 8 additions, 8 deletionstrie/flatdb_sub_trie_loader_test.go
- trie/gen_struct_step.go 3 additions, 3 deletionstrie/gen_struct_step.go
- trie/hashbuilder.go 45 additions, 17 deletionstrie/hashbuilder.go
Loading
Please register or sign in to comment