Skip to content

Test Single Opcode

Documentation for tests/benchmark/stateful/bloatnet/test_single_opcode.py@7b8124a7.

Generate fixtures for these test cases for Osaka with:

fill -v tests/benchmark/stateful/bloatnet/test_single_opcode.py --fork Osaka

abstract: BloatNet single-opcode benchmark cases for state-related operations.

These tests focus on individual EVM opcodes (SLOAD, SSTORE) to measure their performance when accessing many storage slots across pre-deployed contracts. Unlike multi-opcode tests, these isolate single operations to benchmark specific state-handling bottlenecks.

Test Functions Overview

Name Type Cases (Osaka) Description
test_sload_empty_erc20_balanceof benchmark_test 5 Benchmark SLOAD using ERC20 balanceOf on bloatnet.
test_sstore_erc20_approve benchmark_test 5 Benchmark SSTORE using ERC20 approve on bloatnet.
test_sstore_variants benchmark_test 16 Benchmark SSTORE instruction with various configurations.
test_storage_sload_benchmark benchmark_test 4 Benchmark SLOAD instruction with various configurations.
test_storage_sload_same_key_benchmark benchmark_test 2 Benchmark SLOAD instruction when loading the same key over and over.