---
eip: 8149
label: EIP-8149
title: Multi KZG Point Evaluation Precompile
status: Draft
type: Standards Track
category: Core
created: 2026-02-06
requires: 4844
official: https://eips.ethereum.org/EIPS/eip-8149
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8149.md
canonical: https://eips.huatuo.xyz/zh/eip-8149/
lang: zh
tldr: 提议新增一个预编译，一次调用即可校验同一个 EIP-4844 blob 的最多 128 个 KZG 打开证明，使欺诈证明验证器等合约不必为每个值都支付一次 50,000 gas 的点求值成本。
tags: [precompile, kzg, blobs, cryptography, core]
---

# EIP-8149: Multi KZG Point Evaluation Precompile

> Verify multiple (z, y) evaluations against a single EIP-4844 blob commitment in one precompile call.

**TL;DR:** 提议新增一个预编译，一次调用即可校验同一个 EIP-4844 blob 的最多 128 个 KZG 打开证明，使欺诈证明验证器等合约不必为每个值都支付一次 50,000 gas 的点求值成本。

## 它解决什么问题？

[EIP-4844](/eip-4844/) 的 blob 无法被 EVM 读取。合约只能看到 blob 的*带版本哈希*。要证明 blob 在点 `z` 处的值为 `y`，合约要调用位于 `0x0A` 的点求值预编译，每个打开证明花费 50,000 gas。

有些应用，尤其是欺诈证明，需要从同一个 blob 取多个值。它们不得不一次次调用 `0x0A`，每次都付全价。EIP-8149 增加了一个批量版本：用一个证明、一次调用，针对一个 blob 承诺验证 *n* 个 `(z, y)` 对。

## 它如何运作

- 一个新的预编译，地址仍标注为 **TBD**。现有的 `0x0A` 预编译保持不变。
- **输入**（`132 + 64·n` 字节）：
  - `versioned_hash`（32 字节）和 `commitment`（48 字节），与 EIP-4844 相同
  - `n`，4 字节大端计数，`1 ≤ n ≤ 128`
  - `n` 对 `z`（32 字节）和 `y`（32 字节），每个都必须严格小于 `BLS_MODULUS`
  - 一个 48 字节的多点 `proof`
- 预编译先检查承诺与带版本哈希是否匹配，然后使用与 EIP-4844 相同的可信设置，在 BLS12-381 上执行一次多点 KZG 验证。
- 成功时的**输出**：与 `0x0A` 相同的 64 字节（`FIELD_ELEMENTS_PER_BLOB` 和 `BLS_MODULUS`），因此现有调用方可以复用其解码逻辑。任何失败都会使调用 revert。
- **Gas** 为 `BASE_GAS + PER_POINT_GAS × n`。两个常量仍为 TBD，但规范要求，只要 `n > 1`，批处理就必须比 `n` 次单独的 `0x0A` 调用更便宜。

## 示例代码

在 Solidity 中构造输入并调用该预编译。由于地址尚未分配，`MULTI_KZG` 只是占位符：

```solidity
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.24;

library MultiKzg {
    address internal constant MULTI_KZG = address(0); // TBD in EIP-8149

    function verify(
        bytes32 versionedHash,
        bytes memory commitment,   // 48 bytes
        bytes32[] memory z,
        bytes32[] memory y,
        bytes memory proof         // 48 bytes
    ) internal view returns (bool) {
        uint256 n = z.length;
        require(n == y.length && n >= 1 && n <= 128, "bad n");

        bytes memory pairs;
        for (uint256 i; i < n; ++i) pairs = bytes.concat(pairs, z[i], y[i]);

        bytes memory input = bytes.concat(
            versionedHash, commitment, bytes4(uint32(n)), pairs, proof
        );
        (bool ok, bytes memory out) = MULTI_KZG.staticcall(input);
        return ok && out.length == 64;
    }
}
```

## 需要注意

- **状态：Draft。** 预编译地址和两个 gas 常量都尚未确定，因此目前还无法在任何网络上使用。
- 它只批处理**同一个** blob 的打开证明。来自不同 blob 的值仍需要分别调用。
- 规范指出，实现通常会通过这些点插值出一个多项式（O(n²)，当这些点是单位根时用 FFT 可达 O(n log n)），最后做一次配对检查。
- 大于或等于 `BLS_MODULUS` 的域元素必须被拒绝，并且 gas 定价必须反映真实的计算成本。


---

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