Skip to content

test_double_rjumpi_invalid_max_stack_height()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height@21fb11c8.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height --fork Osaka

Test max stack height of the final block targeted by two RJUMPIs with the non-uniform stack height range.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
def test_double_rjumpi_invalid_max_stack_height(
    eof_test: EOFTestFiller,
):
    """
    Test max stack height of the final block
    targeted by two RJUMPIs with the non-uniform stack height range.
    """
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH0  # (0, 0)
                    + Op.PUSH0  # (1, 1)
                    + Op.RJUMPI[3]  # (2, 2) to EXIT
                    + Op.RJUMPI[0]  # (1, 1) to EXIT
                    + Op.PUSH0  # EXIT: (0, 1)
                    + Op.PUSH0  # (1, 2)
                    + Op.INVALID,  # (2, 3)
                    max_stack_height=2,  # should be 3
                ),
            ],
        ),
        expect_exception=EOFException.INVALID_MAX_STACK_HEIGHT,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated)
...fork_Osaka-eof_test