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@21fb11c8.

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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
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.

Test ID (Abbreviated)
...fork_Osaka-eof_test