@ethereumjs/statemanager v2.2.0
StateManager Proof Instantiation
Coming with the work from PR #3186 it is now possible to instantiate a new state manager from an EIP-1186 conformant proof with the new DefaultStateManager.fromProof()
static constructor.
Together with the existing createProof()
functionality it is now extremely handy to create proofs on a very high (in the sense of: abstract) API level for account and storage data without having to deal with the underlying trie proof functionality.
See trie README for a comprehensive example on this.
EthersStateManager -> RPCStateManager
This release replaces the specific EthersStateManager
, which can be used to RPC-retrieve state data for (still somewhat experimental) on-chain block execution, with a more generic RPCStateManager
(which still can be used well in conjunction with Ethers, dependency has been removed though), see PR #3167.
This new RPCStateManager
can now be used with any type of JSON-RPC provider that supports the eth
namespace (e.g. an Infura endpoint). See README for an example on how to use the extended provider capabilities.
Note: we have decided to plainly rename, since it seemed unlikely to us that this part of the code base is already hard-wired into production code. If this causes problems for you let us know (Discord).
WASM Crypto Support
With this release round there is a new way to replace the native JS crypto primitives used within the EthereumJS ecosystem by custom/other implementations in a controlled fashion, see PR #3192.
This can e.g. be used to replace time-consuming primitives like the commonly used keccak256
hash function with a more performant WASM based implementation, see @ethereumjs/common
README for some detailed guidance on how to use.
Self-Contained (and Working 🙂) README Examples
All code examples in EthereumJS
monorepo library README files are now self-contained and can be executed "out of the box" by simply copying them over and running "as is", see tracking issue #3234 for an overview. Additionally all examples can now be found in the respective library examples folder (in fact the README examples are now auto-embedded from over there). As a nice side effect all examples are now run in CI on new PRs and so do not risk to get outdated or broken over time.
Other Changes
- Export
originalStorageCache
to ease implementation of own state managers, PR #3161 - This release integrates a new
StatelessVerkleStateManager
. This code is still very experimental and so do not tell anyone 😋, but if you dug so deep and found this note here you are likely eligible for early testing and experimentation, PRs #3139 and #3179