fix: skip storage verification for empty storage dict#2325
fix: skip storage verification for empty storage dict#2325mandeepmourya007 wants to merge 2 commits intoethereum:forks/amsterdamfrom
Conversation
marioevz
left a comment
There was a problem hiding this comment.
This change is modifying the behavior that a lot of tests expect.
We need to:
- Define a new sentinel value
Storage.EMPTY(perhaps simply equal toNone) that is used to signal that the test expects the storage to be completely empty. - Go through all tests that are currently doing
Account(storage={})and use the sentinel value instead, to make sure that the checks remain the same for these tests - Modify
TransactionPostto handle the sentinel value in the way that the original issue describes (Usingeth_getProoffor example).
Closes ethereum#2162 - Add Storage.EMPTY sentinel value to explicitly verify empty storage - Account(storage={}) is now meaningless and allows any storage values - Add eth_getProof method to EthRPC for Storage.EMPTY verification - TransactionPost uses eth_getProof to verify empty storage root - Update tests to use Storage.EMPTY where empty storage check is needed
561faf4 to
5327cb4
Compare
@marioevz please check i update PR but not sure why my old commit lost |
Thanks, I see the changes and looks very good so far! One missing thing though is that we need to search for tests doing |
Update 23 test files to use Storage.EMPTY instead of storage={}
for explicit empty storage verification. This ensures tests that
expect empty storage continue to verify it correctly after the
semantic change where storage={} now allows any storage values.
please have a look I updated other test cases |
Closes #2162
Account(storage={}) caused infinite loop when verifying storage over RPC (attempting to check 2^256 keys). Skip storage check when no keys are specified - empty storage dict is now treated as 'allow any storage values'.
🗒️ Description
🔗 Related Issues or PRs
N/A.
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.