This EIP specifies a new Ethereum JSON-RPC method, eth_txGasLimitCap, which returns the maximum transaction gas limit
(tx.gas) that the node will accept under the current fork rules (and any stricter local policy). This enables wallets,
SDKs, bundlers, and tooling to discover the effective per-transaction gas limit cap without simulation or out-of-band
knowledge.
EIP-7825 introduces a protocol-level per-transaction gas limit cap (e.g. 2^24 = 16,777,216 on Ethereum) to bound
worst-case single-transaction work. However, it does not specify any way to query this cap.
As a consequence, users and tools must:
This is brittle because:
32,000,000),The key words “MUST", “MUST NOT", “SHOULD", and “MAY" are to be interpreted as described in RFC 2119.
eth_txGasLimitCapeth_txGasLimitCap[] (no parameters)QUANTITY or null
QUANTITY.null.Returning null indicates that no finite per-transaction gas limit is enforced by the node.
Let:
protocolCap be the maximum tx.gas permitted by the active protocol rules at the node's current head (e.g. from
EIP-7825 when enabled).policyCap be any stricter local cap applied by the node to transaction acceptance (e.g. txpool admission), if
configured; otherwise, unbounded.Then the node MUST return:
min(protocolCap, policyCap) if finite, else null.A node MUST NOT return a value higher than the protocol cap when the protocol cap is finite.
Ethereum (EIP-7825 cap = 2^24):
A chain with a 32,000,000 cap:
A dedicated method is needed because there is currently no way to query the maximum allowed tx.gas without simulation
or out-of-band knowledge.
Returning the effective cap (min(protocolCap, policyCap)) matches what users need when constructing transactions to
submit.
This EIP adds a new JSON-RPC method and does not modify existing methods. Existing clients and applications remain compatible.
Pseudo code:
This EIP only exposes information that is already public or otherwise observable by probing. It does not expose secrets or user data.
Copyright and related rights waived via CC0.