Skip to content

test_rjumpi_into_stack_height_diff()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_stack_height_diff@fbd9cb20.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_stack_height_diff --fork Osaka

EOF code containing RJUMPI with target instruction that causes stack height difference.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
def test_rjumpi_into_stack_height_diff(
    eof_test: EOFTestFiller,
):
    """EOF code containing RJUMPI with target instruction that causes stack height difference."""
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH1(0)
                    + Op.PUSH1(0)
                    + Op.RJUMPI[-(len(Op.RJUMPI[0]) + len(Op.PUSH1(0)) + len(Op.PUSH1(0)))]
                    + Op.STOP,
                ),
            ],
        ),
        expect_exception=EOFException.STACK_HEIGHT_MISMATCH,
    )

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