Skip to content

Comments

chore(deps): update dependency @ethereumjs/tx to v10#95

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/ethereumjs-tx-10.x
Open

chore(deps): update dependency @ethereumjs/tx to v10#95
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/ethereumjs-tx-10.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 29, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@ethereumjs/tx (source) ^4.0.0^10.0.0 age adoption passing confidence

Release Notes

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

v10.1.1: @​ethereumjs/tx v10.1.1

Compare Source

  • EIP-7702: Fix unpadding of bytes for hex-string "0x0" inputs in authorization list fields, see PR #​4209
  • Deprecate Node.js 18 support, minimum Node.js version is now 20, see PR #​4180
  • Add Node.js 24 support, see PR #​4194
  • Dependency update: @noble/curves to v2, see PR #​4179

v10.1.0: @​ethereumjs/tx v10.1.0

Compare Source

  • tx: throw on toCreationAddress for 4844 and 7702, PR #​4162
  • tx: improve JSDoc annotations, PR #​4161
  • 4844 Tx Constructor Consistency and UX, PR #​4155
  • valueBoundaryCheck chores, PR #​4083
  • updates regarding blobtx serialization, PR #​4065
EIP-7594 - PeerDAS - Peer Data Availability Sampling

Support for EIP-7594 PeerDAS blob transactions has been added. This extends EIP-4844 blob transactions with data availability sampling capabilities. PeerDAS transactions use network wrapper version 1 and include cell proofs instead of blob proofs. The transaction library now supports creating and validating PeerDAS transactions with a maximum of 6 blobs per transaction.

import { Blob4844Tx } from @​ethereumjs/tx
import { Common, Hardfork } from @​ethereumjs/common
import { hexToBytes } from @​ethereumjs/util

const common = new Common({ chain: mainnet, hardfork: Hardfork.Osaka })

// Create a PeerDAS blob transaction (network wrapper version 1)
const tx = Blob4844Tx.fromTxData({
  chainId: common.chainId(),
  nonce: 0n,
  maxFeePerGas: 1000000000n,
  maxPriorityFeePerGas: 1000000000n,
  maxFeePerBlobGas: 1000000000n,
  gasLimit: 100000n,
  to: 0x...,
  value: 0n,
  blobVersionedHashes: [0x...],
  blobs: [0x...], // Blob data
  kzgCommitments: [0x...],
  kzgProofs: [0x...], // Cell proofs for PeerDAS
  networkWrapperVersion: 1 // EIP-7594
}, { common })
EIP-7825 - Transaction Gas Limit Cap

EIP-7825 support has been implemented, introducing a protocol-level cap of 16,777,216 gas (2^24) for individual transactions. The transaction library now validates that transaction gas limits do not exceed this cap. Transactions with gas limits above the cap will be rejected during construction.

import { LegacyTx } from @​ethereumjs/tx
import { Common, Hardfork } from @​ethereumjs/common

const common = new Common({ chain: mainnet, hardfork: Hardfork.Osaka })

// Transaction with gas limit exceeding 16,777,216 will throw an error
try {
  const tx = LegacyTx.fromTxData({
    gasLimit: 20000000n, // Exceeds EIP-7825 cap
    // ... other fields
  }, { common })
} catch (error) {
  // Error: Gas limit exceeds maximum allowed by EIP-7825
}

// Valid transaction with gas limit within the cap
const validTx = LegacyTx.fromTxData({
  gasLimit: 10000000n, // Within EIP-7825 cap
  // ... other fields
}, { common })

v10.0.0: @​ethereumjs/tx v10.0.0

Compare Source

Overview

This release is part of the v10 breaking release round making the EthereumJS libraries compatible with the Pectra hardfork going live on Ethereum mainnet on May 7 2025. Beside the hardfork update these releases mark a milestone in our release history since they - for the first time ever - bring the full Ethereum protocol stack - including the EVM - to the browser without any restrictions anymore, coming along with other substantial updates regarding library security and functionality.

