---
eip: 7782
label: EIP-7782
title: Reduce Block Latency
status: Draft
type: Standards Track
category: Core
created: 2024-10-05
requires: 7623, 7778
official: https://eips.ethereum.org/EIPS/eip-7782
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7782.md
canonical: https://eips.huatuo.xyz/zh/eip-7782/
lang: zh
tldr: 提议把以太坊的 slot 时间从 12 秒缩短到 6 秒，使确认延迟和 epoch 时长减半，同时每个区块的 gas 和 blob 上限也减半。
tags: [consensus, slot-time, latency, finality, core]
---

# EIP-7782: Reduce Block Latency

> Reduce Ethereum's slot time from 12s to 6s to decrease latency by 50%, distribute bandwidth usage, and improve UX.

**TL;DR:** 提议把以太坊的 slot 时间从 12 秒缩短到 6 秒，使确认延迟和 epoch 时长减半，同时每个区块的 gas 和 blob 上限也减半。

## 它解决什么问题？

以太坊的每个区块都按 12 秒的 slot 到来。这决定了交易获得首次确认的速度下限、rollup 结算的快慢，以及（由于每个 epoch 有 32 个 slot）最终性所需的时间。

通过把区块做大来提高吞吐量会遇到网络限制；作者指出，在没有重大网络改进的情况下，区块大小很难实际超过约 10 MiB。EIP-7782 则让区块的出块频率翻倍，并按比例保持其大小，使带宽使用在时间上更均匀地分散。

## 它如何运作

- **Slot 计划。** 共识层增加 `SLOT_SCHEDULE` 配置，在某个分叉 epoch 把 `SECONDS_PER_SLOT` 从 12 切换为 6。epoch 时长从 384 秒缩短到 192 秒。
- **Gas 和 blob 上限减半。** Gas 上限的设置被重新解释为"每 12 秒的 gas"。分叉后的第一个区块使用之前 gas 上限的一半，原本配置为投票 36,000,000 的客户端会改为投票 18,000,000。Blob 的目标值和最大值也减半（向下取整）。单位时间内的吞吐量大致不变，只是以更小、更频繁的形式到来。
- **新的 slot 内截止时间。** 6 秒的 slot 不再均分为三等份，而是采用不均匀的安排，给区块传播留出更多时间：0 ms 提议，3000 ms 做 attestation，4500 ms 做聚合。客户端必须支持毫秒精度的截止时间。

作者列出的预期收益包括：用户确认更快、最终性更快、L2 结算延迟更短（尤其是排序跟随 L1 区块的 based rollup），以及降低 DEX 流动性提供者的 loss-versus-rebalancing。

## 示例代码

规范中的配置形式（epoch 值明确只是示意）：

```yaml
SLOT_SCHEDULE:
  - EPOCH: 348618
    SECONDS_PER_SLOT: 12
  - EPOCH: 355368
    SECONDS_PER_SLOT: 6
```

把区块数转换为实际时间的代码应当读取 slot 时长，而不是硬编码 12：

```ts
// Before: const secondsAgo = blocksAgo * 12;
const SECONDS_PER_SLOT = await getSecondsPerSlot(); // from beacon API /eth/v1/config/spec
const secondsAgo = blocksAgo * SECONDS_PER_SLOT;
```

## 需要注意

- **状态：Draft。** 它尚未被安排进任何网络升级，上面的分叉 epoch 只是占位值。
- 它依赖 [EIP-7623](/eip-7623/)（提高 calldata 成本）和 [EIP-7778](/eip-7778/)（不含退款的区块 gas 记账），这两者限定了最坏情况下的区块大小。
- 假定区块间隔为 12 秒的合约和链下代码（例如"每天区块数"常量，或以区块号计的超时）将以不同的实际时间速率运行。基于时间的逻辑请优先使用 `block.timestamp`。
- 安全部分指出了消息更频繁带来的网络拥塞，以及需要在新的时序下重新检查分叉选择和最终性的行为。


---

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