reintroduces performance improvement previously removed while fixing upstream geth merge
// note: we are passing data.Root as stateRoot here, to skip the check for stateRoot existence in trie.newTrieReader,
// we already check that when opening state trie and reading the account node
trieID := trie.StorageTrieID(data.Root, key, data.Root)
storageTr, err := trie.NewStateTrie(trieID, sdb.TrieDB())
enables cleans cache in triedb used for traversing storage tries in dumpRawTrieDescendants - when opening storage trie with trie.NewStateTrie (using the trick above), a node with hash equal data.Root is read twice from triedb (once in when getting a trie.Reader, then when reading the node). Caching the node should save some of KeyValueStore reads.
adds pruner.Config.Threads option
adds extra progress logging when a thread traversing storage trie for given account takes longer then 5 minutes
part of NIT-2541
This PR:
reintroduces performance improvement previously removed while fixing upstream geth merge
enables cleans cache in triedb used for traversing storage tries in
dumpRawTrieDescendants
- when opening storage trie withtrie.NewStateTrie
(using the trick above), a node with hash equaldata.Root
is read twice from triedb (once in when getting atrie.Reader
, then when reading the node). Caching the node should save some of KeyValueStore reads.adds
pruner.Config.Threads
optionadds extra progress logging when a thread traversing storage trie for given account takes longer then 5 minutes