@@ -45,19 +45,16 @@ pub struct GasConfig {
45
45
pub ed25519_batch_verify_cost : LinearGasCost ,
46
46
/// ed25519 batch signature verification cost (single public key)
47
47
pub ed25519_batch_verify_one_pubkey_cost : LinearGasCost ,
48
- /// bls12-381 aggregate cost per point (g1)
49
- pub bls12_381_aggregate_g1_per_point : u64 ,
50
- /// bls12-381 aggregate cost per point (g2)
51
- pub bls12_381_aggregate_g2_per_point : u64 ,
48
+ /// bls12-381 aggregate cost (g1)
49
+ pub bls12_381_aggregate_g1_cost : LinearGasCost ,
50
+ /// bls12-381 aggregate cost (g2)
51
+ pub bls12_381_aggregate_g2_cost : LinearGasCost ,
52
52
/// bls12-381 hash to g1 cost
53
53
pub bls12_381_hash_to_g1_cost : u64 ,
54
54
/// bls12-381 hash to g2 cost
55
55
pub bls12_381_hash_to_g2_cost : u64 ,
56
56
/// bls12-381 pairing equality check cost
57
- pub bls12_381_pairing_equality_cost : u64 ,
58
- /// bls12-381 aggregated pairing equality check cost per point
59
- /// (added on top of the base pairing equality check cost)
60
- pub bls12_381_aggregated_pairing_equality_cost_per_pair : u64 ,
57
+ pub bls12_381_pairing_equality_cost : LinearGasCost ,
61
58
}
62
59
63
60
impl Default for GasConfig {
@@ -86,13 +83,20 @@ impl Default for GasConfig {
86
83
per_item : 10 * GAS_PER_US ,
87
84
} ,
88
85
// just assume the production machines have more than 4 cores, so we can half that
89
- bls12_381_aggregate_g1_per_point : 16 * GAS_PER_US / 2 ,
90
- bls12_381_aggregate_g2_per_point : 33 * GAS_PER_US / 2 ,
91
- bls12_381_hash_to_g1_cost : 324 * GAS_PER_US ,
92
- bls12_381_hash_to_g2_cost : 528 * GAS_PER_US ,
93
- // god i wish i was lying
94
- bls12_381_pairing_equality_cost : 1038 * GAS_PER_US ,
95
- bls12_381_aggregated_pairing_equality_cost_per_pair : 108 * GAS_PER_US ,
86
+ bls12_381_aggregate_g1_cost : LinearGasCost {
87
+ base : 136 * GAS_PER_US / 2 ,
88
+ per_item : 24 * GAS_PER_US / 2 ,
89
+ } ,
90
+ bls12_381_aggregate_g2_cost : LinearGasCost {
91
+ base : 207 * GAS_PER_US / 2 ,
92
+ per_item : 49 * GAS_PER_US / 2 ,
93
+ } ,
94
+ bls12_381_hash_to_g1_cost : 563 * GAS_PER_US ,
95
+ bls12_381_hash_to_g2_cost : 871 * GAS_PER_US ,
96
+ bls12_381_pairing_equality_cost : LinearGasCost {
97
+ base : 2281 * GAS_PER_US ,
98
+ per_item : 163 * GAS_PER_US ,
99
+ } ,
96
100
}
97
101
}
98
102
}
0 commit comments