Skip to content

Commit 5c15dd8

Browse files
params: update BLS gas costs
1 parent 0af03ee commit 5c15dd8

File tree

7 files changed

+693
-623
lines changed

7 files changed

+693
-623
lines changed

core/vm/testdata/precompiles/blsG1Add.json

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

core/vm/testdata/precompiles/blsG2Add.json

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

core/vm/testdata/precompiles/blsG2Mul.json

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

core/vm/testdata/precompiles/blsG2MultiExp.json

Lines changed: 173 additions & 103 deletions
Large diffs are not rendered by default.

core/vm/testdata/precompiles/blsMapG2.json

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

core/vm/testdata/precompiles/blsPairing.json

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

params/protocol_params.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ const (
150150
Bn256PairingPerPointGasByzantium uint64 = 80000 // Byzantium per-point price for an elliptic curve pairing check
151151
Bn256PairingPerPointGasIstanbul uint64 = 34000 // Per-point price for an elliptic curve pairing check
152152

153-
Bls12381G1AddGas uint64 = 600 // Price for BLS12-381 elliptic curve G1 point addition
154-
Bls12381G1MulGas uint64 = 12000 // Price for BLS12-381 elliptic curve G1 point scalar multiplication
155-
Bls12381G2AddGas uint64 = 4500 // Price for BLS12-381 elliptic curve G2 point addition
156-
Bls12381G2MulGas uint64 = 55000 // Price for BLS12-381 elliptic curve G2 point scalar multiplication
157-
Bls12381PairingBaseGas uint64 = 115000 // Base gas price for BLS12-381 elliptic curve pairing check
158-
Bls12381PairingPerPairGas uint64 = 23000 // Per-point pair gas price for BLS12-381 elliptic curve pairing check
159-
Bls12381MapG1Gas uint64 = 5500 // Gas price for BLS12-381 mapping field element to G1 operation
160-
Bls12381MapG2Gas uint64 = 110000 // Gas price for BLS12-381 mapping field element to G2 operation
153+
Bls12381G1AddGas uint64 = 500 // Price for BLS12-381 elliptic curve G1 point addition
154+
Bls12381G1MulGas uint64 = 12000 // Price for BLS12-381 elliptic curve G1 point scalar multiplication
155+
Bls12381G2AddGas uint64 = 800 // Price for BLS12-381 elliptic curve G2 point addition
156+
Bls12381G2MulGas uint64 = 45000 // Price for BLS12-381 elliptic curve G2 point scalar multiplication
157+
Bls12381PairingBaseGas uint64 = 65000 // Base gas price for BLS12-381 elliptic curve pairing check
158+
Bls12381PairingPerPairGas uint64 = 43000 // Per-point pair gas price for BLS12-381 elliptic curve pairing check
159+
Bls12381MapG1Gas uint64 = 5500 // Gas price for BLS12-381 mapping field element to G1 operation
160+
Bls12381MapG2Gas uint64 = 75000 // Gas price for BLS12-381 mapping field element to G2 operation
161161

162162
// The Refund Quotient is the cap on how much of the used gas can be refunded. Before EIP-3529,
163163
// up to half the consumed gas could be refunded. Redefined as 1/5th in EIP-3529

0 commit comments

Comments
 (0)