Navigation Menu

Skip to content

Releases: ethereum/solidity

Version 0.4.11

03 May 12:59
Compare
Choose a tag to compare

This release fixes a bug in the optimizer (more about this on the blog), introduces the standard JSON interface, adds interface contracts and implements some additional safety checks.

The standard JSON interface provides a unified way to invoke the Solidity compiler in order to ease cross-platform adoption and compilation verification.

Features:

  • Implement the Standard JSON Input / Output API
  • Support interface contracts.
  • C API (jsonCompiler): Add the compileStandard() method to process a Standard JSON I/O.
  • Commandline interface: Add the --standard-json parameter to process a Standard JSON I/O.
  • Commandline interface: Support --allow-paths to define trusted import paths. Note: the
    path(s) of the supplied source file(s) is always trusted.
  • Inline Assembly: Storage variable access using _slot and _offset suffixes.
  • Inline Assembly: Disallow blocks with unbalanced stack.
  • Static analyzer: Warn about statements without effects.
  • Static analyzer: Warn about unused local variables, parameters, and return parameters.
  • Syntax checker: issue deprecation warning for unary '+'

Bugfixes:

  • Assembly output: Implement missing AssemblyItem types.
  • Compiler interface: Fix a bug where source indexes could be inconsistent between Solidity compiled
    with different compilers (clang vs. gcc) or compiler settings. The bug was visible in AST
    and source mappings.
  • Gas Estimator: Reflect the most recent fee schedule.
  • Type system: Contract inheriting from base with unimplemented constructor should be abstract.
  • Optimizer: Number representation bug in the constant optimizer fixed.

We especially thank all our open source community contributors:

Abraham Sangha, AdrianClv, Andy Milenius, Chandan Kumar, Federico Bond, FedericoCapello, JohnAllen, Matt Searle, Matt Wisniewski, Morgan, Omkara and Rhett Aultman

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

Update: the original release on 3rd of May contained the wrong version numbers (it included the pre-release tag). This has been rectified today, the 4th of May, and all the linked binaries have been updated.

The files should have the following SHA-256 hashes:

  • solc-static-linux: 0a8d138ee245039e6f8312edc024ba3c4739cc3c013b47dc7fc9196a2e327fea
  • solidity-windows.zip: 4387ef9733643ed387e5975d2241e423bd8d79c54db90d07a70c62c8c3e1be77
  • solidity_0.4.11.tar.gz: 5a96a3ba4d0d6457ad8101d6219152610e46b384bfbd48244e3474573f7a6d47
  • soljson.js: 49fa27e6e70e08ddc7ba3790325e07c07902d9e855362d03fb908757ac14b4e5

Version 0.4.10

15 Mar 17:22
Compare
Choose a tag to compare

This release is focused on stability and also introduces some new smart contract safety features: require, assert and transfer. Note that the new revert function will only be gas-efficient starting from homestead.

Features:

  • Add assert(condition), which throws if condition is false (meant for internal errors).
  • Add require(condition), which throws if condition is false (meant for invalid input).
  • Commandline interface: Do not overwrite files unless forced.
  • Introduce .transfer(value) for sending Ether.
  • Code generator: Support revert() to abort with rolling back, but not consuming all gas.
  • Inline assembly: Support revert (EIP140) as an opcode.
  • Parser: Support scientific notation in numbers (e.g. 2e8 and 200e-2).
  • Type system: Support explicit conversion of external function to address.
  • Type system: Warn if base of exponentiation is literal (result type might be unexpected).
  • Type system: Warn if constant state variables are not compile-time constants.

Bugfixes:

  • Commandline interface: Always escape filenames (replace /, : and . with _).
  • Commandline interface: Do not try creating paths . and ...
  • Commandline interface: Allow long library names.
  • Parser: Disallow octal literals.
  • Type system: Fix a crash caused by continuing on fatal errors in the code.
  • Type system: Disallow compound assignment for tuples.
  • Type system: Detect cyclic dependencies between constants.
  • Type system: Disallow arrays with negative length.
  • Type system: Fix a crash related to invalid binary operators.
  • Type system: Disallow var declaration with empty tuple type.
  • Type system: Correctly convert function argument types to pointers for member functions.
  • Type system: Move privateness of constructor into AST itself.
  • Inline assembly: Charge one stack slot for non-value types during analysis.
  • Assembly output: Print source location before the operation it refers to instead of after.
  • Optimizer: Stop trying to optimize tricky constants after a while.

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

