Skip to content

Releases: ethereum/solidity

Version 0.4.26

29 Apr 14:52
4563c3f
Compare
Choose a tag to compare

This is a bugfix release for the 0.4.x series that contains backported fixes for important bugs that affected code generation. It also contains a fix that makes the emscripten target compatible with newer browser versions.

Important Bugfixes:

  • Code Generator: Fix initialization routine of uninitialized internal function pointers in constructor context.
  • Type System: Use correct type name for contracts in event parameters when used in libraries. This affected code generation.

Bugfixes:

  • ABIEncoderV2: Refuse to generate code that is known to be potentially buggy.
  • General: Split rule list such that JavaScript environments with small stacks can use the compiler.

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

Version 0.5.7

26 Mar 12:59
6da8b01
Compare
Choose a tag to compare

This release mainly fixes bugs in the optimizer and in the experimental ABI encoder. For details about the bug, please see the official announcement.

Furthermore, this release also allows you to use Yul as a language option (instead of "Solidity") in the standard-json-interface.

Important Bugfixes:

  • ABIEncoderV2: Fix bugs related to loading short value types from storage when encoding an array or struct from storage.
  • ABIEncoderV2: Fix buffer overflow problem when encoding packed array from storage.
  • Optimizer: Fix wrong ordering of arguments in byte optimization rule for constants.

Language Features:

  • Function calls with named arguments now work with overloaded functions.

Compiler Features:

  • Inline Assembly: Issue error when using callvalue() inside nonpayable function (in the same way that msg.value already does).
  • Standard JSON Interface: Support "Yul" as input language.
  • SMTChecker: Show callstack together with model if applicable.
  • SMTChecker: Support modifiers.
  • Yul Optimizer: Enable stack allocation optimization by default if Yul optimizer is active (disable in yulDetails).

Bugfixes:

  • Code Generator: Defensively pad memory for type(Contract).name to multiples of 32.
  • Type System: Detect and disallow internal function pointers as parameters for public/external library functions, even when they are nested/wrapped in structs, arrays or other types.
  • Yul Optimizer: Properly determine whether a variable can be eliminated during stack compression pass.
  • Yul / Inline Assembly Parser: Disallow more than one case statement with the same label inside a switch based on the label's integer value.

Build System:

  • Install scripts: Fix boost repository URL for CentOS 6.
  • Soltest: Fix hex string update in soltest.

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

Alex Beregszaszi, Bhargava Shastry, Christian Parpart, Chris Ward, Constantin Kloecker, Daniel Kirchner, Erik Kundt, Leonardo Alt, Mathias Baumann, SystemGlitch, Taariq Levack

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

Version 0.5.6

13 Mar 16:51
b259423
Compare
Choose a tag to compare

This release mainly fixes an optimizer bug related to multiple shift opcodes that was introduced in the previous release. It is unlikely that any existing contracts are affected, but you should still not use Solidity 0.5.5.

Apart from that, the support for calldata structs and arrays by ABIEncoderV2 is almost finished now, we added some more optimizer rules and added enums and one-dimensional arrays to the SMT checker.

Important Bugfixes:

  • Yul Optimizer: Fix visitation order bug for the structural simplifier.
  • Optimizer: Fix overflow in optimization rule that simplifies double shift by constant.

Language Features:

  • Allow calldata arrays with dynamically encoded base types with ABIEncoderV2.
  • Allow dynamically encoded calldata structs with ABIEncoderV2.

Compiler Features:

  • Optimizer: Add rules for lt-comparisons with constants.
  • Peephole Optimizer: Remove double iszero before jumpi.
  • SMTChecker: Support enums without typecast.
  • SMTChecker: Support one-dimensional arrays.
  • Type Checker: Provide better error messages for some literal conversions.
  • Yul Optimizer: Add rule to remove empty default switch cases.
  • Yul Optimizer: Add rule to remove empty cases if no default exists.
  • Yul Optimizer: Add rule to replace a switch with no cases with pop(expression).

Bugfixes:

  • JSON ABI: Json description of library ABIs no longer contains functions with internal types like storage structs.
  • SMTChecker: Fix internal compiler error when contract contains too large rational number.
  • Type system: Detect if a contract's base uses types that require the experimental abi encoder while the contract still uses the old encoder.

Build System:

  • Soltest: Add support for arrays in function signatures.
  • Soltest: Add support for struct arrays in function signatures.

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

Version 0.5.5

05 Mar 15:53
47a71e8
Compare
Choose a tag to compare

This release focuses on the stabilization of the ABIEncoderV2 and the optimizer. We also prepared for the Petersburg release which is the default EVM now and improved the SMT checker, such that it now reports less false positives when using SafeMath.
You can now activate the experimental Yul optimizer using settings: {optimizer: {enabled: true, details: {yul: true}}} or in the commandline via solc --optimize-yul.

