We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26918e5 commit a9df61aCopy full SHA for a9df61a
1 file changed
tests/benchmark/compute/precompile/test_bls12_381.py
@@ -177,6 +177,7 @@ def test_bls12_g1_msm(
177
def test_bls12_g2_msm(
178
benchmark_test: BenchmarkTestFiller,
179
fork: Fork,
180
+ gas_benchmark_value: int,
181
k: int,
182
) -> None:
183
"""Benchmark BLS12_G2_MSM precompile with varying number of points."""
@@ -190,6 +191,13 @@ def test_bls12_g2_msm(
190
191
* k
192
)
193
194
+ intrinsic_gas_cost = fork.transaction_intrinsic_cost_calculator()(
195
+ calldata=calldata
196
+ )
197
+
198
+ if intrinsic_gas_cost > gas_benchmark_value:
199
+ pytest.skip("k configuration exceeds the gas limit")
200
201
attack_block = Op.POP(
202
Op.STATICCALL(
203
gas=Op.GAS, address=precompile_address, args_size=Op.CALLDATASIZE
0 commit comments