Skip to content

refactor(benchmark): parametrize multi-opcode tests by factory size#2189

Open
CPerezz wants to merge 1 commit intoethereum:forks/amsterdamfrom
CPerezz:refactor/multi-opcode-factory-sizes
Open

refactor(benchmark): parametrize multi-opcode tests by factory size#2189
CPerezz wants to merge 1 commit intoethereum:forks/amsterdamfrom
CPerezz:refactor/multi-opcode-factory-sizes

Conversation

@CPerezz
Copy link
Contributor

@CPerezz CPerezz commented Feb 11, 2026

Summary

  • Refactors the 3 factory-based bloatnet benchmarks (balance_extcodesize, balance_extcodecopy, balance_extcodehash) to use Create2PreimageLayout and Conditional instead of manual inline CREATE2 bytecode and error handling
  • Parametrizes all 3 tests by the 6 available factory bytecode sizes (0.5KB–24KB), adding the size to each benchmark name (e.g. test_bloatnet_balance_extcodesize[balance_extcodesize-24KB])
  • Adds the 6 factory stub addresses (deployed on the bloatnet) to stubs.json
  • Consolidates stubs.json loading to module top level (shared by factory and ERC20 tests)

…de size

Refactor the 3 factory-based bloatnet benchmarks (balance_extcodesize,
balance_extcodecopy, balance_extcodehash) to:

- Use Create2PreimageLayout instead of manual inline CREATE2 bytecode
- Use Conditional for clean STATICCALL error handling
- Parametrize by all 6 factory sizes (0.5KB–24KB) from stubs.json,
  adding the size to each benchmark name
- Add 6 factory stub addresses deployed on the bloatnet
- Consolidate stubs.json loading to module top (shared by factory and
  ERC20 tests)

Test names now include the bytecode size, e.g.:
  test_bloatnet_balance_extcodesize[balance_extcodesize-24KB]
@LouisTsai-Csie
Copy link
Collaborator

Hi @CPerezz , thanks a lot for working on this 🙌

I reviewed and realized that PR #2122 overlaps quite a bit with this one, but PR #2122 also includes a broader refactor and some structural changes on top of the same logic. Since that, could we move forward with PR #2122 and cherry picks your commits for the updates of stub files.

what do you think

@CPerezz
Copy link
Contributor Author

CPerezz commented Feb 13, 2026

Hey @LouisTsai-Csie

Will you cherry pick then? I can PR to your branch. but sees cherry-picking might just be easier.

LMK if you need anything from my side. But happy to get this commit on top of your stuff.

If you prefer me to do a follow-up PR, LMK also and I'll do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants