Skip to content

test_rjumpi_backwards_reference_only()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_backwards_reference_only@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_rjumpi_backwards_reference_only --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_rjumpi_backwards_reference_only --until=PragueEIP7692

EOF code containing instructions only reachable by backwards RJUMPI

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
def test_rjumpi_backwards_reference_only(
    eof_test: EOFTestFiller,
):
    """
    EOF code containing instructions only reachable by backwards RJUMPI
    """
    container = Container.Code(
        code=(
            Op.RJUMP[RJUMP_LEN]
            + Op.RJUMP[RJUMPI_LEN + len(Op.ORIGIN)]
            + Op.ORIGIN
            + Op.RJUMPI[-(RJUMP_LEN + RJUMPI_LEN + len(Op.ORIGIN))]
            + Op.STOP
        )
    )
    eof_test(
        data=container,
        expect_exception=EOFException.UNREACHABLE_INSTRUCTIONS,
    )