Skip to content

Commit

Permalink
Merge pull request #8341 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.6.3
  • Loading branch information
chriseth authored Feb 18, 2020
2 parents bacdbe5 + c2e22d4 commit 8dda952
Show file tree
Hide file tree
Showing 435 changed files with 12,385 additions and 3,208 deletions.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ defaults:
path: build/solc/solc
destination: solc

# compiled tool executable target
- artifacts_tools: &artifacts_tools
path: build/tools/solidity-upgrade
destination: solidity-upgrade

# compiled executable targets
- artifacts_executables: &artifacts_executables
root: build
Expand Down Expand Up @@ -257,6 +262,22 @@ jobs:
name: Check for C++ coding style
command: ./scripts/check_style.sh

chk_pylint:
docker:
- image: buildpack-deps:eoan
steps:
- checkout
- run:
name: Install pip
command: apt -q update && apt install -y python3-pip
- run:
name: Install pylint
command: python3 -m pip install pylint z3-solver pygments-lexer-solidity
# also z3-solver to make sure pylint knows about this module, pygments-lexer-solidity for docs
- run:
name: Linting Python Scripts
command: ./scripts/pylint_all.py

chk_buglist:
docker:
- image: circleci/node
Expand Down Expand Up @@ -308,6 +329,7 @@ jobs:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- store_artifacts: *artifacts_tools
- persist_to_workspace: *artifacts_executables

b_ubu_release: &build_ubuntu1904_release
Expand Down Expand Up @@ -391,8 +413,8 @@ jobs:
- run:
name: Regression tests
command: |
git clone https://github.com/ethereum/solidity-fuzzing-corpus /tmp/solidity-fuzzing-corpus
mkdir -p test_results
export ASAN_OPTIONS="check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2"
scripts/regressions.py -o test_results
- run: *gitter_notify_failure
- run: *gitter_notify_success
Expand Down Expand Up @@ -439,6 +461,7 @@ jobs:
- /usr/local/Homebrew
- run: *run_build
- store_artifacts: *artifacts_solc
- store_artifacts: *artifacts_tools
- persist_to_workspace: *artifacts_build_dir

t_osx_soltest:
Expand Down Expand Up @@ -718,6 +741,7 @@ workflows:
# DISABLED FOR 0.6.0 - chk_docs_examples: *workflow_trigger_on_tags
- chk_buglist: *workflow_trigger_on_tags
- chk_proofs: *workflow_trigger_on_tags
- chk_pylint: *workflow_trigger_on_tags