Language Features:

  • Add support for getters of mappings with string or bytes key types.
  • Meta programming: Provide access to the name of contracts via type(C).name.

Compiler Features:

  • Support petersburg as evmVersion and set as default.
  • Commandline Interface: Option to activate the experimental yul optimizer using -optimize-yul.
  • Inline Assembly: Consider extcodehash as part of Constantinople.
  • Inline Assembly: Instructions unavailable to the currently configured EVM are errors now.
  • SMTChecker: Do not report underflow/overflow if they always revert. This removes false positives when using SafeMath.
  • Standard JSON Interface: Allow retrieving metadata without triggering bytecode generation.
  • Standard JSON Interface: Provide fine-grained control over the optimizer via the settings.
  • Static Analyzer: Warn about expressions with custom types when they have no effect.
  • Optimizer: Add new rules with constants including LT, GT, AND and BYTE.
  • Optimizer: Add rule for shifts with constants for Constantinople.
  • Optimizer: Combine multiple shifts with constant shift-by values into one.
  • Optimizer: Do not mask with 160-bits after CREATE and CREATE2 as they are guaranteed to return an address or 0.
  • Optimizer: Support shifts in the constant optimiser for Constantinople.
  • Yul Optimizer: Add rule to replace switch statements with literals by matching case body.

Bugfixes:

  • ABIEncoderV2: Fix internal error related to bare delegatecall.
  • ABIEncoderV2: Fix internal error related to ecrecover.
  • ABIEncoderV2: Fix internal error related to mappings as library parameters.
  • ABIEncoderV2: Fix invalid signature for events containing structs emitted in libraries.
  • Inline Assembly: Proper error message for missing variables.
  • Optimizer: Fix internal error related to unused tag removal across assemblies. This never generated any invalid code.
  • SMTChecker: Fix crash related to statically-sized arrays.
  • TypeChecker: Fix internal error and disallow index access on contracts and libraries.
  • Yul: Properly detect name clashes with functions before their declaration.
  • Yul: Take built-in functions into account in the compilability checker.
  • Yul Optimizer: Properly take reassignments to variables in sub-expressions into account when replacing in the ExpressionSimplifier.

Build System:

  • Soltest: Add support for left-aligned, padded hex literals.
  • Soltest: Add support for right-aligned, padded boolean literals.

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

Alex Beregszaszi, Bhargava Shastry, Christian Parpart, Chris Ward, Daniel Kirchner, David Terry, Erik Kundt, Leo Arias, Leonardo Alt, Mathias Baumann

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

Version 0.5.4

12 Feb 13:52
9549d8f
Compare
Choose a tag to compare

This release adds support for calldata structs and packed encoding with ABIEncoderV2. We also introduced some changes to the C API and added support for continuous fuzzing via Google oss-fuzz. In addition to that, we added a new commandline option for improved (colorized) diagnostics formatting.

Language Features:

  • Allow calldata structs without dynamically encoded members with ABIEncoderV2.

Compiler Features:

  • ABIEncoderV2: Implement packed encoding.
  • C API (libsolc / raw soljson.js): Introduce solidity_free method which releases all internal buffers to save memory.
  • Commandline Interface: Adds new option --new-reporter for improved diagnostics formatting
    along with --color and --no-color for colorized output to be forced (or explicitly disabled).

Bugfixes:

  • Code Generator: Defensively pad allocation of creationCode and runtimeCode to multiples of 32 bytes.
  • Commandline Interface: Allow yul optimizer only for strict assembly.
  • Parser: Disallow empty import statements.
  • Type Checker: Disallow mappings with data locations other than storage.
  • Type Checker: Fix internal error when a struct array index does not fit into a uint256.
  • Type System: Properly report packed encoded size for arrays and structs (mostly unused until now).

Build System:

  • Add support for continuous fuzzing via Google oss-fuzz
  • SMT: If using Z3, require version 4.6.0 or newer.
  • Soltest: Add parser that is used in the file-based unit test environment.
  • Ubuntu PPA Packages: Use CVC4 as SMT solver instead of Z3

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

Alex Beregszaszi, Bhargava Shastry, Christian Reitwiessner, Christian Parpart, Chris Ward, Daniel Kirchner, Erik Kundt, Leo Arias, Leonardo Alt, Mathias Baumann, Mudit Gupta, Shelly Grossman

Version 0.5.3

22 Jan 14:40
10d17f2
Compare
Choose a tag to compare

This release adds support for accessing the code of a contract type, which will hopefully make the new CREATE2 opcode easier to use. We also added some static analysis features to the compiler, but most changes were done "under the hood" to pave the way for using the new Yul-based optimizer with ABIEncoderV2.

