EIP-8457 EIP-2537-based KZG batch verification (Batched KZG Point Evaluation via EIP-2537)

No call decision · Scaling & data · EIP status Draft · created 2026-07-06

This documents a contract-level technique for verifying multiple KZG opening proofs of EIP-4844 blobs at once, using two EIP-2537 MSM calls and one pairing check. It becomes cheaper than the existing approach starting at 5 to 6 openings.

Why it is needed

Rollup and data availability contracts often need to verify multiple KZG openings within a single transaction: once per blob when a settlement transaction carries several blobs, and once per point when a proving system samples one blob at multiple points. Today, the EIP-4844 point evaluation precompile is called once per opening, and at 50,000 gas per call plus call and calldata overhead, verifying 6 blobs alone costs over 300,000 gas, with cost scaling linearly with the number of openings. As the per-block blob limit rises, the number of openings to verify rises with it. In practice, one production rollup had 4,102 settlement transactions over 90 days, each verifying 6 blobs this way, and this technique could have saved about 17% of verification gas, roughly 224 million gas in total. Batch verification itself is not hard, but getting the verification equation, challenge derivation, or binding check wrong in just one place produces a verifier that still passes all valid batches while also letting some invalid batches through, and such mistakes are not revealed by ordinary tests using honest inputs. This document records the technique and the checks that must not be skipped in one place, so it can be reviewed and reused instead of reinvented.

What changes

Today

After EIP-8457

Who is affected

In depth

Existing approach: the point evaluation precompile

An opening claim (h, C, z, y, π) asserts that the polynomial pointed to by commitment C evaluates to y at z, and that C is the commitment pointed to by versioned hash h. The EIP-4844 point evaluation precompile is called once per claim, checking kzg_to_versioned_hash(C) == h and e(C - y·G1 + z·π, G2) == e(π, [τ]₂), consuming POINT_EVALUATION_PRECOMPILE_GAS = 50000 per call. This verification equation is arranged so that the G2-side inputs are fixed to just the generator point and [τ]₂, which lets the bilinearity of pairings fold n checks into a single random linear combination.

Input encoding and pre-validation

All G1 points use the 128-byte uncompressed encoding, the only format accepted by the EIP-2537 precompiles. The binding between commitment and versioned hash is checked by computing the 48-byte compressed encoding from the uncompressed point and verifying kzg_to_versioned_hash(compress(C)) == h. Before calling the precompiles, the implementation MUST check n ≥ 1, that all array lengths match, that all scalars z and y are less than q, that all points are exactly 128 bytes, and the versioned hash binding, rejecting the batch if any of these fails. Canonical encoding, being on the curve, and membership in the prime-order subgroup are enforced by BLS12_G1MSM and BLS12_PAIRING_CHECK. BLS12_G1ADD does not perform a subgroup check, so it MUST NOT be used on untrusted points.

Challenge derivation (Fiat-Shamir)

The challenge scalars r_1..r_n MUST be derived by hashing the entire batch, that is, all versioned hashes, commitments, evaluation points, evaluation values, and proofs. The RECOMMENDED approach is seed = keccak256(DOMAIN || h_1..h_n || z_1..z_n || y_1..y_n || C_1..C_n || π_1..π_n), r_i = keccak256(seed || i) mod q, with r_i replaced by 1 if it comes out as 0, so that no claim is excluded from the combination. If even one prover-controlled input is left out of the hash, or if the challenge depends on a value the prover can choose afterward, the prover can select a proof that cancels out across the combination and get an invalid batch to pass.

The verification equation and its three forms

Compute RHS = Σ r_i·π_i via MSM, compute LHS, and then use BLS12_PAIRING_CHECK to verify whether e(LHS, -G2) · e(RHS, [τ]₂) == 1. Embedding -G2 as a constant avoids the need to negate a G1 point on chain. In the general form, LHS = Σ r_i·C_i + Σ (r_i·z_i)·π_i - (Σ r_i·y_i)·G1, giving 2n + 1 MSM slots. If all claims share the evaluation point z, the proof terms collapse into a single z·RHS slot, giving n + 2 slots, and if a single blob is opened at multiple points, the commitment terms collapse into a single (Σ r_i)·C slot, also giving n + 2. Implementing only the general form MAY still be correct for all inputs.

Soundness rationale: the random linear combination

Each claim i corresponds to a target group element t_i, which is the identity element only if the claim is true. If even one t_j is not the identity, there is exactly one value of r_j in [0, q) that makes the combination the identity, so the probability that an invalid batch passes is 1/q ≈ 2⁻²⁵⁵. This is the degree-1 case of the Schwartz-Zippel lemma, and it holds regardless of how many claims are invalid. Consensus layer batch verifiers that use powers r⁰..rⁿ⁻¹ of a single challenge r have a looser bound of (n - 1)/q, whereas here a single keccak256 per claim maintains a tighter bound. This is a strong Fiat-Shamir transform where not just the proofs but the objects being proven enter the transcript, and it relies on the standard assumption of treating the hash as a random oracle.

Gas cost and the break-even point

The pairing check is fixed at 2 · 32600 + 37700 = 102900 gas regardless of n, while the MSM cost is 12000 · discount(k) / 1000 per element, with the discount dropping as low as 519/1000 as k grows. The end-to-end measured break-even point is n = 5 for the shared-value form and n = 6 for the general form; batches smaller than that SHOULD fall back to looping over the point evaluation precompile. When falling back, the 128-byte points MUST be compressed to 48 bytes. Measured figures show that at n = 10, the loop costs 527,720 gas versus 340,845 gas for the multi-blob form and 320,742 gas for the single-blob form, and at n = 100, the shared-value form saves 65% to 69% while the general form saves about 53%.

Security checks implementations easily miss

Bypassing the precompile also removes its internal versioned hash check, so skipping an explicit binding check lets a prover open an arbitrary commitment that is actually unrelated to the transaction's blobs. Such a verifier passes all honest batches, so this is not revealed by tests that use only honest inputs; it requires tests that insert a commitment with a mismatched versioned hash and tests that alter only y_i. If the embedded constant [τ]₂ is wrong, it will either reject all honest proofs or accept proofs from a different setup, so it must be checked against the documented value. If a batch is rejected, there is no way to tell which claim is invalid, so use cases like dispute games that need to pin down responsibility require individual re-verification. Length and range checks should be placed before the precompile calls so that invalid input fails with an ordinary revert that refunds the remaining gas.

Proposal status and related proposals

This EIP is an Informational proposal that does not change protocol or consensus rules; it transcribes a construction such as verify_kzg_proof_batch from the consensus-layer Deneb spec into the EVM context. A separate proposal, EIP-8149, is a dedicated precompile that verifies a single blob at multiple points against one aggregate proof; it requires a protocol change and a new proof format and cannot handle multiple commitments, so it is orthogonal to this technique rather than competing with it. The source status is Draft, so the content may still change, and the provided call records contain no decision on this proposal.

Original EIP · ← EIPs