Today we are releasing version 0.8.34 of the Solidity Compiler.
This is a bugfix release that patches an important bug of high severity affecting clearing of storage and transient storage variables in the IR pipeline.
If your code does not use delete on a transient state variable, your contract is not affected.
The affected pattern has proven to be very rare in practice - only three deployed contracts were found across all EVM-compatible chains. The respective teams have been notified. Projects that compile with --via-ir and use delete on transient storage are urged to update.
Important Bugfixes
Transient Storage Clearing Helper Collision Bug
A bug in the IR code generator was reported by Hexens.
The bug affects compiler versions 0.8.28 through 0.8.33 and only manifests when compiling with the IR pipeline.
Since --via-ir is not enabled by default, projects that have not explicitly opted into it are not affected.
When a contract clears both a persistent and a transient storage variable of the same type, the compiler may emit the wrong opcode (sstore instead of tstore, or vice versa) for one of these operations. This can result in unintended writes to persistent storage or ineffective clearing of persistent state. In both cases, the other storage domain is also incorrectly affected.
Read our blog post describing the bug for full details on which contracts are affected and how to check your project.
Full Changelog
Important Bugfixes
- Yul IR Code Generation: Fix a bug that could result in clearing a storage variable instead of a transient storage variable at the same position in the layout (and vice-versa).
Compiler Features
- Yul Optimizer: Remove redundant prerequisite steps from the default optimizer sequence.
You can read the full release announcement on our blog:
Users can download the new version of Solidity Compiler from GitHub:
And if you’re interested in an in-depth blog post explaining the bug that was fixed in v0.8.34 you can read it here: