Skip to content

@chriseth chriseth released this May 28, 2019

As in previous releases, we spent most of the time making Solidity future-proof by further working on the Yul optimizer, the Solidity to Yul (and eWasm) translator and the SMT Checker.

Code generated from Solidity now always includes the version number in the CBOR metadata so that it becomes possible to quickly assess whether a contract might be affected by a compiler bug or not.

Language Features:

  • Inline Assembly: Revert change introduced in 0.5.7: The callvalue() instruction does not require payable anymore.
  • Static Analyzer: Disallow libraries calling themselves externally.

Compiler Features:

  • Assembler: Encode the compiler version in the deployed bytecode.
  • Code Generator: Fix handling of structs of dynamic size as constructor parameters.
  • Inline Assembly: Disallow the combination of msize() and the Yul optimizer.
  • Metadata: Add IPFS hashes of source files.
  • Optimizer: Add rule to simplify SHL/SHR combinations.
  • Optimizer: Add rules for multiplication and division by left-shifted one.
  • SMTChecker: Support inherited state variables.
  • SMTChecker: Support tuples and function calls with multiple return values.
  • SMTChecker: Support delete.
  • SMTChecker: Inline external function calls to this.
  • Yul Optimizer: Simplify single-run for loops to if statements.
  • Yul Optimizer: Optimize representation of numbers.
  • Yul Optimizer: Do not inline recursive functions.
  • Yul Optimizer: Do not remove instructions that affect msize() if msize() is used.

Bugfixes:

  • Code Generator: Explicitly turn uninitialized internal function pointers into invalid functions when loaded from storage.
  • Code Generator: Fix assertion failure when assigning structs containing array of mapping.
  • Compiler Internals: Reset the Yul string repository before each compilation, freeing up memory.
  • SMTChecker: Fix bad cast in base constructor modifier.
  • SMTChecker: Fix internal error when visiting state variable inherited from base class.
  • SMTChecker: Fix internal error in fixed point operations.
  • SMTChecker: Fix internal error in assignment to unsupported type.
  • SMTChecker: Fix internal error in branching when inlining function calls that modify local variables.

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

Alex Beregszaszi, Andrey Bronin, asymmetric, Bhargava Shastry, Christian Parpart, Chris Ward, Daniel Kirchner, Erik Kundt, Guy Lando, Isaac Ibiapina, Jorropo, Leonardo Alt, Mathias Baumann, mingchuan, Rocky, Vedant Agarwala.

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

Assets 6

@chriseth chriseth released this Apr 30, 2019

This release fixes important but very unlikely bugs and further completes ABIEncoderV2, SMTChecker and Yul and improves the optimizer.

Notably, if ABIEncoderV2 is activated, the ABI decoder will now revert on input with dirty higher order bits instead of ignoring those bits.

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.
  • Yul Optimizer: Fix SSA transform for multi-assignments.

Language Features:

  • ABIEncoderV2: Implement encoding of calldata arrays and structs.
  • Code Generation: Implement copying recursive structs from storage to memory.
  • Yul: Disallow function definitions inside for-loop init blocks.

Compiler Features:

  • ABI Decoder: Raise a runtime error on dirty inputs when using the experimental decoder.
  • Optimizer: Add rule for shifts by constants larger than 255 for Constantinople.
  • Optimizer: Add rule to simplify certain ANDs and SHL combinations
  • SMTChecker: Support arithmetic compound assignment operators.
  • SMTChecker: Support unary increment and decrement for array and mapping access.
  • SMTChecker: Show unsupported warning for inline assembly blocks.
  • SMTChecker: Support mod.
  • SMTChecker: Support contract type.
  • SMTChecker: Support this as address.
  • SMTChecker: Support address members.
  • Standard JSON Interface: Metadata settings now re-produce the original "useLiteralContent" setting from the compilation input.
  • Yul: Adds break and continue keywords to for-loop syntax.
  • Yul: Support . as part of identifiers.
  • Yul Optimizer: Adds steps for detecting and removing of dead code.

Bugfixes:

  • SMTChecker: Implement Boolean short-circuiting.
  • SMTChecker: SSA control-flow did not take into account state variables that were modified inside inlined functions that were called inside branches.
  • Type System: Allow direct call to base class functions that have overloads.
  • Yul: Properly register functions and disallow shadowing between function variables and variables in the outside scope.

Build System:

  • Soltest: Add commandline option --test / -t to isoltest which takes a string that allows filtering unit tests.
  • soltest.sh: allow environment variable SOLIDITY_BUILD_DIR to specify build folder and add --help usage.

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

Alex Beregszaszi, Bhargava Shastry, Christian Parpart, Chris Ward, Constantin Kloecker, Daniel Kirchner, dm4, Erik Kundt, fnatic, Grant Wuerker, hydai, Ilya Ostrovskiy, Leonardo Alt, Mathias Baumann, mingchuan, rocky, William Entriken

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

Assets 6

@chriseth chriseth released this Apr 29, 2019

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.

Assets 6

@chriseth chriseth released this Mar 26, 2019

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.

Assets 6

@chriseth chriseth released this Mar 13, 2019

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.

Assets 6

@chriseth chriseth released this Mar 5, 2019

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.

Assets 6

@erak erak released this Feb 12, 2019

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

Assets 6

@chriseth chriseth released this Jan 22, 2019

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

Assets 6

@chriseth chriseth released this Dec 19, 2018

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

Assets 6

@chriseth chriseth released this Dec 3, 2018

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

Assets 8
You can’t perform that action at this time.