Skip to content

test_callf_stack_size_1024_at_callf()

Documentation for tests/prague/eip7692_eof_v1/eip4750_functions/test_callf_execution.py::test_callf_stack_size_1024_at_callf@verkle@v0.0.6.

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4750_functions/test_callf_execution.py::test_callf_stack_size_1024_at_callf --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/eip4750_functions/test_callf_execution.py::test_callf_stack_size_1024_at_callf --until=PragueEIP7692

Test stack reaching 1024 items in called function at CALLF instruction

Source code in tests/prague/eip7692_eof_v1/eip4750_functions/test_callf_execution.py
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
def test_callf_stack_size_1024_at_callf(
    eof_state_test: EOFStateTestFiller,
):
    """Test stack reaching 1024 items in called function at CALLF instruction"""
    eof_state_test(
        data=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH0 * 1023
                    + Op.CALLF[1]
                    + Op.POP * 1023
                    + Op.SSTORE(slot_code_worked, value_code_worked)
                    + Op.RETURN(0, 0),
                    max_stack_height=1023,
                ),
                Section.Code(
                    Op.CALLF[2] +
                    # stack has 1024 items
                    Op.POP + Op.RETF,
                    code_inputs=0,
                    code_outputs=0,
                    max_stack_height=1,
                ),
                Section.Code(
                    Op.PUSH0 + Op.RETF,  # stack has 1024 items
                    code_inputs=0,
                    code_outputs=1,
                    max_stack_height=1,
                ),
            ],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
    )