revm icon indicating copy to clipboard operation
revm copied to clipboard

EIP-1153: Transient storage opcodes

Open moodysalem opened this issue 2 years ago • 5 comments

useful for testing and developing to have these opcodes optionally enabled https://eips.ethereum.org/EIPS/eip-1153

moodysalem avatar Jul 24 '22 09:07 moodysalem

Hm what is the usecase for using this opcodes for testing?

rakita avatar Jul 25 '22 15:07 rakita

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

moodysalem avatar Jul 25 '22 16:07 moodysalem

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.

rakita avatar Jul 26 '22 07:07 rakita

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

moodysalem avatar Jul 28 '22 15:07 moodysalem

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.

rakita avatar Jul 28 '22 19:07 rakita

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

moodysalem avatar Nov 14 '22 16:11 moodysalem

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.

rakita avatar Nov 18 '22 10:11 rakita

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.

0xJepsen avatar Mar 22 '23 18:03 0xJepsen