diff --git a/specs/_features/eip7594/polynomial-commitments-sampling.md b/specs/_features/eip7594/polynomial-commitments-sampling.md index 1353bafa3..19c3569b8 100644 --- a/specs/_features/eip7594/polynomial-commitments-sampling.md +++ b/specs/_features/eip7594/polynomial-commitments-sampling.md @@ -133,9 +133,10 @@ def g2_lincomb(points: Sequence[G2Point], scalars: Sequence[BLSFieldElement]) -> BLS multiscalar multiplication in G2. This function can be optimized using Pippenger's algorithm and variants. """ assert len(points) == len(scalars) - result = bls.Z2() - for x, a in zip(points, scalars): - result = bls.add(result, bls.multiply(bls.bytes96_to_G2(x), a)) + points_g2 = [] + for point in points: + points_g2.append(bls.bytes96_to_G2(point)) + result = bls.g2_multi_exp(points_g2, scalars) return Bytes96(bls.G2_to_bytes96(result)) ```