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

fix(deps): update dependency @ethereumjs/tx to v5 #736

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 9, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@ethereumjs/tx (source) 3.5.2 -> 5.3.0 age adoption passing confidence

Release Notes

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

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/common v4.1.0

Compare Source

Holesky Testnet Support

This release comes with full support for the Holesky public Ethereum testnet replacing the Goerli test network.

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
  • Small Cancun-related fixes, PR #​3099
Bugfixes
  • Updates and fixes along Geth genesis file parsing, PR #​2961
  • Handle forkHash on timestamp == genesis timestamp, PR #​2959
Other Changes
  • Performance: Cache Parameter Values + activated EIPs for current Hardfork, PR #​2994

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

Compare Source

Maintenance release with dependency updates, PR #​2445

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

Compare Source

Support for Geth genesis.json Genesis Format

For lots of custom chains (for e.g. devnets and testnets), you might come across a Geth genesis.json config which has both config specification for the chain as well as the genesis state specification.

Common now has a new constructor Common.fromGethGenesis() - see PRs #​2300 and #​2319 - which can be used in following manner to instantiate for example a VM run or a tx with a genesis.json based Common:

import { Common } from '@​ethereumjs/common'
// Load geth genesis json file into lets say `genesisJson` and optional `chain` and `genesisHash`
const common = Common.fromGethGenesis(genesisJson, { chain: 'customChain', genesisHash })
// If you don't have `genesisHash` while initiating common, you can later configure common (for e.g.
// calculating it afterwards by using the `@ethereumjs/blockchain` package)
common.setForkHashes(genesisHash)
New Ethers Static Constructor

There is a new static constructor TransactionFactory.fromEthersProvider() which has been added to the library, see PR #​2315. The new constructor allows for an easy instantiation of a fitting transaction object using an Ethers provider connecting e.g. to a local node or a service provider like Infura.

Other Changes and Fixes
  • Disallow tx initialization with values incorrectly passed in as arrays, PR #​2284

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

Configuration

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

🚦 Automerge: Enabled.

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 4 times, most recently from 5f7f82b to 9013713 Compare August 18, 2023 01:40
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 4 times, most recently from f2ca411 to b1a8c58 Compare August 26, 2023 02:36
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 6 times, most recently from 8caacfd to 38c7c58 Compare September 4, 2023 21:51
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 5 times, most recently from a58a89e to 02a9db6 Compare September 14, 2023 19:52
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 3 times, most recently from 07e0006 to 72bf2cf Compare September 16, 2023 21:57
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 2 times, most recently from 86f8de9 to f6fdc58 Compare September 25, 2023 12:46
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 3 times, most recently from 1a5ec1a to 6a5f8a8 Compare October 12, 2023 03:49
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 3 times, most recently from c817964 to ac0ec07 Compare October 19, 2023 06:05
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 2 times, most recently from 43bbc8e to c6c7b4f Compare February 28, 2024 16:59
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 2 times, most recently from 784652e to 7106cb3 Compare March 7, 2024 01:01
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 5 times, most recently from c9f97b1 to 1a30e0f Compare March 20, 2024 23:12
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 3 times, most recently from 9010924 to 1421740 Compare March 29, 2024 18:35
@renovate renovate bot changed the title Update dependency @ethereumjs/tx to v5 fix(deps): update dependency @ethereumjs/tx to v5 Mar 29, 2024
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 3 times, most recently from f5e7f33 to 5c8d83e Compare April 4, 2024 23:19
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 4 times, most recently from 7af296b to f8e81e7 Compare April 11, 2024 17:42
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 2 times, most recently from ed8ae57 to a21df0b Compare May 5, 2024 07:59
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 4 times, most recently from c6fc379 to a406a62 Compare May 13, 2024 22:44
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch 2 times, most recently from 2dc1114 to b3bd08d Compare May 28, 2024 22:35
@renovate renovate bot force-pushed the renovate/ethereumjs-tx-5.x branch from b3bd08d to 05f9a19 Compare June 5, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
0 participants