{"eip":7706,"title":"Separate gas type for calldata","description":"Create a separate basefee and gaslimit for calldata","authors":["Vitalik Buterin (@vbuterin)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2024-05-13","requires":[1559,4844],"discussionsTo":"https://ethereum-magicians.org/t/eip-7706-create-a-separate-basefee-and-gaslimit-for-calldata/19998","repo":"EIPs","label":"EIP-7706","officialUrl":"https://eips.ethereum.org/EIPS/eip-7706","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7706.md","url":"https://eips.huatuo.xyz/eip-7706/","tldr":{"en":"Proposes giving calldata its own base fee and per-block gas limit, alongside execution gas and blob gas, to shrink worst-case block size while making calldata cheaper on average.","ja":"calldata に、実行ガス・blob ガスと並ぶ独自のベースフィーとブロックごとのガス上限を持たせ、最悪ケースのブロックサイズを縮小しつつ、平均的には calldata を安くすることを提案する。","ko":"calldata에 실행 가스, blob 가스와 별개의 자체 기본 수수료와 블록당 가스 한도를 부여해, 최악의 경우 블록 크기를 줄이면서 평균적으로는 calldata를 더 저렴하게 만들자고 제안한다.","zh":"提议为 calldata 设立独立的基础费用和每区块 gas 上限，与执行 gas 和 blob gas 并列，以缩小最坏情况下的区块大小，同时让 calldata 的平均价格更低。"},"tags":["gas","fees","calldata","transactions","core"],"explainers":{"en":{"lang":"en","tldr":"Proposes giving calldata its own base fee and per-block gas limit, alongside execution gas and blob gas, to shrink worst-case block size while making calldata cheaper on average.","tags":["gas","fees","calldata","transactions","core"],"related":[1559,4844,2718,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7706/","markdown":"## What problem does it solve?\n\nCalldata and computation share one gas pool. A block can therefore be filled almost entirely with calldata, so the theoretical maximum block size (about 30,000,000 / 16 ≈ 1.87 MB at the gas limit when the EIP was written) is far above the typical size (around 100 kB, excluding blobs). That worst case is a major argument against raising the gas limit, cutting calldata prices, or adding blobs.\n\n[EIP-4844](/eip-4844/) solved the same issue for blob data by giving blobs their own fee market. EIP-7706 applies that recipe to calldata: a separate base fee and a separate limit. The maximum calldata per block drops sharply, while the target is set around 2× current average usage, so on average calldata should get cheaper.\n\n## How it works\n\nGas becomes a **three-element vector**: `[execution, blob, calldata]`.\n\n- **New transaction type** (number TBD, via [EIP-2718](/eip-2718/)) with `max_fees_per_gas` and `priority_fees_per_gas` as length-3 vectors. Its intrinsic cost drops the usual 16/4 gas per byte calldata charge, because calldata is now billed in its own dimension.\n- **Calldata gas** is counted the same way as today: 4 gas per zero byte, 16 per non-zero byte (expressed as 4 gas per \"token\", 4 tokens per non-zero byte).\n- **Per-block limits**: execution uses the normal gas limit, blobs use `MAX_BLOB_GAS_PER_BLOCK`, calldata gets `gas_limit / 4`. Targets are limit/2, limit/2 and limit/4 respectively.\n- **One base-fee rule for all three**: each dimension tracks `excess_gas` and prices with the EIP-4844 `fake_exponential` formula. This replaces the separate [EIP-1559](/eip-1559/) execution-gas rule.\n- **Header changes**: `gas_limit`, `gas_used`, `base_fee_per_gas`, `blob_gas_used` and `excess_blob_gas` are replaced by vector fields `gas_limits`, `gas_used`, `excess_gas`.\n\nOlder transaction types are mapped into vectors automatically; for example a type-2 transaction uses its `max_fee_per_gas` for both execution and calldata.\n\n## Sample code\n\nCore pricing logic, condensed from the spec (Python):\n\n```python\nLIMIT_TARGET_RATIOS = [2, 2, 4]   # execution, blob, calldata\nBASE_FEE_UPDATE_FRACTION = 8\nMIN_BASE_FEE_PER_GAS = 1\n\ndef calldata_gas(data: bytes) -\u003e int:\n    zeros = data.count(0)\n    tokens = zeros + (len(data) - zeros) * 4\n    return tokens * 4\n\ndef targets(parent):\n    return [lim // r for lim, r in zip(parent.gas_limits, LIMIT_TARGET_RATIOS)]\n\ndef excess_gas(parent):\n    return [max(e + u - t, 0)\n            for e, u, t in zip(parent.excess_gas, parent.gas_used, targets(parent))]\n\ndef base_fees(parent):\n    return [fake_exponential(MIN_BASE_FEE_PER_GAS, e, t * BASE_FEE_UPDATE_FRACTION)\n            for e, t in zip(parent.excess_gas, targets(parent))]\n\ndef fees_per_gas(max_fees, priority_fees, block_base_fees):\n    assert all(b \u003c= m for b, m in zip(block_base_fees, max_fees))\n    return [min(b + p, m) for b, p, m in zip(block_base_fees, priority_fees, max_fees)]\n```\n\n## Things to know\n\n- **Status: Stagnant.** It has not been scheduled for any upgrade, and the fork block and transaction type number are still TBD.\n- Ethereum took a different, simpler route to cap worst-case calldata: [EIP-7623](/eip-7623/) raises the calldata floor price for data-heavy transactions.\n- Block building gets more complex with several independent limits, though the spec argues greedy strategies are close to optimal since most blocks are not full.\n- Legacy-style transactions would keep working but pay slightly sub-optimally, since their calldata and execution fees are forced to be equal.\n"},"ja":{"lang":"ja","tldr":"calldata に、実行ガス・blob ガスと並ぶ独自のベースフィーとブロックごとのガス上限を持たせ、最悪ケースのブロックサイズを縮小しつつ、平均的には calldata を安くすることを提案する。","tags":["gas","fees","calldata","transactions","core"],"related":[1559,4844,2718,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7706/","markdown":"## 何を解決するのか\n\ncalldata と計算は 1 つのガスプールを共有しています。そのため、ブロックをほぼ calldata だけで埋めることができ、理論上の最大ブロックサイズ（この EIP の執筆時点でガス上限 30,000,000 / 16 ≈ 1.87 MB）は、典型的なサイズ（blob を除いて約 100 kB）をはるかに上回ります。この最悪ケースは、ガス上限の引き上げ、calldata 価格の引き下げ、blob の追加に対する大きな反対理由になっています。\n\n[EIP-4844](/eip-4844/) は blob データに独自の手数料市場を与えることで、同じ問題を解決しました。EIP-7706 はそのやり方を calldata に適用し、別個のベースフィーと別個の上限を設けます。ブロックあたりの最大 calldata は大幅に減り、目標は現在の平均使用量の約 2 倍に設定されるため、平均的には calldata は安くなるはずです。\n\n## 仕組み\n\nガスは **3 要素のベクトル** `[execution, blob, calldata]` になります。\n\n- **新しいトランザクションタイプ**（番号は未定、[EIP-2718](/eip-2718/) 経由）は、`max_fees_per_gas` と `priority_fees_per_gas` を長さ 3 のベクトルとして持ちます。calldata が独自の次元で課金されるため、固有コストからは通常の 1 バイトあたり 16/4 ガスの calldata 課金が除かれます。\n- **calldata ガス**の数え方は現在と同じで、ゼロバイトは 4 ガス、非ゼロバイトは 16 ガスです（1「トークン」あたり 4 ガス、非ゼロバイトは 4 トークンとして表現）。\n- **ブロックごとの上限**: 実行は通常のガス上限、blob は `MAX_BLOB_GAS_PER_BLOCK`、calldata は `gas_limit / 4` です。目標はそれぞれ上限の 1/2、1/2、1/4 です。\n- **3 つすべてに共通のベースフィー規則**: 各次元が `excess_gas` を追跡し、EIP-4844 の `fake_exponential` の式で価格を決めます。これにより、[EIP-1559](/eip-1559/) の実行ガス用の別規則は置き換えられます。\n- **ヘッダーの変更**: `gas_limit`、`gas_used`、`base_fee_per_gas`、`blob_gas_used`、`excess_blob_gas` は、ベクトル形式のフィールド `gas_limits`、`gas_used`、`excess_gas` に置き換えられます。\n\n古いトランザクションタイプは自動的にベクトルに写像されます。たとえば type-2 トランザクションは、実行と calldata の両方に `max_fee_per_gas` を使います。\n\n## サンプルコード\n\n仕様から抜粋した中核の価格決定ロジック（Python）:\n\n```python\nLIMIT_TARGET_RATIOS = [2, 2, 4]   # execution, blob, calldata\nBASE_FEE_UPDATE_FRACTION = 8\nMIN_BASE_FEE_PER_GAS = 1\n\ndef calldata_gas(data: bytes) -\u003e int:\n    zeros = data.count(0)\n    tokens = zeros + (len(data) - zeros) * 4\n    return tokens * 4\n\ndef targets(parent):\n    return [lim // r for lim, r in zip(parent.gas_limits, LIMIT_TARGET_RATIOS)]\n\ndef excess_gas(parent):\n    return [max(e + u - t, 0)\n            for e, u, t in zip(parent.excess_gas, parent.gas_used, targets(parent))]\n\ndef base_fees(parent):\n    return [fake_exponential(MIN_BASE_FEE_PER_GAS, e, t * BASE_FEE_UPDATE_FRACTION)\n            for e, t in zip(parent.excess_gas, targets(parent))]\n\ndef fees_per_gas(max_fees, priority_fees, block_base_fees):\n    assert all(b \u003c= m for b, m in zip(block_base_fees, max_fees))\n    return [min(b + p, m) for b, p, m in zip(block_base_fees, priority_fees, max_fees)]\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** どのアップグレードにも予定されておらず、フォークブロックとトランザクションタイプの番号も未定のままです。\n- Ethereum は、最悪ケースの calldata を抑えるために別のより単純な道を選びました。[EIP-7623](/eip-7623/) は、データ量の多いトランザクションに対する calldata の下限価格を引き上げます。\n- 独立した上限が複数あると、ブロック構築は複雑になります。ただし仕様は、ほとんどのブロックは満杯ではないため、貪欲法が最適に近いと論じています。\n- レガシー形式のトランザクションは引き続き動作しますが、calldata と実行の手数料が同じ値に固定されるため、わずかに最適でない金額を支払うことになります。\n"},"ko":{"lang":"ko","tldr":"calldata에 실행 가스, blob 가스와 별개의 자체 기본 수수료와 블록당 가스 한도를 부여해, 최악의 경우 블록 크기를 줄이면서 평균적으로는 calldata를 더 저렴하게 만들자고 제안한다.","tags":["gas","fees","calldata","transactions","core"],"related":[1559,4844,2718,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7706/","markdown":"## 어떤 문제를 해결하나요?\n\ncalldata와 연산은 하나의 가스 풀을 공유합니다. 그래서 블록을 거의 calldata로만 채울 수 있고, 이론상 최대 블록 크기(이 EIP가 작성되던 시점의 가스 한도에서 30,000,000 / 16 ≈ 1.87 MB)는 일반적인 크기(blob 제외 약 100 kB)보다 훨씬 큽니다. 이 최악의 경우는 가스 한도 상향, calldata 가격 인하, blob 추가에 반대하는 주요 논거입니다.\n\n[EIP-4844](/eip-4844/)는 blob에 자체 수수료 시장을 줘서 같은 문제를 해결했습니다. EIP-7706은 같은 방식을 calldata에 적용해 별도의 기본 수수료와 별도의 한도를 둡니다. 블록당 최대 calldata는 크게 줄어들고, 목표는 현재 평균 사용량의 약 2배로 설정되므로 평균적으로 calldata는 더 저렴해져야 합니다.\n\n## 어떻게 동작하나요?\n\n가스는 **3요소 벡터** `[execution, blob, calldata]`가 됩니다.\n\n- **새 트랜잭션 타입**(번호 미정, [EIP-2718](/eip-2718/) 사용)은 `max_fees_per_gas`와 `priority_fees_per_gas`를 길이 3의 벡터로 가집니다. calldata가 자체 차원에서 과금되므로, 고유 비용에서는 바이트당 16/4 가스라는 일반 calldata 요금이 빠집니다.\n- **calldata 가스**는 지금과 같은 방식으로 계산됩니다. 0 바이트는 4 가스, 0이 아닌 바이트는 16 가스입니다(\"토큰\" 하나당 4 가스, 0이 아닌 바이트는 4 토큰으로 표현).\n- **블록당 한도**: 실행은 일반 가스 한도, blob은 `MAX_BLOB_GAS_PER_BLOCK`, calldata는 `gas_limit / 4`입니다. 목표는 각각 한도의 1/2, 1/2, 1/4입니다.\n- **세 차원 모두에 하나의 기본 수수료 규칙**: 각 차원이 `excess_gas`를 추적하고 EIP-4844의 `fake_exponential` 공식으로 가격을 매깁니다. 이는 별도의 [EIP-1559](/eip-1559/) 실행 가스 규칙을 대체합니다.\n- **헤더 변경**: `gas_limit`, `gas_used`, `base_fee_per_gas`, `blob_gas_used`, `excess_blob_gas`가 벡터 필드 `gas_limits`, `gas_used`, `excess_gas`로 바뀝니다.\n\n이전 트랜잭션 타입은 자동으로 벡터로 매핑됩니다. 예를 들어 type-2 트랜잭션은 `max_fee_per_gas`를 실행과 calldata 모두에 사용합니다.\n\n## 샘플 코드\n\n명세에서 추려 낸 핵심 가격 책정 로직(Python):\n\n```python\nLIMIT_TARGET_RATIOS = [2, 2, 4]   # execution, blob, calldata\nBASE_FEE_UPDATE_FRACTION = 8\nMIN_BASE_FEE_PER_GAS = 1\n\ndef calldata_gas(data: bytes) -\u003e int:\n    zeros = data.count(0)\n    tokens = zeros + (len(data) - zeros) * 4\n    return tokens * 4\n\ndef targets(parent):\n    return [lim // r for lim, r in zip(parent.gas_limits, LIMIT_TARGET_RATIOS)]\n\ndef excess_gas(parent):\n    return [max(e + u - t, 0)\n            for e, u, t in zip(parent.excess_gas, parent.gas_used, targets(parent))]\n\ndef base_fees(parent):\n    return [fake_exponential(MIN_BASE_FEE_PER_GAS, e, t * BASE_FEE_UPDATE_FRACTION)\n            for e, t in zip(parent.excess_gas, targets(parent))]\n\ndef fees_per_gas(max_fees, priority_fees, block_base_fees):\n    assert all(b \u003c= m for b, m in zip(block_base_fees, max_fees))\n    return [min(b + p, m) for b, p, m in zip(block_base_fees, priority_fees, max_fees)]\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 어떤 업그레이드에도 예정되어 있지 않으며, 포크 블록과 트랜잭션 타입 번호도 아직 미정입니다.\n- 이더리움은 최악의 calldata를 제한하기 위해 다르고 더 단순한 길을 택했습니다. [EIP-7623](/eip-7623/)은 데이터가 많은 트랜잭션의 calldata 하한 가격을 올립니다.\n- 독립적인 한도가 여러 개이면 블록 구성이 더 복잡해집니다. 다만 명세는 대부분의 블록이 가득 차지 않으므로 탐욕적 전략이 최적에 가깝다고 주장합니다.\n- 레거시 방식 트랜잭션은 계속 동작하지만, calldata 수수료와 실행 수수료가 같게 강제되므로 약간 최적이 아닌 금액을 내게 됩니다.\n"},"zh":{"lang":"zh","tldr":"提议为 calldata 设立独立的基础费用和每区块 gas 上限，与执行 gas 和 blob gas 并列，以缩小最坏情况下的区块大小，同时让 calldata 的平均价格更低。","tags":["gas","fees","calldata","transactions","core"],"related":[1559,4844,2718,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7706/","markdown":"## 它解决什么问题？\n\nCalldata 和计算共用同一个 gas 池。因此，一个区块几乎可以全部被 calldata 填满，理论上的最大区块大小（本 EIP 撰写时在 gas 上限下约为 30,000,000 / 16 ≈ 1.87 MB）远高于典型大小（不含 blob 约 100 kB）。这种最坏情况是反对提高 gas 上限、降低 calldata 价格或增加 blob 的主要理由。\n\n[EIP-4844](/eip-4844/) 通过为 blob 提供独立的费用市场解决了同样的问题。EIP-7706 把这套办法用到 calldata 上：独立的基础费用和独立的上限。每个区块的最大 calldata 量大幅下降，而目标值设为当前平均用量的约 2 倍，因此平均而言 calldata 应该会变便宜。\n\n## 它如何运作\n\nGas 变成一个**三元向量**：`[execution, blob, calldata]`。\n\n- **新的交易类型**（编号待定，通过 [EIP-2718](/eip-2718/)），其 `max_fees_per_gas` 和 `priority_fees_per_gas` 是长度为 3 的向量。由于 calldata 现在在自己的维度中计费，它的固有成本不再包含通常每字节 16/4 gas 的 calldata 费用。\n- **Calldata gas** 的计算方式与现在相同：零字节 4 gas，非零字节 16 gas（表示为每个\"token\"4 gas，每个非零字节 4 个 token）。\n- **每区块上限**：执行使用常规 gas 上限，blob 使用 `MAX_BLOB_GAS_PER_BLOCK`，calldata 为 `gas_limit / 4`。目标分别为上限的 1/2、1/2 和 1/4。\n- **三个维度共用同一条基础费用规则**：每个维度跟踪 `excess_gas`，并使用 EIP-4844 的 `fake_exponential` 公式定价。这取代了单独的 [EIP-1559](/eip-1559/) 执行 gas 规则。\n- **区块头变更**：`gas_limit`、`gas_used`、`base_fee_per_gas`、`blob_gas_used` 和 `excess_blob_gas` 被向量字段 `gas_limits`、`gas_used`、`excess_gas` 取代。\n\n旧的交易类型会被自动映射为向量；例如 type-2 交易会把它的 `max_fee_per_gas` 同时用于执行和 calldata。\n\n## 示例代码\n\n从规范中精简出的核心定价逻辑（Python）：\n\n```python\nLIMIT_TARGET_RATIOS = [2, 2, 4]   # execution, blob, calldata\nBASE_FEE_UPDATE_FRACTION = 8\nMIN_BASE_FEE_PER_GAS = 1\n\ndef calldata_gas(data: bytes) -\u003e int:\n    zeros = data.count(0)\n    tokens = zeros + (len(data) - zeros) * 4\n    return tokens * 4\n\ndef targets(parent):\n    return [lim // r for lim, r in zip(parent.gas_limits, LIMIT_TARGET_RATIOS)]\n\ndef excess_gas(parent):\n    return [max(e + u - t, 0)\n            for e, u, t in zip(parent.excess_gas, parent.gas_used, targets(parent))]\n\ndef base_fees(parent):\n    return [fake_exponential(MIN_BASE_FEE_PER_GAS, e, t * BASE_FEE_UPDATE_FRACTION)\n            for e, t in zip(parent.excess_gas, targets(parent))]\n\ndef fees_per_gas(max_fees, priority_fees, block_base_fees):\n    assert all(b \u003c= m for b, m in zip(block_base_fees, max_fees))\n    return [min(b + p, m) for b, p, m in zip(block_base_fees, priority_fees, max_fees)]\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 它尚未被排入任何升级，分叉区块和交易类型编号仍待定。\n- 以太坊选择了另一条更简单的路径来限制最坏情况下的 calldata：[EIP-7623](/eip-7623/) 提高了数据量大的交易的 calldata 下限价格。\n- 有多个独立上限会让区块构建变得更复杂，不过规范认为，由于大多数区块并未填满，贪心策略已接近最优。\n- 旧式交易仍可继续使用，但支付的费用会略微欠优，因为它们的 calldata 费用和执行费用被强制相等。\n"}}}
