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

fmacleal/integrate tstorage in transaction execution #2844

Conversation

fmacleal
Copy link
Contributor

@fmacleal fmacleal commented Nov 11, 2024

Description

In this MR,

We are adding the TLOAD and TSTORE opcodes in the transaction execution context, validating that the transient storage it's using the memory context correctly between different contract calls. More specifically, if we use delegatecall, callcode, call and staticcall the values stored between these different contracts subcalls are storing and loading the values as defined by the EIP-1153 . This way, we will ensure that no contract it's accessing the memory from the other regarding the context call used.

Besides this, I have addressed some sonar issues regarding the use of switchcase in the opcodes classes.

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

Copy link

github-actions bot commented Nov 11, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

- WIP
- Now we will add unit tests for underflow execution tests
@fmacleal fmacleal force-pushed the fmacleal/integrate-tstorage-in-transaction-execution branch from 2b12be5 to 61a3a23 Compare November 11, 2024 11:56
-  We had to add unit tests for underflow execution tests since isn't possible write contract for these scenarios
- Now we have all the tests regarding execution context with different types of calls, missing the gas
cost calculation that will be done in a later task
@fmacleal fmacleal changed the title Fmacleal/integrate tstorage in transaction execution fmacleal/integrate tstorage in transaction execution Nov 11, 2024
@fmacleal fmacleal requested a review from asoto-iov November 13, 2024 15:14
Copy link
Contributor

@Vovchyk Vovchyk left a comment

Choose a reason for hiding this comment

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

lgtm

@fmacleal fmacleal merged commit ea7d304 into fmacleal/addition_transient_storage_opcodes Nov 14, 2024
8 checks passed
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.

3 participants