Language Features:

  • Provide access to creation and runtime code of contracts via type(C).creationCode / type(C).runtimeCode.

Compiler Features:

  • Control Flow Graph: Warn about unreachable code.
  • SMTChecker: Support basic typecasts without truncation.
  • SMTChecker: Support external function calls and erase all knowledge regarding storage variables and references.

Bugfixes:

  • Emscripten: Split simplification rule initialization up further to work around issues with soljson.js in some browsers.
  • Type Checker: Disallow calldata structs until implemented.
  • Type Checker: Return type error if fixed point encoding is attempted instead of throwing UnimplementedFeatureError.
  • Yul: Check that arguments to dataoffset and datasize are literals at parse time and properly take this into account in the optimizer.
  • Yul: Parse number literals for detecting duplicate switch cases.
  • Yul: Require switch cases to have the same type.

Build System:

  • Emscripten: Upgrade to emscripten 1.38.8 on travis and circleci.

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

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

Alex Beregszaszi, androlo, Asher, chandan kumar mandal, Christian Parpart, Chris Ward, Daniel Kirchner, Erik Kundt, Evan Saulpaugh, Leonardo Alt, Nick Barry, Paweł Bylica, poiresel, spmvg, Tomek Kopczynski, William Entriken

Version 0.5.2

19 Dec 18:25
1df8f40
Compare
Choose a tag to compare

This release of the Solidity compiler includes several performance optimizations. These include faster compilation time but also cheaper contracts in some situations. This version also checks for all instances of uninitialized storage references, has some improved error messages and other checks.

You can now create complete contracts in Yul through the support of the Yul object format and the special functions datasize, dataoffset and datacopy.

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

Language Features:

  • Control Flow Graph: Detect every access to uninitialized storage pointers.

Compiler Features:

  • Inline Assembly: Improve error messages around invalid function argument count.
  • Code Generator: Only check callvalue once if all functions are non-payable.
  • Code Generator: Use codecopy for string constants more aggressively.
  • Code Generator: Use binary search for dispatch function if more efficient. The size/speed tradeoff can be tuned using --optimize-runs.
  • SMTChecker: Support mathematical and cryptographic functions in an uninterpreted way.
  • SMTChecker: Support one-dimensional mappings.
  • Standard JSON Interface: Disallow unknown keys in standard JSON input.
  • Standard JSON Interface: Only run code generation if it has been requested. This could lead to unsupported feature errors only being reported at the point where you request bytecode.
  • Static Analyzer: Do not warn about unused variables or state mutability for functions with an empty body.
  • Type Checker: Add an additional reason to be displayed when type conversion fails.
  • Yul: Support object access via datasize, dataoffset and datacopy in standalone assembly mode.

Bugfixes:

  • Standard JSON Interface: Report specific error message for json input errors instead of internal compiler error.

Build System:

  • Replace the trusty PPA build by a static build on cosmic that is used for the trusty package instead.
  • Remove support for Visual Studio 2015.

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

Albert, Alex Beregszaszi, Christian Parpart, Chris Ward, Daniel Kirchner, Erik Kundt, Kevin Kelley, Leonardo Alt, liangdzou, Lionello Lunesu, Mathias Baumann, Ricardo Guilherme Schmidt, Yi Huang, Zacharius

Version 0.5.1

03 Dec 15:32
c8a2cb6
Compare
Choose a tag to compare

This release improves the usability of interfaces, fixes some bugs, extends the SMT checker and provides an early preview of the Yul optimizer.

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

Language Features:

  • Allow mapping type for parameters and return variables of public and external library functions.
  • Allow public functions to override external functions.

Compiler Features:

  • Code generator: Do not perform redundant double cleanup on unsigned integers when loading from calldata.
  • Commandline interface: Experimental --optimize option for assembly mode (--strict-assembly and --yul).
  • SMTChecker: SMTLib2 queries and responses passed via standard JSON compiler interface.
  • SMTChecker: Support msg, tx and block member variables.
  • SMTChecker: Support gasleft() and blockhash() functions.
  • SMTChecker: Support internal bound function calls.
  • Yul: Support Yul objects in --assemble, --strict-assembly and --yul commandline options.

