Skip to content

Releases: ethereumjs/ethereumjs-monorepo

@ethereumjs/statemanager v2.2.1

08 Feb 17:18
ff43fc1
Compare
Choose a tag to compare
  • Hotfix release adding a missing debug dependency to the @ethereumjs/trie package (dependency), PR #3271

@ethereumjs/statemanager v2.2.0

08 Feb 16:18
b258fd9
Compare
Choose a tag to compare

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

@ethereumjs/evm v2.2.1

08 Feb 19:12
11f3a9c
Compare
Choose a tag to compare
  • Hotfix release moving the @ethereumjs/verkle dependency for @ethereumjs/statemanager from a peer dependency to the main dependencis (note that this decision might be temporary)

@ethereumjs/evm v2.2.0

08 Feb 17:32
ff43fc1
Compare
Choose a tag to compare

Dencun Hardfork Support

While all EIPs contained in the upcoming Dencun hardfork run pretty much stable within the EthereumJS libraries for quite some time, this is the first release round which puts all this in the official space and removes "experimental" labeling preparing for an imminent Dencun launch on the last testnets (Holesky) and mainnet activation! 🎉

Dencun hardfork on the execution side is called Cancun and can be activated within the EthereumJS libraries (default hardfork still Shanghai) with a following common instance:

import * as kzg from 'c-kzg'
import { Common, Chain, Hardfork } from '@ethereumjs/common'
import { initKZG } from '@ethereumjs/util'

initKZG(kzg, __dirname + '/../../client/src/trustedSetups/official.txt')
const common = new Common({
  chain: Chain.Mainnet,
  hardfork: Hardfork.Cancun,
  customCrypto: { kzg: kzg },
})
console.log(common.customCrypto.kzg) // Should print the initialized KZG interface

Note that the kzg initialization slightly changed from previous experimental releases and a custom KZG instance is now passed to Common by using the customCrypto parameter, see PR #3262.

At the moment using the Node.js bindings for the c-kzg library is the only option to get KZG related functionality to work, note that this solution is not browser compatible. We are currently working on a WASM build of that respective library. Let us know on the urgency of this task! 😆

While EIP-4844 - activating shard blob transactions - is for sure the most prominent EIP from this hardfork, enabling better scaling for the Ethereum ecosystem by providing cheaper block space for L2s, there are in total 6 EIPs contained in the Dencun hardfork. The following is an overview of which EthereumJS libraries mainly implement the various EIPs:

  • EIP-1153: Transient storage opcodes (@ethereumjs/evm)
  • EIP-4788: Beacon block root in the EVM (@ethereumjs/block, @ethereumjs/evm, @ethereumjs/vm)
  • EIP-4844: Shard Blob Transactions (@ethereumjs/tx, @ethereumjs/block, @ethereumjs/evm)
  • EIP-5656: MCOPY - Memory copying instruction (@ethereumjs/evm)
  • EIP-6780: SELFDESTRUCT only in same transaction (@ethereumjs/vm)
  • EIP-7516: BLOBBASEFEE opcode (@ethereumjs/block, @ethereumjs/evm)

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

  • Fix modexp precompile edge cases (❤️ to @last-las for reporting!), PR #3169
  • Fix bug in custom precompile functionality (❤️ to @roninjin10 for the contribution!), PR #3158
  • Fix Blake2F gas + output calculation on non-zero aligned inputs (❤️ to @kchojn for the contribution!), PR #3201
  • Ensure modexp right-pads input data (❤️ to @last-las for reporting!), PR #3206
  • Fix CALL(CODE) gas (❤️ to @last-las for reporting!), PR #3195
  • Add runCallOpts and runCodeOpts to evm exports, PR #3172
  • Add test for ecrecover precompile, PR #3184
  • Additional tests for the ripemd160 and blake2f precompiles, PR #3189

@ethereumjs/ethash v3.0.2

08 Feb 17:24
ff43fc1
Compare
Choose a tag to compare

Maintenance release with dependency updates, see PR #3261

@ethereumjs/devp2p v6.1.1

08 Feb 17:16
ff43fc1
Compare
Choose a tag to compare
  • Hotfix release adding a missing debug dependency to the @ethereumjs/trie package (dependency), PR #3271

@ethereumjs/devp2p v6.1.0

08 Feb 16:12
b258fd9
Compare
Choose a tag to compare

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

  • Debug log optimizations, PR #3165
  • Dependency updates, PR #3212

@ethereumjs/common v4.2.0

08 Feb 16:01
b258fd9
Compare
Choose a tag to compare

Dencun Hardfork Support

While all EIPs contained in the upcoming Dencun hardfork run pretty much stable within the EthereumJS libraries for quite some time, this is the first release round which puts all this in the official space and removes "experimental" labeling preparing for an imminent Dencun launch on the last testnets (Holesky) and mainnet activation! 🎉

Dencun hardfork on the execution side is called Cancun and can be activated within the EthereumJS libraries (default hardfork still Shanghai) with a following common instance:

import * as kzg from 'c-kzg'
import { Common, Chain, Hardfork } from '@ethereumjs/common'
import { initKZG } from '@ethereumjs/util'

initKZG(kzg, __dirname + '/../../client/src/trustedSetups/official.txt')
const common = new Common({
  chain: Chain.Mainnet,
  hardfork: Hardfork.Cancun,
  customCrypto: { kzg: kzg },
})
console.log(common.customCrypto.kzg) // Should print the initialized KZG interface

