aboutsummaryrefslogtreecommitdiffstats
path: root/trie/proof.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-5/+5
|
* trie: go fmt packagePéter Szilágyi2018-11-161-1/+1
|
* trie: return hasher to pool (#18116)Łukasz Kurowski2018-11-161-0/+2
| | | | | | * trie: return hasher to pool * trie: minor code formatting fix
* trie: fixes to comply with golint (#16771)kiel barry2018-05-221-5/+5
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-19/+28
| | | This commit reduces database I/O by not writing every state trie to disk.
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-241-29/+24
| | | | | | | | | | | | | | | | | | This PR implements the new LES protocol version extensions: * new and more efficient Merkle proofs reply format (when replying to a multiple Merkle proofs request, we just send a single set of trie nodes containing all necessary nodes) * BBT (BloomBitsTrie) works similarly to the existing CHT and contains the bloombits search data to speed up log searches * GetTxStatusMsg returns the inclusion position or the pending/queued/unknown state of a transaction referenced by hash * an optional signature of new block data (number/hash/td) can be included in AnnounceMsg to provide an option for "very light clients" (mobile/embedded devices) to skip expensive Ethash check and accept multiple signatures of somewhat trusted servers (still a lot better than trusting a single server completely and retrieving everything through RPC). The new client mode is not implemented in this PR, just the protocol extension.
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-2/+3
| | | | | | | | | 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: more node iterator improvements (#14615)Felix Lange2017-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ethdb: remove Set Set deadlocks immediately and isn't part of the Database interface. * trie: add Err to Iterator This is useful for testing because the underlying NodeIterator doesn't need to be kept in a separate variable just to get the error. * trie: add LeafKey to iterator, panic when not at leaf LeafKey is useful for callers that can't interpret Path. * trie: retry failed seek/peek in iterator Next Instead of failing iteration irrecoverably, make it so Next retries the pending seek or peek every time. Smaller changes in this commit make this easier to test: * The iterator previously returned from Next on encountering a hash node. This caused it to visit the same path twice. * Path returned nibbles with terminator symbol for valueNode attached to fullNode, but removed it for valueNode attached to shortNode. Now the terminator is always present. This makes Path unique to each node and simplifies Leaf. * trie: add Path to MissingNodeError The light client trie iterator needs to know the path of the node that's missing so it can retrieve a proof for it. NodeIterator.Path is not sufficient because it is updated when the node is resolved and actually visited by the iterator. Also remove unused fields. They were added a long time ago before we knew which fields would be needed for the light client.
* 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.
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-5/+2
|
* 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-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-5/+3
|
* core, core/state, trie: enterprise hand-tuned multi-level cachingPéter Szilágyi2016-05-261-4/+4
|
* all: update license informationFelix Lange2016-04-151-0/+16
|
* light: implemented odr-capable trie and state structureszsfelfoldi2015-12-171-9/+15
|
* trie: added error handlingzsfelfoldi2015-12-011-1/+10
| | | | Created alternate versions of Trie and SecureTrie functions that can return a MissingNodeError (used by ODR services)
* trie: add merkle proof functionsFelix Lange2015-09-231-0/+122