test_nested_calls()
Documentation for tests/benchmark/compute/instruction/test_system.py::test_nested_calls@ffe48572.
Generate fixtures for these test cases for Bogota with:
fill -v tests/benchmark/compute/instruction/test_system.py::test_nested_calls --gas-benchmark-values 1
Benchmark chains of nested call frames.
Source code in tests/benchmark/compute/instruction/test_system.py
| @pytest.mark.parametrize(
"opcode",
[Op.CALL, Op.CALLCODE, Op.DELEGATECALL, Op.STATICCALL],
)
def test_nested_calls(
benchmark_test: BenchmarkTestFiller,
pre: Alloc,
opcode: Op,
) -> None:
"""Benchmark chains of nested call frames."""
chain_address = pre.deploy_contract(
code=Op.POP(opcode(gas=Op.GAS, address=Op.ADDRESS))
)
benchmark_test(
target_opcode=opcode,
code_generator=JumpLoopGenerator(
attack_block=Op.POP(Op.CALL(gas=Op.GAS, address=chain_address))
),
)
|
Parametrized Test Cases
This test generates 4 parametrized test cases across 4 forks.