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

Adapt storage capturing in OpcodeTracer for modularized execution #10357

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

kselveliev
Copy link
Contributor

Description:

This PR is a copy of #10307. (It was checkout from the pr fixing the states caching but it will be delayed due to needed upstream changes). So opening with main as base branch.

This PR fixes storage capturing in modularized execution.
Storage values are now read from mirror node writable states during execution.
Added a test who actually modifies storage of a contract and can verify execution.
This pr also fixes 4 failing test in OpcodeServiceTests. Now OpcodeServiceTest fixes are completed.

Changes:
OpcodeTracer - reads storage changes from writablestates - STORAGE_KEY for modularized
OpcodeTracerTest - adds codecov for new methods
OpcodeServiceTest - adds new test contract which modifies contract storage and verifies storage changes

Related issue(s):

Fixes #10259

Notes for reviewer:
This PR only captures properly storage changes from state after fixes from #10306 but since the mentioned PR might require changes upstream. In order not to slow down this PR it's opened from main. Tests will be passing but storage changes will be empty for now until resolution of the above PR where state will be properly populated.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@kselveliev kselveliev added enhancement Type: New feature web3 Area: Web3 API modularizedEVM labels Feb 11, 2025
@kselveliev kselveliev added this to the 0.124.0 milestone Feb 11, 2025
@kselveliev kselveliev self-assigned this Feb 11, 2025
@kselveliev kselveliev requested a review from a team as a code owner February 11, 2025 12:39
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.19%. Comparing base (40fa50b) to head (afa4aee).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##               main   #10357    +/-   ##
==========================================
  Coverage     92.19%   92.19%            
- Complexity     8038     8094    +56     
==========================================
  Files           984      988     +4     
  Lines         33548    33711   +163     
  Branches       4236     4264    +28     
==========================================
+ Hits          30928    31079   +151     
- Misses         1612     1618     +6     
- Partials       1008     1014     +6     

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

Signed-off-by: Kristiyan Selveliev <[email protected]>
Signed-off-by: Kristiyan Selveliev <[email protected]>
Copy link
Contributor

@bilyana-gospodinova bilyana-gospodinova 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 but needs spotless.

Signed-off-by: Kristiyan Selveliev <[email protected]>
Signed-off-by: Kristiyan Selveliev <[email protected]>
Signed-off-by: Kristiyan Selveliev <[email protected]>
Signed-off-by: Kristiyan Selveliev <[email protected]>
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM

@steven-sheehy steven-sheehy merged commit 5bd7cba into main Feb 12, 2025
35 of 36 checks passed
@steven-sheehy steven-sheehy deleted the 10259-storage-capturing-modularized-v2 branch February 12, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature modularizedEVM web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Storage capturing option in OpcodeTracer for modularized
3 participants