aboutsummaryrefslogtreecommitdiffstats
path: root/light/trie.go
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-6/+6
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-6/+6
|
* light: odrTrie tryUpdate should use update (#18107)Sheldon2018-11-261-1/+1
| | | | | TryUpdate does not call t.trie.TryUpdate(key, value) and calls t.trie.TryDelete instead. The update operation simply deletes the corresponding entry, though it could retrieve later by odr. However, it adds further network overhead.
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-4/+14
| | | This commit reduces database I/O by not writing every state trie to disk.
* contracts/release: do not print error log if les backend has no peersZsolt Felfoldi2017-12-181-1/+1
|
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-67/+184
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* trie: remove Key in MissingNodeErrorFelix Lange2017-04-181-11/+4
| | | | | | The key was constructed from nibbles, which isn't possible for all nodes. Remove the only use of Key in LightTrie by always retrying with the original key that was looked up.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+2
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* light: light chain, VM env and tx poolZsolt Felfoldi2016-11-091-13/+12
|
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* light: implemented odr-capable trie and state structureszsfelfoldi2015-12-171-0/+123