revm
revm copied to clipboard
EIP-1153: Transient storage opcodes
useful for testing and developing to have these opcodes optionally enabled https://eips.ethereum.org/EIPS/eip-1153
Hm what is the usecase for using this opcodes for testing?
developing protocols that will make use of it. you can just use regular storage, but then your gas measurements are off and you're testing against a pre-transient storage version of the code
Yeah but transient storage is still going to spend the gas. I am okay to spend time including this but only when it gets certain it is going to be included in the Ethereum mainnet.
Yeah but transient storage is still going to spend the gas.
what do you mean? it spends much less gas. hard to compare gas snapshots of contracts if you can't test with the proposed opcodes
I am okay to spend time including this but only when it gets certain it is going to be included in the Ethereum mainnet.
what's the downside of including it before it is certain, behind a flag? ethereumjs did this, which allows for testing in hardhat
Yeah but transient storage is still going to spend the gas.
what do you mean? it spends much less gas. hard to compare gas snapshots of contracts if you can't test with the proposed opcodes
My bad, I thought you meant testing smart contract, i was confused bcs of that, but you meant testing this EIP?
I am okay to spend time including this but only when it gets certain it is going to be included in the Ethereum mainnet.
what's the downside of including it before it is certain, behind a flag? ethereumjs did this, which allows for testing in hardhat
I would rather spend doing something else than investing my time in this particular EIP atm, and even if the work is done by somebody else there is still a maintenance cost of this (small but still there). As it is uncertain when or even if it is going to be included and design as with every EIP is going to be changed, so for me, as I am doing revm on my own time, the best way is to wait and see where this goes.
The EIP is now CFI: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md#eips-considered-for-inclusion
Would love to see this in revm and subsequently forge so users can start playing with it
Hello, I am following what is going on. There were a few major changes happening inside revm as usage of ruint so I am focusing on that.
I dont have a need to merge or do this before all clients did their implementation as it would save me a lot of time doing it later and skipping discussion/uncertainty that every concrete implementation brings.
As it stands from a few months ago, if you want to invest your own time and experiment, be free to do it in side repo, it is kinda easy to build foundry with patched revm.
Just adding here, that this feature would be desired for the arbiter project as well. Although it's not our immediate concern. Perhaps when it comes to it I could take a look at implementing this given the specification.