Skip to content

test_returning_section_aborts_jumpf()

Documentation for tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py::test_returning_section_aborts_jumpf@3719e927.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py::test_returning_section_aborts_jumpf --fork Osaka

Test EOF container validation where in the same code section we have returning and nonreturning terminating instructions.

Source code in tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
def test_returning_section_aborts_jumpf(
    eof_test: EOFTestFiller,
):
    """
    Test EOF container validation where in the same code section we have returning
    and nonreturning terminating instructions.
    """
    container = Container(
        sections=[
            Section.Code(code=Op.CALLF[1] + Op.STOP, max_stack_height=1),
            Section.Code(
                code=Op.PUSH0 * 2 + Op.RJUMPI[4] + Op.POP + Op.JUMPF[2] + Op.RETF,
                code_outputs=1,
            ),
            Section.Code(
                code=Op.PUSH0 * 2 + Op.RJUMPI[1] + Op.RETF + Op.INVALID,
                code_inputs=0,
                code_outputs=1,
            ),
        ],
    )
    eof_test(container=container)

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