Skip to content

Benchmark refactoring idea for readability #1932

@LouisTsai-Csie

Description

@LouisTsai-Csie

Extend benchmark test wrapper logic to support calldata-aware splitting

Originally proposed by @jochem-brouwer in this comment.

The current benchmark test wrapper’s split-tx logic only works when the calldata remains unchanged. However, several benchmark tests rely on calldata as an index (e.g. for selecting storage slots), which prevents us from using the code generator and reduces overall code readability. We should find a way to support dynamic calldata in the split-tx logic.

Use EIP-7702 Delegation for Contract-Size Benchmarks

Originally proposed by @jochem-brouwer in this comment.

Benchmarking different contract sizes (just-created, small, medium, XEN) is cumbersome. We could use EIP-7702 by pre-creating a small set of delegated accounts with fixed storage sizes, then delegate them to different benchmark code as needed. This avoids redeploying contracts while preserving size characteristics.

The main caveat is cleanup: any SSTORE performed during a test must be reverted to the original values so tests can be re-run deterministically, especially in execute remote mode where genesis resets are not possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions