From 0daa2acdff87d4ca1fe549a29fc2eff15c0e33a1 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 2 Jul 2024 17:05:40 -0500 Subject: [PATCH] Remove verify_kzg_proof_multi_impl too --- .../polynomial-commitments-sampling.md | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/specs/_features/eip7594/polynomial-commitments-sampling.md b/specs/_features/eip7594/polynomial-commitments-sampling.md index de04557820..9625ea3d72 100644 --- a/specs/_features/eip7594/polynomial-commitments-sampling.md +++ b/specs/_features/eip7594/polynomial-commitments-sampling.md @@ -34,7 +34,6 @@ - [`evaluate_polynomialcoeff`](#evaluate_polynomialcoeff) - [KZG multiproofs](#kzg-multiproofs) - [`compute_kzg_proof_multi_impl`](#compute_kzg_proof_multi_impl) - - [`verify_kzg_proof_multi_impl`](#verify_kzg_proof_multi_impl) - [`verify_cell_kzg_proof_batch_impl`](#verify_cell_kzg_proof_batch_impl) - [Cell cosets](#cell-cosets) - [`coset_shift_for_cell`](#coset_shift_for_cell) @@ -432,45 +431,6 @@ def compute_kzg_proof_multi_impl( return KZGProof(g1_lincomb(KZG_SETUP_G1_MONOMIAL[:len(quotient_polynomial)], quotient_polynomial)), ys ``` -#### `verify_kzg_proof_multi_impl` - -```python -def verify_kzg_proof_multi_impl(commitment: KZGCommitment, - zs: Coset, - ys: CosetEvals, - proof: KZGProof) -> bool: - """ - Verify a KZG multi-evaluation proof for a set of `k` points. - - This is done by checking if the following equation holds: - Q(x) Z(x) = f(X) - I(X) - Where: - f(X) is the polynomial that we want to verify opens at `k` points to `k` values - Q(X) is the quotient polynomial computed by the prover - I(X) is the degree k-1 polynomial that evaluates to `ys` at all `zs`` points - Z(X) is the polynomial that evaluates to zero on all `k` points - - The verifier receives the commitments to Q(X) and f(X), so they check the equation - holds by using the following pairing equation: - e([Q(X)]_1, [Z(X)]_2) == e([f(X)]_1 - [I(X)]_1, [1]_2) - """ - - assert len(zs) == len(ys) - - # Compute [Z(X)]_2 - zero_poly = g2_lincomb(KZG_SETUP_G2_MONOMIAL[:len(zs) + 1], vanishing_polynomialcoeff(zs)) - # Compute [I(X)]_1 - interpolated_poly = g1_lincomb(KZG_SETUP_G1_MONOMIAL[:len(zs)], interpolate_polynomialcoeff(zs, ys)) - - return (bls.pairing_check([ - [bls.bytes48_to_G1(proof), bls.bytes96_to_G2(zero_poly)], - [ - bls.add(bls.bytes48_to_G1(commitment), bls.neg(bls.bytes48_to_G1(interpolated_poly))), - bls.neg(bls.bytes96_to_G2(KZG_SETUP_G2_MONOMIAL[0])), - ], - ])) -``` - #### `verify_cell_kzg_proof_batch_impl` ```python