Some highlights:

  • 🌴 Introduction of a tree-shakeable API
  • 👷🏼 Substantial dependency reduction to a "controlled dependency set" (no more than 10 + @Noble crypto)
  • 📲 EIP-7702 readiness
  • 🛵 Substantial bundle size reductions for all libraries
  • 🏄🏾‍♂️ All libraries now pure JS being WASM-free by default
  • 🦋 No more propriatary Node.js primitives

So: All libraries now work in the browser "out of the box".

Release Notes

Major release notes for this release can be found in the alpha.1 release notes here, with some additions along with the RC.1 releases, see here.

Changes since RC.1
  • Fix for the EIP-7702 gas calculation, PR #​3935
  • Update transaction test runner to correctly report tests and fix edge case of invalid 7702 txs with nested lists inside the authority list, PR3942

v5.4.0: @​ethereumjs/tx v5.4.0

Compare Source

EOA Code Transaction (EIP-7702) (outdated)

This release introduces support for a non-final version of EIP-7702 EOA code transactions, see PR #​3470. This tx type allows to run code in the context of an EOA and therefore extend the functionality which can be "reached" from respectively integrated into the scope of an otherwise limited EOA account.

The following is a simple example how to use an EOACodeEIP7702Transaction with one autorization list item:

// ./examples/EOACodeTx.ts

import { Chain, Common, Hardfork } from '@​ethereumjs/common'
import { EOACodeEIP7702Transaction } from '@​ethereumjs/tx'
import type { PrefixedHexString } from '@​ethereumjs/util'

const ones32 = `0x${'01'.repeat(32)}` as PrefixedHexString

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Cancun, eips: [7702] })
const tx = EOACodeEIP7702Transaction.fromTxData(
  {
    authorizationList: [
      {
        chainId: '0x1',
        address: `0x${'20'.repeat(20)}`,
        nonce: ['0x1'],
        yParity: '0x1',
        r: ones32,
        s: ones32,
      },
    ],
  },
  { common }
)

console.log(
  `EIP-7702 EOA code tx created with ${tx.authorizationList.length} authorization list item(s).`
)

Note: Things move fast with EIP-7702 and the released implementation is based on this commit and therefore already outdated. An up-to-date version will be released along our breaking release round planned for early September 2024.

Verkle Updates
  • Update kzg-wasm to 0.4.0, PR #​3358
  • Shift Verkle to osaka hardfork, PR #​3371
Other Features
  • Extend BlobEIP4844Transaction.networkWrapperToJson() to also include the 4844 fields, PR #​3365
  • Stricter prefixed hex typing, PRs #​3348, #​3427 and #​3357 (some changes removed in PR #​3382 for backwards compatibility reasons, will be reintroduced along upcoming breaking releases)
Bugfixes
  • Fix bug in generic error message regarding chain ID reporting, PR #​3386

v5.3.0: @​ethereumjs/tx v5.3.0

Compare Source

Full 4844 Browser Readiness
WASM KZG

Shortly following the "Dencun Hardfork Support" release round from last month, this is now the first round of releases where the EthereumJS libraries are now fully browser compatible regarding the new 4844 functionality, see PRs #​3294 and #​3296! 🎉

Our WASM wizard @​acolytec3 has spent the last two weeks and created a WASM build of the c-kzg library which we have released under the kzg-wasm name on npm (and you can also use independently for other projects). See the newly created GitHub repository for some library-specific documentation.

This WASM KZG library can now be used for KZG initialization (replacing the old recommended c-kzg initialization), see the respective README section from the tx library for usage instructions (which is also accurate for the other using upstream libraries like block or EVM).

Note that kzg-wasm needs to be added manually to your own dependencies and the KZG initialization code needs to be adopted like the following (which you will likely want to do in most cases, so if you deal with post Dencun EVM bytecode and/or 4844 blob txs in any way):

import { loadKZG } from 'kzg-wasm'
import { Chain, Common, Hardfork } from '@​ethereumjs/common'

const kzg = await loadKZG()

