Transient storage.

EIP-1153 introduces transient storage to Ethereum, which allows storage to be used only for the duration of a transaction. Transient storage enables cleaner smart contract designs, saves tons of gas, and simplifies the EVM design.

Why?

Simplifies the EVM design. Today, regular storage is used for the transient use-case which means there is always an unnecessary read from disk. To achieve “transientness”, the EVM honors refunds if storage slots are set to their original value before the end of the transaction. However, the refund logic is quite complex, not easily predictable from a gas-accounting perspective, requires developers to do hacks like clearing to a dirtied value instead of 0, and also wastes gas in the case of reverts.

Low effort, high impact. EIP1153 has already been implemented in Nethermind, Besu, Geth, and Ethereumjs. Transaction and blockchain tests have been written in ethereum/tests repo and run against the above clients. Including this in Shanghai will enable app developers to reap these benefits immediately and write better, cleaner smart contract patterns that will be forward-compatible with the future visions and designs for ethereum.

Saves a ton of gas. A cold read from storage is 2100 gas. A dirty write to storage is 2900. With a cap on refunds, any use of transient storage after the cap will cost the same as using regular storage, ~5000 gas if writing back dirtied values. Without using this dirty value trick, it would cost MUCH more as a clean write to storage is 20,000.

Better smart contract design patterns and developer experience. Right now, storage is used transiently for patterns like re-entrency locks. Using transient storage with eip1153 will be as simple as using a `transient` keyword.

Protocols & devs want dis shit.

FAQ