EIP-8123 introduces a new JSON-RPC method called eth_txLimitGasCap for querying the EIP-7825 tx gas limit cap. See the full EIP details in the GitHub PR:
Great proposal! Quick question about implementation: should clients return the
cap even if EIP-7825 isnāt active yet on that chain, or should they return null
until the fork activates? Also curious how this would work for chains that
havenāt implemented 7825 at all.
Thanks @dicethedev! If EIP-7825 isnāt active, the chain should return null, indeed. With one exception - even if the chain hasnāt upgraded to Fusaka yet, if they enforce a custom policy for tx gas limits, they should return that value. For example, Base enforces a 25M cap today (and they havenāt upgraded to Fusaka yet).
I wrote a piece of pseudocode in the EIP on GitHub, cross-sharing here for visibility:
if protocol has finite tx gas cap at head:
protocolCap = that value
else:
protocolCap = +infinity
if protocol has policy cap:
policyCap = that value
else:
policyCap = +infinity
cap = min(protocolCap, policyCap)
if cap is finite:
return cap
else:
return null
@PaulRBerg Got it, thanks! So policy caps take precedence when stricter than protocol caps, and null only when thereās truly no limit. The Base example makes it clear. Looking forward to this being adopted!