{"eip":8372,"title":"Normalized state gas limit","description":"Scales and normalizes the state-gas limit to better balance state-gas and execution-gas utilization.","authors":["Anders Elowsson (@anderselowsson)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2026-08-06","requires":[8037],"discussionsTo":"https://ethereum-magicians.org/t/eip-8372-normalized-state-gas-limit/29332","repo":"EIPs","label":"EIP-8372","officialUrl":"https://eips.ethereum.org/EIPS/eip-8372","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8372.md","url":"https://eips.huatuo.xyz/eip-8372/","tldr":{"en":"Proposes giving EIP-8037 state gas its own scaled block limit and normalizing it before computing gas_used, so the state-byte price can match real demand without leaving either state gas or execution gas underused.","ja":"EIP-8037 のステートガスに独自のスケール済みブロックリミットを与え、gas_used を計算する前に正規化することを提案する。これにより、ステートバイトの価格を実際の需要に合わせられ、ステートガスと実行ガスのどちらも使い切れずに余らせずに済む。","ko":"EIP-8037 상태 가스에 별도의 스케일된 블록 한도를 주고 gas_used를 계산하기 전에 이를 정규화하자고 제안한다. 상태 바이트 가격을 실제 수요에 맞추면서 상태 가스나 실행 가스 어느 쪽도 덜 쓰이지 않게 한다.","zh":"提议为 EIP-8037 的状态 gas 设置独立的缩放区块上限，并在计算 gas_used 之前对其归一化，使状态字节的价格能够匹配真实需求，同时不会让状态 gas 或执行 gas 任何一方闲置。"},"tags":["gas","state-growth","gas-limit","core","glamsterdam"],"explainers":{"en":{"lang":"en","tldr":"Proposes giving EIP-8037 state gas its own scaled block limit and normalizing it before computing gas_used, so the state-byte price can match real demand without leaving either state gas or execution gas underused.","tags":["gas","state-growth","gas-limit","core","glamsterdam"],"related":[8037,7999,8075],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8372/","markdown":"## What problem does it solve?\n\n[EIP-8037](/eip-8037/) splits gas into two kinds: *state gas* for creating new state (accounts, storage, code) and *execution gas* for everything else. Both share the same block limit, and the block's `gas_used` is the larger of the two totals. The cost per state byte (`CPSB`) therefore fixes how much new state the 50% target allows.\n\nThat only works if users happen to want to spend about half their gas on state creation at that price:\n\n- If state demand is **lower**, too little state is created relative to the intended growth target.\n- If it is **higher**, state gas hits its target first and becomes the bottleneck, crowding out execution.\n\nA fully adaptive multi-dimensional fee market ([EIP-7999](/eip-7999/)) or a dynamic state price ([EIP-8075](/eip-8075/)) would solve this, but both are more complex. EIP-8372 does a simpler one-time calibration at the fork.\n\n## How it works\n\nTwo parameters are added to EIP-8037:\n\n- `CPSB`, chosen from observed demand, and\n- `STATE_GAS_LIMIT_SCALE`, the raw state-gas limit as a percentage of the block gas limit (denominator 100).\n\nTransactions may use raw state gas up to `block_gas_limit × SCALE / 100`. For block accounting, state gas is normalized back to the regular scale before taking the maximum:\n\n```python\nstate_gas_limit = block_gas_limit * STATE_GAS_LIMIT_SCALE // 100\nnormalized_state = block_state_gas_used * 100 // STATE_GAS_LIMIT_SCALE\ngas_used = max(block_execution_gas_used, normalized_state)\nassert block_state_gas_used \u003c= state_gas_limit\nassert gas_used \u003c= block_gas_limit\n```\n\n`CPSB` and the scale move together. If demand looks lower than expected, both go down (a cheaper state byte, a smaller raw limit); if higher, both go up. The number of state bytes at the 50% target stays the same; only the price that attracts that demand changes. No new transaction or header fields are added.\n\n## Sample code\n\nThe calibration recipe from the spec, as a sketch (all inputs are chosen by developers before the fork):\n\n```python\ndef calibrate(target_state_growth_per_year, expected_block_gas_limit, blocks_per_year, chosen_cpsb):\n    # CPSB that maps the growth target to 50% of an unscaled limit\n    baseline_cpsb = expected_block_gas_limit * blocks_per_year // (2 * target_state_growth_per_year)\n    # chosen_cpsb comes from demand elasticities observed after Glamsterdam\n    scale = chosen_cpsb * 100 // baseline_cpsb\n    return chosen_cpsb, scale          # -\u003e CPSB, STATE_GAS_LIMIT_SCALE\n```\n\n## Things to know\n\n- **Status: Draft.** `CPSB` and `STATE_GAS_LIMIT_SCALE` are both still `TBD`.\n- The values are fixed at activation. If demand is misjudged, fixing it needs another hard fork, so the spec asks for stress-testing across plausible demand elasticities.\n- Maximum state-byte capacity per block stays roughly the same regardless of the calibration (up to rounding).\n- Builders, clients and gas estimators must use the scaled limit and normalized accounting after activation; transaction formats and receipts do not change.\n"},"ja":{"lang":"ja","tldr":"EIP-8037 のステートガスに独自のスケール済みブロックリミットを与え、gas_used を計算する前に正規化することを提案する。これにより、ステートバイトの価格を実際の需要に合わせられ、ステートガスと実行ガスのどちらも使い切れずに余らせずに済む。","tags":["gas","state-growth","gas-limit","core","glamsterdam"],"related":[8037,7999,8075],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8372/","markdown":"## 何を解決するのか\n\n[EIP-8037](/eip-8037/) はガスを 2 種類に分けます。新しいステート（アカウント、ストレージ、コード）を作るための*ステートガス*と、それ以外すべてのための*実行ガス*です。両者は同じブロックリミットを共有し、ブロックの `gas_used` は 2 つの合計のうち大きい方です。したがって、ステートバイトあたりのコスト（`CPSB`）が、50% のターゲットで許容される新規ステートの量を決めます。\n\nこれが成り立つのは、その価格でユーザーがたまたまガスの約半分をステートの作成に使いたいと考えている場合だけです。\n\n- ステートへの需要が**低い**と、意図した増加目標に比べて作成されるステートが少なすぎます。\n- **高い**と、ステートガスが先にターゲットに達してボトルネックとなり、実行を押しのけてしまいます。\n\n完全に適応的な多次元手数料市場（[EIP-7999](/eip-7999/)）や動的なステート価格（[EIP-8075](/eip-8075/)）ならこれを解決できますが、どちらもより複雑です。EIP-8372 は、フォーク時に一度だけ行う、より単純なキャリブレーションを行います。\n\n## 仕組み\n\nEIP-8037 に 2 つのパラメータが追加されます。\n\n- 観測された需要から選ばれる `CPSB`\n- `STATE_GAS_LIMIT_SCALE`: ブロックガスリミットに対する、生のステートガスリミットの割合（分母は 100）\n\nトランザクションは、`block_gas_limit × SCALE / 100` までの生のステートガスを使えます。ブロックの会計では、最大値を取る前に、ステートガスを通常のスケールに正規化し直します。\n\n```python\nstate_gas_limit = block_gas_limit * STATE_GAS_LIMIT_SCALE // 100\nnormalized_state = block_state_gas_used * 100 // STATE_GAS_LIMIT_SCALE\ngas_used = max(block_execution_gas_used, normalized_state)\nassert block_state_gas_used \u003c= state_gas_limit\nassert gas_used \u003c= block_gas_limit\n```\n\n`CPSB` とスケールは一緒に動かします。需要が想定より低く見える場合は両方を下げ（ステートバイトを安くし、生のリミットを小さくする）、高い場合は両方を上げます。50% のターゲットでのステートバイト数は変わらず、その需要を引き付ける価格だけが変わります。新しいトランザクションフィールドやヘッダーフィールドは追加されません。\n\n## サンプルコード\n\n仕様のキャリブレーション手順のスケッチ（すべての入力は、フォークの前に開発者が選びます）:\n\n```python\ndef calibrate(target_state_growth_per_year, expected_block_gas_limit, blocks_per_year, chosen_cpsb):\n    # CPSB that maps the growth target to 50% of an unscaled limit\n    baseline_cpsb = expected_block_gas_limit * blocks_per_year // (2 * target_state_growth_per_year)\n    # chosen_cpsb comes from demand elasticities observed after Glamsterdam\n    scale = chosen_cpsb * 100 // baseline_cpsb\n    return chosen_cpsb, scale          # -\u003e CPSB, STATE_GAS_LIMIT_SCALE\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** `CPSB` と `STATE_GAS_LIMIT_SCALE` はどちらもまだ `TBD` です。\n- 値は有効化時に固定されます。需要を見誤った場合、修正には別のハードフォークが必要になるため、仕様は、現実的な需要の弾力性の範囲でストレステストを行うことを求めています。\n- ブロックあたりの最大ステートバイト容量は、キャリブレーションにかかわらずおおむね同じままです（丸めを除く）。\n- ビルダー、クライアント、ガス見積もりツールは、有効化後はスケール済みのリミットと正規化された会計を使わなければなりません。トランザクション形式とレシートは変わりません。\n"},"ko":{"lang":"ko","tldr":"EIP-8037 상태 가스에 별도의 스케일된 블록 한도를 주고 gas_used를 계산하기 전에 이를 정규화하자고 제안한다. 상태 바이트 가격을 실제 수요에 맞추면서 상태 가스나 실행 가스 어느 쪽도 덜 쓰이지 않게 한다.","tags":["gas","state-growth","gas-limit","core","glamsterdam"],"related":[8037,7999,8075],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8372/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-8037](/eip-8037/)은 가스를 두 종류로 나눕니다. 새 상태(계정, 스토리지, 코드)를 만드는 *상태 가스*와 나머지 모든 것을 위한 *실행 가스*입니다. 둘은 같은 블록 한도를 공유하며, 블록의 `gas_used`는 두 합계 중 큰 쪽입니다. 따라서 상태 바이트당 비용(`CPSB`)이 50% 목표에서 허용되는 새 상태의 양을 정합니다.\n\n이는 사용자가 그 가격에서 가스의 절반 정도를 상태 생성에 쓰고 싶어 할 때만 성립합니다.\n\n- 상태 수요가 **더 낮으면** 의도한 증가 목표에 비해 상태가 너무 적게 만들어집니다.\n- **더 높으면** 상태 가스가 먼저 목표에 도달해 병목이 되고 실행을 밀어냅니다.\n\n완전히 적응형인 다차원 수수료 시장([EIP-7999](/eip-7999/))이나 동적 상태 가격([EIP-8075](/eip-8075/))이 이를 해결할 수 있지만 둘 다 더 복잡합니다. EIP-8372는 포크 시점에 한 번만 하는 더 단순한 보정을 합니다.\n\n## 어떻게 동작하나요?\n\nEIP-8037에 두 개의 파라미터가 추가됩니다.\n\n- 관측된 수요를 바탕으로 정하는 `CPSB`\n- `STATE_GAS_LIMIT_SCALE`: 블록 가스 한도 대비 원시 상태 가스 한도의 비율(분모는 100)\n\n트랜잭션은 `block_gas_limit × SCALE / 100`까지 원시 상태 가스를 쓸 수 있습니다. 블록 회계에서는 최대값을 취하기 전에 상태 가스를 일반 스케일로 다시 정규화합니다.\n\n```python\nstate_gas_limit = block_gas_limit * STATE_GAS_LIMIT_SCALE // 100\nnormalized_state = block_state_gas_used * 100 // STATE_GAS_LIMIT_SCALE\ngas_used = max(block_execution_gas_used, normalized_state)\nassert block_state_gas_used \u003c= state_gas_limit\nassert gas_used \u003c= block_gas_limit\n```\n\n`CPSB`와 스케일은 함께 움직입니다. 수요가 예상보다 낮아 보이면 둘 다 낮추고(상태 바이트가 더 싸지고 원시 한도가 작아짐), 높으면 둘 다 높입니다. 50% 목표에서의 상태 바이트 수는 그대로이고, 그 수요를 끌어들이는 가격만 달라집니다. 새로운 트랜잭션 필드나 헤더 필드는 추가되지 않습니다.\n\n## 샘플 코드\n\n스펙의 보정 절차를 스케치한 것(모든 입력은 포크 전에 개발자가 정합니다):\n\n```python\ndef calibrate(target_state_growth_per_year, expected_block_gas_limit, blocks_per_year, chosen_cpsb):\n    # CPSB that maps the growth target to 50% of an unscaled limit\n    baseline_cpsb = expected_block_gas_limit * blocks_per_year // (2 * target_state_growth_per_year)\n    # chosen_cpsb comes from demand elasticities observed after Glamsterdam\n    scale = chosen_cpsb * 100 // baseline_cpsb\n    return chosen_cpsb, scale          # -\u003e CPSB, STATE_GAS_LIMIT_SCALE\n```\n\n## 알아둘 점\n\n- **상태: Draft.** `CPSB`와 `STATE_GAS_LIMIT_SCALE`은 둘 다 아직 `TBD`입니다.\n- 값은 활성화 시점에 고정됩니다. 수요를 잘못 판단하면 고치기 위해 또 한 번의 하드 포크가 필요하므로, 스펙은 그럴듯한 수요 탄력성 범위 전반에서 스트레스 테스트를 요구합니다.\n- 블록당 최대 상태 바이트 용량은 보정과 관계없이 (반올림을 제외하면) 거의 같게 유지됩니다.\n- 빌더, 클라이언트, 가스 추정기는 활성화 후 스케일된 한도와 정규화된 회계를 사용해야 합니다. 트랜잭션 형식과 영수증은 바뀌지 않습니다.\n"},"zh":{"lang":"zh","tldr":"提议为 EIP-8037 的状态 gas 设置独立的缩放区块上限，并在计算 gas_used 之前对其归一化，使状态字节的价格能够匹配真实需求，同时不会让状态 gas 或执行 gas 任何一方闲置。","tags":["gas","state-growth","gas-limit","core","glamsterdam"],"related":[8037,7999,8075],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8372/","markdown":"## 它解决什么问题？\n\n[EIP-8037](/eip-8037/) 把 gas 分为两种：用于创建新状态（账户、存储、代码）的*状态 gas*，以及用于其他一切的*执行 gas*。两者共用同一个区块上限，区块的 `gas_used` 取两个总量中较大的一个。因此，每个状态字节的成本（`CPSB`）决定了 50% 目标所允许的新状态数量。\n\n只有当用户恰好愿意在该价格下把约一半的 gas 花在创建状态上时，这种做法才行得通：\n\n- 如果状态需求**较低**，相对于预期的增长目标，创建的状态就太少。\n- 如果**较高**，状态 gas 会先达到目标并成为瓶颈，挤占执行的空间。\n\n完全自适应的多维费用市场（[EIP-7999](/eip-7999/)）或动态状态价格（[EIP-8075](/eip-8075/)）可以解决这个问题，但两者都更复杂。EIP-8372 在分叉时做一次更简单的一次性校准。\n\n## 它如何运作\n\nEIP-8037 新增两个参数：\n\n- `CPSB`，根据观察到的需求选定；以及\n- `STATE_GAS_LIMIT_SCALE`，即原始状态 gas 上限占区块 gas 上限的百分比（分母为 100）。\n\n交易最多可以使用 `block_gas_limit × SCALE / 100` 的原始状态 gas。在区块核算时，先把状态 gas 归一化回常规尺度，再取最大值：\n\n```python\nstate_gas_limit = block_gas_limit * STATE_GAS_LIMIT_SCALE // 100\nnormalized_state = block_state_gas_used * 100 // STATE_GAS_LIMIT_SCALE\ngas_used = max(block_execution_gas_used, normalized_state)\nassert block_state_gas_used \u003c= state_gas_limit\nassert gas_used \u003c= block_gas_limit\n```\n\n`CPSB` 和缩放比例一起变动。如果需求看起来低于预期，两者都下调（状态字节更便宜，原始上限更小）；如果更高，两者都上调。50% 目标处的状态字节数保持不变；变化的只是吸引这一需求的价格。不会增加新的交易字段或区块头字段。\n\n## 示例代码\n\n规范中的校准方法，以草图形式给出（所有输入都由开发者在分叉之前选定）：\n\n```python\ndef calibrate(target_state_growth_per_year, expected_block_gas_limit, blocks_per_year, chosen_cpsb):\n    # CPSB that maps the growth target to 50% of an unscaled limit\n    baseline_cpsb = expected_block_gas_limit * blocks_per_year // (2 * target_state_growth_per_year)\n    # chosen_cpsb comes from demand elasticities observed after Glamsterdam\n    scale = chosen_cpsb * 100 // baseline_cpsb\n    return chosen_cpsb, scale          # -\u003e CPSB, STATE_GAS_LIMIT_SCALE\n```\n\n## 需要注意\n\n- **状态：Draft。** `CPSB` 和 `STATE_GAS_LIMIT_SCALE` 目前都仍是 `TBD`。\n- 这些数值在激活时就固定下来。如果对需求判断失误，修正它需要再进行一次硬分叉，因此规范要求在各种合理的需求弹性下进行压力测试。\n- 无论如何校准，每个区块的最大状态字节容量大致保持不变（舍入误差除外）。\n- 激活后，构建者、客户端和 gas 估算器必须使用缩放后的上限和归一化的核算方式；交易格式和收据不会改变。\n"}}}
