Skip to content

Releases: ethereum/solidity

Version 0.4.4

01 Nov 08:53
Compare
Choose a tag to compare

This is a bugfix release that fixes a storage corruption that appears when multiple variables are stored in the same slot (details).

Bugfixes:

  • Type checker: forbid signed exponential that led to an incorrect use of EXP opcode.
  • Code generator: properly clean higher order bytes before storing in storage.

Version 0.4.3

25 Oct 13:53
Compare
Choose a tag to compare

This is a real bugfix release as you can see from the changelog below. The most important fix concerns the optimizer which generated invalid code connected to the SHA3 opcode in certain situations.

Features:

  • Inline assembly: support both suicide and selfdestruct opcodes
    (note: suicide is deprecated).
  • Inline assembly: issue warning if stack is not balanced after block.
  • Include keccak256() as an alias to sha3().
  • Support shifting constant numbers.

Bugfixes:

  • Commandline interface: Disallow unknown options in solc.
  • Name resolver: Allow inheritance of enum definitions.
  • Type checker: Proper type checking for bound functions.
  • Type checker: fixed crash related to invalid fixed point constants
  • Type checker: fixed crash related to invalid literal numbers.
  • Type checker: super.x does not look up x in the current contract.
  • Code generator: expect zero stack increase after super as an expression.
  • Code generator: fix an internal compiler error for L.Foo for enum Foo defined in library L.
  • Code generator: allow inheritance of enum definitions.
  • Inline assembly: support the address opcode.
  • Inline assembly: fix parsing of assignment after a label.
  • Inline assembly: external variables of unsupported type (such as this, super, etc.)
    are properly detected as unusable.
  • Inline assembly: support variables within modifiers.
  • Optimizer: fix related to stale knowledge about SHA3 operations

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.