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
WIP: add support for transient storage in the solidity #14957
Draft
Amxx
wants to merge
19
commits into
ethereum:develop
Choose a base branch
from
Amxx:features/transient-storage-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Mar 22, 2024
-
feat: transient reentrancy lock producing analogous byte code
NOTE: This is far from being complete or usable in production. The parser is modified to expect the "transient" keyword on contract-level declarations, as well as local variables. Most of the focus is spent on making the former correct, so YMMV with the latter, espcially in regards to array/reference handling. The CompilerContext internally separates storage variables from transient variables and computes a StorageOffset map for each. This is used to ensure transient and persistent storage aren't overwriting each other in the same namespace. Compiling the Test.sol and TestStorage.sol contracts and diffing the bytecode results in the SLOAD/SSTORE instructions being replaced by TLOAD/TSTORE instructions. AFAICT there are unreachable portions of the bytecode that differ between the two, which presumably relates to the metadata hash appended by the compiler. There are certainly a ton of edge cases in regard to properly processing the AST, but this should suffice for some demos.
Configuration menu - View commit details
-
Copy full SHA for 3c45006 - Browse repository at this point
Copy the full SHA 3c45006View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7184d0c - Browse repository at this point
Copy the full SHA 7184d0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52a7adb - Browse repository at this point
Copy the full SHA 52a7adbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a19b9b7 - Browse repository at this point
Copy the full SHA a19b9b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3ebac5 - Browse repository at this point
Copy the full SHA c3ebac5View commit details -
mapping(uint256 => uint256) transient myMapping; not processed correctly
Configuration menu - View commit details
-
Copy full SHA for efcd29f - Browse repository at this point
Copy the full SHA efcd29fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac87eea - Browse repository at this point
Copy the full SHA ac87eeaView commit details
Commits on Mar 23, 2024
-
- support Transient location in ArrayType and ArrayUtils. - support location in derivation of Mapping. (mapping might be in a storage struct or a transient struct)
Configuration menu - View commit details
-
Copy full SHA for ba8e5e7 - Browse repository at this point
Copy the full SHA ba8e5e7View commit details
Commits on Mar 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5ad7fb7 - Browse repository at this point
Copy the full SHA 5ad7fb7View commit details -
Fix pushing to transient dynamic array
--optimize-yul does appear to work, but --optimize removes some transiant operations
Configuration menu - View commit details
-
Copy full SHA for e10f1b3 - Browse repository at this point
Copy the full SHA e10f1b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b82e80b - Browse repository at this point
Copy the full SHA b82e80bView commit details
Commits on Mar 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6bc048c - Browse repository at this point
Copy the full SHA 6bc048cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a64351 - Browse repository at this point
Copy the full SHA 0a64351View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cb2e03 - Browse repository at this point
Copy the full SHA 9cb2e03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ddb58f - Browse repository at this point
Copy the full SHA 2ddb58fView commit details
Commits on Mar 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 313efc2 - Browse repository at this point
Copy the full SHA 313efc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a38fc68 - Browse repository at this point
Copy the full SHA a38fc68View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2c760e - Browse repository at this point
Copy the full SHA f2c760eView commit details
Commits on Apr 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 33ad0c1 - Browse repository at this point
Copy the full SHA 33ad0c1View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.