Skip to content

Commit 41bc03e

Browse files
fix: update failing cases
1 parent 619f1cf commit 41bc03e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

tests/benchmark/test_worst_memory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def test_worst_codecopy(
154154
fork: Fork,
155155
max_code_size_ratio: float,
156156
fixed_src_dst: bool,
157-
dq,
158157
):
159158
"""Test running a block filled with CODECOPY executions."""
160159
max_code_size = fork.max_code_size()

tests/benchmark/test_worst_stateful_opcodes.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from ethereum_test_benchmark.benchmark_code_generator import ExtCallGenerator, JumpLoopGenerator
1414
from ethereum_test_forks import Fork
15-
from ethereum_test_specs import BlockchainTestFiller
15+
from ethereum_test_specs import BlockchainTestFiller, StateTestFiller
1616
from ethereum_test_specs.benchmark import BenchmarkTestFiller
1717
from ethereum_test_tools import (
1818
Account,
@@ -339,6 +339,7 @@ def test_worst_storage_access_cold(
339339

340340
op_tx = Transaction(
341341
to=contract_address,
342+
gas_limit=gas_benchmark_value,
342343
sender=pre.fund_eoa(),
343344
)
344345
blocks.append(Block(txs=[op_tx]))
@@ -365,6 +366,7 @@ def test_worst_storage_access_warm(
365366
benchmark_test: BenchmarkTestFiller,
366367
pre: Alloc,
367368
storage_action: StorageAction,
369+
gas_benchmark_value: int,
368370
env: Environment,
369371
):
370372
"""Test running a block with as many warm storage slot accesses as possible."""
@@ -410,6 +412,7 @@ def test_worst_storage_access_warm(
410412

411413
op_tx = Transaction(
412414
to=contract_address,
415+
gas_limit=gas_benchmark_value,
413416
sender=pre.fund_eoa(),
414417
)
415418
blocks.append(Block(txs=[op_tx]))
@@ -424,6 +427,7 @@ def test_worst_storage_access_warm(
424427
def test_worst_blockhash(
425428
blockchain_test: BlockchainTestFiller,
426429
pre: Alloc,
430+
gas_benchmark_value: int,
427431
):
428432
"""Test running a block with as many blockhash accessing oldest allowed block as possible."""
429433
# Create 256 dummy blocks to fill the blockhash window.
@@ -436,6 +440,7 @@ def test_worst_blockhash(
436440
execution_code_address = pre.deploy_contract(code=execution_code)
437441
op_tx = Transaction(
438442
to=execution_code_address,
443+
gas_limit=gas_benchmark_value,
439444
sender=pre.fund_eoa(),
440445
)
441446
blocks.append(Block(txs=[op_tx]))
@@ -639,7 +644,7 @@ def test_worst_selfdestruct_existing(
639644

640645
@pytest.mark.parametrize("value_bearing", [True, False])
641646
def test_worst_selfdestruct_created(
642-
benchmark_test: BenchmarkTestFiller,
647+
state_test: StateTestFiller,
643648
pre: Alloc,
644649
value_bearing: bool,
645650
fork: Fork,
@@ -722,11 +727,12 @@ def test_worst_selfdestruct_created(
722727
)
723728
code_tx = Transaction(
724729
to=code_addr,
730+
gas_limit=gas_benchmark_value,
725731
sender=pre.fund_eoa(),
726732
)
727733

728734
post = {code_addr: Account(storage={0: 42})} # Check for successful execution.
729-
benchmark_test(
735+
state_test(
730736
pre=pre,
731737
post=post,
732738
tx=code_tx,
@@ -736,7 +742,7 @@ def test_worst_selfdestruct_created(
736742

737743
@pytest.mark.parametrize("value_bearing", [True, False])
738744
def test_worst_selfdestruct_initcode(
739-
benchmark_test: BenchmarkTestFiller,
745+
state_test: StateTestFiller,
740746
pre: Alloc,
741747
value_bearing: bool,
742748
fork: Fork,
@@ -807,8 +813,7 @@ def test_worst_selfdestruct_initcode(
807813
)
808814

809815
post = {code_addr: Account(storage={0: 42})} # Check for successful execution.
810-
benchmark_test(
811-
env=env,
816+
state_test(
812817
pre=pre,
813818
post=post,
814819
tx=code_tx,

0 commit comments

Comments
 (0)