# build-only
- b_docs: *workflow_trigger_on_tags
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ docs/utils/*.pyc
/deps/downloads/
deps/install
deps/cache
cmake-build-debug/

# vim stuff
[._]*.sw[a-p]
Expand Down
3 changes: 2 additions & 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.6.2")
set(PROJECT_VERSION "0.6.3")
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)

include(TestBigEndian)
Expand Down Expand Up @@ -55,6 +55,7 @@ add_subdirectory(libevmasm)
add_subdirectory(libyul)
add_subdirectory(libsolidity)
add_subdirectory(libsolc)
add_subdirectory(tools)

if (NOT EMSCRIPTEN)
add_subdirectory(solc)
Expand Down
23 changes: 23 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
### 0.6.3 (2020-02-18)

Language Features:
* Allow contract types and enums as keys for mappings.
* Allow function selectors to be used as compile-time constants.
* Report source locations for structured documentation errors.



Compiler Features:
* AST: Add a new node for doxygen-style, structured documentation that can be received by contract, function, event and modifier definitions.
* Code Generator: Use ``calldatacopy`` instead of ``codecopy`` to zero out memory past input.
* Debug: Provide reason strings for compiler-generated internal reverts when using the ``--revert-strings`` option or the ``settings.debug.revertStrings`` setting on ``debug`` mode.
* Yul Optimizer: Prune functions that call each other but are otherwise unreferenced.


Bugfixes:
* Assembly: Added missing `source` field to legacy assembly json output to complete the source reference.
* Parser: Fix an internal error for ``abstract`` without ``contract``.
* Type Checker: Make invalid calls to uncallable types fatal errors instead of regular.



### 0.6.2 (2020-01-27)

Language Features:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The Solidity Contract-Oriented Programming Language
[![Join the chat at https://gitter.im/ethereum/solidity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/solidity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
You can talk to us on [![solidity at https://gitter.im/ethereum/solidity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/solidity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge). Questions, feedback and suggestions are welcome!

Solidity is a statically typed, contract-oriented, high-level language for implementing smart contracts on the Ethereum platform.

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test_script:
- soltest.exe --show-progress -- --testpath %APPVEYOR_BUILD_FOLDER%\test --no-smt
# Skip bytecode compare if private key is not available
- cd %APPVEYOR_BUILD_FOLDER%
- ps: if ($env:priv_key) {
- ps: if ($env:priv_key -and -not $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
scripts\bytecodecompare\storebytecode.bat $Env:CONFIGURATION $bytecodedir
}
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
Expand Down
3 changes: 3 additions & 0 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
endif ()

# Use fancy colors in the compiler diagnostics
add_compile_options(-fdiagnostics-color)

# Additional Clang-specific compiler settings.
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
Expand Down
4 changes: 2 additions & 2 deletions cmake/toolchains/libfuzzer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(USE_CVC4 OFF CACHE BOOL "Disable CVC4" FORCE)
set(OSSFUZZ ON CACHE BOOL "Enable fuzzer build" FORCE)
# Use libfuzzer as the fuzzing back-end
set(LIB_FUZZING_ENGINE "-fsanitize=fuzzer" CACHE STRING "Use libfuzzer back-end" FORCE)
# clang/libfuzzer specific flags for ASan instrumentation
set(CMAKE_CXX_FLAGS "-O1 -gline-tables-only -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libstdc++" CACHE STRING "Custom compilation flags" FORCE)
# clang/libfuzzer specific flags for UBSan instrumentation
set(CMAKE_CXX_FLAGS "-O1 -gline-tables-only -fsanitize=undefined -fsanitize=fuzzer-no-link -stdlib=libstdc++" CACHE STRING "Custom compilation flags" FORCE)
4 changes: 2 additions & 2 deletions docs/050-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This section highlights changes that affect syntax and semantics.
last one only works for value types). Change every ``keccak256(a, b, c)`` to
``keccak256(abi.encodePacked(a, b, c))``. Even though it is not a breaking
change, it is suggested that developers change
``x.call(bytes4(keccak256("f(uint256)"), a, b)`` to
``x.call(bytes4(keccak256("f(uint256)")), a, b)`` to
``x.call(abi.encodeWithSignature("f(uint256)", a, b))``.

* Functions ``.call()``, ``.delegatecall()`` and ``.staticcall()`` now return
Expand Down Expand Up @@ -455,7 +455,7 @@ New version:
uint z = someInteger();
x += z;
// Throw is now disallowed.
require(x > 100);
require(x <= 100);
int y = -3 >> 1;
require(y == -2);
do {
Expand Down
4 changes: 4 additions & 0 deletions docs/bugs_by_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -884,5 +884,9 @@
"0.6.2": {
"bugs": [],
"released": "2020-01-27"
},
"0.6.3": {
"bugs": [],
"released": "2020-02-18"
}
}
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
import os
import re

from pygments_lexer_solidity import SolidityLexer

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

def setup(sphinx):
thisdir = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, thisdir + '/utils')
from pygments_lexer_solidity import SolidityLexer
sphinx.add_lexer('Solidity', SolidityLexer())

sphinx.add_stylesheet('css/custom.css')
Expand Down Expand Up @@ -53,7 +54,7 @@ def setup(sphinx):

# General information about the project.
project = 'Solidity'
copyright = '2016-2019, Ethereum'
copyright = '2016-2020, Ethereum'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 3 additions & 3 deletions docs/contracts/constant-state-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ value types and strings.
pragma solidity >=0.4.0 <0.7.0;

contract C {
uint constant x = 32**22 + 8;
string constant text = "abc";
bytes32 constant myHash = keccak256("abc");
uint constant X = 32**22 + 8;
string constant TEXT = "abc";
bytes32 constant MY_HASH = keccak256("abc");
}
10 changes: 10 additions & 0 deletions docs/control-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -717,3 +717,13 @@ in scope in the block that follows.
in a catch block or the execution of the try/catch statement itself
reverts (for example due to decoding failures as noted above or
due to not providing a low-level catch clause).

.. note::
The reason behind a failed call can be manifold. Do not assume that
the error message is coming directly from the called contract:
The error might have happened deeper down in the call chain and the
called contract just forwarded it. Also, it could be due to an
out-of-gas situation and not a deliberate error condition:
The caller always retains 63/64th of the gas in a call and thus
even if the called contract goes out of gas, the caller still
has some gas left.
3 changes: 2 additions & 1 deletion docs/grammar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TypeName = ElementaryTypeName

UserDefinedTypeName = Identifier ( '.' Identifier )*

Mapping = 'mapping' '(' ElementaryTypeName '=>' TypeName ')'
Mapping = 'mapping' '(' ( ElementaryTypeName | UserDefinedTypeName ) '=>' TypeName ')'
ArrayTypeName = TypeName '[' Expression? ']'
FunctionTypeName = 'function' FunctionTypeParameterList ( 'internal' | 'external' | StateMutability )*
( 'returns' FunctionTypeParameterList )?
Expand Down Expand Up @@ -96,6 +96,7 @@ Expression
| IndexRangeAccess
| MemberAccess
| FunctionCall
| Expression '{' NameValueList '}'
| '(' Expression ')'
| ('!' | '~' | 'delete' | '++' | '--' | '+' | '-') Expression
| Expression '**' Expression
Expand Down
5 changes: 2 additions & 3 deletions docs/types/mapping-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ Mapping Types
Mapping types use the syntax ``mapping(_KeyType => _ValueType)`` and variables
of mapping type are declared using the syntax ``mapping(_KeyType => _ValueType) _VariableName``.
The ``_KeyType`` can be any
built-in value type plus ``bytes`` and ``string``. User-defined
or complex types such as contract types, enums, mappings, structs or array types
apart from ``bytes`` and ``string`` are not allowed.
built-in value type, ``bytes``, ``string``, or any contract or enum type. Other user-defined
or complex types, such as mappings, structs or array types are not allowed.
``_ValueType`` can be any type, including mappings, arrays and structs.

You can think of mappings as `hash tables <https://en.wikipedia.org/wiki/Hash_table>`_, which are virtually initialised
Expand Down
Loading

0 comments on commit 8dda952

Please sign in to comment.