EIP-1153: Transient storage opcodes

You could also check the code length of caller is greater than zero. You can’t do this for code running in a constructor

I’m not sure if the exact criticisms of those opcodes applies here. Could you elaborate or share a link?

This is interesting, but it might make transient storage harder to implement in the clients, since you need to keep track of the depth of the call stack by address. I don’t think it would introduce any additional risk, but the contract is already capable of resetting storage before returning from the calls (and also if the call reverts, all transient storage writes within it are reverted as well.) The 100 gas per TSTORE saved is probably not worth optimizing, and actually more explicitly represents the cost of clearing the slots. IMO this should be handled by the smart contract, not by the opcode, because it is trivial to handle within the smart contract.

1 Like