Skip to content

test_rjumpv_backwards_min_stack_wrong()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_backwards_min_stack_wrong@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_rjumpv.py::test_rjumpv_backwards_min_stack_wrong --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_rjumpv.py::test_rjumpv_backwards_min_stack_wrong --until=PragueEIP7692

Backwards rjumpv where min_stack does not match

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
def test_rjumpv_backwards_min_stack_wrong(
    eof_test: EOFTestFiller,
):
    """
    Backwards rjumpv where min_stack does not match
    """
    container = Container.Code(
        code=(
            Op.PUSH0  # (0, 0)
            + Op.PUSH1(0)  # (1, 1)
            + Op.RJUMPV[1]  # (2, 2) To PUSH1
            + Op.PUSH0  # (1, 1)
            + Op.PUSH1(4)  # (1, 2)
            + Op.RJUMPV[-11]  # (2, 3) To first RJUMPV with (1, 2)
            + Op.STOP  # (1, 2)
        ),
        max_stack_height=3,
    )
    eof_test(
        data=container,
        expect_exception=EOFException.STACK_HEIGHT_MISMATCH,
    )