From 4d073f10a2683ad5b41e1b0ad81b6f5a615df891 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Thu, 18 Apr 2024 18:00:01 +0100 Subject: [PATCH 1/2] remove remainder polynomial when in monomial form --- specs/_features/eip7594/polynomial-commitments-sampling.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specs/_features/eip7594/polynomial-commitments-sampling.md b/specs/_features/eip7594/polynomial-commitments-sampling.md index 829e16eba..14548dea6 100644 --- a/specs/_features/eip7594/polynomial-commitments-sampling.md +++ b/specs/_features/eip7594/polynomial-commitments-sampling.md @@ -313,14 +313,12 @@ def compute_kzg_proof_multi_impl( # For all x_i, compute p(x_i) - p(z) ys = [evaluate_polynomialcoeff(polynomial_coeff, z) for z in zs] - interpolation_polynomial = interpolate_polynomialcoeff(zs, ys) - polynomial_shifted = add_polynomialcoeff(polynomial_coeff, neg_polynomialcoeff(interpolation_polynomial)) # For all x_i, compute (x_i - z) denominator_poly = vanishing_polynomialcoeff(zs) # Compute the quotient polynomial directly in evaluation form - quotient_polynomial = divide_polynomialcoeff(polynomial_shifted, denominator_poly) + quotient_polynomial = divide_polynomialcoeff(polynomial_coeff, denominator_poly) return KZGProof(g1_lincomb(KZG_SETUP_G1_MONOMIAL[:len(quotient_polynomial)], quotient_polynomial)), ys ``` From 33dfa88160d9073e7e5e75827dce2a9877a7ca29 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Fri, 19 Apr 2024 12:07:58 +0100 Subject: [PATCH 2/2] fix bad merge --- specs/_features/eip7594/polynomial-commitments-sampling.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specs/_features/eip7594/polynomial-commitments-sampling.md b/specs/_features/eip7594/polynomial-commitments-sampling.md index aa6a8e183..a238a95fe 100644 --- a/specs/_features/eip7594/polynomial-commitments-sampling.md +++ b/specs/_features/eip7594/polynomial-commitments-sampling.md @@ -322,8 +322,6 @@ def compute_kzg_proof_multi_impl( # For all points, compute the evaluation of those points ys = [evaluate_polynomialcoeff(polynomial_coeff, z) for z in zs] - # Compute r(X) - interpolation_polynomial = interpolate_polynomialcoeff(zs, ys) # Compute Z(X) denominator_poly = vanishing_polynomialcoeff(zs)