---
eip: 8075
label: EIP-8075
title: Adaptive state cost to cap growth & scale L1
status: Draft
type: Standards Track
category: Core
created: 2025-10-02
requires: 1559, 4844, 8037
official: https://eips.ethereum.org/EIPS/eip-8075
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8075.md
canonical: https://eips.huatuo.xyz/zh/eip-8075/
lang: zh
tldr: 为状态创建定价，使用自带的 EIP-4844 风格控制器，目标是每天约 250 MiB 的新增状态，并把 state gas 从区块 gas limit 中剥离，使更高的状态价格不会挤占计算资源。
tags: [gas, state-growth, fee-market, scaling, core]
---

# EIP-8075: Adaptive state cost to cap growth & scale L1

> Track state bytes and target 250 MiB/day by dynamically adjusting the state gas cost. Exempt state from the gas limit to facilitate scaling.

**TL;DR:** 为状态创建定价，使用自带的 EIP-4844 风格控制器，目标是每天约 250 MiB 的新增状态，并把 state gas 从区块 gas limit 中剥离，使更高的状态价格不会挤占计算资源。

## 它解决什么问题？

随着以太坊提高区块 gas limit，更多的 gas 也意味着有更多空间创建新账户、合约和存储槽，于是状态数据库增长更快，客户端变慢。[EIP-8037](/eip-8037/) 对此的回应是按字节为状态创建定价，并把每个操作的价格提高大约 3 倍到 9.5 倍。但那是一个**固定**价格，没有人知道用户对它有多敏感：

- 如果需求几乎不变，状态的增长仍然快于期望。
- state gas 仍然计入区块 gas limit，所以昂贵的状态操作会吃掉每个区块的大部分空间。规范中的例子估计，在 gas limit 提高 5 倍之后，状态可能占用全部 gas 的约 65–79 %，其他操作的实际吞吐量只会增长约 1.5 倍到 2.5 倍。

EIP-8075 直接以状态增长率为目标，并把状态与常规 gas limit 分离。

## 它如何运作

**自我调节的每状态字节价格。** 每个区块头新增三个字段：`state_bytes_created`、`state_bytes_cleared` 和 `excess_state_bytes`。与 [EIP-4844](/eip-4844/) 中的 blob gas 类似，当净创建量超过目标时，超额部分会累积，价格按指数规律变化：

| 常量 | 值 |
| --- | --- |
| `TARGET_STATE_BYTES_PER_BLOCK` | 36,400（约 250 MiB/天） |
| `MAX_STATE_BYTES_PER_BLOCK` | 72,800 |
| `MIN_STATE_GAS_PER_BYTE` | 380 |
| `STATE_GAS_UPDATE_FRACTION` | 36,418,000（每个区块最多 +0.1 %） |

每个操作的成本是 `bytes × state_gas_per_byte`，使用 EIP-8037 的字节数（例如新账户为 112，新存储槽为 32，部署的代码每字节为 1）。

**独立的限制，共用的基础费用。** 执行时分别跟踪 `regular_gas` 和 `state_gas`。只有常规 gas 计入区块 gas limit（区块头字段 `gas_used` 更名为 `regular_gas_used`）；净状态字节数以 `MAX_STATE_BYTES_PER_BLOCK` 为上限。[EIP-1559](/eip-1559/) 的基础费用仍然对两者都有反应，使用常规 gas 加上经过归一化的状态用量，归一化使得用满状态预算相当于区块被填满。

交易格式保持不变：状态仍然用 gas 支付，所以用户的 `gas_limit` 必须覆盖当前每字节价格下的状态成本。

## 示例代码

来自规范的控制器（Python）：

```python
def calc_excess_state_bytes(parent) -> int:
    excess = parent.excess_state_bytes + parent.state_bytes_created
    deficit = TARGET_STATE_BYTES_PER_BLOCK + parent.state_bytes_cleared
    return 0 if excess < deficit else excess - deficit

def get_state_gas_per_byte(header) -> int:
    return fake_exponential(MIN_STATE_GAS_PER_BYTE,
                            header.excess_state_bytes,
                            STATE_GAS_UPDATE_FRACTION)

# Wallet-side gas limit with a safety margin m for price drift
gas_limit = regular_gas_estimate + state_bytes * state_gas_per_byte * m
```

## 需要注意

- 状态：**Draft**。常量、区块头布局，乃至整体设计（相对于其他方案）都仍未确定。
- 由于每状态字节的价格在签名和打包之间可能漂移，创建状态且 `gas_limit` 很紧的交易可能会耗尽 gas。钱包需要读取 `excess_state_bytes`，计算当前价格并加上余量，就像处理 blob 费用那样。
- 规范讨论了其他方案：带有独立常规 gas 和状态字节限制的交易格式、[EIP-8011](/eip-8011/) 中的多维计量，以及 [EIP-7999](/eip-7999/) 中的聚合 gas 费用市场。
- 它建立在 EIP-8037 按字节计量的基础上，而不是取代它。


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8075
