Skip to content

test_callf_with_inputs_stack_size_1024_at_push()

Documentation for tests/prague/eip7692_eof_v1/eip4750_functions/test_callf_execution.py::test_callf_with_inputs_stack_size_1024_at_push@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_with_inputs_stack_size_1024_at_push --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_with_inputs_stack_size_1024_at_push --until=PragueEIP7692

Test stack reaching 1024 items in nested called function with inputs at PUSH0 instruction

Source code in tests/prague/eip7692_eof_v1/eip4750_functions/test_callf_execution.py
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
def test_callf_with_inputs_stack_size_1024_at_push(
    eof_state_test: EOFStateTestFiller,
):
    """Test stack reaching 1024 items in nested called function with inputs at PUSH0 instruction"""
    eof_state_test(
        data=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH0 * 1022
                    + Op.CALLF[1]
                    + Op.POP * 1022
                    + Op.SSTORE(slot_code_worked, value_code_worked)
                    + Op.RETURN(0, 0),
                    max_stack_height=1022,
                ),
                Section.Code(
                    Op.PUSH0 +
                    # Stack has 1023 items
                    Op.CALLF[2] + Op.POP + Op.RETF,
                    code_inputs=3,
                    code_outputs=3,
                    max_stack_height=4,
                ),
                Section.Code(
                    Op.PUSH0 +
                    # Stack has 1024 items
                    Op.POP + Op.RETF,
                    code_inputs=3,
                    code_outputs=3,
                    max_stack_height=4,
                ),
            ],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
    )