Skip to content

Version 0.8.18

Compare
Choose a tag to compare
@NunoFilipeSantos NunoFilipeSantos released this 01 Feb 15:12
· 1187 commits to develop since this release
87f61d9

Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.18.
This latest version includes a range of improvements and it also introduces support for the Paris upgrade!

Changelog

Language Features:

  • Allow named parameters in mapping types.

Compiler Features:

  • Commandline Interface: Add --no-cbor-metadata that skips CBOR metadata from getting appended at the end of the bytecode.
  • Commandline Interface: Return exit code 2 on uncaught exceptions.
  • EVM: Deprecate block.difficulty and disallow difficulty() in inline assembly for EVM versions >= paris. The change is due to the renaming introduced by EIP-4399.
  • EVM: Introduce block.prevrandao in Solidity and prevrandao() in inline assembly for EVM versions >= paris.
  • EVM: Set the default EVM version to "Paris".
  • EVM: Support for the EVM version "Paris".
  • Language Server: Add basic document hover support.
  • Natspec: Add event Natspec inheritance for devdoc.
  • Optimizer: Added optimization rule and(shl(X, Y), shl(X, Z)) => shl(X, and(Y, Z)).
  • Parser: More detailed error messages about invalid version pragmas.
  • SMTChecker: Make z3 the default solver for the BMC and CHC engines instead of all solvers.
  • SMTChecker: Support Eldarica as a Horn solver for the CHC engine when using the CLI option --model-checker-solvers eld. The binary eld must be available in the system.
  • Solidity Upgrade Tool: Remove solidity-upgrade tool.
  • Standard JSON: Add a boolean field settings.metadata.appendCBOR that skips CBOR metadata from getting appended at the end of the bytecode.
  • TypeChecker: Warn when using deprecated builtin selfdestruct.
  • Yul EVM Code Transform: Generate more optimal code for user-defined functions that always terminate a transaction. No return labels will be pushed for calls to functions that always terminate.
  • Yul Optimizer: Allow replacing the previously hard-coded cleanup sequence by specifying custom steps after a colon delimiter (:) in the sequence string.
  • Yul Optimizer: Eliminate keccak256 calls if the value was already calculated by a previous call and can be reused.

Bugfixes:

  • Parser: Disallow several indexed attributes for the same event parameter.
  • Parser: Disallow usage of the indexed attribute for modifier parameters.
  • SMTChecker: Fix display error for negative integers that are one more than powers of two.
  • SMTChecker: Fix internal error on chain assignments using static fully specified state variables.
  • SMTChecker: Fix internal error on multiple wrong SMTChecker natspec entries.
  • SMTChecker: Fix internal error when a public library function is called internally.
  • SMTChecker: Fix internal error when deleting struct member of function type.
  • SMTChecker: Fix internal error when using user-defined types as mapping indices or struct members.
  • SMTChecker: Improved readability for large integers that are powers of two or almost powers of two in error messages.
  • TypeChecker: Fix bug where private library functions could be attached with using for outside of their declaration scope.
  • Yul Optimizer: Hash hex and decimal literals according to their value instead of their representation, improving the detection of equivalent functions.

We especially thank all the contributors that made this release possible:

Alexander Arlt, Alex Beregszaszi, andy53, Anton Paymyshev, Bhargava Shastry, Big-Aaron, Bojidar00, Bulgantamir Gankhuyag, chriseth, Christian Parpart, ChrisXXXXXXX, Damian Wechman, Daniel Kirchner, Doggo, Duc Thanh Nguyen, Franco Victorio, Franziska Heintel, George Plotnikov, hrkrshnn, Ikko Ashimine, Ishtiaque Zahid, John Kane, Kaan Uzdoğan, Kamil Śliwak, Leo Alt, ligi, Lokesh Kumar, Matheus Aguiar, Mathias L. Baumann, Mike Leach, Miles Liu, Minebuu, Mio, Nathaniel Jensen, Nikola Matić, Nishant Sachdeva, Nuno Santos, omahs, Paweł Bylica, Phill, Pierre Grimaud, Prusakova Katya, Rafal Stozek, Rajkumar gaur, Rhythm Bansal, Riley, Rodrigo Q. Saramago, Sabnock, Saw-mon-and-Natalie, Sebastian Supreme, Soham Zemse, Vinay, vlad, William Entriken, Yusuf Benli

If you want to perform a source build, please only use solidity_0.8.18.tar.gz and not the source archives generated automatically by GitHub.

UPDATE 2023-02-02: The Linux binary originally included here has been rebuilt and replaced due to incompatibility with older Ubuntu releases (Bionic, Focal and earlier). We have recently migrated our CI builds to Ubuntu 22.04, which includes a backwards-incompatible glibc version. Since the Linux binary is not completely static (it dynamically loads Z3 and consequently glibc), it would not run with older glibc when built against newer one. You can find more details in the release blog post and issue #13921.

To be clear: both binaries will produce identical outputs under all circumstances, including the commit hash in the metadata. Only the hash of the compiler binary itself will change due to the replacement, but the new binary will always produce byte-identical output.

The SHA-256 hash of the old binary was a1c0f33eb4482c26f56719ecf62b0ee05d7d7a4f8264ffbddf9ebcd9095c32bd. The new one is
95e6ed4949a63ad89afb443ecba1fb8302dd2860ee5e9baace3e674a0f48aa77.