test_sibling_frame_memory()
Documentation for tests/benchmark/compute/instruction/test_memory.py::test_sibling_frame_memory@ffe48572.
Generate fixtures for these test cases for Bogota with:
fill -v tests/benchmark/compute/instruction/test_memory.py::test_sibling_frame_memory --gas-benchmark-values 1
Benchmark sibling call frames that each expand their own memory.
Source code in tests/benchmark/compute/instruction/test_memory.py
| @pytest.mark.parametrize("mem_size", [0, 8 * 1024, 64 * 1024])
def test_sibling_frame_memory(
benchmark_test: BenchmarkTestFiller,
pre: Alloc,
mem_size: int,
) -> None:
"""Benchmark sibling call frames that each expand their own memory."""
frame_code = Op.STOP if mem_size == 0 else Op.MSTORE8(mem_size - 1, 0)
frame_address = pre.deploy_contract(code=frame_code)
benchmark_test(
target_opcode=Op.CALL,
code_generator=JumpLoopGenerator(
attack_block=Op.POP(
Op.CALL(
gas=Op.GAS,
address=frame_address,
)
)
),
)
|
Parametrized Test Cases
This test generates 3 parametrized test cases across 4 forks.