@@ -106,6 +106,7 @@ def test_worst_calldatasize(
106
106
):
107
107
"""Test running a block with as many CALLDATASIZE as possible."""
108
108
generator = JumpLoopGenerator (setup = Bytecode (), attack_block = Op .POP (Op .CALLDATASIZE ))
109
+ generator .deploy_contracts (pre , fork )
109
110
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
110
111
tx .data = Bytes (b"\x00 " * calldata_length )
111
112
@@ -254,7 +255,7 @@ def test_worst_msize(
254
255
setup = Op .MLOAD (Op .CALLVALUE ) + Op .POP ,
255
256
attack_block = Op .MSIZE ,
256
257
)
257
-
258
+ generator . deploy_contracts ( pre , fork )
258
259
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
259
260
tx .value = HexNumber (mem_size )
260
261
@@ -1195,9 +1196,11 @@ def test_worst_modexp(
1195
1196
Op .STATICCALL (Op .GAS , 0x5 , Op .PUSH0 , Op .CALLDATASIZE , Op .PUSH0 , Op .PUSH0 )
1196
1197
)
1197
1198
1198
- tx = JumpLoopGenerator (
1199
+ generator = JumpLoopGenerator (
1199
1200
setup = Op .CALLDATACOPY (0 , 0 , Op .CALLDATASIZE ), attack_block = attack_block
1200
- ).generate_transaction (pre , gas_benchmark_value , fork )
1201
+ )
1202
+ generator .deploy_contracts (pre , fork )
1203
+ tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
1201
1204
tx .data = Bytes (bytes (mod_exp_input ).rstrip (b"\x00 " ))
1202
1205
1203
1206
benchmark_test (
@@ -2150,6 +2153,7 @@ def test_worst_blobhash(
2150
2153
):
2151
2154
"""Test running a block with as many BLOBHASH instructions as possible."""
2152
2155
generator = ExtCallGenerator (setup = Bytecode (), attack_block = Op .BLOBHASH (blob_index ))
2156
+ generator .deploy_contracts (pre , fork )
2153
2157
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
2154
2158
2155
2159
tx_type = TransactionType .LEGACY
@@ -2272,6 +2276,7 @@ def test_worst_mod(
2272
2276
)
2273
2277
2274
2278
generator = JumpLoopGenerator (setup = code_constant_pool , attack_block = code_segment )
2279
+ generator .deploy_contracts (pre , fork )
2275
2280
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
2276
2281
2277
2282
input_value = initial_mod if not should_negate else neg (initial_mod )
@@ -2396,6 +2401,7 @@ def test_worst_modarith(
2396
2401
)
2397
2402
2398
2403
generator = JumpLoopGenerator (setup = code_constant_pool , attack_block = code_segment )
2404
+ generator .deploy_contracts (pre , fork )
2399
2405
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
2400
2406
tx .data = Bytes (initial_mod .to_bytes (32 , byteorder = "big" ))
2401
2407
@@ -2468,6 +2474,7 @@ def test_amortized_bn128_pairings(
2468
2474
attack_block = Op .POP (Op .STATICCALL (Op .GAS , 0x08 , 0 , Op .CALLDATASIZE , 0 , 0 ))
2469
2475
2470
2476
generator = JumpLoopGenerator (setup = code_prefix , attack_block = attack_block )
2477
+ generator .deploy_contracts (pre , fork )
2471
2478
tx = generator .generate_transaction (pre , gas_benchmark_value , fork )
2472
2479
tx .data = _generate_bn128_pairs (optimal_per_call_num_pairings , 42 )
2473
2480
0 commit comments