Commit graph

12 commits

Author SHA1 Message Date
Daniel Liu
d52bfaa5ca
all: introduce trie owner notion #24750 (#1090)
* cmd, core/state, light, trie, eth: add trie owner notion

* all: refactor

* tests: fix goimports

* core/state/snapshot: fix ineffasigns

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-08-22 16:37:39 +08:00
Daniel Liu
ea459d68a3
trie: fix spelling mistakes (#1122) 2025-06-20 16:29:57 +08:00
Daniel Liu
5328a637c0 trie: use unified emptyRootHash and emptyCodeHash (#26718) 2025-04-07 16:44:32 +08:00
Daniel Liu
c8b39cabae trie: faster trie node encoding (#24126) 2025-04-07 16:44:32 +08:00
Paweł Bylica
4df7801137 trie: simplify StackTrie implementation (#23950)
Trim the search key from head as it's being pushed deeper into the trie. Previously the search key was never modified but each node kept information how to slice and compare it in keyOffset. Now the keyOffset is not needed as this information is included in the slice of the search key. This way the keyOffset can be removed and key manipulation
simplified.
2025-04-07 16:44:32 +08:00
Martin Holst Swende
e3efb24444 trie: make stacktrie support binary marshal/unmarshal (#22685) 2025-04-07 16:44:32 +08:00
Martin Holst Swende
a8bd860e2f trie: make stacktrie not mutate input values (#22673)
The stacktrie is a bit un-untuitive, API-wise: since it mutates input values.
Such behaviour is dangerous, and easy to get wrong if the calling code 'forgets' this quirk. The behaviour is fixed by this PR, so that the input values are not modified by the stacktrie.

Note: just as with the Trie, the stacktrie still references the live input objects, so it's still _not_ safe to mutate the values form the callsite.
2025-04-07 16:44:32 +08:00
Daniel Liu
dcea73039c trie: bloom-filter based pruning mechanism (#21724) 2025-04-07 16:44:32 +08:00
Martin Holst Swende
f7fd4af087 trie: stacktrie fixes (#21799)
* trie: fix error in stacktrie not committing small roots

* trie: improved tests

* trie: fix error in stacktrie with small nodes

* trie: add (skipped) testcase for stacktrie

* trie: fix docs in stacktrie
2025-04-07 16:44:32 +08:00
Martin Holst Swende
87270e3988 trie: fix flaw in stacktrie pool reuse (#21699) 2025-04-07 16:44:32 +08:00
gary rong
1424987768 trie: polish commit function (#21692)
* trie: polish commit function

* trie: fix typo
2025-04-07 16:44:32 +08:00
Daniel Liu
54f73e471f trie: Derivesha with stacktrie (#21407) 2025-04-07 16:44:32 +08:00