Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Storage testing #1205

Open
OlivierBBB opened this issue Sep 16, 2024 · 1 comment
Open

Storage testing #1205

OlivierBBB opened this issue Sep 16, 2024 · 1 comment
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants