Skip to content

test_double_rjumpi_invalid_max_stack_height()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height@verkle@v0.0.6.

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height --until=PragueEIP7692

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

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
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(
        data=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,
    )