Skip to content

Commit b12c434

Browse files
holimanshekhirin
authored andcommitted
tests/fuzzers: supply gnark multiexp config, fixes ethereum#26669 (ethereum#26670)
This change fixes a fuzzer which broke when we updated the gnark dependency earlier.
1 parent cea380d commit b12c434

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/fuzzers/bls12381/bls12381_fuzz.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"io"
2727
"math/big"
2828

29+
"github.com/consensys/gnark-crypto/ecc"
2930
gnark "github.com/consensys/gnark-crypto/ecc/bls12-381"
3031
"github.com/consensys/gnark-crypto/ecc/bls12-381/fp"
3132
"github.com/consensys/gnark-crypto/ecc/bls12-381/fr"
@@ -198,7 +199,7 @@ func FuzzCrossG1MultiExp(data []byte) int {
198199
}
199200
gethScalars = append(gethScalars, s)
200201
var gnarkScalar = &fr.Element{}
201-
gnarkScalar = gnarkScalar.SetBigInt(s).FromMont()
202+
gnarkScalar = gnarkScalar.SetBigInt(s)
202203
gnarkScalars = append(gnarkScalars, *gnarkScalar)
203204

204205
gethPoints = append(gethPoints, new(bls12381.PointG1).Set(kp1))
@@ -217,7 +218,7 @@ func FuzzCrossG1MultiExp(data []byte) int {
217218

218219
// gnark multi exp
219220
cp := new(gnark.G1Affine)
220-
cp.MultiExp(gnarkPoints, gnarkScalars)
221+
cp.MultiExp(gnarkPoints, gnarkScalars, ecc.MultiExpConfig{})
221222

222223
// compare result
223224
if !(bytes.Equal(cp.Marshal(), g1.ToBytes(&kp))) {

0 commit comments

Comments
 (0)