EIP-1153: Transient Storage #855
Replies: 3 comments 5 replies
-
Hi @Stebalien, I’ve been exploring ways to implement EIP-1153’s transient storage in the FEVM, focusing on the My plan aims to create a temporary storage structure similar to Here’s the full proposal for your review: Transient Storage Implementation Plan Proposal Any feedback would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the advice, @Stebalien. I'm revisiting this work after stepping away to focus on other priorities. I’d like to pursue the approach I believe you’re suggesting: using permanent storage along with a top-level origin/nonce tombstone to maintain feature parity with EIP-1153, even though it might not be the most gas-efficient solution. Proposed BenefitsThis approach would allow us to achieve compatibility with Ethereum contracts that rely on transient storage. Additionally, it would provide a path to iterate in the future: if transient storage becomes highly utilized or demanded, we could take on the more challenging task of implementing a more gas-efficient solution. Technical DetailsThe proposed changes would involve modifying
The OperationsThe new operations would include:
Operationally:
Downsides
Does this approach sound like a viable way forward for compatibility with EIP-1153? If there are specific improvements or alternative paths you’d recommend, I’d be happy to explore those further. Your insights have been incredibly helpful, and I want to ensure we’re on the right track here. |
Beta Was this translation helpful? Give feedback.
-
I've thought about this a bit more. I think @snissn's current approach is good for now but, if this ever becomes a performance issue, we can optimize it. Specifically, I'd propose a second wasm memory:
The tricky part about this approach is resource management. Specifically, this is a resource that's not scoped to the lifetime of a call to a specific actor. I wish we could scope it to the lifetime of the first call (in the call stack) of a specific actor, but the EIP doesn't allow for this (the data must live for the full transaction, regardless). The only solution I can think of is to limit the maximum memory by gas (similar to Ethereum) instead of by some absolute value (as we currently do). E.g., because the max gas for a transaction is 10B, we could charge 10 gas per byte of transient storage allocated, giving us a max 1GiB of memory used (reset on every transaction). This is how we deal with IPLD data as well (we charge a 10 gas memory retention fee). |
Beta Was this translation helpful? Give feedback.
-
EIP-1153 is adding support for "transient storage" to the EVM. To maintain compatibility, we'll need to make these opcodes available from the EVM actor (FEVM).
We have two possible paths:
The second option is more interesting and has no obvious solution:
I don't have a real solution here, but we should get this discussion started regardless as the EIP is supposed to land in the next Ethereum network upgrade (Dencun).
Beta Was this translation helpful? Give feedback.
All reactions