Skip to content

Commit

Permalink
params: update BLS gas costs
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Apr 8, 2024
1 parent 0af03ee commit 5c15dd8
Show file tree
Hide file tree
Showing 7 changed files with 693 additions and 623 deletions.
208 changes: 104 additions & 104 deletions core/vm/testdata/precompiles/blsG1Add.json

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions core/vm/testdata/precompiles/blsG2Add.json

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions core/vm/testdata/precompiles/blsG2Mul.json

Large diffs are not rendered by default.

276 changes: 173 additions & 103 deletions core/vm/testdata/precompiles/blsG2MultiExp.json

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions core/vm/testdata/precompiles/blsMapG2.json

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions core/vm/testdata/precompiles/blsPairing.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ const (
Bn256PairingPerPointGasByzantium uint64 = 80000 // Byzantium per-point price for an elliptic curve pairing check
Bn256PairingPerPointGasIstanbul uint64 = 34000 // Per-point price for an elliptic curve pairing check

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

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

0 comments on commit 5c15dd8

Please sign in to comment.