From b2d72a18f0727e2071be6f10f4393cab8f4b6f05 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Thu, 3 Nov 2022 18:08:37 +0200 Subject: [PATCH] Fix type error in the inputs to hash_to_bls_field() --- specs/eip4844/polynomial-commitments.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specs/eip4844/polynomial-commitments.md b/specs/eip4844/polynomial-commitments.md index 1ecfe4f369..c90c0d38d4 100644 --- a/specs/eip4844/polynomial-commitments.md +++ b/specs/eip4844/polynomial-commitments.md @@ -346,13 +346,16 @@ def compute_aggregated_poly_and_commitment( Return (1) the aggregated polynomial, (2) the aggregated KZG commitment, and (3) the polynomial evaluation random challenge. """ + # Convert blobs to polynomials + polynomials = [blob_to_polynomial(blob) for blob in blobs] + # Generate random linear combination challenges - r = hash_to_bls_field(blobs, kzg_commitments) + r = hash_to_bls_field(polynomials, kzg_commitments) r_powers = compute_powers(r, len(kzg_commitments)) evaluation_challenge = int(r_powers[-1]) * r % BLS_MODULUS # Create aggregated polynomial in evaluation form - aggregated_poly = Polynomial(poly_lincomb([blob_to_polynomial(blob) for blob in blobs], r_powers)) + aggregated_poly = Polynomial(poly_lincomb(polynomials, r_powers)) # Compute commitment to aggregated polynomial aggregated_poly_commitment = KZGCommitment(g1_lincomb(kzg_commitments, r_powers))