At ETHDenver, the Optimism team built a proof of concept implementation of EIP-1153, including the necessary changes to go-ethereum and solc to allow developers to test it out. This EIP introduces two new opcodes - TLOAD and TSTORE. Both of which mirror SLOAD and SSTORE but instead use memory instead of reading/writing to disk. These opcodes enable an in memory key/value store that is namespaced by the current address(this). Some usecases include reentrency locks, in memory mappings, better in memory arrays.
The transient storage persists throughout execution of the transaction, but is not globally accessible. This means that if contract A writes something into transient storage, then contract B will not be able to read that value. It seems like there is some desire to have a global transient storage that can be accessed between accounts. This adds complexity as a system will need to be in place for preventing contracts from overwriting keys that were written by other contracts and contracts will need to use a dynamic keying system to prevent storage slot collision. Perhaps another opcode EXTSLOAD can be considered in the future for this functionality. h/t @moodysalem
The solc fork supports yul functions for TLOAD and TSTORE as well as an experimental transient keyword in solidity. For a quickstart guide on compiling contracts locally to use these opcodes, see https://github.com/tynes/eip1153
A hosted node running the code can be found at https://eip1153.optimism.io. If you are interested in receiving some funds to test it out, dm @tyneslol on Twitter.
Shoutout to Matthew Slipper and Conner Fromknecht for their help in implementing it, Ben Wilson in deploying it, as well as various conversations with protolambda, Kelvin Fichter, Karl Floersch, Ben Jones and Ethereum researchers around its usage and implementation.
Note: the solc fork is highly experimental and should not be used in production.
See the code here: