---
eip: 8237
label: EIP-8237
title: Independent CL/EL Sync
status: Draft
type: Standards Track
category: Core
created: 2026-04-22
requires: 7732
official: https://eips.ethereum.org/EIPS/eip-8237
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8237.md
canonical: https://eips.huatuo.xyz/zh/eip-8237/
lang: zh
tldr: 把 ePBS 出价中的 execution-requests 根替换为双方层都能计算的 SHA256“partial header hash”，使共识客户端无需下载执行载荷就能对信标区块进行范围同步。
tags: [sync, consensus, execution, epbs, glamsterdam]
---

# EIP-8237: Independent CL/EL Sync

> Enables independent consensus and execution layer synchronization by replacing execution_requests_root with an accumulator hash.

**TL;DR:** 把 ePBS 出价中的 execution-requests 根替换为双方层都能计算的 SHA256“partial header hash”，使共识客户端无需下载执行载荷就能对信标区块进行范围同步。

## 它解决什么问题？

在 ePBS 之前，每个信标区块都内嵌其执行载荷。在范围同步期间，共识（CL）客户端下载区块、运行信标状态转换，并把每个载荷交给执行（EL）客户端。两层真正需要达成一致的只有载荷的区块哈希，以及由 EL 产生、由 CL 消费的**执行请求**（存款、提款、合并）。

[EIP-7732](/eip-7732/)（ePBS）把载荷从信标区块中移到单独的信封里。原则上，CL 就可以只同步信标区块，节省带宽并避免与 EL 的往返。但没有载荷，它就无法检查载荷是否与出价的 `block_hash` 或 `execution_requests_root` 匹配，而后者是 EL 无法计算的 SSZ 根。EIP-8237 提供了一个两层都能自行计算并检查的承诺。

## 它如何运作

- **出价变更。** 从 `ExecutionPayloadBid` 中移除 `execution_requests_root`。
- **新字段 `partial_header_hash`** 被添加到 `BeaconBlockBody`、EL 的 `ExecutionPayload` 和 EL 区块头中（因此被 `block_hash` 所覆盖）。
- **计算方式。** 它是对 `parent_hash`、`prev_randao`、`gas_limit`、`timestamp`、`withdrawals`、`slot_number` 和 `execution_requests` 拼接结果的普通 SHA256，整数使用原始的小端字节，列表使用原始拼接。使用普通 SHA256 是因为 EL 没有 SSZ `hash_tree_root` 的工具。
- **CL 检查。** 以前 CL 会把 `hash_tree_root(requests)` 与出价中的根比较，现在则根据出价和自身状态重新计算 `partial_header_hash`，并与信封或下一个信标区块体中的值比较。
- **EL 检查。** EL 根据自己的区块重新计算同一个值，并拒绝不匹配的情况。
- 由于 `parent_hash` 把每个值与前一个区块相连，规范把它描述为跨区块链接的累加器。同步中的 CL 可以推迟载荷验证：一旦 EL 追上并且结果一致，整条承诺链就得到确认。
- **Engine API。** 新方法允许 CL 按区块哈希向 EL 询问其存储的值，以便在长时间同步后两层不一致时找出分歧所在。草案尚未给出该方法的名称。

## 示例代码

规范中的累加器（Python 风格伪代码）：

```python
import hashlib

def u64(x: int) -> bytes:
    return x.to_bytes(8, "little")

def compute_partial_header_hash(parent_hash, prev_randao, gas_limit, timestamp,
                                withdrawals, slot_number, execution_requests) -> bytes:
    data = (
        parent_hash + prev_randao
        + u64(gas_limit) + u64(timestamp)
        + b"".join(serialize(w) for w in withdrawals)
        + u64(slot_number)
        + serialize(execution_requests)
    )
    return hashlib.sha256(data).digest()

# EL side, during block validation
assert block.partial_header_hash == compute_partial_header_hash(
    block.parent_hash, block.prev_randao, block.gas_limit, block.timestamp,
    block.withdrawals, block.slot_number, execution_requests)
```

## 需要注意

- **状态：Draft。** 它与 ePBS 一同面向 Glamsterdam/Gloas 分叉，并且修改了共识容器，因此需要硬分叉。
- 它不引入新的信任假设：每个载荷最终仍会被验证，只是在范围同步的较晚阶段进行。
- `slot_number` 字段来自 Glamsterdam 的另一个 EIP，`block_access_list` 来自 [EIP-7928](/eip-7928/)；随着这些提案的演进，具体的容器布局可能会改变。
- 该累加器不能通过 Merkle 证明；它只是绑定这些值，而这正是同步所需要的全部。


---

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