Skip to content

Releases: ethereum/solidity

Version 0.4.2

17 Sep 13:36
Compare
Choose a tag to compare

Bugfixes:

  • Code Generator: Fix library functions being called from payable functions.
  • Type Checker: Fixed a crash about invalid array types.
  • Code Generator: Fixed a call gas bug that became visible after
    version 0.4.0 for calls where the output is larger than the input.

Version 0.4.1

09 Sep 10:38
Compare
Choose a tag to compare

This is a bugfix release that fixes an error when compiling libraries with the latest version 0.4.0.

Version 0.4.0

08 Sep 14:22
Compare
Choose a tag to compare

Note: Version 0.4.0 is unable to compile libraries. Please upgrade to 0.4.1.

This release deliberately breaks backwards compatibility mostly to enforce some safety features. The most important change is that you have to explicitly specify if functions can receive ether via the payable modifier. Furthermore, more situations cause exceptions to be thrown.

Minimal changes to be made for upgrade:

  • Add payable to all functions that want to receive Ether (including the constructor and the fallback function).
  • Change _ to _; in modifiers.
  • Add version pragma to each file: pragma solidity ^0.4.0;

Breaking Changes:

  • Source files have to specify the compiler version they are compatible with using e.g. pragma solidity ^0.4.0; or
    pragma solidity >=0.4.0 <0.4.8;
  • Functions that want to receive Ether have to specify the
    new payable modifier (otherwise they throw).
  • Contracts that want to receive Ether with a plain "send"
    have to implement a fallback function with the payable
    modifier. Contracts now throw if no payable fallback
    function is defined and no function matches the signature.
  • Failing contract creation through "new" throws.
  • Division / modulus by zero throws.
  • Function call throws if target contract does not have code
  • Modifiers are required to contain _ (use if (false) _ as a workaround if needed).
  • Modifiers: return does not skip part in modifier after _.
  • Placeholder statement _ in modifier now requires explicit ;.
  • ecrecover now returns zero if the input is malformed (it previously returned garbage).
  • The constant keyword cannot be used for constructors or the fallback function.
  • Removed --interface (Solidity interface) output option
  • JSON AST: General cleanup, renamed many nodes to match their C++ names.
  • JSON output: srcmap-runtime renamed to srcmapRuntime.
  • Moved (and reworked) standard library contracts from inside the compiler to github.com/ethereum/solidity/std
    (import "std"; or import owned; do not work anymore).
  • Confusing and undocumented keyword after was removed.
  • New reserved words: abstract, hex, interface, payable, pure, static, view.

Features:

  • Hexadecimal string literals: hex"ab1248fe"
  • Internal: Inline assembly usable by the code generator.
  • Commandline interface: Using - as filename allows reading from stdin.
  • Interface JSON: Fallback function is now part of the ABI.
  • Interface: Version string now semver compatible.
  • Code generator: Do not provide "new account gas" if we know the called account exists.

Bugfixes:

  • JSON AST: Nodes were added at wrong parent
  • Why3 translator: Crash fix for exponentiation
  • Commandline Interface: linking libraries with underscores in their name.
  • Type Checker: Fallback function cannot return data anymore.
  • Code Generator: Fix crash when sha3() was used on unsupported types.
  • Code Generator: Manually set gas stipend for .send(0).

Lots of changes to the documentation mainly by voluntary external contributors.

Version 0.3.6

10 Aug 19:09
Compare
Choose a tag to compare

This is the first release from the new "solidity-standalone" repository. It does not have dependencies to cpp-ethereum anymore and can be built just from the solidity github repository.

Note that the optimizer was disabled in some situations which could lead to larger (but correcter) code.

Features:

  • Formal verification: Take external effects on a contract into account.
  • Type Checker: Warning about unused return value of low-level calls and send.
  • Output: Source location and node id as part of AST output
  • Output: Source location mappings for bytecode
  • Output: Formal verification as part of json compiler output.

