Commit Graph

17 Commits

Author SHA1 Message Date
Marius van der Wijden 5976e58415
trie: reduce allocs in recHash (#27770) 2023-08-18 22:41:19 +02:00
Guillaume Ballet 6c8310ebb4
trie: use stacktrie for Derivesha operation (#21407)
core/types: use stacktrie for derivesha

trie: add stacktrie file

trie: fix linter

core/types: use stacktrie for derivesha

rebased: adapt stacktrie to the newer version of DeriveSha

Co-authored-by: Martin Holst Swende <martin@swende.se>

More linter fixes

review feedback: no key offset for nodes converted to hashes

trie: use EncodeRLP for full nodes

core/types: insert txs in order in derivesha

trie: tests for derivesha with stacktrie

trie: make stacktrie use pooled hashers

trie: make stacktrie reuse tmp slice space

trie: minor polishes on stacktrie

trie/stacktrie: less rlp dancing

core/types: explain the contorsions in DeriveSha

ci: fix goimport errors

trie: clear mem on subtrie hashing

squashme: linter fix

stracktrie: use pooling, less allocs (#3)

trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP

Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place.

Co-authored-by: Martin Holst Swende <martin@swende.se>

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-09-29 17:38:13 +02:00
Martin Holst Swende 4f85c2b88b
trie: fix error in node decoding (#19111) 2019-02-16 16:16:12 +01:00
Sarlor ea06da0892 trie: avoid unnecessary slicing on shortnode decoding (#16917)
optimization code
2018-06-07 11:48:36 +03:00
Wenbiao Zheng 38c7eb0f26 trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)
This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.

In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
2018-05-29 17:48:43 +02:00
Felix Lange f958d7d482 trie: rework and document key encoding
'encode' and 'decode' are meaningless because the code deals with three
encodings. Document the encodings and give a name to each one.
2017-04-25 02:14:31 +02:00
Felix Lange 35a7dcb162 all: gofmt -w -s 2017-01-06 15:52:03 +01:00
zsfelfoldi ef422ee1e1 light: implemented odr-capable trie and state structures 2015-12-17 16:07:54 +01:00
Felix Lange 565d9f2306 core, trie: new trie 2015-09-22 22:53:49 +02:00
Ethan Buchman 46c9594081 trie: run codec tests, add benchmarks, faster 2015-08-06 14:04:16 -04:00
Ethan Buchman c1d516546d faster hex-prefix codec and string -> []byte 2015-08-06 03:17:59 -04:00
Felix Lange bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange 3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
obscuren 705cf6113d debug err removed 2015-01-29 23:18:46 +01:00
obscuren 9022f5034f default values removed 2015-01-29 23:17:43 +01:00
obscuren af34749a6b ethtrie => trie 2014-10-31 14:45:03 +01:00