Skip to content

test_double_rjumpi()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi@a86d4327.

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 --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 --until=PragueEIP7692

Two RJUNMPIs, causing the min stack to underflow

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
def test_double_rjumpi(
    eof_test: EOFTestFiller,
):
    """
    Two RJUNMPIs, causing the min stack to underflow
    """
    container = Container.Code(
        code=(
            Op.PUSH0  # (0, 0)
            + Op.PUSH0  # (1, 1)
            + Op.RJUMPI[5]  # (2, 2) To RETURN
            + Op.PUSH0  # (1, 1)
            + Op.PUSH0  # (2, 2)
            + Op.RJUMPI[0]  # (3, 3)
            + Op.RETURN  # (1, 2) Underflow
        ),
        max_stack_height=3,
    )
    eof_test(
        data=container,
        expect_exception=EOFException.STACK_UNDERFLOW,
    )