Skip to content

test_worst_jumps()

Documentation for tests/zkevm/test_worst_compute.py::test_worst_jumps@64f949d0.

Generate fixtures for these test cases for Prague with:

fill -v tests/zkevm/test_worst_compute.py::test_worst_jumps --fork Prague

Test running a JUMP-intensive contract.

Source code in tests/zkevm/test_worst_compute.py
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
@pytest.mark.zkevm
@pytest.mark.valid_from("Cancun")
@pytest.mark.slow
def test_worst_jumps(state_test: StateTestFiller, pre: Alloc):
    """Test running a JUMP-intensive contract."""
    env = Environment()

    jumps_code = Op.JUMPDEST + Op.JUMP(Op.PUSH0)
    jumps_address = pre.deploy_contract(jumps_code)

    tx = Transaction(
        to=jumps_address,
        gas_limit=env.gas_limit,
        sender=pre.fund_eoa(),
    )

    state_test(
        genesis_environment=env,
        pre=pre,
        post={},
        tx=tx,
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Cancun-state_test
...fork_Cancun-blockchain_test_from_state_test
...fork_Prague-state_test
...fork_Prague-blockchain_test_from_state_test
...fork_Osaka-state_test
...fork_Osaka-blockchain_test_from_state_test