Version 0.4.9

31 Jan 18:33
Compare
Choose a tag to compare

This release fixes quite some bugs and also adds several new features.

Things to look out for:

  • To disambiguate contracts and libraries of the same name in different files, everything is now prefixed by "filename:". This applies to the compiler output, the linker input and other things.
  • Internal exceptions are now thrown by using an invalid opcode (0xfe), manual exceptions still use an invalid jump.

Features:

  • Compiler interface: Contracts and libraries can be referenced with a file: prefix to make them unique.
  • Compiler interface: Report source location for "stack too deep" errors.
  • AST: Use deterministic node identifiers.
  • Inline assembly: introduce invalid (EIP141) as an opcode.
  • Type system: Introduce type identifier strings.
  • Type checker: Warn about invalid checksum for addresses and deduce type from valid ones.
  • Metadata: Do not include platform in the version number.
  • Metadata: Add option to store sources as literal content.
  • Code generator: Extract array utils into low-level functions.
  • Code generator: Internal errors (array out of bounds, etc.) now cause a reversion by using an invalid
    instruction (0xfe - EIP141) instead of an invalid jump. Invalid jump is still kept for explicit throws.

Bugfixes:

  • Code generator: Allow recursive structs.
  • Inline assembly: Disallow variables named like opcodes.
  • Type checker: Allow multiple events of the same name (but with different arities or argument types)
  • Natspec parser: Fix error with @param parsing and whitespace.

Version 0.4.8

13 Jan 12:40
Compare
Choose a tag to compare

Features:

  • Optimiser: Performance improvements.
  • Output: Print assembly in new standardized Solidity assembly format.

Bugfixes:

  • Remappings: Prefer longer context over longer prefix.
  • Type checker, code generator: enable access to events of base contracts' names.
  • Imports: import ".dir/a" is not a relative path. Relative paths begin with directory . or ...
  • Type checker: disallow inheritances of different kinds (e.g. a function and a modifier) of members of the same name

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

Version 0.4.7

15 Dec 13:00
Compare
Choose a tag to compare

Features:

  • Bitshift operators.
  • Type checker: Warn when msg.value is used in non-payable function.
  • Code generator: Inject the Swarm hash of a metadata file into the bytecode.
  • Code generator: Replace expensive memcpy precompile by simple assembly loop.
  • Optimizer: Some dead code elimination.

Bugfixes:

  • Code generator: throw if calling the identity precompile failed during memory (array) copying.
  • Type checker: string literals that are not valid UTF-8 cannot be converted to string type
  • Code generator: any non-zero value given as a boolean argument is now converted into 1.
  • AST Json Converter: replace VariableDefinitionStatement nodes with VariableDeclarationStatement
  • AST Json Converter: fix the camel case in ElementaryTypeNameExpression
  • AST Json Converter: replace public field with visibility in the function definition nodes

Swarm hash of javascript binary: bzzr://de00cf8d235867a00d831e0055b376420789977d276c02e6ff0d1d5b00f5d84d

Version 0.4.6

22 Nov 14:35
Compare
Choose a tag to compare

Bugfixes:

  • Optimizer: Knowledge about state was not correctly cleared for JUMPDESTs

Swarm hash of js compiler: bzzr:/b873fa122233c91b1531527c390f6ca49df4d2a2c5f75706f4b612a0c813cb6a

Version 0.4.5

21 Nov 11:26
Compare
Choose a tag to compare

This Solidity release adds function types. Use-cases include supplying callbacks for asynchronous or off-chain operations or generic library features (for example map-reduce-style programming). This release also improves the safety of enums and sending Ether to a contract constructor.

Features:

  • Function types
  • Do-while loops: support for a do <block> while (<expr>); control structure
  • Inline assembly: support invalidJumpLabel as a jump label.
  • Type checker: now more eagerly searches for a common type of an inline array with mixed types
  • Code generator: generates a runtime error when an out-of-range value is converted into an enum type.

Bugfixes:

  • Inline assembly: calculate stack height warning correctly even when local variables are used.
  • Code generator: check for value transfer in non-payable constructors.
  • Parser: disallow empty enum definitions.
  • Type checker: disallow conversion between different enum types.
  • Interface JSON: do not include trailing new line.

Swarm hash of js compiler: bzzr://de94c41f727124a5b02bd1db087e6bcba19a682c5d89bf3cdaa650e9fdd08403

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.