@ethereumjs/trie v5.0.0-beta.3
Pre-release
Pre-release
holgerd77
released this
11 Aug 15:35
·
1350 commits
to master
since this release
Beta 3 release for the upcoming breaking release round on the EthereumJS monorepo libraries, see the Beta 1 release notes for the main long change set description as well as the Beta 2 release notes for notes on some additional changes (CHANGELOG).
Root Hash Persistance
The trie library now comes with a new constructor option persistRoot
which is disabled by default but allows to persist state root updates along write operations directly in the DB and therefore omits the need to manually set to a new state root, see PR #2071 and PR #2123, thanks to @faustbrian for the contribution! ❤️
To activate root hash persistance you can set the persistRoot
option on instantiation::
import { Trie, LevelDB } from '@ethereumjs/trie'
import { Level } from 'level'
const trie = new Trie({ db: new LevelDB(new Level('MY_TRIE_DB_LOCATION')), persistRoot: true })
Other Changes
- Fix: Pass down a custom hash function for hashing on trie copies, PR #2068