// Instantiate `common`
const common = new Common({
  chain: Chain.Mainnet,
  hardfork: Hardfork.Cancun,
  customCrypto: { kzg },
})

Manual addition is necessary because we did not want to bundle our libraries with WASM code by default, since some projects are then prevented from using our libraries.

Note that passing in the KZG setup file is not necessary anymore, since this is now defaulting to the setup file from the official KZG ceremony (which is now bundled with the KZG library).

Trie Node.js Import Bug

Since this fits well also to be placed here relatively prominently for awareness: we had a relatively nasty bug in the @ethereumjs/trie library with a Node.js web stream import also affecting browser compatibility, see PR #​3280. This bug has been fixed along with these releases and this library now references the updated trie library version.

v5.2.1: @​ethereumjs/tx v5.2.1

Compare Source

  • Hotfix release adding a missing debug dependency to the @ethereumjs/trie package (dependency), PR #​3271

v5.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" labelling 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.

New addSignature() API Method

There is a new dedicated method addSignature() introduced for all tx types which allows to add the raw signature values to a transaction without the need to call into tx.sign(), which would need a private key to do so, see PR #​3238.

This functionality is e.g. handy for hardware wallet implementations where the signature generation is taking place externally.

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.

v5.1.0: @​ethereumjs/tx v5.1.0

Compare Source

More Type-Aligned Library Structure

This release gently introduces a backwards-compatible new/adopted library structure which is more aligned with the idea of independent tx types, bundling various functionalities together in a way that is not necessarily hierarchical, see PR #​2993 and #​3010.

Reused functionality (e.g. calculating the upfront-cost (getUpfrontCost()) of an EIP-1559-compatible tx - is internally bundled in capability files (e.g. capabilities/eip1559.ts), which provide static call access to the respective methods.

These methods are then called and the functionality exposed by the respective methods in the tx classes, see the following example code for an FeeMarketEIP1559Transaction:

getUpfrontCost(baseFee: bigint = BigInt(0)): bigint {
    return EIP1559.getUpfrontCost(this, baseFee)
  }

This makes creating additional or custom tx types and reusing of existing functionality substantially easier and makes the library substantially more robust by largely consolidating previously redundant code parts.

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 peer dependency for kzg module to use the official trusted setup for mainnet, PR #​3107
Other Changes
  • Performance: cache tx sender to avoid redundant and costly ecrecover calls, PR #​2985
  • Add new method getDataFee() to BlobEIP4844Transaction, PR #​2955

v5.0.0: @​ethereumjs/tx v5.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:

v4.2.0: @​ethereumjs/tx v4.2.0

Compare Source

This release is part of a final planned release round for the current major EthereumJS release versions, with next major versions planned to be released in July 2023.

It mainly removes all non-final EIP-4844, KZG and SSZ code from the libraries (mainly block, tx, util, evm, vm, blockchain) - see PR #​2721 - to allow for a clean slate for the current major versions to transition to maintenance mode. In particular the @chainsafe/ssz dependency is removed from the @ethereumjs/util library, which is a dependency of all other upstream EthereumJS libraries and removal therefore makes the whole stack lighter again.

If you are interested in continuously following EIP-4844 work have a look at and follow our upcoming breaking releases where major changes will be integrated with 4844 nearing a final state.

Other Changes:

  • Fix EIP-155 transaction encoding on chain ID 0 for legacy txs, PR #​2671

v4.1.2: @​ethereumjs/tx v4.1.2

Compare Source

Features
  • Add allowUnlimitedInitcodeSize option to partially disable EIP-3860, PR #​2594
  • Better Optimism RPC compatibility, new TransactionFactory.fromRPCTx() static constructor, PR #​2613
Bugfixes
  • Fixed EIP-3860 (max init code size) check when deserializing RLPs, PR #​2601
  • EIP-3860: only check max init code size on create contract tx, PR #​2575
Maintenance
  • Removed Ethers dependency, alternative fromEthersProvider() static constructor implementation, PR #​2633
  • Bump @ethereumjs/util @chainsafe/ssz dependency to 0.11.1 (no WASM, native SHA-256 implementation, ES2019 compatible, explicit imports), PRs #​2622, #​2564 and #​2656
  • Update ethereum-cryptography from 1.2 to 2.0 (switch from noble-secp256k1 to noble-curves), PR #​2641

v4.1.1: - Stable Istanbul Support

Compare Source

First stable Istanbul release passing all StateTests and BlockchainTests from the official Ethereum test suite v7.0.0-beta.1. Test suite conformance have been reached along work on PR #​607 (thanks @​s1na!) and there were several fixes along the way, so it is strongly recommended that
you upgrade from the first beta Istanbul release v4.1.0.

Istanbul Related Fixes

  • Refund counter has been moved from the EEI to the EVM module, PR #​612, gasRefund is re-added to the execResult in the EVM module at the end of message execution in EVM to remain (for the most part) backwards-compatible in the release
  • Fixed blake2f precompile for rounds > 0x4000000
  • Fixed issues causing RevertPrecompiled* test failures
  • Fixed an issue where the RIPEMD precompile has to remain touched even when the call reverts and be considered for deletion, see EIP-716 for context
  • Updated ethereumjs-block to v2.2.1
  • Updated ethereumjs-blockchain to v4.0.2
  • Limited ethereumjs-util from ^6.1.0 to ~6.1.0
  • Hardfork-related fixes in test runners and test utilities

Other Changes

  • Introduction of a new caching mechanism to cache calls towards promisify being present in hot paths (performance optimization), PR #​600
  • Renamed some missing result.return to result.returnValue on EVM execution in examples, PR #​604
  • Improved event documentation, PR #​601

v4.1.0: @​ethereumjs/tx v4.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 for your transactions with:

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

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai })
Experimental EIP-4844 Shard Blob Transactions Support

