Skip to content

test_rjump_backwards_infinite_loop()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_backwards_infinite_loop@bc691d13.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_backwards_infinite_loop --fork Osaka

Validate that a backwards RJUMP as terminal operation is valid.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
def test_rjump_backwards_infinite_loop(
    eof_test: EOFTestFiller,
):
    """Validate that a backwards RJUMP as terminal operation is valid."""
    eof_test(
        container=Container(
            name="backwards_rjump_terminal",
            sections=[
                Section.Code(
                    code=Op.PUSH0
                    + Op.RJUMPI[3]
                    + Op.RJUMP[7]
                    + Op.SSTORE(1, 0x2015)
                    + Op.STOP
                    + Op.RJUMP[-10]
                ),
                Section.Data(data="0xdeadbeef"),
            ],
        ),
    )

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