Skip to content

test_double_rjumpi_invalid_max_stack_height()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_double_rjumpi_invalid_max_stack_height@bc691d13.

Generate fixtures for these test cases for Osaka with:

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

Test max stack height of the final block targeted by two RJUMPIs with the non-uniform stack height range.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
def test_double_rjumpi_invalid_max_stack_height(
    eof_test: EOFTestFiller,
):
    """
    Test max stack height of the final block
    targeted by two RJUMPIs with the non-uniform stack height range.
    """
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH0  # (0, 0)
                    + Op.PUSH0  # (1, 1)
                    + Op.RJUMPI[3]  # (2, 2) to EXIT
                    + Op.RJUMPI[0]  # (1, 1) to EXIT
                    + Op.PUSH0  # EXIT: (0, 1)
                    + Op.PUSH0  # (1, 2)
                    + Op.INVALID,  # (2, 3)
                    max_stack_increase=2,  # should be 3
                ),
            ],
        ),
        expect_exception=EOFException.INVALID_MAX_STACK_INCREASE,
    )

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