EIP-4803: Limit transaction gas to a maximum of 2^63-1

This is the discussion topic for

This is a follow up of ACD#120 where it was agreed to follow up the EIP-2681 and split more of EIP-1985 content into individual EIPs.

@chfast suggested to further reduce this limit to 2^31-1, because it would allow removing the “call depth check” from the EVM.

The call depth is limited to 1024, but the Tangerine Whistle hardfork introduced EIP-150 with the “63/64th rule”. That rule makes it not realistic to exhaust the 1024 limit with the current and historical block gas limits. However having 2^31-1 would allow removing it entirely – or in practice combine the various checks into a few branches.

A CALL costing 1 gas would allow 1138 call depth, while 4 gas would terminate after 1021 depth. Note that a call currently costs as at least 100 gas (EIP-2929).

1 Like

For historical reference, this proposal was also discussed in 2017. There was a suggestion for 2^62-1 as a limit there.

Additionally, here it was suggested to explicitly enforce this on the block level too. It is unlikely to be worth it, given the strict rules about increasing the block gas limit.

2^31-1 would also fit into the integer space of a double, which means you could store this value in a JavaScript number without fear of running into rounding errors.

1 Like