Skip to content

Releases: ethereum/solidity

Version 0.8.17

08 Sep 15:25
8df45f5
Compare
Choose a tag to compare

This release primarily fixes an important bug, but also involves some improvements in code generation, optimizer and in the language server.

For details, please see the release announcement.

Important Bugfixes:

  • Yul Optimizer: Prevent the incorrect removal of storage writes before calls to Yul functions that conditionally terminate the external EVM call.

Compiler Features:

  • Code Generator: More efficient overflow checks for multiplication.
  • Language Server: Analyze all files in a project by default (can be customized by setting 'file-load-strategy' to 'directly-opened-and-on-import' in LSP settings object).
  • Yul Optimizer: Simplify the starting offset of zero-length operations to zero.

Bugfixes:

  • Type Checker: Fix internal compiler error on tuple assignments with invalid left-hand side.
  • Yul IR Code Generation: Fix internal compiler error when accessing the .slot member of a mapping through a storage reference in inline assembly.

Build System:

  • Allow disabling pedantic warnings and do not treat warnings as errors during compiler build when -DPEDANTIC=OFF flag is passed to CMake.
  • Update emscripten to version 3.1.19.

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

Alexander Arlt, Bhargava Shastry, Christian Parpart, Damian Wechman, Daniel Kirchner, Duc Thanh Nguyen, Emmanuel Oaikhenan, Francisco Giordano, Kamil Śliwak, krakxn, Leonardo Alt, Leonid Pospelov, Luke Hutchison, Luoh Ren-Shan, Matheus Aguiar, Mathias L. Baumann, MeetRajput00, Nikola Matić, NoFaceDev, Pranay, Roman Figurin, Taylor Ferran, Thanh Tran, Yuvraj Singh, aathan, emmaodia, khue, kuzdogan, minaminao, Nishant Sachdeva, tcoyvwac, xternet

If you want to perform a source build, please only use solidity_0.8.17.tar.gz and not the zip provided by github directly.

Version 0.8.16

08 Aug 13:44
07a7930
Compare
Choose a tag to compare

This release fixes one important bug and contains further minor bug fixes and features.

For details, please see the release announcement.

Important Bugfixes:

  • Code Generation: Fix data corruption that affected ABI-encoding of calldata values represented by tuples: structs at any nesting level; argument lists of external functions, events and errors; return value lists of external functions. The 32 leading bytes of the first dynamically-encoded value in the tuple would get zeroed when the last component contained a statically-encoded array.

Compiler Features:

  • Code Generator: More efficient code for checked addition and subtraction.
  • TypeChecker: Support using library constants in initializers of other constants.
  • Yul IR Code Generation: Improved copy routines for arrays with packed storage layout.
  • Yul Optimizer: Add rule to convert mod(add(X, Y), A) into addmod(X, Y, A), if A is a power of two.
  • Yul Optimizer: Add rule to convert mod(mul(X, Y), A) into mulmod(X, Y, A), if A is a power of two.

Bugfixes:

  • Commandline Interface: Disallow the following options outside of the compiler mode: --via-ir,--metadata-literal, --metadata-hash, --model-checker-show-unproved, --model-checker-div-mod-no-slacks, --model-checker-engine, --model-checker-invariants, --model-checker-solvers, --model-checker-timeout, --model-checker-contracts, --model-checker-targets.
  • Type Checker: Fix compiler crash on tuple assignments involving certain patterns with unary tuples on the left-hand side.
  • Type Checker: Fix compiler crash when abi.encodeCall received a tuple expression instead of an inline tuple.
  • Type Checker: Fix null dereference in abi.encodeCall type checking of free function.

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

