Skip to content

feat(tests): Add worst-case SSTORE test#2757

Open
nerolation wants to merge 1 commit into
ethereum:forks/amsterdamfrom
nerolation:toni/worst-case-sstore
Open

feat(tests): Add worst-case SSTORE test#2757
nerolation wants to merge 1 commit into
ethereum:forks/amsterdamfrom
nerolation:toni/worst-case-sstore

Conversation

@nerolation
Copy link
Copy Markdown
Contributor

🗒️ Description

Add test_sstore_bloated_multi_contract: SSTORE benchmark spreading writes across many fresh contracts and stride-spaced (2**240) slots within each, while a shared dependency_holder enforces an inter-tx RAW edge. Maximizes MPT breadth at post-state-root computation while keeping txs serialized.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks: just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Cute Animal Picture

TBD

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.17%. Comparing base (8d8301c) to head (eb5f4bc).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2757   +/-   ##
================================================
  Coverage            88.17%   88.17%           
================================================
  Files                  577      577           
  Lines                35659    35659           
  Branches              3490     3490           
================================================
  Hits                 31442    31442           
  Misses                3654     3654           
  Partials               563      563           
Flag Coverage Δ
unittests 88.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@LouisTsai-Csie LouisTsai-Csie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side!

@nerolation
Copy link
Copy Markdown
Contributor Author

One issue with this test is that the contracts I'm targeting have no storage. I talked with @CPerezz and @jochem-brouwer about this but essentially we need to first deploy the needed code to some accounts (while keeping track of them), then bloating the storage slots (while keeping track of them) and then selecting accounts + storage slots that are far from each other such that the post-state root calculation becomes "worst-case".
Each transaction targets a different contract and within those contracts the tx targets distinct storage slots far from each other. The result would be worst-case root calc times for each individual account AND worst-case state root calculation over the accounts.

@LouisTsai-Csie
Copy link
Copy Markdown
Collaborator

@nerolation I’m not sure I fully understand your comment, and I’d like to know the next steps:

  • Do you need additional bloating on perf-devnet-3? If so, Jochem and Carlos can help with that.
  • Would you prefer that I merge this PR first and then open a new one for future refactor? Or keep this PR open and not merge it?

For information, I recently merged a PR (#2672) that addresses the initcode prefix length issue. If that’s the current bottleneck, it might be worth taking a look at this benchmark.

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