Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

feat: add support for the merge hardfork #3971

Merged
merged 26 commits into from
Dec 14, 2022
Merged

feat: add support for the merge hardfork #3971

merged 26 commits into from
Dec 14, 2022

Conversation

MicaiahReid
Copy link
Contributor

@MicaiahReid MicaiahReid commented Nov 30, 2022

This release (re)introduces support for the Merge! In preparation for the merge, our friends at ethereumjs were working hard on a huge new release with quite a few breaking changes. Because we rely so heavily on the work that ethereumjs does, these breaking changes impacted just about every nook and cranny of the Ganache code base. We wanted to get the merge features to our users as soon as possible, while also doing our due diligence to make sure the sweeping changes made by the ethereumjs upgrade don't affect Ganache's stability. With all that in mind, we released Ganache v7.4.4-alpha.0 back in September with support for the Merge. This PR brings that set of features to our stable release.

This introduces a few important changes and features that are worth explaining.

Important Changes

  • Upgrading ethereumjs required dropping support for Node.js v12. In Ganache v7.0.0 we gave a deprecation notice for Node.js v12, and this release finalizes the removal of support for this version. To use Ganache, you'll need to install Node.js v14 or greater.

New Feature

The only new feature that could potentially impact our users is the introduction of the finalized and safe block tags. These can be used with eth_getBlockByNumber, or any other RPC method that receives a block tag:

const finalizeBlock = await provider.request({ method: "eth_getBlockByNumber", params: ["finalized", true] } );
const safeBlock = await provider.request({ method: "eth_getBlockByNumber", params: ["safe", true] } );

Note: These new block tags are aliases for the existing latest block tag.

Fixes #2006, fixes #3693, fixes #3578

@MicaiahReid MicaiahReid changed the title feat: add support for the merge hardfork feat: add support for the merge hardfork Nov 30, 2022
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@jeffsmale90 jeffsmale90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In progress - 77/133 files viewed :/

src/chains/ethereum/address/tests/index.test.ts Outdated Show resolved Hide resolved
src/chains/ethereum/block/src/runtime-block.ts Outdated Show resolved Hide resolved
src/chains/ethereum/block/src/runtime-block.ts Outdated Show resolved Hide resolved
Comment on lines -38 to +33
stack: BN[];
stack: bigint[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this event expected to be used externally? If so, is this also a breaking change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @ganache/console.log package is pre-1.0, which means every new version is allowed breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? Thoughts, @davidmurdoch?

Regardless, the console.log package is at version 0.2.0, so we can break freely

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think breaking console package is fine, but if updating the console dep in ganache results in breaking ganache changes, that'd be a breaking change for the ganache package too right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would. But it doesn't break anything, I don't think 🙃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up @MicaiahReid. I'll test this once the Truffle release ships. Truffle pins @ganache/console.log

src/chains/ethereum/ethereum/src/helpers/run-call.ts Outdated Show resolved Hide resolved
src/chains/ethereum/ethereum/src/helpers/run-call.ts Outdated Show resolved Hide resolved
src/packages/rlp/tests/dataTypes.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LETS DO THIS (after detach mode is released)

@MicaiahReid MicaiahReid merged commit b816de2 into develop Dec 14, 2022
@MicaiahReid MicaiahReid deleted the the-merge branch December 14, 2022 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants