aboutsummaryrefslogtreecommitdiffstats
path: root/trie/node.go
Commit message (Collapse)AuthorAgeFilesLines
* p2p, swarm, trie: avoid copying slices in loops (#17265)Oleg Kovalov2018-08-071-2/+2
|
* trie: cache collapsed tries node, not rlp blobs (#16876)Péter Szilágyi2018-06-211-1/+14
| | | | | | | | | | | | The current trie memory database/cache that we do pruning on stores trie nodes as binary rlp encoded blobs, and also stores the node relationships/references for GC purposes. However, most of the trie nodes (everything apart from a value node) is in essence just a collection of references. This PR switches out the RLP encoded trie blobs with the collapsed-but-not-serialized trie nodes. This permits most of the references to be recovered from within the node data structure, avoiding the need to track them a second time (expensive memory wise).
* trie: remove unused `buf` parameter (#16583)xincaosu2018-04-271-4/+4
|
* trie: rework and document key encodingFelix Lange2017-04-251-2/+2
| | | | | 'encode' and 'decode' are meaningless because the code deals with three encodings. Document the encodings and give a name to each one.
* trie: ensure resolved nodes stay loadedFelix Lange2016-10-181-13/+13
| | | | | | | | 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-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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, core/state, trie: enterprise hand-tuned multi-level cachingPéter Szilágyi2016-05-261-21/+39
|
* core, trie: new trieFelix Lange2015-09-231-24/+150
|
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* trie: dirty trackingJeffrey Wilcke2015-07-041-0/+1
|
* Fixed a copy issue in the trie which could cause a consensus failureobscuren2015-02-031-2/+6
|
* default values removedobscuren2015-01-301-1/+1
|
* Moved ptrie => trie. Removed old trieobscuren2015-01-081-0/+40