ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

Ensure we support a uint256 chain ID

Open acolytec3 opened this issue 1 year ago • 3 comments

We should make sure we don't disallow chain IDs up to a uint256 size (i.e. a really big number) per this update to Pectra Devnet 5 specs

Probably what should happen here is we just add a check in common when setting up genesis parameters to make sure the chain ID isn't greater than 2^32 (or whatever the max uint256 is)

acolytec3 avatar Dec 21 '24 02:12 acolytec3

It looks like this is only intended for the auth lists on 7702. I have implemented that here: https://github.com/ethereumjs/ethereumjs-monorepo/pull/3807/commits/5079664401866fa2d3b3de04686827334687bc32

jochem-brouwer avatar Dec 22 '24 02:12 jochem-brouwer

Shouldn't we also do this check in common on start up?

acolytec3 avatar Dec 22 '24 02:12 acolytec3

We could do a monorepo-wide policy of chain-ids fitting in uint256 to be compatible with other clients? This would not be a candidate for the devnet-5 PR though, should have a follow-up PR on this if we want to do that.

Note: we do not have restrictions by default on the chain id size, so by default we would support "all" chain ids, except that we have some checks in for instance the tx package that this is not higher than some value.

jochem-brouwer avatar Dec 22 '24 11:12 jochem-brouwer