---
eip: 7691
label: EIP-7691
title: Blob throughput increase
status: Final
type: Standards Track
category: Core
created: 2024-04-17
official: https://eips.ethereum.org/EIPS/eip-7691
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7691.md
canonical: https://eips.huatuo.xyz/zh/eip-7691/
lang: zh
tldr: 在 Pectra 升级中，把以太坊每个区块的 blob 目标值和最大值从 3/6 提高到 6/9，使 rollup 可用的目标数据空间翻倍。
tags: [blobs, scaling, rollups, gas, core, pectra]
---

# EIP-7691: Blob throughput increase

> Increase the number of blobs to reach a new target and max of 6 and 9 blobs per block respectively

**TL;DR:** 在 Pectra 升级中，把以太坊每个区块的 blob 目标值和最大值从 3/6 提高到 6/9，使 rollup 可用的目标数据空间翻倍。

## 它解决什么问题？

Rollup 把交易数据以 blob 的形式发布到以太坊，blob 由 Dencun 升级中的 [EIP-4844](/eip-4844/) 引入。由于没人能预测主网的点对点网络能否承受额外的数据量，Dencun 设定了谨慎的目标：每个区块目标 3 个 blob，最多 6 个。

Dencun 上线后，监测显示网络稳定，重组率下降，而 `IDONTWANT` 消息等 gossipsub 改进有望节省带宽。Rollup 的 blob 需求也在增长，因此本 EIP 采取了简单的短期措施：提高这些数值，而不等待 PeerDAS 这类更大的改动。

## 它如何运作

这纯粹是参数变更，随 Prague/Electra（"Pectra"）升级（[EIP-7600](/eip-7600/)）激活：

| 参数 | 之前（Cancun/Deneb） | 之后（Prague/Electra） |
| --- | --- | --- |
| 每区块目标 blob 数 | 3 | 6 |
| 每区块最大 blob 数 | 6 | 9 |
| `TARGET_BLOB_GAS_PER_BLOCK` | 393216 | 786432 |
| `MAX_BLOB_GAS_PER_BLOCK` | 786432 | 1179648 |
| `BLOB_BASE_FEE_UPDATE_FRACTION` | 3338477 | 5007716 |

共识层使用 blob 数量，执行层使用 gas 数值。EIP-4844 中现有的 `calc_excess_blob_gas` 和 `get_base_fee_per_blob_gas` 函数保持不变，只是从第一个分叉区块起读取新的常量。

**为什么需要新的 update fraction？** 在 3/6 时，比例是 1:2，所以满块和空块使 blob 基础费用变动的幅度大致相同（+12.5 % / −11.1 %）。在 6/9 时，空块比目标少 6，而满块只比目标多 3，这种对称性就被打破了。新的 fraction 是一种折中：现在满块会使 blob 费用上涨约 8.2 %，空块会使其下降约 14.5 %。

## 示例代码

使用新常量的 EIP-4844 blob 基础费用公式（Python）：

```python
MIN_BASE_FEE_PER_BLOB_GAS = 1
BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE = 5007716
TARGET_BLOB_GAS_PER_BLOCK = 786432  # 6 blobs * 131072

def calc_excess_blob_gas(parent_excess: int, parent_used: int) -> int:
    total = parent_excess + parent_used
    return 0 if total < TARGET_BLOB_GAS_PER_BLOCK else total - TARGET_BLOB_GAS_PER_BLOCK

def fake_exponential(factor: int, numerator: int, denominator: int) -> int:
    i, output, acc = 1, 0, factor * denominator
    while acc > 0:
        output += acc
        acc = (acc * numerator) // (denominator * i)
        i += 1
    return output // denominator

def base_fee_per_blob_gas(excess_blob_gas: int) -> int:
    return fake_exponential(MIN_BASE_FEE_PER_BLOB_GAS, excess_blob_gas,
                            BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE)
```

## 需要注意

- **状态：Final**，属于 Pectra 升级的一部分。
- 只改变了参数；blob 交易格式和费用机制与 EIP-4844 相同。
- 2:3 的目标/最大值比例意味着 blob 费用下降得比上涨更快。这是有意为之，但也意味着费用对突发流量的反应是不对称的。
- 规范称这是一次短期上调；更长期的 blob 扩容依赖 PeerDAS 和后续的参数调整。


---

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