{"eip":8131,"title":"Unified Transaction Content Floor","description":"Flat 64 gas per content byte at the floor, covering all user-controlled transaction fields and capping worst-case block size.","authors":["Toni Wahrstätter (@nerolation)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2025-01-21","requires":[2028,4844,7623,7702,7976,7981],"discussionsTo":"https://ethereum-magicians.org/t/eip-9999-add-auth-data-to-eip-7623-floor/12345","repo":"EIPs","label":"EIP-8131","officialUrl":"https://eips.ethereum.org/EIPS/eip-8131","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8131.md","url":"https://eips.huatuo.xyz/eip-8131/","tldr":{"en":"Prices every user-controlled byte of a transaction (calldata, access lists, EIP-7702 authorizations, blob hashes) at a flat 64 gas at the floor, giving one simple rule that hard-caps worst-case block size.","ja":"トランザクションのユーザーが制御するすべてのバイト（calldata、アクセスリスト、EIP-7702 の認可、blob ハッシュ）を、フロアで一律 64 gas として価格付けする。最悪ケースのブロックサイズに厳密な上限を設ける、単純な 1 つのルールになる。","ko":"트랜잭션에서 사용자가 제어하는 모든 바이트(calldata, 액세스 리스트, EIP-7702 인가, blob 해시)를 하한에서 일률적으로 64 gas로 가격을 매겨, 최악의 경우 블록 크기에 엄격한 상한을 두는 단순한 규칙 하나를 제공한다.","zh":"把交易中每一个用户可控的字节（calldata、访问列表、EIP-7702 授权、blob 哈希）都按下限处统一的 64 gas 定价，用一条简单的规则为最坏情况下的区块大小设定硬上限。"},"tags":["core","gas","calldata","block-size","pricing"],"explainers":{"en":{"lang":"en","tldr":"Prices every user-controlled byte of a transaction (calldata, access lists, EIP-7702 authorizations, blob hashes) at a flat 64 gas at the floor, giving one simple rule that hard-caps worst-case block size.","tags":["core","gas","calldata","block-size","pricing"],"related":[7623,7976,7981,7702,4844],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8131/","markdown":"## What problem does it solve?\n\nNodes must be able to handle the biggest block an attacker can build, not the average one. [EIP-7623](/eip-7623/) introduced a **floor** price for calldata so that data-heavy transactions cannot fill blocks cheaply. Follow-ups pushed the floor to a uniform 64 gas per calldata byte ([EIP-7976](/eip-7976/)) and extended it to access-list entries ([EIP-7981](/eip-7981/)).\n\nTwo kinds of transaction content still pay nothing at the floor: [EIP-7702](/eip-7702/) authorization tuples and [EIP-4844](/eip-4844/) blob versioned hashes. And each new field has needed its own EIP and constants. EIP-8131 replaces these piecemeal rules with one formula covering every user-controlled content byte.\n\n## How it works\n\nThe floor for a transaction is:\n\n```\ntx_floor = 21000 + 64 * (\n      len(calldata)\n    + 20  * access_list_addresses\n    + 32  * access_list_storage_keys\n    + 108 * eip7702_authorizations      # worst-case RLP size of one auth tuple\n    + 32  * blob_versioned_hashes\n)\n```\n\nCharging keeps the shape introduced by EIP-7623:\n\n```\nrequire tx.gas \u003e= max(intrinsic_gas, tx_floor)\ngas_used = max(execution_gas_used, tx_floor)\n```\n\n- **Intrinsic gas is unchanged** (still 4/16 gas per zero/non-zero calldata byte per [EIP-2028](/eip-2028/)). The floor only matters for transactions that carry a lot of data relative to the computation they do.\n- **Content only, not full RLP.** Envelope and signature bytes are treated as covered by the 21,000 base cost, so two transactions with identical content pay the same floor whatever their type.\n- **Block-size bound.** Since every content byte costs at least 64 gas, total attacker-controlled content per block is at most `block_gas_limit / 64`, roughly 0.94 MB at a 60M gas limit, with no assumptions about compression.\n\n## Sample code\n\nComputing the floor client-side so gas estimates do not come up short (TypeScript):\n\n```ts\ntype TxContent = {\n  data: Uint8Array;\n  accessList?: { address: string; storageKeys: string[] }[];\n  authorizationCount?: number;      // EIP-7702 auths\n  blobVersionedHashCount?: number;  // EIP-4844 blob hashes\n};\n\nexport function txFloor(tx: TxContent): bigint {\n  const al = tx.accessList ?? [];\n  const keys = al.reduce((n, e) =\u003e n + e.storageKeys.length, 0);\n  const bytes =\n    tx.data.length +\n    20 * al.length +\n    32 * keys +\n    108 * (tx.authorizationCount ?? 0) +\n    32 * (tx.blobVersionedHashCount ?? 0);\n  return 21000n + 64n * BigInt(bytes);\n}\n\n// gasLimit must be at least max(intrinsic, txFloor(tx))\ntxFloor({ data: new Uint8Array(0), authorizationCount: 1 }); // 27912n\n```\n\n## Things to know\n\n- Status: **Draft**. It would require a hard fork, and it folds in EIP-7976 and EIP-7981 rather than stacking on them.\n- Plain ETH transfers are unaffected (floor = 21,000). A typical token transfer is far below the floor; a 50k-gas transaction needs more than about 450 bytes of calldata before the floor applies.\n- The biggest impact falls on EIP-7702 (type-4) transactions, since each authorization now adds 6,912 gas at the floor, and on blob-carrying transactions, which pay for their 32-byte versioned hashes.\n- Wallets and `eth_estimateGas` must compute the new floor, or estimates for floor-bound transactions will be too low and rejected.\n- The spec includes its own mainnet impact sample (May 2026); treat those figures as the author's measurement, not a guarantee.\n"},"ja":{"lang":"ja","tldr":"トランザクションのユーザーが制御するすべてのバイト（calldata、アクセスリスト、EIP-7702 の認可、blob ハッシュ）を、フロアで一律 64 gas として価格付けする。最悪ケースのブロックサイズに厳密な上限を設ける、単純な 1 つのルールになる。","tags":["core","gas","calldata","block-size","pricing"],"related":[7623,7976,7981,7702,4844],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8131/","markdown":"## 何を解決するのか\n\nノードは、平均的なブロックではなく、攻撃者が作れる最大のブロックを処理できなければなりません。[EIP-7623](/eip-7623/) は calldata に**フロア**価格を導入し、データの多いトランザクションが安くブロックを埋められないようにしました。その後の提案で、フロアは calldata 1 バイトあたり一律 64 gas に引き上げられ（[EIP-7976](/eip-7976/)）、アクセスリストのエントリにも拡張されました（[EIP-7981](/eip-7981/)）。\n\nそれでも、トランザクションの内容のうち 2 種類は、フロアでまだ何も支払っていません。[EIP-7702](/eip-7702/) の認可タプルと、[EIP-4844](/eip-4844/) の blob バージョン付きハッシュです。しかも、新しいフィールドが増えるたびに、それぞれ専用の EIP と定数が必要でした。EIP-8131 は、こうした場当たり的な規則を、ユーザーが制御するすべてのコンテンツバイトをカバーする 1 つの式に置き換えます。\n\n## 仕組み\n\nトランザクションのフロアは次のとおりです。\n\n```\ntx_floor = 21000 + 64 * (\n      len(calldata)\n    + 20  * access_list_addresses\n    + 32  * access_list_storage_keys\n    + 108 * eip7702_authorizations      # worst-case RLP size of one auth tuple\n    + 32  * blob_versioned_hashes\n)\n```\n\n課金は EIP-7623 が導入した形を保ちます。\n\n```\nrequire tx.gas \u003e= max(intrinsic_gas, tx_floor)\ngas_used = max(execution_gas_used, tx_floor)\n```\n\n- **固有ガスは変わりません**（[EIP-2028](/eip-2028/) に従い、calldata のゼロバイト / 非ゼロバイトあたり 4/16 gas のままです）。フロアが効くのは、行う計算に対して大量のデータを運ぶトランザクションだけです。\n- **完全な RLP ではなく、コンテンツのみ。** エンベロープと署名のバイトは 21,000 の基本コストでカバーされているものとして扱うため、コンテンツが同一の 2 つのトランザクションは、タイプに関係なく同じフロアを支払います。\n- **ブロックサイズの上限。** すべてのコンテンツバイトが少なくとも 64 gas かかるため、1 ブロックあたりの攻撃者が制御するコンテンツの合計は最大でも `block_gas_limit / 64` で、ガスリミット 6,000 万なら約 0.94 MB です。圧縮に関する仮定は不要です。\n\n## サンプルコード\n\nガス見積もりが不足しないよう、クライアント側でフロアを計算する例（TypeScript）:\n\n```ts\ntype TxContent = {\n  data: Uint8Array;\n  accessList?: { address: string; storageKeys: string[] }[];\n  authorizationCount?: number;      // EIP-7702 auths\n  blobVersionedHashCount?: number;  // EIP-4844 blob hashes\n};\n\nexport function txFloor(tx: TxContent): bigint {\n  const al = tx.accessList ?? [];\n  const keys = al.reduce((n, e) =\u003e n + e.storageKeys.length, 0);\n  const bytes =\n    tx.data.length +\n    20 * al.length +\n    32 * keys +\n    108 * (tx.authorizationCount ?? 0) +\n    32 * (tx.blobVersionedHashCount ?? 0);\n  return 21000n + 64n * BigInt(bytes);\n}\n\n// gasLimit must be at least max(intrinsic, txFloor(tx))\ntxFloor({ data: new Uint8Array(0), authorizationCount: 1 }); // 27912n\n```\n\n## 知っておくべきこと\n\n- ステータス: **Draft**。ハードフォークが必要で、EIP-7976 と EIP-7981 の上に積み重ねるのではなく、それらを取り込みます。\n- 単純な ETH の送金は影響を受けません（フロア = 21,000）。典型的なトークン送金はフロアをはるかに下回ります。5 万 gas のトランザクションでは、フロアが効くには約 450 バイトを超える calldata が必要です。\n- 最も大きな影響を受けるのは EIP-7702（type-4）トランザクションです。各認可がフロアで 6,912 gas を追加するためです。また、32 バイトのバージョン付きハッシュ分を支払う blob 付きトランザクションにも影響します。\n- ウォレットと `eth_estimateGas` は新しいフロアを計算しなければなりません。さもないと、フロアに縛られるトランザクションの見積もりが低すぎて拒否されます。\n- 仕様には、メインネットへの影響を試算した独自のサンプル（2026 年 5 月）が含まれています。その数値は著者による測定であり、保証ではないものとして扱ってください。\n"},"ko":{"lang":"ko","tldr":"트랜잭션에서 사용자가 제어하는 모든 바이트(calldata, 액세스 리스트, EIP-7702 인가, blob 해시)를 하한에서 일률적으로 64 gas로 가격을 매겨, 최악의 경우 블록 크기에 엄격한 상한을 두는 단순한 규칙 하나를 제공한다.","tags":["core","gas","calldata","block-size","pricing"],"related":[7623,7976,7981,7702,4844],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8131/","markdown":"## 어떤 문제를 해결하나요?\n\n노드는 평균적인 블록이 아니라 공격자가 만들 수 있는 가장 큰 블록을 처리할 수 있어야 합니다. [EIP-7623](/eip-7623/)은 데이터가 많은 트랜잭션이 블록을 싸게 채울 수 없도록 calldata에 **하한(floor)** 가격을 도입했습니다. 후속 제안들은 하한을 calldata 바이트당 일률 64 gas로 올렸고([EIP-7976](/eip-7976/)), 액세스 리스트 항목까지 확장했습니다([EIP-7981](/eip-7981/)).\n\n그래도 트랜잭션 내용 중 두 종류는 하한에서 여전히 아무것도 내지 않습니다. [EIP-7702](/eip-7702/) 인가 튜플과 [EIP-4844](/eip-4844/) blob 버전 해시입니다. 게다가 새 필드가 생길 때마다 각자 EIP와 상수가 필요했습니다. EIP-8131은 이런 단편적인 규칙들을 사용자가 제어하는 모든 내용 바이트를 포괄하는 하나의 공식으로 대체합니다.\n\n## 어떻게 동작하나요?\n\n트랜잭션의 하한은 다음과 같습니다.\n\n```\ntx_floor = 21000 + 64 * (\n      len(calldata)\n    + 20  * access_list_addresses\n    + 32  * access_list_storage_keys\n    + 108 * eip7702_authorizations      # worst-case RLP size of one auth tuple\n    + 32  * blob_versioned_hashes\n)\n```\n\n과금은 EIP-7623이 도입한 형태를 유지합니다.\n\n```\nrequire tx.gas \u003e= max(intrinsic_gas, tx_floor)\ngas_used = max(execution_gas_used, tx_floor)\n```\n\n- **고유 gas는 그대로입니다**([EIP-2028](/eip-2028/)에 따라 calldata의 0 바이트 / 0이 아닌 바이트당 여전히 4/16 gas). 하한은 수행하는 연산에 비해 많은 데이터를 싣는 트랜잭션에만 의미가 있습니다.\n- **전체 RLP가 아니라 내용만.** 봉투와 서명 바이트는 21,000 기본 비용에 포함된 것으로 취급하므로, 내용이 같은 두 트랜잭션은 타입과 상관없이 같은 하한을 냅니다.\n- **블록 크기 상한.** 모든 내용 바이트가 최소 64 gas이므로, 블록당 공격자가 제어하는 내용의 총량은 많아야 `block_gas_limit / 64`이며, gas limit 6,000만에서는 약 0.94 MB입니다. 압축에 대한 가정은 필요하지 않습니다.\n\n## 샘플 코드\n\ngas 추정이 모자라지 않도록 클라이언트 측에서 하한을 계산하는 예(TypeScript):\n\n```ts\ntype TxContent = {\n  data: Uint8Array;\n  accessList?: { address: string; storageKeys: string[] }[];\n  authorizationCount?: number;      // EIP-7702 auths\n  blobVersionedHashCount?: number;  // EIP-4844 blob hashes\n};\n\nexport function txFloor(tx: TxContent): bigint {\n  const al = tx.accessList ?? [];\n  const keys = al.reduce((n, e) =\u003e n + e.storageKeys.length, 0);\n  const bytes =\n    tx.data.length +\n    20 * al.length +\n    32 * keys +\n    108 * (tx.authorizationCount ?? 0) +\n    32 * (tx.blobVersionedHashCount ?? 0);\n  return 21000n + 64n * BigInt(bytes);\n}\n\n// gasLimit must be at least max(intrinsic, txFloor(tx))\ntxFloor({ data: new Uint8Array(0), authorizationCount: 1 }); // 27912n\n```\n\n## 알아둘 점\n\n- 상태: **Draft**. 하드포크가 필요하며, EIP-7976과 EIP-7981 위에 쌓는 것이 아니라 그것들을 흡수합니다.\n- 일반 ETH 전송은 영향을 받지 않습니다(하한 = 21,000). 일반적인 토큰 전송은 하한보다 훨씬 낮습니다. 5만 gas 트랜잭션은 하한이 적용되려면 calldata가 약 450바이트를 넘어야 합니다.\n- 가장 큰 영향을 받는 것은 EIP-7702(type-4) 트랜잭션입니다. 각 인가가 이제 하한에서 6,912 gas를 더하기 때문입니다. 또한 32바이트 버전 해시 비용을 내는 blob 포함 트랜잭션도 영향을 받습니다.\n- 지갑과 `eth_estimateGas`는 새 하한을 계산해야 합니다. 그렇지 않으면 하한에 묶인 트랜잭션의 추정치가 너무 낮아 거부됩니다.\n- 스펙에는 메인넷 영향 샘플(2026년 5월)이 자체적으로 포함되어 있습니다. 그 수치는 저자의 측정값일 뿐 보장이 아니라고 보세요.\n"},"zh":{"lang":"zh","tldr":"把交易中每一个用户可控的字节（calldata、访问列表、EIP-7702 授权、blob 哈希）都按下限处统一的 64 gas 定价，用一条简单的规则为最坏情况下的区块大小设定硬上限。","tags":["core","gas","calldata","block-size","pricing"],"related":[7623,7976,7981,7702,4844],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8131/","markdown":"## 它解决什么问题？\n\n节点必须能处理攻击者能构造出的最大区块，而不是平均区块。[EIP-7623](/eip-7623/) 引入了 calldata 的**下限**价格，使数据密集型交易无法廉价地填满区块。后续提案把下限提高到每个 calldata 字节统一 64 gas（[EIP-7976](/eip-7976/)），并扩展到访问列表条目（[EIP-7981](/eip-7981/)）。\n\n交易内容中仍有两类在下限处不需要付任何费用：[EIP-7702](/eip-7702/) 授权元组和 [EIP-4844](/eip-4844/) blob 版本化哈希。而且每增加一个新字段，都需要单独的 EIP 和常量。EIP-8131 用一个涵盖所有用户可控内容字节的公式取代了这些零散的规则。\n\n## 它如何运作\n\n交易的下限为：\n\n```\ntx_floor = 21000 + 64 * (\n      len(calldata)\n    + 20  * access_list_addresses\n    + 32  * access_list_storage_keys\n    + 108 * eip7702_authorizations      # worst-case RLP size of one auth tuple\n    + 32  * blob_versioned_hashes\n)\n```\n\n计费保持 EIP-7623 引入的形式：\n\n```\nrequire tx.gas \u003e= max(intrinsic_gas, tx_floor)\ngas_used = max(execution_gas_used, tx_floor)\n```\n\n- **固有 gas 不变**（按 [EIP-2028](/eip-2028/)，calldata 的零字节 / 非零字节仍分别为 4/16 gas）。下限只对相对于所做计算而言携带大量数据的交易有影响。\n- **只计内容，不计完整 RLP。** 信封和签名字节被视为已由 21,000 的基础成本覆盖，因此内容相同的两笔交易无论类型如何，都支付相同的下限。\n- **区块大小上界。** 由于每个内容字节至少花费 64 gas，每个区块中攻击者可控的内容总量至多为 `block_gas_limit / 64`，在 6000 万 gas limit 下约为 0.94 MB，且无需对压缩做任何假设。\n\n## 示例代码\n\n在客户端计算下限，避免 gas 估算偏低（TypeScript）：\n\n```ts\ntype TxContent = {\n  data: Uint8Array;\n  accessList?: { address: string; storageKeys: string[] }[];\n  authorizationCount?: number;      // EIP-7702 auths\n  blobVersionedHashCount?: number;  // EIP-4844 blob hashes\n};\n\nexport function txFloor(tx: TxContent): bigint {\n  const al = tx.accessList ?? [];\n  const keys = al.reduce((n, e) =\u003e n + e.storageKeys.length, 0);\n  const bytes =\n    tx.data.length +\n    20 * al.length +\n    32 * keys +\n    108 * (tx.authorizationCount ?? 0) +\n    32 * (tx.blobVersionedHashCount ?? 0);\n  return 21000n + 64n * BigInt(bytes);\n}\n\n// gasLimit must be at least max(intrinsic, txFloor(tx))\ntxFloor({ data: new Uint8Array(0), authorizationCount: 1 }); // 27912n\n```\n\n## 需要注意\n\n- 状态：**Draft**。它需要一次硬分叉，并且是把 EIP-7976 和 EIP-7981 并入，而不是叠加在它们之上。\n- 普通的 ETH 转账不受影响（下限 = 21,000）。典型的代币转账远低于下限；一笔 5 万 gas 的交易需要超过约 450 字节的 calldata，下限才会起作用。\n- 影响最大的是 EIP-7702（type-4）交易，因为每个授权现在在下限处增加 6,912 gas；以及携带 blob 的交易，它们要为其 32 字节的版本化哈希付费。\n- 钱包和 `eth_estimateGas` 必须计算新的下限，否则受下限约束的交易的估算会偏低而被拒绝。\n- 规范中包含它自己的主网影响样本（2026 年 5 月）；请把这些数字视为作者的测量结果，而非保证。\n"}},"requiredBy":[8279]}