a3d4, Aiman Baharna, Alex Beregszaszi, Bhargava Shastry, Christian Parpart, Christian Reitwiessner, CJ42, Damian Wechman, Daniel Kirchner, Daniel Lupu, Derek Gottfrid, Duc Thanh Nguyen, Femi Bolaji, Harikrishnan Mulackal, Ishtiaque Zahid, Kamil Śliwak, krakxn, Matheus Aguiar, Mathias L. Baumann, Maximiliano Schultheis, Midhun07, minami, Nikola Matić, Nishant Sachdeva, Quentin Garchery, Richie, Rodrigo Baraglia, Rohit Kumar Suman, Ryan, vdusart, victorknox, William Entriken, ywon0925

If you want to perform a source build, please only use solidity_0.8.16.tar.gz and not the zip provided by github directly.

Version 0.8.15

15 Jun 14:54
e14f271
Compare
Choose a tag to compare

This release fixes two important bugs and also contains other minor bug fixes and features.

For details, please see the release announcement.

Important Bugfixes:

  • Code Generation: Avoid writing dirty bytes to storage when copying bytes arrays.
  • Yul Optimizer: Keep all memory side-effects of inline assembly blocks.

Language Features:

  • Add E.selector for a non-anonymous event E to access the 32-byte selector topic.

Compiler Features:

  • LSP: Add rudimentary support for semantic highlighting.
  • Type Checker: Warn about assignments involving multiple pushes to storage bytes that may invalidate references.
  • Yul Optimizer: Improve inlining heuristics for via IR code generation and pure Yul compilation.

Bugfixes:

  • ABI Encoder: When encoding an empty string coming from storage do not add a superfluous empty slot for data.
  • Common Subexpression Eliminator: Process assembly items in chunks with maximum size of 2000. It helps to avoid extremely time-consuming searches during code optimization.
  • Yul Optimizer: Do not remove returndatacopy in cases in which it might perform out-of-bounds reads that unconditionally revert as out-of-gas. Previously, any
    returndatacopy that wrote to memory that was never read from was removed without accounting for the out-of-bounds condition.

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

Christian Parpart, Christian Reitwiessner, Damian Wechman, Daniel Kirchner, Denis T, Dustin Alandzes, Harikrishnan Mulackal, Josep M Sobrepere, Kamil Śliwak, Matheus Aguiar, Mathias L. Baumann, Nishant Sachdeva, Prajwal Borkar, Ryan, Samuel Osewa, Saw-mon-and-Natalie, shady41, sourabh.xyz, uji, Yuri Victorovich

If you want to perform a source build, please only use solidity_0.8.15.tar.gz and not the zip provided by github directly.

Version 0.8.14

17 May 12:37
80d49f3
Compare
Choose a tag to compare

This release fixes two important bugs and also contains other minor bug fixes and features.

For details, please see the release announcement.

Important Bugfixes:

  • ABI Encoder: When ABI-encoding values from calldata that contain nested arrays, correctly validate the nested array length against calldatasize() in all cases.
  • Override Checker: Allow changing data location for parameters only when overriding external functions.

Compiler Features:

  • Assembly-Json Exporter: Include source list in sourceList field.
  • Commandline Interface: Option --pretty-json works also with the following options: --abi, --asm-json, --ast-compact-json, --devdoc, --storage-layout, --userdoc.
  • Language Server: Allow full filesystem access to language server.
  • Peephole Optimizer: Remove operations without side effects before simple terminations.
  • SMTChecker: Support abi.encodeCall taking into account the called selector.

Bugfixes:

  • Assembly-Json Exporter: Fix assembly json export to store jump types of operations in jumpType field instead of value.
  • SMTChecker: Fix ABI compatibility with z3 >=4.8.16.
  • SMTChecker: Fix bug when z3 is selected but not available at runtime.
  • Type Checker: Properly check restrictions of using ... global in conjunction with libraries.
  • TypeChecker: Convert parameters of function type to how they would be called for abi.encodeCall.

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

