{"eip":7981,"title":"Increase Access List Cost","description":"Price access lists for data to reduce maximum block size","authors":["Toni Wahrstätter (@nerolation)"],"status":"Last Call","type":"Standards Track","category":"Core","created":"2024-12-27","requires":[2930,7623,7976],"discussionsTo":"https://ethereum-magicians.org/t/eip-7981-increase-access-list-cost/24680","repo":"EIPs","label":"EIP-7981","officialUrl":"https://eips.ethereum.org/EIPS/eip-7981","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7981.md","url":"https://eips.huatuo.xyz/eip-7981/","tldr":{"en":"Charges access lists an extra 64 gas per byte of data so they can no longer be combined with calldata to dodge the calldata floor price, cutting the worst-case block size by about 21%.","ja":"アクセスリストにデータ 1 バイトあたり追加で 64 gas を課し、calldata と組み合わせて calldata のフロア価格を回避できないようにする。最悪ケースのブロックサイズが約 21% 小さくなる。","ko":"액세스 리스트에 데이터 바이트당 추가로 64 gas를 부과해, calldata와 조합해 calldata 하한 가격을 피할 수 없게 한다. 최악의 경우 블록 크기가 약 21% 줄어든다.","zh":"对访问列表的每个字节数据额外收取 64 gas，使其无法再与 calldata 组合来规避 calldata 下限价格，最坏情况下的区块大小约减少 21%。"},"tags":["gas","access-lists","calldata","core","glamsterdam"],"explainers":{"en":{"lang":"en","tldr":"Charges access lists an extra 64 gas per byte of data so they can no longer be combined with calldata to dodge the calldata floor price, cutting the worst-case block size by about 21%.","tags":["gas","access-lists","calldata","core","glamsterdam"],"related":[2930,7623,7976,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7981/","markdown":"## What problem does it solve?\n\n[EIP-7623](/eip-7623/) and its follow-up [EIP-7976](/eip-7976/) put a **floor** on calldata pricing: a transaction that carries lots of data but does little computation pays a higher per-byte rate. That limits how large a block can get in bytes.\n\n[EIP-2930](/eip-2930/) access lists, however, are priced only for the storage warming they provide (2,400 gas per address, 1,900 per storage key), not for the bytes they add to the block. Their gas counts as \"execution-side\" gas, so a transaction can mix access lists with calldata in the right ratio to reach maximum block size without ever hitting the floor. EIP-7981 closes that loophole. The spec estimates it reduces the worst-case block size by about 21% with little impact on normal users.\n\n## How it works\n\n- Count access list bytes: **20 bytes per address + 32 bytes per storage key**.\n- `access_list_data_cost = 64 × access_list_bytes`, i.e. **1,280 gas per address** and **2,048 gas per storage key**. 64 gas/byte matches the EIP-7976 floor rate.\n- This cost is added as a **flat surcharge outside** the `max(…)` between normal intrinsic+execution gas and the calldata floor. The existing EIP-2930 costs and the EIP-7976 floor formula are unchanged.\n\n```python\ntx.gasUsed = (\n    21000\n    + access_list_data_cost\n    + max(\n        STANDARD_TOKEN_COST * tokens_in_calldata\n        + execution_gas_used\n        + is_create * (32000 + INITCODE_WORD_COST * words(calldata))\n        + access_list_cost,\n        TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata,\n    )\n)\n```\n\nA transaction whose gas limit is below `tx.gasUsed` computed with zero execution gas is invalid.\n\n## Sample code\n\nEstimating the new surcharge for an access list (TypeScript):\n\n```ts\ntype AccessListEntry = { address: string; storageKeys: string[] };\n\nconst BYTES_PER_ADDRESS = 20;\nconst BYTES_PER_KEY = 32;\nconst GAS_PER_BYTE = 64n;\n\nfunction accessListDataCost(list: AccessListEntry[]): bigint {\n  const bytes = list.reduce(\n    (sum, e) =\u003e sum + BYTES_PER_ADDRESS + BYTES_PER_KEY * e.storageKeys.length, 0);\n  return BigInt(bytes) * GAS_PER_BYTE;\n}\n\n// One address with two keys: (20 + 64) * 64 = 5,376 extra gas\n// on top of the EIP-2930 cost of 2,400 + 2 * 1,900 = 6,200.\nconsole.log(accessListDataCost([{ address: \"0x\" + \"11\".repeat(20), storageKeys: [\"0x01\", \"0x02\"] }]));\n```\n\n## Things to know\n\n- **Status: Last Call** (deadline 2026-11-01 in the spec). It is listed as Scheduled for Inclusion in the Glamsterdam meta EIP ([EIP-7773](/eip-7773/)), which is still in Review. Activation requires a hard fork.\n- Access lists become noticeably more expensive. A list that used to save a little gas by pre-warming slots may now cost more than it saves; wallets and SDKs that auto-attach access lists should re-check whether they help.\n- Gas estimation in wallets and nodes must be updated.\n- The spec's rationale text describes access list tokens as part of the floor calculation, while the formula and reference code add a separate flat surcharge; the formula is the normative part.\n"},"ja":{"lang":"ja","tldr":"アクセスリストにデータ 1 バイトあたり追加で 64 gas を課し、calldata と組み合わせて calldata のフロア価格を回避できないようにする。最悪ケースのブロックサイズが約 21% 小さくなる。","tags":["gas","access-lists","calldata","core","glamsterdam"],"related":[2930,7623,7976,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7981/","markdown":"## 何を解決するのか\n\n[EIP-7623](/eip-7623/) とその後継の [EIP-7976](/eip-7976/) は calldata の価格に**フロア**を設けました。大量のデータを運ぶ一方で計算をほとんど行わないトランザクションは、バイトあたりの料金が高くなります。これによりブロックのバイトサイズの上限が抑えられます。\n\nしかし [EIP-2930](/eip-2930/) のアクセスリストは、それがもたらすストレージのウォーミング（アドレスあたり 2,400 gas、ストレージキーあたり 1,900 gas）に対してのみ価格が付けられており、ブロックに加えるバイト数には課金されません。そのガスは「実行側」のガスとして数えられるため、トランザクションはアクセスリストと calldata を適切な比率で混ぜることで、フロアに到達することなく最大のブロックサイズに達することができます。EIP-7981 はこの抜け穴を塞ぎます。仕様は、通常のユーザーへの影響は小さいまま、最悪ケースのブロックサイズを約 21% 減らせると見積もっています。\n\n## 仕組み\n\n- アクセスリストのバイト数を数えます。**アドレス 1 つにつき 20 バイト、ストレージキー 1 つにつき 32 バイト**です。\n- `access_list_data_cost = 64 × access_list_bytes`、つまり**アドレスあたり 1,280 gas**、**ストレージキーあたり 2,048 gas** です。64 gas/バイトは EIP-7976 のフロアレートと一致します。\n- このコストは、通常の固有ガス＋実行ガスと calldata フロアの間の `max(…)` の**外側**に、**定額の加算**として足されます。既存の EIP-2930 のコストと EIP-7976 のフロア計算式は変わりません。\n\n```python\ntx.gasUsed = (\n    21000\n    + access_list_data_cost\n    + max(\n        STANDARD_TOKEN_COST * tokens_in_calldata\n        + execution_gas_used\n        + is_create * (32000 + INITCODE_WORD_COST * words(calldata))\n        + access_list_cost,\n        TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata,\n    )\n)\n```\n\n実行ガスをゼロとして計算した `tx.gasUsed` よりガスリミットが小さいトランザクションは無効です。\n\n## サンプルコード\n\nアクセスリストに対する新しい加算コストを見積もる例（TypeScript）:\n\n```ts\ntype AccessListEntry = { address: string; storageKeys: string[] };\n\nconst BYTES_PER_ADDRESS = 20;\nconst BYTES_PER_KEY = 32;\nconst GAS_PER_BYTE = 64n;\n\nfunction accessListDataCost(list: AccessListEntry[]): bigint {\n  const bytes = list.reduce(\n    (sum, e) =\u003e sum + BYTES_PER_ADDRESS + BYTES_PER_KEY * e.storageKeys.length, 0);\n  return BigInt(bytes) * GAS_PER_BYTE;\n}\n\n// One address with two keys: (20 + 64) * 64 = 5,376 extra gas\n// on top of the EIP-2930 cost of 2,400 + 2 * 1,900 = 6,200.\nconsole.log(accessListDataCost([{ address: \"0x\" + \"11\".repeat(20), storageKeys: [\"0x01\", \"0x02\"] }]));\n```\n\n## 知っておくべきこと\n\n- **ステータス: Last Call**（仕様上の期限は 2026-11-01）。Glamsterdam のメタ EIP（[EIP-7773](/eip-7773/)）では Scheduled for Inclusion に挙げられていますが、そのメタ EIP 自体はまだ Review です。有効化にはハードフォークが必要です。\n- アクセスリストは目に見えて高価になります。これまでスロットを事前にウォームすることで少しガスを節約できていたリストは、節約分より高くつく場合があります。アクセスリストを自動で付けるウォレットや SDK は、それが有効かどうか再確認すべきです。\n- ウォレットやノードのガス見積もりを更新する必要があります。\n- 仕様の理由づけ（rationale）の文章はアクセスリストのトークンをフロア計算の一部として説明していますが、計算式とリファレンスコードは別の定額加算を足しています。規範となるのは計算式です。\n"},"ko":{"lang":"ko","tldr":"액세스 리스트에 데이터 바이트당 추가로 64 gas를 부과해, calldata와 조합해 calldata 하한 가격을 피할 수 없게 한다. 최악의 경우 블록 크기가 약 21% 줄어든다.","tags":["gas","access-lists","calldata","core","glamsterdam"],"related":[2930,7623,7976,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7981/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-7623](/eip-7623/)과 그 후속인 [EIP-7976](/eip-7976/)은 calldata 가격에 **하한(floor)**을 두었습니다. 데이터는 많이 싣지만 연산은 거의 하지 않는 트랜잭션은 바이트당 더 높은 요금을 냅니다. 이로써 블록이 바이트 단위로 얼마나 커질 수 있는지가 제한됩니다.\n\n그런데 [EIP-2930](/eip-2930/) 액세스 리스트는 그것이 제공하는 스토리지 워밍(주소당 2,400 gas, 스토리지 키당 1,900 gas)에 대해서만 가격이 매겨져 있고, 블록에 추가하는 바이트에는 요금이 붙지 않습니다. 이 gas는 \"실행 쪽\" gas로 계산되므로, 트랜잭션은 액세스 리스트와 calldata를 적절한 비율로 섞어 하한에 걸리지 않고도 최대 블록 크기에 도달할 수 있습니다. EIP-7981은 이 허점을 막습니다. 스펙은 일반 사용자에게 거의 영향을 주지 않으면서 최악의 경우 블록 크기를 약 21% 줄일 수 있다고 추정합니다.\n\n## 어떻게 동작하나요?\n\n- 액세스 리스트의 바이트 수를 셉니다. **주소당 20바이트 + 스토리지 키당 32바이트**입니다.\n- `access_list_data_cost = 64 × access_list_bytes`, 즉 **주소당 1,280 gas**, **스토리지 키당 2,048 gas**입니다. 바이트당 64 gas는 EIP-7976의 하한 요율과 같습니다.\n- 이 비용은 일반 고유 gas + 실행 gas와 calldata 하한 사이의 `max(…)` **바깥**에 **정액 추가 요금**으로 더해집니다. 기존 EIP-2930 비용과 EIP-7976 하한 공식은 그대로입니다.\n\n```python\ntx.gasUsed = (\n    21000\n    + access_list_data_cost\n    + max(\n        STANDARD_TOKEN_COST * tokens_in_calldata\n        + execution_gas_used\n        + is_create * (32000 + INITCODE_WORD_COST * words(calldata))\n        + access_list_cost,\n        TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata,\n    )\n)\n```\n\ngas limit이 실행 gas를 0으로 두고 계산한 `tx.gasUsed`보다 낮은 트랜잭션은 유효하지 않습니다.\n\n## 샘플 코드\n\n액세스 리스트에 대한 새 추가 요금 추정(TypeScript):\n\n```ts\ntype AccessListEntry = { address: string; storageKeys: string[] };\n\nconst BYTES_PER_ADDRESS = 20;\nconst BYTES_PER_KEY = 32;\nconst GAS_PER_BYTE = 64n;\n\nfunction accessListDataCost(list: AccessListEntry[]): bigint {\n  const bytes = list.reduce(\n    (sum, e) =\u003e sum + BYTES_PER_ADDRESS + BYTES_PER_KEY * e.storageKeys.length, 0);\n  return BigInt(bytes) * GAS_PER_BYTE;\n}\n\n// One address with two keys: (20 + 64) * 64 = 5,376 extra gas\n// on top of the EIP-2930 cost of 2,400 + 2 * 1,900 = 6,200.\nconsole.log(accessListDataCost([{ address: \"0x\" + \"11\".repeat(20), storageKeys: [\"0x01\", \"0x02\"] }]));\n```\n\n## 알아둘 점\n\n- **상태: Last Call**(스펙상 기한 2026-11-01). Glamsterdam 메타 EIP([EIP-7773](/eip-7773/))에서 Scheduled for Inclusion으로 올라 있지만, 그 메타 EIP 자체는 아직 Review입니다. 활성화에는 하드포크가 필요합니다.\n- 액세스 리스트가 눈에 띄게 비싸집니다. 슬롯을 미리 워밍해 gas를 조금 아끼던 리스트가 이제는 절약하는 것보다 더 많은 비용이 들 수 있습니다. 액세스 리스트를 자동으로 붙이는 지갑과 SDK는 여전히 도움이 되는지 다시 확인해야 합니다.\n- 지갑과 노드의 gas 추정을 업데이트해야 합니다.\n- 스펙의 근거(rationale) 문단은 액세스 리스트 토큰을 하한 계산의 일부로 설명하지만, 공식과 레퍼런스 코드는 별도의 정액 추가 요금을 더합니다. 규범적인 것은 공식입니다.\n"},"zh":{"lang":"zh","tldr":"对访问列表的每个字节数据额外收取 64 gas，使其无法再与 calldata 组合来规避 calldata 下限价格，最坏情况下的区块大小约减少 21%。","tags":["gas","access-lists","calldata","core","glamsterdam"],"related":[2930,7623,7976,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7981/","markdown":"## 它解决什么问题？\n\n[EIP-7623](/eip-7623/) 及其后续的 [EIP-7976](/eip-7976/) 为 calldata 定价设了**下限**：携带大量数据但几乎不做计算的交易，每字节要付更高的价格。这限制了区块在字节数上能增长到多大。\n\n然而，[EIP-2930](/eip-2930/) 访问列表的定价只对应它带来的存储预热（每个地址 2,400 gas，每个存储键 1,900 gas），并不对它给区块增加的字节收费。它的 gas 被算作“执行侧”gas，因此交易可以按合适的比例混合使用访问列表和 calldata，在从不触及下限的情况下达到最大区块大小。EIP-7981 堵上了这个漏洞。规范估计，它能把最坏情况下的区块大小降低约 21%，对普通用户影响很小。\n\n## 它如何运作\n\n- 统计访问列表的字节数：**每个地址 20 字节 + 每个存储键 32 字节**。\n- `access_list_data_cost = 64 × access_list_bytes`，即**每个地址 1,280 gas**、**每个存储键 2,048 gas**。每字节 64 gas 与 EIP-7976 的下限费率一致。\n- 这笔费用作为**固定附加费**加在普通固有 gas + 执行 gas 与 calldata 下限之间的 `max(…)` **之外**。现有的 EIP-2930 费用和 EIP-7976 的下限公式保持不变。\n\n```python\ntx.gasUsed = (\n    21000\n    + access_list_data_cost\n    + max(\n        STANDARD_TOKEN_COST * tokens_in_calldata\n        + execution_gas_used\n        + is_create * (32000 + INITCODE_WORD_COST * words(calldata))\n        + access_list_cost,\n        TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata,\n    )\n)\n```\n\n如果交易的 gas limit 低于按执行 gas 为零计算出的 `tx.gasUsed`，则该交易无效。\n\n## 示例代码\n\n估算访问列表新增附加费（TypeScript）：\n\n```ts\ntype AccessListEntry = { address: string; storageKeys: string[] };\n\nconst BYTES_PER_ADDRESS = 20;\nconst BYTES_PER_KEY = 32;\nconst GAS_PER_BYTE = 64n;\n\nfunction accessListDataCost(list: AccessListEntry[]): bigint {\n  const bytes = list.reduce(\n    (sum, e) =\u003e sum + BYTES_PER_ADDRESS + BYTES_PER_KEY * e.storageKeys.length, 0);\n  return BigInt(bytes) * GAS_PER_BYTE;\n}\n\n// One address with two keys: (20 + 64) * 64 = 5,376 extra gas\n// on top of the EIP-2930 cost of 2,400 + 2 * 1,900 = 6,200.\nconsole.log(accessListDataCost([{ address: \"0x\" + \"11\".repeat(20), storageKeys: [\"0x01\", \"0x02\"] }]));\n```\n\n## 需要注意\n\n- **状态：Last Call**（规范中的截止日期为 2026-11-01）。它在 Glamsterdam 元 EIP（[EIP-7773](/eip-7773/)）中被列为 Scheduled for Inclusion，而该元 EIP 本身仍处于 Review。激活需要硬分叉。\n- 访问列表会明显变贵。过去通过预热存储槽稍微节省 gas 的列表，现在花费可能超过节省。会自动附加访问列表的钱包和 SDK 应重新检查它们是否仍然有益。\n- 钱包和节点中的 gas 估算必须更新。\n- 规范的原理（rationale）文字把访问列表 token 描述为下限计算的一部分，而公式和参考代码则是加上一笔单独的固定附加费；公式才是规范性的部分。\n"}},"requiredBy":[8007,8131,8279]}
