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

Addition of Transient Storage Opcodes #2778

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

fmacleal
Copy link
Contributor

@fmacleal fmacleal commented Oct 1, 2024

This PR aims to implements the RSKIP-446 that handles the transient storage opcodes defined int he RSKIP-446, which aims to be compatible with EIP-1153 from Ethereum.

The PR still in draft mode because some tests need to be fixed and added.

Description

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:

@fmacleal fmacleal force-pushed the fmacleal/addition_transient_storage_opcodes branch from d6dc804 to 8892bf3 Compare October 14, 2024 10:46
Copy link

github-actions bot commented Oct 25, 2024

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

* Adding the structure for transient storage opcodes

- Finishing test validation for basic scenarios of TLOAD/TSTORE

* Refactor from code to get advantage from the MutableRepository

- In order to get advantage from the whole flow of tracking, rollback and commits already present in the MutableRepository.
We refactored a bit the logic of transient storage, now it's simpler.

* Adding more tests defined on the EIP-1153 spec

* Adding tests for the different create contexts EIP1153

* Addressing comments from review

* Adding more scenarios of test with dynamic execution context
@fmacleal fmacleal force-pushed the fmacleal/addition_transient_storage_opcodes branch from f244dc2 to 551df42 Compare November 4, 2024 14:06
@fmacleal fmacleal force-pushed the fmacleal/addition_transient_storage_opcodes branch from 612a66a to 99599fb Compare November 5, 2024 14:05
* Added tests for dynamic execution contexts

- WIP
- Now we will add unit tests for underflow execution tests

* Added tests for dynamic execution contexts

-  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

* Addressing review comments
//given
ActivationConfig.ForBlock activations = mock(ActivationConfig.ForBlock.class);
when(activations.isActive(RSKIP446)).thenReturn(true);
String expected = "0000000000000000000000000000000000000000000000000000000000000000";

Check notice

Code scanning / CodeQL

Unread local variable Note test

Variable 'String expected' is never read.
Copy link

sonarcloud bot commented Nov 25, 2024

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