---
eip: 8094
label: EIP-8094
title: eth/vhash - Blob-Aware Mempool
status: Draft
type: Standards Track
category: Networking
created: 2025-11-29
requires: 7642
official: https://eips.ethereum.org/EIPS/eip-8094
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8094.md
canonical: https://eips.huatuo.xyz/zh/eip-8094/
lang: zh
tldr: 修改 devp2p 的 eth 协议，使 blob 交易在传播时不带 blob，blob 则按 versioned hash 单独获取，这样提高手续费（replace-by-fee）时就不会在网络中重复发送同样的 blob 数据。
tags: [networking, devp2p, blobs, mempool, rbf]
---

# EIP-8094: eth/vhash - Blob-Aware Mempool

> Make mempool messaging vhash aware

**TL;DR:** 修改 devp2p 的 eth 协议，使 blob 交易在传播时不带 blob，blob 则按 versioned hash 单独获取，这样提高手续费（replace-by-fee）时就不会在网络中重复发送同样的 blob 数据。

## 它解决什么问题？

blob 交易（[EIP-4844](/eip-4844/)）带有一个很大的 *sidecar*：blob 及其 KZG 承诺和证明。发送者为了更快被打包而提高手续费（replace-by-fee，RBF）时，替换交易是一笔拥有新哈希的新交易。在当前的 eth 协议（eth/69，[EIP-7642](/eip-7642/)）中，对等节点无法得知这笔替换交易带有的正是自己已经持有的那些 blob，于是整个 sidecar 会被再次下载和转发。

这在最糟的时候最糟：RBF 在手续费飙升期间被大量使用，而这通常与网络负载高峰重合。这个 EIP 让节点可以跳过已拥有的 blob 的重复下载。

## 它如何运作

blob 通过其 **versioned hash（vhash）** 来寻址，这是每笔 type-3 交易的 `blob_versioned_hashes` 字段中已经承诺的标识符。

- `Transactions (0x02)` 和 `PooledTransactions (0x0a)` 发送 type-3 交易时**不带** sidecar。由于裸交易很小，节点可以直接推送，而不是仅仅发布通告。
- 两条新消息（消息码尚待分配）：
  - `GetPooledBlobs`：`[request-id, [vhash1, vhash2, ...]]`，向对等节点请求特定的 blob。
  - `PooledBlobs`：`[request-id, [blob1, blob2, ...]]`，按请求顺序返回；不可用的 blob 可以跳过。接收方会根据所请求的 vhash 校验每个 blob。
- 节点在收到并验证某笔 blob 交易的所有 blob 之前，不得转发该交易。

因此，当提高手续费的替换交易到达时，节点会把它的 vhash 与已存储的内容对比，只请求缺少的 blob，往往一个也不缺。

作者曾考虑过为整个 sidecar 使用单个哈希，但选择了按 blob 的 vhash，因为它们已经存在，而且允许替换交易携带更少的 blob。他们还权衡过用 vhash 或 nonce 扩展通告（[EIP-8077](/eip-8077/)），最终选定“不带 sidecar 的交易，blob 按需获取”。

## 示例代码

接收端逻辑（伪代码）：

```python
def on_blob_tx(peer, tx):               # type-3 tx received without sidecar
    missing = [h for h in tx.blob_versioned_hashes if not blob_store.has(h)]
    if missing:
        peer.send(GetPooledBlobs(request_id=new_id(), vhashes=missing))
        pending[tx.hash] = tx
    else:
        validate_and_add(tx)            # e.g. RBF with identical blobs: no download

def on_pooled_blobs(peer, msg):
    for blob in msg.blobs:              # same order as requested, gaps allowed
        h = kzg_to_versioned_hash(blob.commitment)
        if h in requested(msg.request_id) and verify_blob(blob):
            blob_store.put(h, blob)
    # only now may completed txs be forwarded to other peers
```

## 需要注意

- 状态为 **Draft**。消息码、blob 的具体编码（版本前缀、发送 cell proof 以便接收方重建纠删码）以及安全性考虑仍未确定。
- 这只是网络层变更：一个新的 eth 协议版本，没有硬分叉，也没有共识变更。旧客户端继续使用之前的版本。
- 它可能与 [EIP-8077](/eip-8077/)（通告来源和 nonce）以及 [EIP-8070](/eip-8070/) 中的稀疏 blobpool 结合使用；与后者如何结合尚未决定。
- 推送不带 sidecar 的小交易，可以抵消获取 blob 所需的额外往返。


---

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