Propose to increase Block Gas Limit to 30M gas

After the mainnet stall of july 2022 ( Post Mortem - Celo Stall, July 13 2022 ) and the activation of the consensus fork block discussed in Validator consensus update plan , we now propose the re-increase of the block gas limit to 30M.

Why 30M? While validators have enough processing power to go beyond blocks of 50M including consensus time, the issue is presented in the message format of Istanbul consensus and the message size limit of the p2p network. The fix from the consensus fork changed the offending message’s formats, but even so there is (currently) a hard limit of 10Mb on p2p messages which prevents us from bigger blocks for the time being. Alternatives can be explored, but on the meantime raising the gas limit to its new maximum would increase TPS while we discuss a way forward.

Thoughts?

1 Like

Yes, please bring back the 30M gas.

Also, with regard to the 10mb rlpx frame size limit, I think that particular cap can actually be increased in a future client upgrade, even without a hardfork.

The gas cost per byte of calldata is 4 for 0x0 value, so if we ramped the max rlpx frame size up from 10MB → 20MB, then we can theoretically handle blocks of almost 80M gas.

How about:

  1. ramp up the block gas to 30M first
  2. introduce a code change to ramp rlpx frame limit from 10MB → 20MB
  3. when we see that doubling the rlpx frame limit does not cause any adverse issues (i don’t think it will), then take another stab at ramping the block gas to 50M

At 50M gas, the theoretical largest block message will be ~13MB in size, if it was a block full of 0x0 calldata.

Raising the message size limit without a fork could potentially allow for an attack that would stall the network after f+1 validators upgraded to the new version, and before 2f+1 validators upgraded.

The rlp encoding assumes an output of <16MB, so without modifying the rlp encoding, going above 16mb is not possible. I haven’t looked in detail if it’s possible to modify rlp to allow bigger than 16mb payloads (or if it’s even a good idea).

However, where we go from here (30M gas) is still up for discussion, what’s interesting here is to find out if there’s support for this proposal

I see, then raising that limit beyond 10M would another HF to migrate safely. This 10MB limit is a side-effect of Geth’s P2P implementation and not really part of the actual blockchain spec.

Fun fact, on BSC, they upped the block gas limit to >100M and didn’t increase this message size limit, so technically, there are valid blocks according to their spec that cannot be propagated due to Geth limitation.