Skip to content

[Bug]: Unable to configure hardfork/ EIPS #31932

Open
@pgherveou

Description

@pgherveou

Describe the bug

Hey there 👋

We are hitting an issue with the latest release
It looks like the latest version is using @metamsk/transaction-controller 50.0.0

This version define the default hardfork to be Prague
and there are no way to configure how the chain Common from @ethereumjs/common is configured

This is how the Common::custom is being called:

https://github.com/MetaMask/core/blob/3350d56f237d0fc5ae2f3d7663c779fd7b025281/packages/transaction-controller/src/utils/prepare.ts?plain=1#L48

function getCommonConfiguration(chainId: Hex): Common {
  const customChainParams: Partial<ChainConfig> = {
    chainId: parseInt(chainId, 16),
    defaultHardfork: HARDFORK,
  };

  return Common.custom(customChainParams, {
    eips: [7702],
  });
}

As a result this break our chain for certain transaction types
For example this Hardfork integrate EIP-3860 that defines a maxInitCodeSize that is too low for our chain

Expected behavior

There should be an option to configure the chain and define what fork / EIP it support

Screenshots/Recordings

No response

Steps to reproduce

  1. Go to https://remix.polkadot.io/ (our Remix fork for Polkadot)
  2. Build https://wizard.openzeppelin.com/#erc20
  3. Deploy

Error messages or log output

Notice that the contract fails to deploy with 

creation of MyToken errored: Error occurred: the initcode size of this transaction is too large: it is 82059 while the max is 49152.

Detection stage

In production (default)

Version

12.15.2

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To be fixed

    Status

    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions