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

fix(levm): initialization of transient storage #1540

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

damiramirez
Copy link
Contributor

@damiramirez damiramirez commented Dec 19, 2024

Motivation

Each time we moved to a new context, we were overwriting the previous transient storage. Also add a check in tstore to see if the tx is static.

Description

  • Add a new parameter to CallFrame::new(). Now we can send the current value of transient_storage to the subcontext.
  • Check in tstore if the tx is static. In that case it must returns an error.

We can also think about moving the TransientStorage from CallFrame to the Environment, since it is a storage of the tx.

Reference
EIP-1153: If the TSTORE opcode is called within the context of a STATICCALL, it will result in an exception instead of performing the modification. TLOAD is allowed within the context of a STATICCALL.

@damiramirez damiramirez self-assigned this Dec 19, 2024
@damiramirez damiramirez added the levm Lambda EVM implementation label Dec 19, 2024
@damiramirez damiramirez marked this pull request as ready for review December 19, 2024 20:12
@damiramirez damiramirez requested a review from a team as a code owner December 19, 2024 20:12
JereSalo
JereSalo previously approved these changes Dec 19, 2024
@JereSalo
Copy link
Contributor

I like the change. I agree that maybe we have to put it in the Environment because it makes more sense, so that change in this PR would be good too.

@JereSalo JereSalo dismissed their stale review December 19, 2024 21:11

merge after chaning the Transient Storage to environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants