Skip to content

test_rjumpv_backwards_reference_only()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_backwards_reference_only@bc691d13.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_backwards_reference_only --fork Osaka

EOF code containing instructions only reachable by backwards RJUMPV.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
def test_rjumpv_backwards_reference_only(
    eof_test: EOFTestFiller,
):
    """EOF code containing instructions only reachable by backwards RJUMPV."""
    rjumpv_len = len(Op.RJUMPV[0])
    container = Container.Code(
        code=(
            Op.RJUMP[RJUMP_LEN]
            + Op.RJUMP[rjumpv_len + len(Op.ORIGIN)]
            + Op.ORIGIN
            + Op.RJUMPV[-(RJUMP_LEN + rjumpv_len + len(Op.ORIGIN))]
            + Op.STOP
        )
    )
    eof_test(
        container=container,
        expect_exception=EOFException.UNREACHABLE_INSTRUCTIONS,
    )

Parametrized Test Cases

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

Test ID (Abbreviated)
...fork_Osaka-eof_test
...fork_Osaka-state_test_from_eof_test
...fork_Osaka-blockchain_test_from_eof_test