test_callf_max_stack()
¶
Documentation for tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_execution.py::test_callf_max_stack@3719e927
.
Generate fixtures for these test cases for Osaka with:
fill -v tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_execution.py::test_callf_max_stack --fork Osaka
CALLF where a normal execution would not overflow, but EIP-4750 CALLF rule #4 triggers.
Code Section 0 - calls #1 with the configured height, but we load some operands so the return stack does not overflow Code Section 1 - expands stack, calls #2, THEN recursively calls itself until input is zero, and returns. Code Section 2 - Just returns, zero inputs, zero outputs
This will catch CALLF execution rule #3: always fail if the operand stack is full. Not checking rule 3 results in a call to section 2 and not overfilling the stack (as it is just RETF).
Source code in tests/osaka/eip7692_eof_v1/eip4750_functions/test_callf_execution.py
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
|
Parametrized Test Cases¶
The interactive table below is also available as a standalone page.
Test ID (Abbreviated) | stack_height | failure |
---|---|---|
...fork_Osaka-state_test-no_max_stack | 1018 | False |
...fork_Osaka-state_test-with_max_stack | 1019 | False |
...fork_Osaka-state_test-over_max_stack | 1020 | True |
...fork_Osaka-blockchain_test_from_state_test-no_max_stack | 1018 | False |
...fork_Osaka-blockchain_test_from_state_test-with_max_stack | 1019 | False |
...fork_Osaka-blockchain_test_from_state_test-over_max_stack | 1020 | True |