a3d4, aathan, Aisultan Kali, Alexander Arlt, Alexey Shekhirin, alpharush, andreb0x, Bytecurl, Christian Parpart, Damian Wechman, Daniel Kirchner, dtedesco1, Florian Sey, Hector Roussille, Joshua Quinones, Kamil Śliwak, Leo Alt, Matheus Aguiar, Mathias L. Baumann, Nishant Sachdeva, Nobuhiko Otoba, Ryan, sourabh.xyz, Tharun K

If you want to perform a source build, please only use solidity_0.8.14.tar.gz and not the zip provided by github directly.

Version 0.8.13

16 Mar 13:32
abaa5c0
Compare
Choose a tag to compare

Solidity v0.8.13 fixes an important bug related to abi.encodeCall, extends the using for directive and implements "go to definition" for the language server.

Furthermore, compiling via the new Yul IR pipeline is now considered production ready.

For more details, see the release announcement.

Important Bugfixes:

  • Code Generator: Correctly encode literals used in abi.encodeCall in place of fixed bytes arguments.

Language Features:

  • General: Allow annotating inline assembly as memory-safe to allow optimizations and stack limit evasion that rely on respecting Solidity's memory model.
  • General: using M for Type; is allowed at file level and M can now also be a brace-enclosed list of free functions or library functions.
  • General: using ... for T global; is allowed at file level where the user-defined type T has been defined, resulting in the effect of the statement being available everywhere T is available.

Compiler Features:

  • Commandline Interface: Allow the use of --via-ir in place of --experimental-via-ir.
  • Compilation via Yul IR is no longer marked as experimental.
  • JSON-AST: Added selector field for errors and events.
  • LSP: Implements goto-definition.
  • Peephole Optimizer: Optimize comparisons in front of conditional jumps and conditional jumps across a single unconditional jump.
  • Yul EVM Code Transform: Avoid unnecessary pops on terminating control flow.
  • Yul Optimizer: Remove sstore and mstore operations that are never read from.

Bugfixes:

  • General: Fix internal error for locales with unusual capitalization rules. Locale set in the environment is now completely ignored.
  • Type Checker: Fix incorrect type checker errors when importing overloaded functions.
  • Yul IR Code Generation: Optimize embedded creation code with correct settings. This fixes potential mismatches between the constructor code of a contract compiled in isolation and the bytecode in type(C).creationCode, resp. the bytecode used for new C(...).

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

a3d4, Abdul Karim Moro, Alexander Arlt, Bhargava Shastry, Callis Ezenwaka, Christian Parpart, Daniel Kirchner, david-k, franzihei, hrkrshnn, Kamil Śliwak, kanedaaaa, Leo Alt, Marenz, Mate Soos, Nishant Sachdeva, Paarth Madan, Richie, Sleepy, Tyler, wechman, Wes Bouaziz,

If you want to perform a source build, please only use solidity_0.8.13.tar.gz and not the zip provided by github directly.

Version 0.8.12

16 Feb 11:50
f00d730
Compare
Choose a tag to compare

Solidity v0.8.12 improves the javascript/wasm binary and fixes several bugs.

For more details, see the release announcement.

Language Features:

  • General: Add equality-comparison operators for external function types.
  • General: Support ContractName.functionName for abi.encodeCall, in addition to external function pointers.

Compiler Features:

  • Commandline Interface: Event and error signatures are also returned when using --hashes.
  • Yul Optimizer: Remove mstore and sstore operations if the slot already contains the same value.
  • Yul: Emit immutable references for pure yul code when requested.

