EIP-8123 - RPC Method for Transaction Gas Limit Cap

Created 2026-01-11
Status Draft
Category Interface
Type Standards Track
Authors
Requires

Abstract

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.

Motivation

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:

Specification

The key words “MUST", “MUST NOT", “SHOULD", and “MAY" are to be interpreted as described in RFC 2119.

New method: eth_txGasLimitCap

Request

Response

Returning null indicates that no finite per-transaction gas limit is enforced by the node.

Semantics

Let:

Then the node MUST return:

A node MUST NOT return a value higher than the protocol cap when the protocol cap is finite.

Example

Ethereum (EIP-7825 cap = 2^24):

{ "jsonrpc": "2.0", "id": 1, "method": "eth_txGasLimitCap", "params": [] }
{ "jsonrpc": "2.0", "id": 1, "result": "0x1000000" }

A chain with a 32,000,000 cap:

{ "jsonrpc": "2.0", "id": 1, "result": "0x1e84800" }

Rationale

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.

Backwards Compatibility

This EIP adds a new JSON-RPC method and does not modify existing methods. Existing clients and applications remain compatible.

Reference Implementation

Pseudo code:

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

Security Considerations

This EIP only exposes information that is already public or otherwise observable by probing. It does not expose secrets or user data.

Copyright

Copyright and related rights waived via CC0.