Note that the kzg initialization slightly changed from previous experimental releases and a custom KZG instance is now passed to Common by using the customCrypto parameter, see PR #3262.

At the moment using the Node.js bindings for the c-kzg library is the only option to get KZG related functionality to work, note that this solution is not browser compatible. We are currently working on a WASM build of that respective library. Let us know on the urgency of this task! 😆

While EIP-4844 - activating shard blob transactions - is for sure the most prominent EIP from this hardfork, enabling better scaling for the Ethereum ecosystem by providing cheaper block space for L2s, there are in total 6 EIPs contained in the Dencun hardfork. The following is an overview of which EthereumJS libraries mainly implement the various EIPs:

  • EIP-1153: Transient storage opcodes (@ethereumjs/evm)
  • EIP-4788: Beacon block root in the EVM (@ethereumjs/block, @ethereumjs/evm, @ethereumjs/vm)
  • EIP-4844: Shard Blob Transactions (@ethereumjs/tx, @ethereumjs/block, @ethereumjs/evm)
  • EIP-5656: MCOPY - Memory copying instruction (@ethereumjs/evm)
  • EIP-6780: SELFDESTRUCT only in same transaction (@ethereumjs/vm)
  • EIP-7516: BLOBBASEFEE opcode (@ethereumjs/block, @ethereumjs/evm)

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.

The following is an example using the @polkadot/wasm-crypto package:

import { keccak256, waitReady } from '@polkadot/wasm-crypto'
import { Chain, Common } from '@ethereumjs/common'
import { Block } from '@ethereumjs/block'

const main = async () => {
  // @polkadot/wasm-crypto specific initialization
  await waitReady()

  const common = new Common({ chain: Chain.Mainnet, customCrypto: { keccak256 } })
  const block = Block.fromBlockData({}, { common })

  // Method invocations within EthereumJS library instantiations where the common
  // instance above is passed will now use the custom keccak256 implementation
  console.log(block.hash())
}

main()

We internally use this new feature for various crypto overwrites within the client package, see Client cli.ts implementation for guidance on how to setup with other crypto primitives (e.g. ECDSA signature verification).

Note: replacing native JS crypto primitives with WASM based libraries comes with new security assumptions (additional external dependencies, unauditability of WASM code). It is therefore recommended to evaluate your usage context before applying!

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

  • Schedule Cancun for testnets, PR #3211
  • Internalize crc dependency (security), PR #3224
  • Added Hardfork.Prague as a new hardfork (experimental), PR #3139

@ethereumjs/client v0.10.0

08 Feb 19:17
11f3a9c
Compare
Choose a tag to compare

This client release now comes with official Dencun hardfork support 🎉 and by default uses WASM for crypto primitives for faster block execution times.

Dencun Hardfork Support

This release now officially supports networks running with or switching to the Dencun hardfork ruleset by including the finalized underlying EthereumJS libraries for the various functionality parts (EVM, Block and Tx libraries).

While EIP-4844 - activating shard blob transactions - is for sure the most prominent EIP from this hardfork, enabling better scaling for the Ethereum ecosystem by providing cheaper block space for L2s, there are in total 6 EIPs contained in the Dencun hardfork. The following is an overview of EIPs now supported along a Dencun switch (called Cancun for the execution switch part):

  • EIP-1153: Transient storage opcodes (@ethereumjs/evm)
  • EIP-4788: Beacon block root in the EVM (@ethereumjs/block, @ethereumjs/evm, @ethereumjs/vm)
  • EIP-4844: Shard Blob Transactions (@ethereumjs/tx, @ethereumjs/block, @ethereumjs/evm)
  • EIP-5656: MCOPY - Memory copying instruction (@ethereumjs/evm)
  • EIP-6780: SELFDESTRUCT only in same transaction (@ethereumjs/vm)
  • EIP-7516: BLOBBASEFEE opcode (@ethereumjs/block, @ethereumjs/evm)

Note that while HF timestamp switches for all testnets are included, a mainnet HF timestamp has not yet been set in this release.

WASM Crypto Support

With this release the client uses WASM by default for all crypto related operations like hashing or signature verification, see PR #3192. As a WASM crypto library @polkadot/wasm-crypto is being used and WASM comes into play in the EVM for hashing opcodes and precompiles, block and tx hashing and ECDSA signature verfication down to trie key hashing and all hashing and signature functionality in the devp2p layer.

This makes up for a significantly lighter and sped-up client experience regarding both block execution and sync times.

Note that this functionality can be disabled by using the --useJsCrypto flag.

Stability Fixes

  • Patch fcu skeleton blockfill process to avoid chain reset, PR #3137
  • Fix bug in tx pool during handling NewPooledTransactionHashes message, PR #3156
  • Improved receipt reorg logic, PR #3146
  • Block fetcher stabilizations, PR #3240

Other Changes

  • Fix RPC debug inconsistencies, PR #3125
  • Better typing/refactoring for devp2p ETH method binding, PR #3164
  • Replace superagent with direct RPC calls in RPC tests, PR #3173
  • testdouble to vi refactoring, PR #3182
  • Fetcher Small Bugfixes and Log Improvements, PR #3024

@ethereumjs/block v5.1.1

08 Feb 17:20
ff43fc1
Compare
Choose a tag to compare
  • Hotfix release adding a missing debug dependency to the @ethereumjs/trie package (dependency), PR #3271