--- eip: 8123 title: RPC Method for Transaction Gas Limit Cap description: Add an RPC method to query the EIP-7825 transaction gas limit cap author: Paul Razvan Berg (@PaulRBerg) discussions-to: https://ethereum-magicians.org/t/eip-8123-json-rpc-method-for-transaction-gas-limit-cap/27417 status: Draft type: Standards Track category: Interface created: 2026-01-11 requires: 7825 --- ## 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](./eip-7825.md) 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: - infer it from failed transaction submissions, - hardcode network assumptions, - read client source code, - or rely on Internet documentation. This is brittle because: - the cap may change in future upgrades, - different chains intentionally set different cap values (e.g. Arbitrum and Polygon both use `32,000,000`), - and there already are some proposals to make the transaction gas limit cap dynamic, rather than hardcoded, based on new fee calculation rules ## Specification The key words “MUST", “MUST NOT", “SHOULD", and “MAY" are to be interpreted as described in RFC 2119. ### New method: `eth_txGasLimitCap` #### Request - **Method**: `eth_txGasLimitCap` - **Params**: `[]` (no parameters) #### Response - **Result**: `QUANTITY` or `null` - If the node enforces a finite transaction gas limit cap, it **MUST** return that cap as a `QUANTITY`. - If the node does not enforce a finite cap, it **MUST** return `null`. Returning `null` indicates that no finite per-transaction gas limit is enforced by the node. #### Semantics 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. #### Example Ethereum (EIP-7825 cap = `2^24`): ```json { "jsonrpc": "2.0", "id": 1, "method": "eth_txGasLimitCap", "params": [] } ``` ```json { "jsonrpc": "2.0", "id": 1, "result": "0x1000000" } ``` A chain with a `32,000,000` cap: ```json { "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: ```text 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.