This release supports an experimental version of the blob transaction type introduced with EIP-4844 as being specified in the 01d3209 EIP version from February 8, 2023 and deployed along eip4844-devnet-4 (January 2023), see PR #​2349 as well as PRs #​2522 and #​2526.

Note: This functionality needs a manual KZG library installation and global initialization, see KZG Setup for instructions.

Usage

See the following code snipped for an example on how to instantiate.

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

initKZG(kzg, 'path/to/my/trusted_setup.txt')
const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })

const txData = {
  data: '0x1a8451e600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
  gasLimit: '0x02625a00',
  maxPriorityFeePerGas: '0x01',
  maxFeePerGas: '0xff',
  maxFeePerDataGas: '0xfff',
  nonce: '0x00',
  to: '0xcccccccccccccccccccccccccccccccccccccccc',
  value: '0x0186a0',
  v: '0x01',
  r: '0xafb6e247b1c490e284053c87ab5f6b59e219d51f743f7a4d83e400782bc7e4b9',
  s: '0x479a268e0e0acd4de3f1e28e4fac2a6b32a4195e8dfa9d19147abe8807aa6f64',
  chainId: '0x01',
  accessList: [],
  type: '0x05',
  versionedHashes: ['0xabc...'], // Test with empty array on a first run
  kzgCommitments: ['0xdef...'], // Test with empty array on a first run
  blobs: ['0xghi...'], // Test with empty array on a first run
}

const tx = BlobEIP4844Transaction.fromTxData(txData, { common })

Note that versionedHashes and kzgCommitments have a real length of 32 bytes and blobs have a real length of 4096 bytes and values are trimmed here for brevity.

See the Blob Transaction Tests for examples of usage in instantiating, serializing, and deserializing these transactions.

v4.0.2: @​ethereumjs/tx v4.0.2

Compare Source

Maintenance release with dependency updates, PR #​2445


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-tx-10.x branch from 1abf04b to 7ea0262 Compare August 10, 2025 14:50
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-10.x branch from 7ea0262 to 4625f24 Compare November 7, 2025 00:53
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-10.x branch from 4625f24 to bb021f9 Compare January 19, 2026 15:53
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-10.x branch from bb021f9 to 8eb473d Compare January 28, 2026 13:58
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