-
Notifications
You must be signed in to change notification settings - Fork 267
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
Conversation
The tests are still failing, I am investigating to find the root cause
… Arrays.copyOfRange; add more tests
….java Co-authored-by: Nazaret García Revetria <[email protected]>
d6dc804
to
8892bf3
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
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
f244dc2
to
551df42
Compare
612a66a
to
99599fb
Compare
* 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
- Added scenarios for dynamic executions with revert and invalid
- All the tests from the EIP for reentrancy contexts are covered now
- Added basic scenario of gas measure costs for Transient Storage - Stil needed to add more scenarios of tests for run out of gas
- Added basic scenario of gas measure costs for Transient Storage - Added scenarios of run out of gas exception loops - Still missing some tests with gas consumption for some execution contexts
…ition Transient Storage gas cost calculation
Co-authored-by: Vovchyk <[email protected]>
- As specified in the EIP-1153, it was added test scenarios for reentrancy after selfdestruct. - Besides that, we refactored the folder that contained the DSL tests files
The transient storage resets between blocks, but not between transactions. It'd be good to add a test with multiple transactions on the same block on the test dsl tests. |
…-test-cases Added test scenarios for selfdestruct cases
d0ccf35
to
2090bea
Compare
- After have added a scenario of DSL test where two we check storage between transactions inside same block, we noticed a bug. This commit fixes it clearing the transient storage after the tx finishes.
Fixing conflicts of the master as well.
This looks good now |
- In order to have a better validation of real use of TLOAD/TSTORE, we changed some DSL tests to not create a new block after every tx. This way, we validate that the transient storage it's correctly managed across the different tx. - Small refactor was added in the MutableTrie creation with a better name stating that we are creating an in memory trie.
Quality Gate passedIssues Measures |
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
Checklist: