Solidity v0.8.15 is here! - Two important bugs, cheaper IR code and more

Solidity 0.8.15 fixes two important bugs:

  • The first bug can cause memory writes in inline assembly blocks to be incorrectly removed. While we do not expect a lot of affected cases in practice, we still assigned it a severity of β€œmedium”, since the consequences in affected cases can be severe. You can find more information in our blog post.

  • The second bug dates back to the very first versions of Solidity: When copying bytes arrays from calldata or memory to storage, some dirty bytes may be copied along, and may become visible after a .push() on the array. We assigned a severity of β€œlow”.

On top of this, the release includes several minor bug fixes and improvements. For instance, the inlining heuristics for optimizing via-IR code was improved, resulting in notable code size and gas improvements, as seen at the overall differences between 0.8.14 and 0.8.15 that we observed when using the IR-based pipeline to run test suites of several real-life projects in our CI:

project Bytecode size Deployment gas Runtime gas
ENS -4.85% βœ… -0.29% βœ…
Euler -2.43% βœ… -1.68% βœ… -2.08% βœ…
Gnosis Safe -3.87% βœ… -4.31% βœ… -0.02% βœ…
Gnosis Protocol v2 -3.95% βœ… -2.55% βœ… -0.07% βœ…
Perpetual Pools -4.55% βœ… -2.64% βœ… -1% βœ…
Pool Together -7.09% βœ… -5.59% βœ… -0.37% βœ…
PRBMath -3.56% βœ… -3.49% βœ…
Trident -9.84% βœ… -7.98% βœ… -6.26% βœ…
Uniswap v3 -4.32% βœ… -4.53% βœ… -1.24% βœ…
Yield Liquidator -7.13% βœ… -6.08% βœ… -0.5% βœ…
OpenZeppelin -7.83% βœ… -6.01% βœ… -0.28% βœ…

:open_book: Solidity 0.8.15 Release Announcement | Solidity Blog
:floppy_disk: Release Version 0.8.15 Β· ethereum/solidity Β· GitHub

Spread the word in your communities! :heartbeat:

1 Like