Bugfixes:

  • Antlr Grammar: Allow builtin names in yulPath to support .address in function pointers.
  • Code Generator: Fix internal error when accessing the members of external functions occupying more than two stack slots.
  • Code Generator: Fix internal error when doing an explicit conversion from string calldata to bytes.
  • Control Flow Graph: Perform proper virtual lookup for modifiers for uninitialized variable and unreachable code analysis.
  • General: string.concat now properly takes strings as arguments and returns string memory. It was accidentally introduced as a copy of bytes.concat before.
  • Immutables: Fix wrong error when the constructor of a base contract uses return and the derived contract contains immutable variables.
  • Inheritance: Consider functions in all ancestors during override analysis.
  • IR Generator: Add missing cleanup during the conversion of fixed bytes types to smaller fixed bytes types.
  • IR Generator: Add missing cleanup for indexed event arguments of value type.
  • IR Generator: Fix internal error when copying reference types in calldata and storage to struct or array members in memory.
  • IR Generator: Fix IR syntax error when copying storage arrays of structs containing functions.
  • Natspec: Fix internal error when overriding a struct getter with a Natspec-documented return value and the name in the struct is different.
  • Type Checker: Fix internal error when a constant variable declaration forward references a struct.
  • Yul EVM Code Transform: Improved stack shuffling in corner cases.

Solc-Js:

  • The wrapper now requires at least nodejs v10.
  • The code has been ported to TypeScript.

Build System:

  • Emscripten builds store the embedded WebAssembly binary in LZ4 compressed format and transparently decompress on loading.

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

a3d4, Aleksey Bykhun, Amsavarthan Lv, Ayush Shukla, Bhargava Shastry, Braden Watling, Brien, Bruno Barbieri, Christian Parpart, Daniel Kirchner, Esquith Allen, Franziska Heintel, Hakeem Almidan, Harikrishnan Mulackal, joshieDo, joshuatarkwski, Kamil Śliwak, Laurent, Leo Alt, Markus Waas, Mathias L. Baumann, mejsiej, Mohamed Safouen Bouabid, Naveen Sahu, Nikita Stupin, Nishant Sachdeva, Pranay Reddy, Sean Billig, Semar Augusto, William Entriken, yatharthagoenka, Younghoon-Lee.

If you want to perform a source build, please only use solidity_0.8.12.tar.gz and not the zip provided by github directly.

Version 0.8.11

20 Dec 14:45
d7f0394
Compare
Choose a tag to compare

Solidity v0.8.11 adds a first implementation of a Language Server, allows a safer way to perform ABI-encoding and fixes several bugs.

For more details, see the release announcement.

Language Features:

  • General: New builtin function abi.encodeCall(functionPointer, (arg1, arg2, ...)) that type-checks the arguments and returns the ABI-encoded function call data.

Compiler Features:

  • Commandline Interface: Add --lsp option to get solc to act as a Language Server (LSP) communicating over stdio.

Bugfixes:

  • Code Generator: Fix a crash when using @use-src and compiling from Yul to ewasm.
  • SMTChecker: Fix internal error when an unsafe target is solved more than once and the counterexample messages are different.
  • SMTChecker: Fix soundness of assigned storage/memory local pointers that were not erasing enough knowledge.
  • Fix internal error when a function has a calldata struct argument with an internal type inside.
  • IR Generator: Fix IR syntax error when copying storage arrays of functions.

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

Kamil Śliwak, Leo Alt, nishant-sachdeva, Daniel Kirchner, Marenz, minami, Alessandro Coglio, Alex Beregszaszi, Bhargava Shastry, Dallon Asnes, Dallon Asnes, neel iyer, Christian Parpart, GitHubPang, Mathias Baumann, Omkar Nikhal, Saska Karsi, Tynan Richards, dinah.

If you want to perform a source build, please only use solidity_0.8.11.tar.gz and not the zip provided by github directly.

Version 0.8.10

09 Nov 09:42
fc41083
Compare
Choose a tag to compare

Solidity v0.8.10 can now report contract invariants and reentrancy properties through the SMTChecker. It also contains some new optimizations with regards to external function calls and enabled the new EVM code generator for pure Yul mode.

For more details, see the release announcement.

Language Features:

  • Inline Assembly: Support .address and .selector on external function pointers to access their address and function selector.

