core/vm: specify concurrent tasks to 1 for bls msm precompiles

This commit is contained in:
Jared Wasinger 2024-08-26 13:48:05 -07:00
parent 9b5d1412cc
commit c8d642d027

View file

@ -805,7 +805,7 @@ func (c *bls12381G1MultiExp) Run(input []byte) ([]byte, error) {
// Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1)
r := new(bls12381.G1Affine) r := new(bls12381.G1Affine)
r.MultiExp(points, scalars, ecc.MultiExpConfig{}) r.MultiExp(points, scalars, ecc.MultiExpConfig{NbTasks: 1})
// Encode the G1 point to 128 bytes // Encode the G1 point to 128 bytes
return encodePointG1(r), nil return encodePointG1(r), nil
@ -940,7 +940,7 @@ func (c *bls12381G2MultiExp) Run(input []byte) ([]byte, error) {
// Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1)
r := new(bls12381.G2Affine) r := new(bls12381.G2Affine)
r.MultiExp(points, scalars, ecc.MultiExpConfig{}) r.MultiExp(points, scalars, ecc.MultiExpConfig{NbTasks: 1})
// Encode the G2 point to 256 bytes. // Encode the G2 point to 256 bytes.
return encodePointG2(r), nil return encodePointG2(r), nil