Skip to content

Commit

Permalink
Merge pull request #6269 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.5.6
  • Loading branch information
chriseth authored Mar 13, 2019
2 parents 47a71e8 + d17ad81 commit b259423
Show file tree
Hide file tree
Showing 198 changed files with 4,851 additions and 1,437 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.5.5")
set(PROJECT_VERSION "0.5.6")
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX)

option(LLL "Build LLL" OFF)
Expand Down
35 changes: 35 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
### 0.5.6 (2019-03-13)

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.

### 0.5.5 (2019-03-05)

Language Features:
Expand All @@ -7,10 +39,12 @@ Language Features:

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.
Expand All @@ -36,6 +70,7 @@ Bugfixes:

Build System:
* Soltest: Add support for left-aligned, padded hex literals.
* Soltest: Add support for left-aligned, unpadded hex string literals.
* Soltest: Add support for right-aligned, padded boolean literals.

### 0.5.4 (2019-02-12)
Expand Down
7 changes: 4 additions & 3 deletions ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@
- [ ] Update the version and the hash (``sha256sum solidity_x.x.x.tar.gz``) in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb

### Documentation
- [ ] Update the default version on readthedocs.
- [ ] Build the new version on https://readthedocs.org/projects/solidity/ (select `latest` on the bottom of the page and click `BUILD`)
- [ ] In the admin panel, select `Versions` in the menu and set the default version to the released one.

### Release solc-js
- [ ] Increment the version number, create a pull request for that, merge it after tests succeeded.
- [ ] Run ``npm publish`` in the updated ``solc-js`` repository.
- [ ] Create a commit to increase the version number on ``develop`` in ``CMakeLists.txt`` and add a new skeleton changelog entry.
- [ ] Merge ``release`` back into ``develop``.

### Post-release
- [ ] Create a commit to increase the version number on ``develop`` in ``CMakeLists.txt`` and add a new skeleton changelog entry.
- [ ] Merge ``release`` back into ``develop``.
- [ ] Announce on Twitter and Reddit.
- [ ] Lean back, wait for bug reports and repeat from step 1 :)
8 changes: 4 additions & 4 deletions docs/050-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ This will no longer compile with Solidity v0.5.0. However, you can define a comp

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;
interface OldContract {
function someOldFunction(uint8 a) external;
function anotherOldFunction() external returns (bool);
Expand All @@ -325,7 +325,7 @@ Given the interface defined above, you can now easily use the already deployed p

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

interface OldContract {
function someOldFunction(uint8 a) external;
Expand All @@ -345,7 +345,7 @@ commandline compiler for linking):

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

library OldLibrary {
function someFunction(uint8 a) public returns(bool);
Expand Down Expand Up @@ -430,7 +430,7 @@ New version:

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

contract OtherContract {
uint x;
Expand Down
6 changes: 3 additions & 3 deletions docs/abi-spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Given the contract:

::

pragma solidity >=0.4.16 <0.6.0;
pragma solidity >=0.4.16 <0.7.0;

contract Foo {
function bar(bytes3[2] memory) public pure {}
Expand Down Expand Up @@ -483,7 +483,7 @@ For example,

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

contract Test {
constructor() public { b = hex"12345678901234567890123456789012"; }
Expand Down Expand Up @@ -530,7 +530,7 @@ As an example, the code

::

pragma solidity >=0.4.19 <0.6.0;
pragma solidity >=0.4.19 <0.7.0;
pragma experimental ABIEncoderV2;

contract Test {
Expand Down
10 changes: 5 additions & 5 deletions docs/assembly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ idea is that assembly libraries will be used to enhance the Solidity language.

.. code::
pragma solidity >=0.4.0 <0.6.0;
pragma solidity >=0.4.0 <0.7.0;
library GetCode {
function at(address _addr) public view returns (bytes memory o_code) {
Expand All @@ -101,7 +101,7 @@ efficient code, for example:

.. code::
pragma solidity >=0.4.16 <0.6.0;
pragma solidity >=0.4.16 <0.7.0;
library VectorSum {
// This function is less efficient because the optimizer currently fails to
Expand Down Expand Up @@ -394,7 +394,7 @@ Local Solidity variables are available for assignments, for example:

.. code::
pragma solidity >=0.4.11 <0.6.0;
pragma solidity >=0.4.11 <0.7.0;
contract C {
uint b;
Expand Down Expand Up @@ -433,7 +433,7 @@ be just ``0``, but it can also be a complex functional-style expression.

.. code::
pragma solidity >=0.4.16 <0.6.0;
pragma solidity >=0.4.16 <0.7.0;
contract C {
function f(uint x) public view returns (uint b) {
Expand Down Expand Up @@ -690,7 +690,7 @@ Example:
We will follow an example compilation from Solidity to assembly.
We consider the runtime bytecode of the following Solidity program::

pragma solidity >=0.4.16 <0.6.0;
pragma solidity >=0.4.16 <0.7.0;

contract C {
function f(uint x) public pure returns (uint y) {
Expand Down
12 changes: 12 additions & 0 deletions docs/bugs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
{
"name": "DoubleShiftSizeOverflow",
"summary": "Double bitwise shifts by large constants whose sum overflows 256 bits can result in unexpected values.",
"description": "Nested logical shift operations whose total shift size is 2**256 or more are incorrectly optimized. This only applies to shifts by numbers of bits that are compile-time constant expressions.",
"introduced": "0.5.5",
"fixed": "0.5.6",
"severity": "low",
"conditions": {
"optimizer": true,
"evmVersion": ">=constantinople"
}
},
{
"name": "ExpExponentCleanup",
"summary": "Using the ** operator with an exponent of type shorter than 256 bits can result in unexpected values.",
Expand Down
10 changes: 8 additions & 2 deletions docs/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ severity
discoverability in contract tests, likelihood of occurrence and
potential damage by exploits.
conditions
Conditions that have to be met to trigger the bug. Currently, this
is an object that can contain a boolean value ``optimizer``, which
Conditions that have to be met to trigger the bug. The following
keys can be used:
``optimizer``, Boolean value which
means that the optimizer has to be switched on to enable the bug.
``evmVersion``, a string that indicates which EVM version compiler
settings trigger the bug. The string can contain comparison
operators. For example, ``">=constantinople"`` means that the bug
is present when the EVM version is set to ``constantinople`` or
later.
If no conditions are given, assume that the bug is present.
check
This field contains different checks that report whether the smart contract
Expand Down
8 changes: 7 additions & 1 deletion docs/bugs_by_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,13 @@
"released": "2019-02-12"
},
"0.5.5": {
"bugs": [],
"bugs": [
"DoubleShiftSizeOverflow"
],
"released": "2019-03-05"
},
"0.5.6": {
"bugs": [],
"released": "2019-03-13"
}
}
8 changes: 4 additions & 4 deletions docs/common-patterns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ become the new richest.

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

contract WithdrawalContract {
address public richest;
Expand Down Expand Up @@ -65,7 +65,7 @@ This is as opposed to the more intuitive sending pattern:

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

contract SendContract {
address payable public richest;
Expand Down Expand Up @@ -130,7 +130,7 @@ restrictions highly readable.

::

pragma solidity >=0.4.22 <0.6.0;
pragma solidity >=0.4.22 <0.7.0;

contract AccessRestriction {
// These will be assigned at the construction
Expand Down Expand Up @@ -282,7 +282,7 @@ function finishes.

::

pragma solidity >=0.4.22 <0.6.0;
pragma solidity >=0.4.22 <0.7.0;

contract StateMachine {
enum Stages {
Expand Down
4 changes: 2 additions & 2 deletions docs/contracts/abstract-contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Abstract Contracts

Contracts are marked as abstract when at least one of their functions lacks an implementation as in the following example (note that the function declaration header is terminated by ``;``)::

pragma solidity >=0.4.0 <0.6.0;
pragma solidity >=0.4.0 <0.7.0;

contract Feline {
function utterance() public returns (bytes32);
}

Such contracts cannot be compiled (even if they contain implemented functions alongside non-implemented functions), but they can be used as base contracts::

pragma solidity >=0.4.0 <0.6.0;
pragma solidity >=0.4.0 <0.7.0;

contract Feline {
function utterance() public returns (bytes32);
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/constant-state-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ value types and strings.

::

pragma solidity >=0.4.0 <0.6.0;
pragma solidity >=0.4.0 <0.7.0;

contract C {
uint constant x = 32**22 + 8;
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/creating-contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This means that cyclic creation dependencies are impossible.

::

pragma solidity >=0.4.22 <0.6.0;
pragma solidity >=0.4.22 <0.7.0;

contract OwnedToken {
// `TokenCreator` is a contract type that is defined below.
Expand Down
4 changes: 2 additions & 2 deletions docs/contracts/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ not possible to filter for specific anonymous events by name.

::

pragma solidity >=0.4.21 <0.6.0;
pragma solidity >=0.4.21 <0.7.0;

contract ClientReceipt {
event Deposit(
Expand Down Expand Up @@ -136,7 +136,7 @@ as topics. The event call above can be performed in the same way as

::

pragma solidity >=0.4.10 <0.6.0;
pragma solidity >=0.4.10 <0.7.0;

contract C {
function f() public payable {
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/function-modifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inheritable properties of contracts and may be overridden by derived contracts.

::

pragma solidity ^0.5.0;
pragma solidity >=0.5.0 <0.7.0;

contract owned {
constructor() public { owner = msg.sender; }
Expand Down
Loading

0 comments on commit b259423

Please sign in to comment.