Compiler Features:

  • Code Generator: Skip existence check for external contract if return data is expected. In this case, the ABI decoder will revert if the contract does not exist.
  • Commandline Interface: Accept nested brackets in step sequences passed to --yul-optimizations.
  • Commandline Interface: Add --debug-info option for selecting how much extra debug information should be included in the produced EVM assembly and Yul code.
  • Commandline Interface: Support --asm, --bin, --ir-optimized, --ewasm and --ewasm-ir output selection options in assembler mode.
  • Commandline Interface: Use different colors when printing errors, warnings and infos.
  • JSON AST: Set absolute paths of imports earlier, in the parsing stage.
  • SMTChecker: Output values for block.*, msg.* and tx.* variables that are present in the called functions.
  • SMTChecker: Report contract invariants and reentrancy properties. This can be enabled via the CLI option --model-checker-invariants or the Standard JSON option settings.modelChecker.invariants.
  • Standard JSON: Accept nested brackets in step sequences passed to settings.optimizer.details.yulDetails.optimizerSteps.
  • Standard JSON: Add settings.debug.debugInfo option for selecting how much extra debug information should be included in the produced EVM assembly and Yul code.
  • Yul EVM Code Transform: Switch to new optimized code transform when compiling via Yul with enabled optimizer.
  • Yul Optimizer: Take control-flow side-effects of user-defined functions into account in various optimizer steps.

Bugfixes:

  • Code Generator: Fix constructor source mappings for immutables.
  • Commandline Interface: Disallow --error-recovery option outside of the compiler mode.
  • Commandline Interface: Don't return zero exit code when writing linked files to disk fails.
  • Commandline Interface: Fix extra newline character being appended to sources passed through standard input, affecting their hashes.
  • Commandline Interface: Report output selection options unsupported by the selected input mode instead of ignoring them.
  • Commandline Interface: When linking only accept exact matches for library names passed to the --libraries option. Library names not prefixed with a file name used to match any library with that name.
  • SMTChecker: Fix internal error in magic type access (block, msg, tx).
  • SMTChecker: Fix internal error in the CHC engine when passing gas in the function options.
  • TypeChecker: Fix internal error when using arrays and structs with user defined value types before declaration.
  • TypeChecker: Fix internal error when using user defined value types in public library functions.
  • TypeChecker: Improved error message for constant variables with (nested) mapping types.
  • Yul Assembler: Fix internal error when function names are not unique.
  • Yul IR Generator: Do not output empty switches/if-bodies for empty contracts.

Important Bugfixes in Experimental Features:

  • Yul IR Generator: Changes to function return variables referenced in modifier invocation arguments were not properly forwarded if there was more than one return variable.

Build System:

  • Pass linker-only emscripten options only when linking.
  • Remove obsolete compatibility workaround for emscripten builds.
  • Update emscripten to version 2.0.33.

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

4molybdenum2, Adam Bliss, Alex Beregszaszi, Christian Parpart, Daniel Kirchner, David Dzhalaev, Derek Brans, Gyeonghun Park, Harikrishnan Mulackal, José López, Kamil Śliwak, Leo Arias, Leonardo Alt, Mariela Mantle, Mathias Baumann, Midhun07, Mikko Ohtamaa, MrBrain295, Saurabh Sharma, sgmoore, shikharvashistha, Shivam Rajput, soroosh-sdi, Sreekesh V, tcoyvwac, TerranCivilian, vowchick, William Entriken, Zachinquarantine

If you want to perform a source build, please only use solidity_0.8.10.tar.gz and not the zip provided by github directly.

Version 0.8.9

29 Sep 14:13
e5eed63
Compare
Choose a tag to compare

Solidity v0.8.9 is a pure bugfix release and fixes two important, but low severity, bugs.
For more details, see the release announcement.

Important Bugfixes:

  • Immutables: Properly perform sign extension on signed immutables.
  • User Defined Value Type: Fix storage layout of user defined value types for underlying types shorter than 32 bytes.

