{"eip":8038,"title":"State-access gas cost update","description":"Increases the gas cost of state-access operations to reflect Ethereum’s larger state","authors":["Maria Silva (@misilva73)","Wei Han Ng (@weiihann)","Ansgar Dietrichs (@adietrichs)"],"status":"Last Call","type":"Standards Track","category":"Core","created":"2025-10-03","requires":[8037],"discussionsTo":"https://ethereum-magicians.org/t/eip-8038-state-access-gas-cost-update/25693","repo":"EIPs","label":"EIP-8038","officialUrl":"https://eips.ethereum.org/EIPS/eip-8038","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8038.md","url":"https://eips.huatuo.xyz/eip-8038/","tldr":{"en":"Reprices state access for today's much larger Ethereum state: cold account access goes from 2,600 to 3,000 gas, storage writes get an explicit 10,000-gas surcharge, and EXTCODESIZE/EXTCODECOPY pay for their second read.","ja":"はるかに大きくなった現在の Ethereum の状態に合わせて、状態アクセスの価格を見直す。コールドなアカウントアクセスは 2,600 から 3,000 gas に、ストレージ書き込みには 10,000 gas の明示的な加算が付き、EXTCODESIZE/EXTCODECOPY は 2 回目の読み取りの分も支払う。","ko":"훨씬 커진 오늘날 이더리움 상태에 맞춰 상태 접근 가격을 재조정한다. 콜드 계정 접근은 2,600에서 3,000 gas로, 스토리지 쓰기에는 명시적인 10,000 gas 추가 요금이 붙고, EXTCODESIZE/EXTCODECOPY는 두 번째 읽기 비용도 낸다.","zh":"针对如今大得多的以太坊状态重新定价状态访问：冷账户访问从 2,600 涨到 3,000 gas，存储写入新增明确的 10,000 gas 附加费，EXTCODESIZE/EXTCODECOPY 为第二次读取付费。"},"tags":["gas","repricing","state","core","glamsterdam"],"explainers":{"en":{"lang":"en","tldr":"Reprices state access for today's much larger Ethereum state: cold account access goes from 2,600 to 3,000 gas, storage writes get an explicit 10,000-gas surcharge, and EXTCODESIZE/EXTCODECOPY pay for their second read.","tags":["gas","repricing","state","core","glamsterdam"],"related":[2929,8037,2930,7928,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8038/","markdown":"## What problem does it solve?\n\nState-access gas costs were last raised by [EIP-2929](/eip-2929/) in the Berlin fork (2021). Since then the state has grown a lot, and reading or writing it has become slower relative to other EVM work. If an operation is under-priced, a block full of it takes longer to process than its gas suggests, which limits how far the gas limit can safely go.\n\nEIP-8038 re-benchmarks state operations on a mainnet-sized snapshot across execution clients and raises their prices to match, as part of the scaling work alongside [EIP-8037](/eip-8037/) (state creation cost) and [EIP-7928](/eip-7928/) (block-level access lists).\n\n## How it works\n\nEvery state-touching operation is split into up to three components:\n\n1. **Access**: loading an account or slot (cold or warm, same EIP-2929 rules).\n2. **Write**: changing an account's or slot's leaf values. Now explicit as `ACCOUNT_WRITE` and `STORAGE_WRITE`.\n3. **State creation**: adding a new leaf. Left to EIP-8037 and not repriced here.\n\nKey parameter changes:\n\n| Parameter | Old | New |\n| --- | --- | --- |\n| `COLD_ACCOUNT_ACCESS` | 2,600 | 3,000 |\n| `COLD_STORAGE_ACCESS` / `WARM_ACCESS` | 2,100 / 100 | unchanged |\n| `ACCOUNT_WRITE` (part of `CALL_VALUE`) | ~6,700 | 9,000 |\n| `STORAGE_WRITE` | ~2,800 | 10,000 |\n| `CREATE_ACCESS` (replaces part of `CREATE`'s 32,000) | ~7,000 | 12,000 |\n| `STORAGE_CLEAR_REFUND` | 4,800 | 11,616 |\n| Access list address / storage key | 2,400 / 1,900 | 2,900 / 2,000 |\n\nOther rules:\n\n- `SSTORE` charges `STORAGE_WRITE` only on the write that first moves a slot away from its transaction-start value, and refunds it if a later write restores that value. A slot changed many times in one transaction pays the write once.\n- A value-transferring `CALL` pays `CALL_VALUE = ACCOUNT_WRITE + CALL_STIPEND` (9,000 + 2,300) every time.\n- `EXTCODESIZE` and `EXTCODECOPY` pay an extra `WARM_ACCESS` for the second database read (code after account).\n- Refunds remain capped at 20% of gas used.\n\n## Sample code\n\nRough before/after for common operations (Python, execution gas only, ignoring EIP-8037 state gas):\n\n```python\n# New EIP-8038 parameters\nCOLD_ACCOUNT_ACCESS = 3_000\nCOLD_STORAGE_ACCESS = 2_100\nWARM_ACCESS         = 100\nACCOUNT_WRITE       = 9_000\nSTORAGE_WRITE       = 10_000\nCALL_STIPEND        = 2_300\n\ndef sstore_cost(cold: bool, original, current, new) -\u003e int:\n    \"\"\"Execution gas for SSTORE (state-creation gas from EIP-8037 not included).\"\"\"\n    gas = COLD_STORAGE_ACCESS if cold else WARM_ACCESS\n    if new != current and current == original:\n        gas += STORAGE_WRITE          # first move away from tx-start value\n    return gas\n\ndef call_cost(cold: bool, value: int) -\u003e int:\n    gas = COLD_ACCOUNT_ACCESS if cold else WARM_ACCESS\n    if value \u003e 0:\n        gas += ACCOUNT_WRITE + CALL_STIPEND   # CALL_VALUE\n    return gas\n\nprint(sstore_cost(True, 5, 5, 7))   # 12100  (was 5000 under EIP-2929/2200)\nprint(call_cost(True, 1))           # 14300  (was 2600 + 9000 = 11600)\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/)), still in Review. It requires [EIP-8037](/eip-8037/) and a hard fork.\n- Storage-heavy contracts will see the biggest increases; a first write to an existing slot more than doubles in cost. Re-measure gas for contracts with fixed gas assumptions (e.g. hard-coded `gas:` on calls).\n- Wallets and nodes must update `eth_estimateGas`; stale estimators may under-estimate and cause out-of-gas failures.\n- Access lists stay cost-neutral by design: each entry costs the cold price minus the warm price, so prepaying never costs more than a cold touch.\n- The spec itself notes that more analysis is needed on how dApps are affected.\n"},"ja":{"lang":"ja","tldr":"はるかに大きくなった現在の Ethereum の状態に合わせて、状態アクセスの価格を見直す。コールドなアカウントアクセスは 2,600 から 3,000 gas に、ストレージ書き込みには 10,000 gas の明示的な加算が付き、EXTCODESIZE/EXTCODECOPY は 2 回目の読み取りの分も支払う。","tags":["gas","repricing","state","core","glamsterdam"],"related":[2929,8037,2930,7928,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8038/","markdown":"## 何を解決するのか\n\n状態アクセスのガスコストが最後に引き上げられたのは、2021 年の Berlin フォークでの [EIP-2929](/eip-2929/) です。それ以降、状態は大きく成長し、状態の読み書きは他の EVM の処理と比べて遅くなりました。ある操作の価格が低すぎると、それで埋め尽くされたブロックは、ガスから想定される以上に処理に時間がかかり、ガスリミットをどこまで安全に上げられるかが制限されます。\n\nEIP-8038 は、メインネット規模のスナップショットを使って複数の実行クライアントで状態操作を再ベンチマークし、それに見合うよう価格を引き上げます。これは [EIP-8037](/eip-8037/)（状態作成コスト）や [EIP-7928](/eip-7928/)（ブロックレベルのアクセスリスト）と並ぶスケーリング作業の一部です。\n\n## 仕組み\n\n状態に触れるすべての操作は、最大 3 つの要素に分割されます。\n\n1. **アクセス**: アカウントまたはスロットの読み込み（コールドかウォームか、規則は EIP-2929 と同じ）。\n2. **書き込み**: アカウントまたはスロットのリーフ値の変更。`ACCOUNT_WRITE` と `STORAGE_WRITE` として明示されるようになります。\n3. **状態作成**: 新しいリーフの追加。EIP-8037 に委ねられ、ここでは価格を変更しません。\n\n主なパラメータの変更:\n\n| パラメータ | 旧 | 新 |\n| --- | --- | --- |\n| `COLD_ACCOUNT_ACCESS` | 2,600 | 3,000 |\n| `COLD_STORAGE_ACCESS` / `WARM_ACCESS` | 2,100 / 100 | 変更なし |\n| `ACCOUNT_WRITE`（`CALL_VALUE` の一部） | 約 6,700 | 9,000 |\n| `STORAGE_WRITE` | 約 2,800 | 10,000 |\n| `CREATE_ACCESS`（`CREATE` の 32,000 の一部を置き換え） | 約 7,000 | 12,000 |\n| `STORAGE_CLEAR_REFUND` | 4,800 | 11,616 |\n| アクセスリストのアドレス / ストレージキー | 2,400 / 1,900 | 2,900 / 2,000 |\n\nその他のルール:\n\n- `SSTORE` は、スロットをトランザクション開始時の値から初めて動かす書き込みでのみ `STORAGE_WRITE` を課し、後の書き込みでその値に戻った場合は返金します。1 つのトランザクション内で何度も変更されたスロットは、書き込みコストを 1 回だけ支払います。\n- 価値を送る `CALL` は、毎回 `CALL_VALUE = ACCOUNT_WRITE + CALL_STIPEND`（9,000 + 2,300）を支払います。\n- `EXTCODESIZE` と `EXTCODECOPY` は、2 回目のデータベース読み取り（アカウントの次にコード）の分として、追加で `WARM_ACCESS` を支払います。\n- 返金は引き続きガス使用量の 20% が上限です。\n\n## サンプルコード\n\n一般的な操作の変更前後のおおまかな比較（Python、実行ガスのみ、EIP-8037 の状態ガスは無視）:\n\n```python\n# New EIP-8038 parameters\nCOLD_ACCOUNT_ACCESS = 3_000\nCOLD_STORAGE_ACCESS = 2_100\nWARM_ACCESS         = 100\nACCOUNT_WRITE       = 9_000\nSTORAGE_WRITE       = 10_000\nCALL_STIPEND        = 2_300\n\ndef sstore_cost(cold: bool, original, current, new) -\u003e int:\n    \"\"\"Execution gas for SSTORE (state-creation gas from EIP-8037 not included).\"\"\"\n    gas = COLD_STORAGE_ACCESS if cold else WARM_ACCESS\n    if new != current and current == original:\n        gas += STORAGE_WRITE          # first move away from tx-start value\n    return gas\n\ndef call_cost(cold: bool, value: int) -\u003e int:\n    gas = COLD_ACCOUNT_ACCESS if cold else WARM_ACCESS\n    if value \u003e 0:\n        gas += ACCOUNT_WRITE + CALL_STIPEND   # CALL_VALUE\n    return gas\n\nprint(sstore_cost(True, 5, 5, 7))   # 12100  (was 5000 under EIP-2929/2200)\nprint(call_cost(True, 1))           # 14300  (was 2600 + 9000 = 11600)\n```\n\n## 知っておくべきこと\n\n- **ステータス: Last Call**（仕様上の期限は 2026-11-01）。Glamsterdam のメタ EIP（[EIP-7773](/eip-7773/)）では Scheduled for Inclusion に挙げられていますが、そのメタ EIP はまだ Review です。[EIP-8037](/eip-8037/) とハードフォークが必要です。\n- ストレージを多用するコントラクトで最も大きな上昇が見られます。既存スロットへの最初の書き込みのコストは 2 倍以上になります。ガスの前提を固定しているコントラクト（たとえば呼び出しにハードコードした `gas:`）は、ガスを測り直してください。\n- ウォレットとノードは `eth_estimateGas` を更新する必要があります。古い見積もりでは過小評価となり、ガス不足による失敗を招くおそれがあります。\n- アクセスリストは設計上コスト中立のままです。各エントリのコストはコールド価格からウォーム価格を引いた額なので、事前に支払ってもコールドで触れるより高くなることはありません。\n- 仕様自身が、dApp への影響についてさらなる分析が必要だと述べています。\n"},"ko":{"lang":"ko","tldr":"훨씬 커진 오늘날 이더리움 상태에 맞춰 상태 접근 가격을 재조정한다. 콜드 계정 접근은 2,600에서 3,000 gas로, 스토리지 쓰기에는 명시적인 10,000 gas 추가 요금이 붙고, EXTCODESIZE/EXTCODECOPY는 두 번째 읽기 비용도 낸다.","tags":["gas","repricing","state","core","glamsterdam"],"related":[2929,8037,2930,7928,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8038/","markdown":"## 어떤 문제를 해결하나요?\n\n상태 접근 gas 비용이 마지막으로 인상된 것은 2021년 베를린 포크의 [EIP-2929](/eip-2929/)입니다. 그 후 상태가 크게 늘었고, 상태를 읽고 쓰는 일이 다른 EVM 작업에 비해 느려졌습니다. 어떤 연산의 가격이 너무 낮으면, 그 연산으로 가득 찬 블록은 gas가 시사하는 것보다 처리 시간이 더 오래 걸리고, 이는 gas limit을 얼마나 안전하게 올릴 수 있는지를 제한합니다.\n\nEIP-8038은 메인넷 규모의 스냅샷에서 여러 실행 클라이언트에 걸쳐 상태 연산을 다시 벤치마크하고 그에 맞춰 가격을 올립니다. 이는 [EIP-8037](/eip-8037/)(상태 생성 비용) 및 [EIP-7928](/eip-7928/)(블록 레벨 액세스 리스트)과 함께 진행되는 확장 작업의 일부입니다.\n\n## 어떻게 동작하나요?\n\n상태를 건드리는 모든 연산은 최대 세 가지 구성 요소로 나뉩니다.\n\n1. **접근(Access)**: 계정 또는 슬롯을 로드(콜드 또는 워밍, 규칙은 EIP-2929와 동일).\n2. **쓰기(Write)**: 계정 또는 슬롯의 리프 값을 변경. 이제 `ACCOUNT_WRITE`와 `STORAGE_WRITE`로 명시됩니다.\n3. **상태 생성(State creation)**: 새 리프를 추가. EIP-8037에 맡기며 여기서는 재조정하지 않습니다.\n\n주요 파라미터 변경:\n\n| 파라미터 | 이전 | 이후 |\n| --- | --- | --- |\n| `COLD_ACCOUNT_ACCESS` | 2,600 | 3,000 |\n| `COLD_STORAGE_ACCESS` / `WARM_ACCESS` | 2,100 / 100 | 변경 없음 |\n| `ACCOUNT_WRITE` (`CALL_VALUE`의 일부) | 약 6,700 | 9,000 |\n| `STORAGE_WRITE` | 약 2,800 | 10,000 |\n| `CREATE_ACCESS` (`CREATE`의 32,000 중 일부를 대체) | 약 7,000 | 12,000 |\n| `STORAGE_CLEAR_REFUND` | 4,800 | 11,616 |\n| 액세스 리스트 주소 / 스토리지 키 | 2,400 / 1,900 | 2,900 / 2,000 |\n\n그 밖의 규칙:\n\n- `SSTORE`는 슬롯을 트랜잭션 시작 시점의 값에서 처음 벗어나게 하는 쓰기에서만 `STORAGE_WRITE`를 부과하고, 이후 쓰기가 그 값을 복원하면 환급합니다. 한 트랜잭션에서 여러 번 바뀐 슬롯은 쓰기 비용을 한 번만 냅니다.\n- 값을 전송하는 `CALL`은 매번 `CALL_VALUE = ACCOUNT_WRITE + CALL_STIPEND`(9,000 + 2,300)를 냅니다.\n- `EXTCODESIZE`와 `EXTCODECOPY`는 두 번째 데이터베이스 읽기(계정 다음에 코드) 비용으로 `WARM_ACCESS`를 추가로 냅니다.\n- 환급은 여전히 사용한 gas의 20%로 상한이 있습니다.\n\n## 샘플 코드\n\n일반적인 연산의 전후 비용을 대략 비교한 예(Python, 실행 gas만, EIP-8037 상태 gas는 무시):\n\n```python\n# New EIP-8038 parameters\nCOLD_ACCOUNT_ACCESS = 3_000\nCOLD_STORAGE_ACCESS = 2_100\nWARM_ACCESS         = 100\nACCOUNT_WRITE       = 9_000\nSTORAGE_WRITE       = 10_000\nCALL_STIPEND        = 2_300\n\ndef sstore_cost(cold: bool, original, current, new) -\u003e int:\n    \"\"\"Execution gas for SSTORE (state-creation gas from EIP-8037 not included).\"\"\"\n    gas = COLD_STORAGE_ACCESS if cold else WARM_ACCESS\n    if new != current and current == original:\n        gas += STORAGE_WRITE          # first move away from tx-start value\n    return gas\n\ndef call_cost(cold: bool, value: int) -\u003e int:\n    gas = COLD_ACCOUNT_ACCESS if cold else WARM_ACCESS\n    if value \u003e 0:\n        gas += ACCOUNT_WRITE + CALL_STIPEND   # CALL_VALUE\n    return gas\n\nprint(sstore_cost(True, 5, 5, 7))   # 12100  (was 5000 under EIP-2929/2200)\nprint(call_cost(True, 1))           # 14300  (was 2600 + 9000 = 11600)\n```\n\n## 알아둘 점\n\n- **상태: Last Call**(스펙상 기한 2026-11-01). Glamsterdam 메타 EIP([EIP-7773](/eip-7773/))에서 Scheduled for Inclusion으로 올라 있지만, 해당 메타 EIP는 아직 Review입니다. [EIP-8037](/eip-8037/)과 하드포크가 필요합니다.\n- 스토리지를 많이 쓰는 컨트랙트가 가장 크게 오릅니다. 기존 슬롯에 대한 첫 쓰기는 비용이 두 배 넘게 늘어납니다. gas 가정이 고정된 컨트랙트(예: 호출에 하드코딩된 `gas:`)는 gas를 다시 측정하세요.\n- 지갑과 노드는 `eth_estimateGas`를 업데이트해야 합니다. 오래된 추정기는 과소 추정해 out-of-gas 실패를 일으킬 수 있습니다.\n- 액세스 리스트는 설계상 비용 중립으로 유지됩니다. 각 항목의 비용은 콜드 가격에서 워밍 가격을 뺀 값이므로, 미리 지불해도 콜드로 건드리는 것보다 비용이 더 들지 않습니다.\n- 스펙 자체도 dApp이 어떤 영향을 받는지에 대해서는 더 많은 분석이 필요하다고 밝히고 있습니다.\n"},"zh":{"lang":"zh","tldr":"针对如今大得多的以太坊状态重新定价状态访问：冷账户访问从 2,600 涨到 3,000 gas，存储写入新增明确的 10,000 gas 附加费，EXTCODESIZE/EXTCODECOPY 为第二次读取付费。","tags":["gas","repricing","state","core","glamsterdam"],"related":[2929,8037,2930,7928,7773],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8038/","markdown":"## 它解决什么问题？\n\n状态访问的 gas 成本上一次上调，是 2021 年柏林硬分叉中的 [EIP-2929](/eip-2929/)。此后状态大幅增长，相对于其他 EVM 工作，读写状态变得更慢。如果某个操作定价过低，满是该操作的区块处理时间会比其 gas 暗示的更长，从而限制了 gas limit 能安全提高到多少。\n\nEIP-8038 在主网规模的快照上，跨多个执行客户端重新对状态操作做基准测试，并相应提高价格，这是与 [EIP-8037](/eip-8037/)（状态创建成本）和 [EIP-7928](/eip-7928/)（区块级访问列表）并行的扩容工作的一部分。\n\n## 它如何运作\n\n每个触及状态的操作最多被拆分为三个部分：\n\n1. **访问**：加载账户或存储槽（冷或热，规则与 EIP-2929 相同）。\n2. **写入**：修改账户或存储槽的叶子值。现在明确为 `ACCOUNT_WRITE` 和 `STORAGE_WRITE`。\n3. **状态创建**：新增叶子。交由 EIP-8037 处理，此处不重新定价。\n\n主要参数变化：\n\n| 参数 | 旧值 | 新值 |\n| --- | --- | --- |\n| `COLD_ACCOUNT_ACCESS` | 2,600 | 3,000 |\n| `COLD_STORAGE_ACCESS` / `WARM_ACCESS` | 2,100 / 100 | 不变 |\n| `ACCOUNT_WRITE`（`CALL_VALUE` 的一部分） | 约 6,700 | 9,000 |\n| `STORAGE_WRITE` | 约 2,800 | 10,000 |\n| `CREATE_ACCESS`（取代 `CREATE` 的 32,000 中的一部分） | 约 7,000 | 12,000 |\n| `STORAGE_CLEAR_REFUND` | 4,800 | 11,616 |\n| 访问列表地址 / 存储键 | 2,400 / 1,900 | 2,900 / 2,000 |\n\n其他规则：\n\n- `SSTORE` 只在首次让存储槽偏离其交易开始时的值的那次写入上收取 `STORAGE_WRITE`，如果之后的写入把该值恢复，则退还。在一笔交易中被多次修改的存储槽，只需支付一次写入费用。\n- 转移价值的 `CALL` 每次都要支付 `CALL_VALUE = ACCOUNT_WRITE + CALL_STIPEND`（9,000 + 2,300）。\n- `EXTCODESIZE` 和 `EXTCODECOPY` 为第二次数据库读取（先账户后代码）额外支付一次 `WARM_ACCESS`。\n- 退款仍以已用 gas 的 20% 为上限。\n\n## 示例代码\n\n常见操作新旧成本的粗略对比（Python，仅执行 gas，忽略 EIP-8037 的状态 gas）：\n\n```python\n# New EIP-8038 parameters\nCOLD_ACCOUNT_ACCESS = 3_000\nCOLD_STORAGE_ACCESS = 2_100\nWARM_ACCESS         = 100\nACCOUNT_WRITE       = 9_000\nSTORAGE_WRITE       = 10_000\nCALL_STIPEND        = 2_300\n\ndef sstore_cost(cold: bool, original, current, new) -\u003e int:\n    \"\"\"Execution gas for SSTORE (state-creation gas from EIP-8037 not included).\"\"\"\n    gas = COLD_STORAGE_ACCESS if cold else WARM_ACCESS\n    if new != current and current == original:\n        gas += STORAGE_WRITE          # first move away from tx-start value\n    return gas\n\ndef call_cost(cold: bool, value: int) -\u003e int:\n    gas = COLD_ACCOUNT_ACCESS if cold else WARM_ACCESS\n    if value \u003e 0:\n        gas += ACCOUNT_WRITE + CALL_STIPEND   # CALL_VALUE\n    return gas\n\nprint(sstore_cost(True, 5, 5, 7))   # 12100  (was 5000 under EIP-2929/2200)\nprint(call_cost(True, 1))           # 14300  (was 2600 + 9000 = 11600)\n```\n\n## 需要注意\n\n- **状态：Last Call**（规范中的截止日期为 2026-11-01）。它在 Glamsterdam 元 EIP（[EIP-7773](/eip-7773/)）中被列为 Scheduled for Inclusion，而该元 EIP 仍处于 Review。它依赖 [EIP-8037](/eip-8037/) 和一次硬分叉。\n- 大量使用存储的合约涨幅最大；对已有存储槽的首次写入成本会增加一倍以上。对于有固定 gas 假设的合约（例如调用中硬编码的 `gas:`），请重新测量 gas。\n- 钱包和节点必须更新 `eth_estimateGas`；过时的估算器可能低估并导致 out-of-gas 失败。\n- 访问列表在设计上保持成本中性：每个条目的费用是冷价格减去热价格，因此预付费用永远不会比一次冷访问花得更多。\n- 规范本身指出，关于 dApp 受到怎样的影响，还需要更多分析。\n"}},"requiredBy":[2780,3298,8007,8037,8151,8250,8295,8296,8298,8358,8360]}
