Test Single Opcode¶
Documentation for tests/benchmark/stateful/bloatnet/test_single_opcode.py@8db70f93.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/benchmark/stateful/bloatnet/test_single_opcode.py --gas-benchmark-values 1
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 (Amsterdam) | Description |
|---|---|---|---|
test_account_access |
benchmark_test | 81 | Benchmark account access with caching strategies. |
test_sload_bloated |
benchmark_test | 6 | Benchmark SLOAD opcodes targeting an EOA with storage bloated. |
test_sload_bloated_multi_contract |
benchmark_test | 4 | Benchmark SLOAD across a distinct contract per transaction. |
test_sload_bloated_prefetch_miss |
benchmark_test | 4 | Benchmark SLOAD with calldata-driven offsets to defeat prefetching. |
test_sload_erc20_generic |
benchmark_test | 1 | Benchmark SLOAD using ERC20 balanceOf on bloatnet. |
test_sstore_bloated |
benchmark_test | 12 | Benchmark SSTORE opcodes targeting an EOA with storage bloated. |
test_sstore_dirty_transitions |
benchmark_test | 12 | Benchmark SSTORE dirty state transitions. |
test_sstore_erc20_generic |
benchmark_test | 1 | Benchmark SSTORE using ERC20 approve. |
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. |