Bugfixes:

  • AST: Export canonicalName for UserDefinedValueTypeDefinition and ContractDefinition.

If you want to perform a source build, please only use solidity_0.8.9.tar.gz and not the zip provided by github directly.

Version 0.8.8

27 Sep 16:12
dddeac2
Compare
Choose a tag to compare

Solidity v0.8.8 introduces user defined value types as a major feature, improves overriding interface functions and reading from immutables. Apart from bugfixes, we also cleaned up the command-line interface and improved the way the
import mechanism resolves files.

For more details, see the release announcement.

Language Features:

  • Inheritance: A function that overrides only a single interface function does not require the override specifier.
  • Type System: Support type(E).min and type(E).max for enums.
  • User Defined Value Type: allows creating a zero cost abstraction over a value type with stricter type requirements.

Compiler Features:

  • Commandline Interface: Add --include-path option for specifying extra directories that may contain importable code (e.g. packaged third-party libraries).
  • Commandline Interface: Do not implicitly run evm bytecode generation unless needed for the requested output.
  • Commandline Interface: Normalize paths specified on the command line and make them relative for files located inside base path and/or include paths.
  • Immutable variables can be read at construction time once they are initialized.
  • SMTChecker: Add constraints to better correlate address(this).balance and msg.value.
  • SMTChecker: Support constants via modules.
  • SMTChecker: Support low level call as external calls to unknown code.
  • SMTChecker: Support the value option for external function calls.
  • SMTChecker: Support user defined value types.

Bugfixes:

  • Code Generator: Fix ICE on assigning to calldata structs and statically-sized calldata arrays in inline assembly.
  • Code Generator: Use stable source order for ABI functions.
  • Commandline Interface: Disallow the --experimental-via-ir option in Standard JSON, Assembler and Linker modes.
  • Commandline Interface: Fix resolution of paths whitelisted with --allowed-paths or implicitly due to base path, remappings and files being compiled. Correctly handle paths that do not match imports exactly due to being relative, non-normalized or empty.
  • Commandline Interface: Report optimizer options as invalid in Standard JSON and linker modes instead of ignoring them.
  • Name Resolver: Fix that when importing an aliased symbol using import {AliasedName} from "a.sol" it would use the original name of the symbol and not the aliased one.
  • Opcode Optimizer: Prevent the optimizer from running multiple times to avoid potential bytecode differences for referenced code.
  • Parser: Properly check for multiple SPDX license identifiers next to each other and validate them.
  • SMTChecker: Fix BMC's constraints regarding internal functions.
  • SMTChecker: Fix false negative caused by push on storage array references returned by internal functions.
  • SMTChecker: Fix false positive in external calls from constructors.
  • SMTChecker: Fix internal error on some multi-source uses of abi.*, cryptographic functions and constants.
  • Standard JSON: Fix non-fatal errors in Yul mode being discarded if followed by a fatal error.
  • Type Checker: Correct wrong error message in inline assembly complaining about .slot or .offset` not valid when actually .length`` was used.
  • Type Checker: Disallow modifier declarations and definitions in interfaces.
  • Yul Optimizer: Fix a crash in LoadResolver, when keccak256 has particular non-identifier arguments.

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

Ahmed Ali, Alessandro Coglio, Alex Beregszaszi, Alexander Arlt, Andrew Lyndem, Basit Raza, benldrmn, Bhargava Shastry, CrimsonGlory, Daniel Kirchner, Harikrishnan Mulackal, hawkess, istareatscreens, John Adler, Kamil Śliwak, Leonardo Alt, Marenz, Midhun07, Nikita Stupin, Paul Razvan Berg, priyansh786, Sean Hawkes, soroosh-sdi, Sreekesh V, yatharthagoenka

If you want to perform a source build, please only use solidity_0.8.8.tar.gz and not the zip provided by github directly.