Bugfixes:

  • Commandline Interface: Do not crash if input is taken from stdin.
  • Scanner: Correctly support unicode escape codes in strings.
  • JSON output: Fix error about relative / absolute source file names.
  • JSON output: Fix error about invalid utf8 strings.
  • Code Generator: Dynamic allocation of empty array caused infinite loop.
  • Code Generator: Correctly calculate gas requirements for memcpy precompile.
  • Optimizer: Clear known state if two code paths are joined.

Note regarding the PPA: This version of the solc package conflicts with the cpp-ethereum package (because that still contains solidity). Please uninstall cpp-ethereum before installing solc until we also have a new cpp-ethereum release.

The source below cannot be used without the dependent repositories.

Version 0.3.5

10 Jun 16:02
Compare
Choose a tag to compare

Features:

  • Context-dependent path remappings (different modules can use the same library in different versions)

Bugfixes:

  • Type Checking: Dynamic return types were removed when fetching data from external calls, now they are replaced by an "unusable" type.
  • Type Checking: Overrides by constructors were considered making a function non-abstract.

note: The source below cannot be used without the dependent repositories.

Version 0.3.4

31 May 21:23
Compare
Choose a tag to compare

This release contains no changes outside of the documentation.

note: The source below cannot be used without the dependent repositories.

Version 0.3.3

27 May 17:02
Compare
Choose a tag to compare

This release mainly makes libraries more flexible in that it allows internal functions to be called.

Features

  • Allow internal library functions to be called (by "inlining")
  • Fractional/rational constants (only usable with fixed point types, which are still in progress)
  • Inline assembly has access to internal functions (as jump labels)
  • Running solc without arguments on a terminal will print help.

Fixes

  • Code Generation: Remove some non-determinism in code generation.
  • Code Generation: Corrected usage of not / bnot / iszero in inline assembly
  • Code Generation: Correctly clean bytesNN types before comparison

note: The source below cannot be used without the dependent repositories.

Version 0.3.2

18 Apr 17:34
Compare
Choose a tag to compare

This is mainly a bugfix release. Under the hood, we are in the process of separating the Solidity source code from the rest of the cpp-ethereum source code so that it can soon be built (and released) in isolation.

Fixes:

  • Code generation: Dynamic arrays of structs were not deleted correctly.
  • Code generation: Static arrays in constructor parameter list were not decoded correctly.
  • Parser: Inline assembly parser: byte opcode was unusable
  • Error reporting: tokens for variably-sized types were not converted to string properly

note: The source below cannot be used without the dependent repositories.

Version 0.3.1

31 Mar 16:49
Compare
Choose a tag to compare

This release mainly introduces inline assembly (documentation). Inline assembly provides a way to write low-level but still well readable code. Together with the coming features of inline library functions and templates, it allows to move much of the development that had to be done in the compiler itself into libraries written in Solidity. In the future, it will be possible to introduce new versatile types that still look like builtins.

Features:

  • inline assembly

Fixes:

  • Code generation: array access with narrow types did not clean higher order bits
  • Error reporting: error reporting with unknown source location caused a crash

note: The source below cannot be used without the dependent repositories.

Version 0.3.0 (includes breaking changes)

11 Mar 16:58
Compare
Choose a tag to compare

This version is synchronized to the Homestead changes on the main Ethereum network and introduces various breaking changes.

BREAKING CHANGES:

  • You should not rely on division for literals resulting in a (truncated) integer. This is still the case but will change once we implement fixed point types, i.e. in the future 1/2 == 0.5 will be true, currently we have 1/2 == 0. Note that this only applies to literals ((2 + 7) / 2) and not variables (x / 2).
  • Library calls now default to use DELEGATECALL (e.g. called library functions see the same value as the calling function for msg.value and msg.sender).
  • Added new keywords assembly, fixed, ufixed, fixedNxM, ufixedNxM (for various values of M and N), inline in preparation for future features.

Features:

  • <address>.delegatecall is provided as a low-level calling interface for DELEGATECALL

Bugfixes:

  • Fixed a bug in the optimizer that resulted in comparisons being wrong.

note: The source below cannot be used without the dependent repositories.