@@ -57,7 +57,7 @@ def make_dup(index: int) -> Opcode:
5757
5858@pytest .mark .valid_from ("Cancun" )
5959def test_worst_keccak (
60- blockchain_test : BlockchainTestFiller ,
60+ state_test : StateTestFiller ,
6161 pre : Alloc ,
6262 fork : Fork ,
6363):
@@ -122,11 +122,11 @@ def test_worst_keccak(
122122 sender = pre .fund_eoa (),
123123 )
124124
125- blockchain_test (
125+ state_test (
126126 env = env ,
127127 pre = pre ,
128128 post = {},
129- blocks = [ Block ( txs = [ tx ])] ,
129+ tx = tx ,
130130 )
131131
132132
@@ -141,7 +141,7 @@ def test_worst_keccak(
141141)
142142@pytest .mark .slow ()
143143def test_worst_precompile_only_data_input (
144- blockchain_test : BlockchainTestFiller ,
144+ state_test : StateTestFiller ,
145145 pre : Alloc ,
146146 fork : Fork ,
147147 address : Address ,
@@ -203,19 +203,18 @@ def test_worst_precompile_only_data_input(
203203 sender = pre .fund_eoa (),
204204 )
205205
206- blockchain_test (
206+ state_test (
207207 env = env ,
208208 pre = pre ,
209209 post = {},
210- blocks = [ Block ( txs = [ tx ])] ,
210+ tx = tx ,
211211 )
212212
213213
214214@pytest .mark .valid_from ("Cancun" )
215215def test_worst_modexp (
216- blockchain_test : BlockchainTestFiller ,
216+ state_test : StateTestFiller ,
217217 pre : Alloc ,
218- fork : Fork ,
219218):
220219 """Test running a block with as many MODEXP calls as possible."""
221220 env = Environment ()
@@ -252,11 +251,11 @@ def test_worst_modexp(
252251 sender = pre .fund_eoa (),
253252 )
254253
255- blockchain_test (
254+ state_test (
256255 env = env ,
257256 pre = pre ,
258257 post = {},
259- blocks = [ Block ( txs = [ tx ])] ,
258+ tx = tx ,
260259 )
261260
262261
@@ -407,7 +406,7 @@ def test_worst_modexp(
407406)
408407@pytest .mark .slow ()
409408def test_worst_precompile_fixed_cost (
410- blockchain_test : BlockchainTestFiller ,
409+ state_test : StateTestFiller ,
411410 pre : Alloc ,
412411 precompile_address : Address ,
413412 parameters : list [str ] | list [BytesConcatenation ] | list [bytes ],
@@ -452,11 +451,11 @@ def test_worst_precompile_fixed_cost(
452451 sender = pre .fund_eoa (),
453452 )
454453
455- blockchain_test (
454+ state_test (
456455 env = env ,
457456 pre = pre ,
458457 post = {},
459- blocks = [ Block ( txs = [ tx ])] ,
458+ tx = tx ,
460459 )
461460
462461
@@ -480,9 +479,8 @@ def code_loop_precompile_call(calldata: Bytecode, attack_block: Bytecode):
480479@pytest .mark .valid_from ("Cancun" )
481480@pytest .mark .slow
482481def test_worst_jumps (
483- blockchain_test : BlockchainTestFiller ,
482+ state_test : StateTestFiller ,
484483 pre : Alloc ,
485- fork : Fork ,
486484):
487485 """Test running a JUMP-intensive contract."""
488486 env = Environment ()
@@ -501,29 +499,26 @@ def jump_seq():
501499 caller_code = While (body = Op .POP (Op .CALL (address = jumps_address )))
502500 caller_address = pre .deploy_contract (caller_code )
503501
504- txs = [
505- Transaction (
506- to = caller_address ,
507- gas_limit = env .gas_limit ,
508- sender = pre .fund_eoa (),
509- )
510- ]
502+ tx = Transaction (
503+ to = caller_address ,
504+ gas_limit = env .gas_limit ,
505+ sender = pre .fund_eoa (),
506+ )
511507
512- blockchain_test (
508+ state_test (
513509 genesis_environment = env ,
514510 pre = pre ,
515511 post = {},
516- blocks = [ Block ( txs = txs )] ,
512+ tx = tx ,
517513 )
518514
519515
520516@pytest .mark .zkevm
521517@pytest .mark .valid_from ("Cancun" )
522518@pytest .mark .slow
523519def test_worst_jumpdests (
524- blockchain_test : BlockchainTestFiller ,
520+ state_test : StateTestFiller ,
525521 pre : Alloc ,
526- fork : Fork ,
527522):
528523 """Test running a JUMPDEST-intensive contract."""
529524 env = Environment ()
@@ -536,19 +531,17 @@ def test_worst_jumpdests(
536531 caller_code = While (body = Op .POP (Op .CALL (address = jumpdests_address )))
537532 caller_address = pre .deploy_contract (caller_code )
538533
539- txs = [
540- Transaction (
541- to = caller_address ,
542- gas_limit = env .gas_limit ,
543- sender = pre .fund_eoa (),
544- )
545- ]
534+ tx = Transaction (
535+ to = caller_address ,
536+ gas_limit = env .gas_limit ,
537+ sender = pre .fund_eoa (),
538+ )
546539
547- blockchain_test (
540+ state_test (
548541 genesis_environment = env ,
549542 pre = pre ,
550543 post = {},
551- blocks = [ Block ( txs = txs )] ,
544+ tx = tx ,
552545 )
553546
554547
@@ -676,7 +669,7 @@ def test_worst_jumpdests(
676669 ids = lambda param : "" if isinstance (param , tuple ) else param ,
677670)
678671def test_worst_binop_simple (
679- blockchain_test : BlockchainTestFiller ,
672+ state_test : StateTestFiller ,
680673 pre : Alloc ,
681674 opcode : Op ,
682675 opcode_args : tuple [int , int ],
@@ -704,18 +697,18 @@ def test_worst_binop_simple(
704697 sender = pre .fund_eoa (),
705698 )
706699
707- blockchain_test (
700+ state_test (
708701 env = env ,
709702 pre = pre ,
710703 post = {},
711- blocks = [ Block ( txs = [ tx ])] ,
704+ tx = tx ,
712705 )
713706
714707
715708@pytest .mark .valid_from ("Cancun" )
716709@pytest .mark .parametrize ("opcode" , [Op .ISZERO , Op .NOT ])
717710def test_worst_unop (
718- blockchain_test : BlockchainTestFiller ,
711+ state_test : StateTestFiller ,
719712 pre : Alloc ,
720713 opcode : Op ,
721714):
@@ -738,18 +731,18 @@ def test_worst_unop(
738731 sender = pre .fund_eoa (),
739732 )
740733
741- blockchain_test (
734+ state_test (
742735 env = env ,
743736 pre = pre ,
744737 post = {},
745- blocks = [ Block ( txs = [ tx ])] ,
738+ tx = tx ,
746739 )
747740
748741
749742@pytest .mark .valid_from ("Cancun" )
750743@pytest .mark .parametrize ("shift_right" , [Op .SHR , Op .SAR ])
751744def test_worst_shifts (
752- blockchain_test : BlockchainTestFiller ,
745+ state_test : StateTestFiller ,
753746 pre : Alloc ,
754747 shift_right : Op ,
755748):
@@ -822,19 +815,19 @@ def select_shift_amount(shift_fn, v):
822815 sender = pre .fund_eoa (),
823816 )
824817
825- blockchain_test (
818+ state_test (
826819 env = env ,
827820 pre = pre ,
828821 post = {},
829- blocks = [ Block ( txs = [ tx ])] ,
822+ tx = tx ,
830823 )
831824
832825
833826@pytest .mark .valid_from ("Cancun" )
834827@pytest .mark .parametrize ("mod_bits" , [255 , 191 , 127 , 63 ])
835828@pytest .mark .parametrize ("op" , [Op .MOD , Op .SMOD ])
836829def test_worst_mod (
837- blockchain_test : BlockchainTestFiller ,
830+ state_test : StateTestFiller ,
838831 pre : Alloc ,
839832 mod_bits : int ,
840833 op : Op ,
@@ -944,19 +937,18 @@ def test_worst_mod(
944937 sender = pre .fund_eoa (),
945938 )
946939
947- blockchain_test (
940+ state_test (
948941 env = env ,
949942 pre = pre ,
950943 post = {},
951- blocks = [ Block ( txs = [ tx ])] ,
944+ tx = tx ,
952945 )
953946
954947
955948@pytest .mark .valid_from ("Cancun" )
956949def test_empty_block (
957950 blockchain_test : BlockchainTestFiller ,
958951 pre : Alloc ,
959- fork : Fork ,
960952):
961953 """Test running an empty block as a baseline for fixed proving costs."""
962954 env = Environment ()
0 commit comments