mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
core/vm: specify concurrent tasks to 1 for bls msm precompiles
This commit is contained in:
parent
9b5d1412cc
commit
c8d642d027
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue