Skip to content

Commit

Permalink
update pricing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Dec 19, 2024
1 parent ed6174f commit 42cf434
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ const (
Bls12381G1MulGas uint64 = 12000 // Price for BLS12-381 elliptic curve G1 point scalar multiplication
Bls12381G2AddGas uint64 = 600 // Price for BLS12-381 elliptic curve G2 point addition
Bls12381G2MulGas uint64 = 22500 // Price for BLS12-381 elliptic curve G2 point scalar multiplication
Bls12381PairingBaseGas uint64 = 78000 // Base gas price for BLS12-381 elliptic curve pairing check
Bls12381PairingPerPairGas uint64 = 51600 // Per-point pair gas price for BLS12-381 elliptic curve pairing check
Bls12381MapG1Gas uint64 = 4125 // Gas price for BLS12-381 mapping field element to G1 operation
Bls12381MapG2Gas uint64 = 17000 // Gas price for BLS12-381 mapping field element to G2 operation
Bls12381PairingBaseGas uint64 = 37700 // Base gas price for BLS12-381 elliptic curve pairing check
Bls12381PairingPerPairGas uint64 = 32600 // 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 = 23800 // 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 All @@ -179,9 +179,9 @@ const (
)

// Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
var Bls12381G1MultiExpDiscountTable = [128]uint64{1800, 888, 955, 802, 743, 821, 750, 680, 657, 635, 612, 591, 664, 637, 611, 585, 578, 571, 564, 557, 628, 620, 612, 604, 596, 588, 578, 570, 562, 693, 683, 673, 670, 665, 663, 658, 655, 650, 648, 643, 640, 635, 633, 628, 625, 620, 618, 613, 610, 605, 603, 598, 595, 590, 588, 583, 580, 578, 573, 570, 565, 563, 558, 555, 553, 550, 548, 548, 545, 543, 540, 540, 538, 535, 533, 533, 530, 528, 528, 525, 523, 520, 520, 518, 515, 513, 513, 510, 508, 505, 505, 503, 500, 498, 498, 495, 493, 490, 490, 488, 485, 483, 483, 480, 478, 478, 475, 473, 470, 470, 468, 465, 463, 463, 460, 458, 455, 455, 453, 450, 448, 448, 445, 443, 440, 440, 438, 435}
var Bls12381G1MultiExpDiscountTable = [128]uint64{1000, 949, 848, 797, 764, 750, 738, 728, 719, 712, 705, 698, 692, 687, 682, 677, 673, 669, 665, 661, 658, 654, 651, 648, 645, 642, 640, 637, 635, 632, 630, 627, 625, 623, 621, 619, 617, 615, 613, 611, 609, 608, 606, 604, 603, 601, 599, 598, 596, 595, 593, 592, 591, 589, 588, 586, 585, 584, 582, 581, 580, 579, 577, 576, 575, 574, 573, 572, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 547, 546, 545, 544, 543, 542, 541, 540, 540, 539, 538, 537, 536, 536, 535, 534, 533, 532, 532, 531, 530, 529, 528, 528, 527, 526, 525, 525, 524, 523, 522, 522, 521, 520, 520, 519}

var Bls12381G2MultiExpDiscountTable = [128]uint64{1800, 1776, 1528, 1282, 1188, 1368, 1250, 1133, 1095, 1269, 1224, 1182, 1137, 1274, 1222, 1169, 1155, 1141, 1127, 1113, 1256, 1240, 1224, 1208, 1192, 1176, 1156, 1140, 1124, 1108, 1092, 1076, 1072, 1064, 1060, 1052, 1048, 1040, 1036, 1028, 1024, 1016, 1012, 1004, 1000, 992, 988, 980, 976, 968, 964, 956, 952, 944, 940, 932, 928, 924, 916, 912, 904, 900, 892, 888, 884, 880, 876, 876, 872, 868, 864, 864, 860, 856, 852, 852, 848, 844, 844, 840, 836, 832, 832, 828, 824, 820, 820, 816, 812, 808, 808, 804, 800, 796, 796, 792, 788, 784, 784, 780, 776, 772, 772, 768, 764, 764, 760, 756, 752, 752, 748, 744, 740, 740, 736, 732, 728, 728, 724, 720, 716, 716, 712, 708, 704, 704, 700, 696}
var Bls12381G2MultiExpDiscountTable = [128]uint64{1000, 1000, 923, 884, 855, 832, 812, 796, 782, 770, 759, 749, 740, 732, 724, 717, 711, 704, 699, 693, 688, 683, 679, 674, 670, 666, 663, 659, 655, 652, 649, 646, 643, 640, 637, 634, 632, 629, 627, 624, 622, 620, 618, 615, 613, 611, 609, 607, 606, 604, 602, 600, 598, 597, 595, 593, 592, 590, 589, 587, 586, 584, 583, 582, 580, 579, 578, 576, 575, 574, 573, 571, 570, 569, 568, 567, 566, 565, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 552, 551, 550, 549, 548, 547, 546, 545, 545, 544, 543, 542, 541, 541, 540, 539, 538, 537, 537, 536, 535, 535, 534, 533, 532, 532, 531, 530, 530, 529, 528, 528, 527, 526, 526, 525, 524, 524}

// Difficulty parameters.
var (
Expand Down

0 comments on commit 42cf434

Please sign in to comment.