Skip to content

@ethereumjs/vm v5.6.0

Choose a tag to compare
@holgerd77 holgerd77 released this 09 Nov 09:18
· 1674 commits to master since this release

ArrowGlacier HF Support

This release adds support for the upcoming ArrowGlacier HF (see PR #1527) targeted for December 2021. The only included EIP is EIP-4345 which delays the difficulty bomb to June/July 2022.

Please note that for backwards-compatibility reasons the associated Common is still instantiated with istanbul by default.

An ArrowGlacier VM can be instantiated with:

import VM from '@ethereumjs/vm'
import Common, { Chain, Hardfork } from '@ethereumjs/common'

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.ArrowGlacier })
const vm = new VM({ common })

Additional Error Context for Error Messages

This release extends the text of the error messages in the library with some consistent context information (see PR #1540), here an example for illustration:


invalid receiptTrie


invalid receiptTrie (vm hf=berlin -> block number=1 hash=0x8e368301586b53e30c58dd4734de4b3d6e17db837eb3fbde8cc0036bc7752d9a hf=berlin baseFeePerGas=none txs=1 uncles=0)

The extended errors give substantial more object and chain context and should ease debugging.

Potentially breaking: Attention! If you do react on errors in your code and do exact errror matching (error.message === 'invalid transaction trie') things will break. Please make sure to do error comparisons with something like error.message.includes('invalid transaction trie') instead. This should generally be the pattern used for all error message comparisions and is assured to be future proof on all error messages (we won't change the core text in non-breaking releases).

Other Changes

  • Fixed accountExists bug in pre-Spurious Dragon HFs, PR #1516 and PR #1524
  • New putBlockIntoBlockchain option for BlockBuilder (default: true), PR #1530
  • Extended StateManager.generateGenesis() to also allow for creating genesis blocks with contract accounts, PR #1530 and PR #1541
  • Use RLP library exposed by ethereumjs-util dependency (deduplication), PR #1549