Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Advanced storage testing #1205

Open
OlivierBBB opened this issue Sep 16, 2024 · 2 comments
Open

Advanced storage testing #1205

OlivierBBB opened this issue Sep 16, 2024 · 2 comments
Assignees
Labels

Comments

@OlivierBBB
Copy link
Collaborator

OlivierBBB commented Sep 16, 2024

To properly test storage operations and the new maps one should write multi-block tests where

  • in some transactions addresses and storage keys are pre-warmed, including
    • addresses and storage keys that the transaction will interact with
    • addresses and storage keys that the transaction won't interact with
    • in relation to deployments:
      • addresses that don't yet exist but may or may not get deployed during the transaction
      • storage keys in accounts that may or may already exist
    • accounts that don't require pre-warming (e.g. SENDER, RECIPIENT / DEPLOYMENT_ADDRESS, PRECOMPILES --- Note: London does not prewarm the COINBASE address)
    • accounts where pre-warming makes no sense (e.g. COINBASE)
    • storage keys in accounts whose storage is inaccessible (EOA's, precompiles, EMPTY accounts / gibbrerish address accounts)
  • storage values are set multiple times, at times going back to the value originally in storage
  • storage operations may or may not get undone by a REVERT
  • storage operations may get performed during deployment
  • storage operations may get performed after deployment
  • storage slots may get wiped by SELFDESTRUCT
  • having multiple cycles (in one or more transactions) of
    • CREATE2 wherein you touch storage
    • CALL to the deployed contract and touch storage
    • REVERT the deployment
    • recycle
@OlivierBBB
Copy link
Collaborator Author

OlivierBBB commented Sep 16, 2024

BTW I would take the opportunity to contact @thedarkjester and @gauravahuja on how to use the new testing framework. We will want to write many tests, bytecode won't be an option, especially when we start mixing CREATE(2)'s, CALL's and SELFDESTRUT's, see #1052

@lorenzogentile404
Copy link
Collaborator

This is addressed in this PR #1192. We need to merge the tests only.

@OlivierBBB OlivierBBB changed the title Storage testing Advanced storage testing Feb 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants