Releases: ethereum/solidity
Version 0.4.14
This release contains several new features and bugfixes and also an important security fix: The ecrecover
function can be forced to return invalid data, which can be used to bypass authentication in very special circumstances.
Features:
- C API (
jsonCompiler
): Export thelicense
method. - Code Generator: Optimise the fallback function, by removing a useless jump.
- Inline Assembly: Show useful error message if trying to access calldata variables.
- Inline Assembly: Support variable declaration without initial value (defaults to 0).
- Metadata: Only include files which were used to compile the given contract.
- Type Checker: Disallow value transfers to contracts without a payable fallback function.
- Type Checker: Include types in explicit conversion error message.
- Type Checker: Raise proper error for arrays too large for ABI encoding.
- Type checker: Warn if using
this
in a constructor. - Type checker: Warn when existing symbols, including builtins, are overwritten.
Bugfixes:
- Code Generator: Properly clear return memory area for ecrecover.
- Type Checker: Fix crash for some assignment to non-lvalue.
- Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
- Type Checker: Mark modifiers as internal.
- Type Checker: Re-allow multiple mentions of the same modifier per function.
We especially thank all our open source community contributors:
Antonio Tenerio-Fornés, benjaminion, Federico Bond, Harry Wright, hh3755, James Ray, Juaj Bednar, Luke Schoen, Loa Arias, maurelian, Nathan Hernandez, NIC619, Rhett Aultman, Skiral Inc and VoR0220.
If you want to perform a source build, please only use solidity_0.4.14.tar.gz and not the zip provided by github directly.
Version 0.4.13
This is a small bugfix release that fixes several trivial but very annoying bugs that were introduced with 0.4.12. We also deprecate some old features in preparation of the breaking release 0.5.0.
Features:
- Syntax Checker: Deprecated
throw
in favour ofrequire()
,assert()
andrevert()
. - Type Checker: Warn if a local storage reference variable does not explicitly use the keyword
storage
.
Bugfixes:
- Code Generator: Correctly unregister modifier variables.
- Compiler Interface: Only output AST if analysis was successful.
- Error Output: Do not omit the error type.
We especially thank all our open source community contributors:
Leo Arias and Patrick Walters.
If you want to perform a source build, please only use solidity_0.4.13.tar.gz and not the zip provided by github directly.
Version 0.4.12
This release introduces the AST export, solidifies inline assembly, introduces some more warnings and fixes several bugs.
Manual jumps in assembly are deprecated in favour of the structured constructs switch
, for
and function calls also to provide better portability in the future.
Features:
- Assembly: Add
CREATE2
(EIP86),STATICCALL
(EIP214),RETURNDATASIZE
andRETURNDATACOPY
(EIP211) instructions. - Assembly: Display auxiliary data in the assembly output.
- Assembly: Renamed
SHA3
toKECCAK256
. - AST: export all attributes to JSON format.
- C API (
jsonCompiler
): Use the Standard JSON I/O internally. - Code Generator: Added the Whiskers template system.
- Inline Assembly:
for
andswitch
statements. - Inline Assembly: Function definitions and function calls.
- Inline Assembly: Introduce
keccak256
as an opcode.sha3
is still a valid alias. - Inline Assembly: Present proper error message when not supplying enough arguments to a functional
instruction. - Inline Assembly: Warn when instructions shadow Solidity variables.
- Inline Assembly: Warn when using
jump
s. - Remove obsolete Why3 output.
- Type Checker: Enforce strict UTF-8 validation.
- Type Checker: Warn about copies in storage that might overwrite unexpectedly.
- Type Checker: Warn about type inference from literal numbers.
- Static Analyzer: Warn about deprecation of
callcode
.
Bugfixes:
- Assembly: mark
MLOAD
to have side effects in the optimiser. - Code Generator: Fix ABI encoding of empty literal string.
- Code Generator: Fix negative stack size checks.
- Code generator: Use
REVERT
instead ofINVALID
for generated input validation routines. - Inline Assembly: Enforce function arguments when parsing functional instructions.
- Optimizer: Disallow optimizations involving
MLOAD
because it changesMSIZE
. - Static Analyzer: Unused variable warnings no longer issued for variables used inside inline assembly.
- Type Checker: Fix address literals not being treated as compile-time constants.
- Type Checker: Fixed crash concerning non-callable types.
- Type Checker: Fixed segfault with constant function parameters
- Type Checker: Disallow comparisons between mapping and non-internal function types.
- Type Checker: Disallow invoking the same modifier multiple times.
- Type Checker: Do not treat strings that look like addresses as addresses.
- Type Checker: Support valid, but incorrectly rejected UTF-8 sequences.
We especially thank all our open source community contributors:
Alexey Alexeyeff, Andre Miras, Ben Che, benjaminion, Dillon Arevalo, Edward Ruchevits, Erik Quenon Steggall, ethers, Federico Bond, gregg dourgarian, James Ray, Jonathan Brown, Julius Faber, Lefteris Karapetsas, Marius Kjærstad, Micah Zoltu, Paul Stadig, RJ Catalano, Rhett Aultman, Ron Gross, seusher and Travis Jacobs.
If you want to perform a source build, please only use solidity_0.4.12.tar.gz and not the zip provided by github directly.
Version 0.4.11
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 thecompileStandard()
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
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
and200e-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
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
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
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 withVariableDeclarationStatement
- AST Json Converter: fix the camel case in
ElementaryTypeNameExpression
- AST Json Converter: replace
public
field withvisibility
in the function definition nodes
Swarm hash of javascript binary: bzzr://de00cf8d235867a00d831e0055b376420789977d276c02e6ff0d1d5b00f5d84d
Version 0.4.6
Bugfixes:
- Optimizer: Knowledge about state was not correctly cleared for JUMPDESTs
Swarm hash of js compiler: bzzr:/b873fa122233c91b1531527c390f6ca49df4d2a2c5f75706f4b612a0c813cb6a
Version 0.4.5
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