---
eip: 7975
label: EIP-7975
title: eth/70 - partial block receipt lists
status: Last Call
type: Standards Track
category: Networking
created: 2025-06-16
requires: 7642, 7825
official: https://eips.ethereum.org/EIPS/eip-7975
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7975.md
canonical: https://eips.huatuo.xyz/zh/eip-7975/
lang: zh
tldr: eth/70 允许节点把一个区块的收据拆成多条消息发送，这样当大区块使收据列表超过 10 MiB 的消息上限时，收据同步依然可以继续。
tags: [networking, devp2p, eth-protocol, receipts, sync]
---

# EIP-7975: eth/70 - partial block receipt lists

> Adds a facility for paginating block receipts in the p2p protocol

**TL;DR:** eth/70 允许节点把一个区块的收据拆成多条消息发送，这样当大区块使收据列表超过 10 MiB 的消息上限时，收据同步依然可以继续。

## 它解决什么问题？

节点同步历史数据时，会用 `GetReceipts` 向对等节点请求区块收据，并通过 `Receipts` 消息收到结果。客户端通常会拒绝任何超过 **10 MiB** 的 p2p 消息，因为只有下载完才能判断它是否有效。

单笔交易的收据是有上限的：[EIP-7825](/eip-7825/) 把一笔交易限制在约 1670 万 gas，而日志每字节至少消耗 8 gas，所以一笔交易最多只能产生约 2 MiB 的日志数据。但一个区块包含很多笔交易。规范估计，在区块 gas 上限约 8300 万时，一个区块的收据可能超过 10 MiB，同步就会直接失败。

## 它如何运作

eth/70 为 [eth/69](/eip-7642/) 中定义的两条收据消息增加了分页：

```text
eth/69  GetReceipts (0x0f): [request-id, [blockhash₁, blockhash₂, ...]]
eth/70  GetReceipts (0x0f): [request-id, firstBlockReceiptIndex, [blockhash₁, ...]]

eth/69  Receipts (0x10):    [request-id, [[receipt₁, receipt₂], ...]]
eth/70  Receipts (0x10):    [request-id, lastBlockIncomplete, [[receipt₁, receipt₂], ...]]
```

- `firstBlockReceiptIndex` 告诉服务端跳过所请求的**第一个**区块的前这么多条收据，这样客户端就可以从中断处继续。
- `lastBlockIncomplete = 1` 表示响应中的最后一个列表被截断了，客户端必须继续请求剩余部分。

由于部分列表在完整之前无法与区块头中的 receipts root 校验，客户端会对不完整的列表做合理性检查：

- 已收到的收据数量必须与该区块的交易数量核对；
- 每条收据不得大于其交易 gas 上限 / 8；
- 已下载的总大小必须符合区块 gas 上限所允许的范围。

## 示例代码

客户端获取一个大区块收据的循环（伪代码）：

```python
def fetch_block_receipts(peer, block_hash, tx_count):
    receipts = []
    while True:
        incomplete, lists = peer.request(
            "GetReceipts", first_block_receipt_index=len(receipts), hashes=[block_hash]
        )
        receipts += lists[0]
        if not incomplete:
            break
        sanity_check_partial(receipts, tx_count)   # count, per-tx size, total size
    verify_receipts_root(block_hash, receipts)      # full check once complete
    return receipts
```

## 需要注意

- 状态为 **Last Call**（按规范头部，截止日期为 2026-11-01）。
- 仅涉及网络层：没有共识变更，也不需要硬分叉。eth/70 推出期间，节点仍可与旧的对等节点使用 eth/69 通信。
- 压力来自不断上升的 gas 上限，例如 [EIP-7935](/eip-7935/) 中的 60M 默认值及之后的提高。
- 客户端仍可能需要为单个区块缓冲超过 10 MiB 的尚未验证的数据；合理性检查是限制这一点，而不是消除它。


---

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