Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency @ethereumjs/evm to v3 #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 19, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@ethereumjs/evm (source) 1.4.0 -> 3.1.1 age adoption passing confidence

Release Notes

ethereumjs/ethereumjs-monorepo (@​ethereumjs/evm)

v3.1.1

Compare Source

v3.1.0: @​ethereumjs/common v3.1.0

Compare Source

Functional Shanghai Support

This release fully supports all EIPs included in the Shanghai feature hardfork scheduled for early 2023. Note that a timestamp to trigger the Shanghai fork update is only added for the sepolia testnet and not yet for goerli or mainnet.

You can instantiate a Shanghai-enabled Common instance with:

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

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai })
Changes
  • Added final Shanghai EIPs to HF file, PR #​2459
  • Added timestamp and forkHash for the Sepolia Shanghai HF, PR #​2527
  • Updated forkHash calculation for timebased hardforks, PR #​2458
  • Updated setForkHashes() to update timebased hardfork forkHash values, PR #​2461
Experimental EIP-4844 Shard Blob Transactions Support

This release supports an experimental version of EIP-4844 Shard Blob Transactions as being specified in the 01d3209 EIP version from February 8, 2023 and deployed along eip4844-devnet-4 (January 2023), see PR #​2349.

You can instantiate an EIP-4844 enabled Common instance with:

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

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
Other Changes and Bugfixes
  • Added eips option to Common.fromGethGenesis() constructor options, PR #​2469
  • Set alternative default HF in Common.fromGethGenesis() if mergeForkBlock not present, PR #​2414
  • Fixed some minor custom chain bugs, PR #​2448
  • Allow genesis to be post merge in Common.fromGethGenesis(), PR #​2530

v3.0.0: @​ethereumjs/common v3.0.0

Compare Source

Final release - tada 🎉 - of a wider 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, Beta 3 and Release Candidate (RC) 1 release notes for notes on some additional changes (CHANGELOG).

Changes
  • Internal refactor: removed ambiguous boolean checks within conditional clauses, PR #​2255

v2.2.1: @​ethereumjs/evm v2.2.1

Compare Source

  • 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)

v2.2.0: @​ethereumjs/evm v2.2.0

Compare Source

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

v2.1.0: @​ethereumjs/evm v2.1.0

Compare Source

New EVM Profiler / EVM Performance

This releases ships with a completely new dedicated EVM profiler (❤️ to Jochem for the integration) to measure how the different opcode implementations are doing, see PR #​2988, #​3011, #​3013 and #​3041.

See the new dedicated README section for a detailed usage instruction.

We were already able to do various performance related improvements using this tool (and we hope that you will be too) 🤩:

  • Substantial stack optimizations (PUSH and POPn +30-40%, DUP +40%), PR #​3000
  • JUMPDEST optimizations, PR #​3000
  • Various EVM interpreter optimizations (overall 7-15% performance gain), PR #​2996
  • Memory optimizations (MLOAD and MSTORE + 10-20%), PR #​3032
  • Reused BigInts cache, PR #​3034 and #​3050
  • EXP opcode optimizations (real-world 3x gain, not attack resistant), PR #​3034
EIP-7516 BLOBBASEFEE Opcode

This release supports EIP-7516 with a new BLOBBASEFEE opcode added to and scheduled for the Dencun HF, see PR #​3035 and #​3068. The opcode returns the value of the blob base-fee of the current block it is executing in.

Dencun devnet-11 Compatibility

This release contains various fixes and spec updates related to the Dencun (Deneb/Cancun) HF and is now compatible with the specs as used in devnet-11 (October 2023).

  • Update EIP-4788: do not use precompile anymore but use the pre-deployed bytecode, PR #​2955
Other Changes
  • Add missing debug dependency types, PR #​3072

v2.0.0: @​ethereumjs/evm v2.0.0

Compare Source

Final release version from the breaking release round from Summer 2023 on the EthereumJS libraries, thanks to the whole team for this amazing accomplishment! ❤️ 🥳

See RC1 release notes for the main change description.

Following additional changes since RC1/RC2:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/ethereumjs-evm-3.x branch 2 times, most recently from 61809a5 to 486e6cb Compare March 19, 2024 20:15
@renovate renovate bot force-pushed the renovate/ethereumjs-evm-3.x branch from 486e6cb to 58a949e Compare August 15, 2024 11:43
@renovate renovate bot force-pushed the renovate/ethereumjs-evm-3.x branch from 58a949e to a23b851 Compare September 9, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants