@ethereumjs/trie v6.0.1
holgerd77
released this
02 Nov 08:54
·
425 commits
to master
since this release
Native Support for Uint8Array Values in DBs
The trie library now allows to store values being passed as native Uint8Array
values instead of strings, see PR #3067.
This leads to a significant performance increase when dealing with larger state DBs and it is recommended to activate for new DBs by using the new valueEncoding
option.
Attention!: Switching value encoding by using this new option is not compatible with existing databases.
Debug Logging
The trie library now allows for using debug logging with the DEBUG=ethjs,trie:*
flag on the command line as already being implemented in other EthereumJS libraries, see PR #3019.
See Debugging README section for usage instructions. This comes in pretty handy if in-depth trie analysis with step-by-step following of path reads is needed.
Bugfixes
- Fix empty-root check, PR #3001
Other Changes
- New parameter
skipKeyTransform
(default:false
) for Trieput()
,del()
andbatch()
method to allow to pass in already hashed keys, PR #2950 - New
keyPrefix
option tries to store node keys with a static prefix (used upstream in thestatemanager
package to speed to storage trie reads), PR #3023 - Peformance:
findPath()
optimizations, PR #3066 - Make
null
available as type option forput()
method value, PR #3020 - Allow partial trie options for
shallowCopy()
(e.g. for a more flexible cache configuration for the trie copy), PR #3063 - Use
lock
class from@ethereumjs/util
, PR #3109 - Improve util types and handling, PR #2951