Bugfixes:

  • Assembly output: Do not mix in/out jump annotations with arguments.
  • Commandline interface: Fix crash when using --ast on empty runtime code.
  • Code Generator: Annotate jump from calldata decoder to function as "jump in".
  • Code Generator: Fix internal error related to state variables of function type access via base contract name.
  • Optimizer: Fix nondeterminism bug related to the boost version and constants representation. The bug only resulted in less optimal but still correct code because the generated routine is always verified to be correct.
  • Type Checker: Properly detect different return types when overriding an external interface function with a public contract function.
  • Type Checker: Disallow struct return types for getters of public state variables unless the new ABI encoder is active.
  • Type Checker: Fix internal compiler error when a field of a struct used as a parameter in a function type has a non-existent type.
  • Type Checker: Disallow functions sha3 and suicide also without a function call.
  • Type Checker: Fix internal compiler error with super when base contract function is not implemented.
  • Type Checker: Fixed internal error when trying to create abstract contract in some cases.
  • Type Checker: Fixed internal error related to double declaration of events.
  • Type Checker: Disallow inline arrays of mapping type.
  • Type Checker: Consider abstract function to be implemented by public state variable.

Build System:

  • CMake: LLL is not built anymore by default. Must configure it with CMake as -DLLL=ON.
  • Docker: Includes both Scratch and Alpine images.
  • Emscripten: Upgrade to Emscripten SDK 1.37.21 and boost 1.67.

Solc-Js:

  • Fix handling of standard-json in the commandline executable.
  • Remove support of nodejs 4.

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

Albert, Alex Beregszaszi, Anurag Dashputre, Chris Purta, Christian Parpart, Chris Ward, Daniel Kirchner, David Lozano Jarque, Erik Kundt, hydai, Javier Tarazaga, Justin Wilson, Lazaridis, Leonardo Alt, liangdzou, mordax, Robert Chung, William Entriken, Yet another codejunkie

Version 0.5.0

13 Nov 19:36
1d4f565
Compare
Choose a tag to compare

This is a major breaking release of the Solidity language and compiler that includes many new safety features. In general, programmers have to be more explicit, some weird edge-cases are removed from the language and the low-level compiler interface is much simpler.

This release was long overdue and as a result has amassed an incredibly long list of changes. Please refer to the "Solidity v0.5.0 Breaking Changes” section in the documentation about a good description of what has changed and how to update your code, or if you are courageous, check out the changelog!

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

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

a4nkit, ajs, Alexander Arlt, Alex Beregszaszi, alibabe, Ankit Raj, Anurag Dashputre, Arindam Mondal, Asif Mallik, Augusto F. Hack, bakaoh, Balajiganapathi S, Berk Erol, Bhargava Shastry, Chase McDermott, Christian Parpart, Chris Ward, Crypto Jerônimo, Cryptomental, Daniel Kirchner, Daniel Kronovet, Dimitry, dm4, D-Nice, Dominik Harz, Dylan Wilson, Eitan Levin, Eric Ren, Erik Kundt, Evgeniy Filatov, f-daniel, Federico Bond, feliam, Flash Sheridan, Florian Antony, Franco Victorio, gftea, Guido Vranken, Harry Moreno, herrBez, hydai, Jared Wasinger, Jason Cobb, Jeffrey Anthony, Jesse Busman, João Vítor, Jordan Last, J Quinn, Julius Huelsmann, Kevin Azoulay, Khan M Rashedun-Naby, Kristofer Peterson, Lazaridis, Leanne, Lefteris Karapetsas, Leo Arias, Leonardo Alt, liangdzou, Li Xuanji, Luke Schoen, Martin Diz, Matías Aereal Aeón, Matías A. Ré Medina, Matthew Little, Matt Little, mestorlx, Michał Załęcki, Mike, mingchuan, mordax, Nicolás Venturo, Noel Maersk, Paweł Bylica, Pritam Roy, Richard Littauer, ritzdorf, Rytis Slatkevičius, Shadab Khan, Simon Chen, taitt, Tim Holland, Timofey Solonin, Tomasz Drwięga, Vutsal Singhal, wbt, William Entriken, William Morriss, wpank, xinbenlv

Version 0.4.25

13 Sep 18:03
59dbf8f
Compare
Choose a tag to compare

This release fixed a cleanup error concerning the exponentiation operator. It is a bugfix-only release
and does not contain any features. A more detailed description of the bugs fixed can be found
on the ethereum blog.

Note that nightly builds of Solidity currently contain changes unrelated to this bugfix release.

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

Important Bugfixes:

  • Code Generator: Properly perform cleanup for exponentiation and non-256 bit types.
  • Type Checker: Report error when using indexed structs in events with experimental ABIEncoderV2. This used to log wrong values.
  • Type Checker: Report error when using structs in events without experimental ABIEncoderV2. This used to crash or log the wrong values.
  • Parser: Consider all unicode line terminators (LF, VF, FF, CR, NEL, LS, PS) for single-line comments
    and string literals. They are invalid in strings and will end comments.
  • Parser: Disallow unterminated multi-line comments at the end of input.
  • Parser: Treat /** / as unterminated multi-line comment.

We especially thank all our open source community contributors:

mingchuan and Guido Vranken