aboutsummaryrefslogtreecommitdiffstats
path: root/trie/hasher.go
Commit message (Collapse)AuthorAgeFilesLines
* rlp, trie, contracts, compression, consensus: improve comments (#14580)S. Matthew English2017-06-121-1/+1
|
* trie: rework and document key encodingFelix Lange2017-04-251-1/+1
| | | | | 'encode' and 'decode' are meaningless because the code deals with three encodings. Document the encodings and give a name to each one.
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* trie: add metric to track cache unloading (#3175)Felix Lange2016-10-191-0/+1
|
* trie: ensure dirty flag is unset for embedded child nodesFelix Lange2016-10-181-17/+14
| | | | This was caught by the new invariant check.
* trie: ensure resolved nodes stay loadedFelix Lange2016-10-181-1/+1
| | | | | | | | Commit 40cdcf1183 broke the optimisation which kept nodes resolved during Get in the trie. The decoder assigned cache generation 0 unconditionally, causing resolved nodes to get flushed on Commit. This commit fixes it and adds two tests.
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-151-30/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trie: store nodes as pointers This avoids memory copies when unwrapping node interface values. name old time/op new time/op delta Get 388ns ± 8% 215ns ± 2% -44.56% (p=0.000 n=15+15) GetDB 363ns ± 3% 202ns ± 2% -44.21% (p=0.000 n=15+15) UpdateBE 1.57µs ± 2% 1.29µs ± 3% -17.80% (p=0.000 n=13+15) UpdateLE 1.92µs ± 2% 1.61µs ± 2% -16.25% (p=0.000 n=14+14) HashBE 2.16µs ± 6% 2.18µs ± 6% ~ (p=0.436 n=15+15) HashLE 7.43µs ± 3% 7.21µs ± 3% -2.96% (p=0.000 n=15+13) * trie: close temporary databases in GetDB benchmark * trie: don't keep []byte from DB load around Nodes decoded from a DB load kept hashes and values as sub-slices of the DB value. This can be a problem because loading from leveldb often returns []byte with a cap that's larger than necessary, increasing memory usage. * trie: unload old cached nodes * trie, core/state: use cache unloading for account trie * trie: use explicit private flags (fixes Go 1.5 reflection issue). * trie: fixup cachegen overflow at request of nick * core/state: rename journal size constant
* core, trie: replace state caches with trie journalFelix Lange2016-09-281-0/+157