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

transient storage keyword #3373

Merged
merged 17 commits into from
May 18, 2023
Merged

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Apr 28, 2023

What I did

How I did it

todo:
- [ ] tests

  • update nonreentrancy to use tload/tstore

- [ ] separate allocator for transient(?)

test cases will come in a follow up once we get the ability to test the functionality via py-evm.

How to verify it

Commit message

    experimentally add support for transient storage via a new `transient`
    keyword, which works like `immutable` or `constant`, ex.:

    ```vyper
    my_transient_variable: transient(uint256)
    ```

    this feature is considered experimental until py-evm adds support
    (giving us the ability to actually test it). so this commit leaves the
    default evm version as "shanghai" for now. it blocks the feature on
    pre-cancun EVM versions, so users can't use it by accident - the only
    way to use it is to explicitly enable it via `--evm-version=cancun`.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

vyper/codegen/types/types.py Fixed Show fixed Hide fixed
vyper/codegen/types/types.py Fixed Show fixed Hide fixed
vyper/codegen/types/types.py Fixed Show fixed Hide fixed
vyper/codegen/types/types.py Fixed Show fixed Hide fixed
vyper/codegen/types/types.py Fixed Show fixed Hide fixed
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2023

Codecov Report

Merging #3373 (8bebbb3) into master (27b6b89) will decrease coverage by 0.04%.
The diff coverage is 83.33%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3373      +/-   ##
==========================================
- Coverage   89.32%   89.29%   -0.04%     
==========================================
  Files          84       84              
  Lines       10777    10789      +12     
  Branches     2459     2461       +2     
==========================================
+ Hits         9627     9634       +7     
- Misses        754      757       +3     
- Partials      396      398       +2     
Impacted Files Coverage Δ
vyper/cli/vyper_compile.py 68.38% <ø> (ø)
vyper/evm/opcodes.py 100.00% <ø> (ø)
vyper/semantics/data_locations.py 100.00% <ø> (ø)
vyper/semantics/namespace.py 97.29% <ø> (ø)
vyper/codegen/core.py 86.74% <50.00%> (ø)
vyper/codegen/function_definitions/utils.py 66.66% <66.66%> (-6.67%) ⬇️
vyper/ast/nodes.py 93.74% <100.00%> (-0.14%) ⬇️
vyper/codegen/context.py 92.74% <100.00%> (+0.05%) ⬆️
vyper/codegen/expr.py 87.70% <100.00%> (+0.02%) ⬆️
vyper/evm/address_space.py 100.00% <100.00%> (ø)
... and 2 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

per 1ac8362, the DEFAULT_EVM_VERSION is updated to shanghai.
however, entry points into the compiler which don't use the
`@evm_wrapper` wrapper might continue using paris.
@charles-cooper charles-cooper marked this pull request as ready for review May 18, 2023 17:27
@charles-cooper charles-cooper changed the title [WIP] transient storage keyword transient storage keyword May 18, 2023
just that it compiles / is blocked pre-cancun. does not test the
functionality yet
@charles-cooper charles-cooper enabled auto-merge (squash) May 18, 2023 21:40
@charles-cooper charles-cooper merged commit ed0a654 into vyperlang:master May 18, 2023
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.

None yet

3 participants