Skip to content

Commit c082d0b

Browse files
authored
Merge pull request #7219 from ethereum/develop
Merge develop into release.
2 parents 5a6ea5b + cbac3a4 commit c082d0b

File tree

416 files changed

+17014
-6053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

416 files changed

+17014
-6053
lines changed

.circleci/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ cd .circleci/docker/
99
1010
docker build -t ethereum/solc-buildpack-deps:ubuntu1904 -f Dockerfile.ubuntu1904 .
1111
docker push solidity/solc-buildpack-deps:ubuntu1904
12-
13-
docker build -t ethereum/solc-buildpack-deps:archlinux -f Dockerfile.archlinux .
14-
docker push solidity/solc-buildpack-deps:archlinux
1512
```
1613

1714
which you can find on Dockerhub after the push at:

.circleci/config.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ defaults:
3636
mkdir -p build
3737
cd build
3838
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
39+
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
3940
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS
40-
make ossfuzz ossfuzz_proto -j4
41+
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j4
4142
4243
- run_proofs: &run_proofs
4344
name: Correctness proofs for optimization rules
@@ -69,6 +70,7 @@ defaults:
6970
- artifacts_executables_ossfuzz: &artifacts_executables_ossfuzz
7071
root: build
7172
paths:
73+
- test/tools/ossfuzz/abiv2_proto_ossfuzz
7274
- test/tools/ossfuzz/const_opt_ossfuzz
7375
- test/tools/ossfuzz/solc_noopt_ossfuzz
7476
- test/tools/ossfuzz/solc_opt_ossfuzz
@@ -179,7 +181,23 @@ jobs:
179181
pip install --user codespell
180182
- run:
181183
name: Check spelling
182-
command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt
184+
command: ~/.local/bin/codespell -S "*.enc,.git,Dockerfile*" -I ./scripts/codespell_whitelist.txt
185+
186+
chk_docs_examples:
187+
docker:
188+
- image: circleci/node
189+
environment:
190+
TERM: xterm
191+
steps:
192+
- checkout
193+
- attach_workspace:
194+
at: build
195+
- run:
196+
name: JS deps
197+
command: sudo npm install -g solhint
198+
- run:
199+
name: Test Docs examples
200+
command: ./test/docsCodeStyle.sh
183201

184202
chk_coding_style:
185203
docker:
@@ -231,6 +249,18 @@ jobs:
231249
- store_artifacts: *artifacts_solc
232250
- persist_to_workspace: *artifacts_executables
233251

252+
b_ubu18: &build_ubuntu1804
253+
docker:
254+
- image: ethereum/solidity-buildpack-deps:ubuntu1804
255+
environment:
256+
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
257+
CMAKE_BUILD_TYPE: RelWithDebugInfo
258+
steps:
259+
- checkout
260+
- run: *run_build
261+
- store_artifacts: *artifacts_solc
262+
- persist_to_workspace: *artifacts_executables
263+
234264
b_ubu_codecov:
235265
<<: *build_ubuntu1904
236266
environment:
@@ -252,7 +282,7 @@ jobs:
252282
at: build
253283
- run:
254284
name: "soltest: Syntax Tests"
255-
command: build/test/soltest -t 'syntaxTest*' -- --no-ipc --testpath test
285+
command: build/test/soltest -t 'syntaxTest*' -- --testpath test
256286
- run:
257287
name: "Code Coverage: Syntax Tests"
258288
command: codecov --flags syntax --gcov-root build
@@ -303,10 +333,14 @@ jobs:
303333

304334
b_archlinux:
305335
docker:
306-
- image: ethereum/solidity-buildpack-deps:archlinux
336+
- image: archlinux/base
307337
environment:
308338
TERM: xterm
309339
steps:
340+
- run:
341+
name: Install build dependencies
342+
command: |
343+
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
310344
- checkout
311345
- run: *run_build
312346
- store_artifacts: *artifacts_solc
@@ -444,7 +478,6 @@ jobs:
444478
environment:
445479
EVM: constantinople
446480
OPTIMIZE: 0
447-
SOLTEST_IPC: 0
448481
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
449482

450483
t_ubu_homestead:
@@ -572,6 +605,7 @@ workflows:
572605
# basic checks
573606
- chk_spelling: *workflow_trigger_on_tags
574607
- chk_coding_style: *workflow_trigger_on_tags
608+
- chk_docs_examples: *workflow_trigger_on_tags
575609
- chk_buglist: *workflow_trigger_on_tags
576610
- chk_proofs: *workflow_trigger_on_tags
577611

@@ -587,6 +621,7 @@ workflows:
587621

588622
# Ubuntu 18.10 build and tests
589623
- b_ubu: *workflow_trigger_on_tags
624+
- b_ubu18: *workflow_trigger_on_tags
590625
- t_ubu_cli: *workflow_ubuntu1904
591626
- t_ubu_homestead: *workflow_ubuntu1904
592627
- t_ubu_homestead_opt: *workflow_ubuntu1904
@@ -631,4 +666,3 @@ workflows:
631666
# Code Coverage enabled build and tests
632667
- b_ubu_codecov: *workflow_trigger_on_tags
633668
- t_ubu_codecov: *workflow_ubuntu1904_codecov
634-

.circleci/docker/Dockerfile.archlinux

Lines changed: 0 additions & 28 deletions
This file was deleted.

.circleci/docker/Dockerfile.ubuntu1904

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
#
2222
# (c) 2016-2019 solidity contributors.
2323
#------------------------------------------------------------------------------
24-
FROM buildpack-deps:disco
24+
FROM buildpack-deps:disco AS base
2525

2626
ARG DEBIAN_FRONTEND=noninteractive
2727

2828
RUN set -ex; \
29+
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
30+
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
31+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
2932
apt-get update; \
3033
apt-get install -qqy --no-install-recommends \
3134
build-essential \
@@ -34,21 +37,14 @@ RUN set -ex; \
3437
libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev \
3538
libboost-program-options-dev \
3639
libjsoncpp-dev \
37-
llvm-8-dev libcvc4-dev libleveldb1d \
40+
llvm-8-dev libcvc4-dev libz3-static-dev libleveldb1d \
3841
; \
3942
apt-get install -qy python-pip python-sphinx; \
4043
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-8 1; \
4144
pip install codecov; \
4245
rm -rf /var/lib/apt/lists/*
4346

44-
# Aleth for end-to-end tests
45-
ARG ALETH_VERSION="1.6.0"
46-
ARG ALETH_HASH="7f7004e1563299bc57882e32b32e4a195747dfb6"
47-
ARG ALETH_URL="https://github.com/ethereum/aleth/releases/download/v${ALETH_VERSION}/aleth-${ALETH_VERSION}-linux-x86_64.tar.gz"
48-
RUN set -ex; \
49-
wget -q -O /tmp/aleth.tar.gz "${ALETH_URL}"; \
50-
test "$(shasum /tmp/aleth.tar.gz)" = "$ALETH_HASH /tmp/aleth.tar.gz"; \
51-
tar -xf /tmp/aleth.tar.gz -C /usr
47+
FROM base AS libraries
5248

5349
# Z3
5450
RUN set -ex; \
@@ -60,21 +56,23 @@ RUN set -ex; \
6056
ninja install/strip; \
6157
rm -rf /usr/src/z3
6258

63-
# OSSFUZZ: LPM package (do not remove build dirs as solidity compiles/links against that dir)
59+
# OSSFUZZ: libprotobuf-mutator
6460
RUN set -ex; \
65-
mkdir /src; \
66-
cd /src; \
67-
git clone https://github.com/google/libprotobuf-mutator.git; \
68-
cd libprotobuf-mutator; \
61+
git clone https://github.com/google/libprotobuf-mutator.git \
62+
/usr/src/libprotobuf-mutator; \
63+
cd /usr/src/libprotobuf-mutator; \
6964
git checkout d1fe8a7d8ae18f3d454f055eba5213c291986f21; \
70-
mkdir ../LPM; \
71-
cd ../LPM; \
72-
cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release; \
65+
mkdir build; \
66+
cd build; \
67+
cmake .. -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON \
68+
-DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release \
69+
-DCMAKE_INSTALL_PREFIX="/usr"; \
7370
ninja; \
7471
cp -vpr external.protobuf/bin/* /usr/bin/; \
7572
cp -vpr external.protobuf/include/* /usr/include/; \
7673
cp -vpr external.protobuf/lib/* /usr/lib/; \
77-
ninja install/strip
74+
ninja install/strip; \
75+
rm -rf /usr/src/libprotobuf-mutator
7876

7977
# OSSFUZZ: libfuzzer
8078
RUN set -ex; \
@@ -113,12 +111,16 @@ RUN set -ex; \
113111
# EVMONE
114112
RUN set -ex; \
115113
cd /usr/src; \
116-
git clone --branch="v0.1.0" --recurse-submodules https://github.com/chfast/evmone.git; \
114+
git clone --branch="v0.1.0" --recurse-submodules https://github.com/ethereum/evmone.git; \
117115
cd evmone; \
118116
mkdir build; \
119117
cd build; \
120-
cmake -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="/usr" ..; \
118+
cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ..; \
121119
ninja; \
122120
ninja install/strip; \
123121
rm -rf /usr/src/evmone
124122

123+
FROM base
124+
COPY --from=libraries /usr/lib /usr/lib
125+
COPY --from=libraries /usr/bin /usr/bin
126+
COPY --from=libraries /usr/include /usr/include

.circleci/soltest.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,17 @@ set -e
3636
OPTIMIZE=${OPTIMIZE:-"0"}
3737
EVM=${EVM:-"invalid"}
3838
WORKDIR=${CIRCLE_WORKING_DIRECTORY:-.}
39-
SOLTEST_IPC=${SOLTEST_IPC:-1}
4039
REPODIR="$(realpath $(dirname $0)/..)"
41-
ALETH_PATH="/usr/bin/aleth"
4240

4341
source "${REPODIR}/scripts/common.sh"
4442
# Test result output directory (CircleCI is reading test results from here)
4543
mkdir -p test_results
4644

47-
ALETH_PID=$(run_aleth)
48-
49-
function cleanup() {
50-
safe_kill $ALETH_PID $ALETH_PATH
51-
}
52-
trap cleanup INT TERM
53-
5445
# in case we run with ASAN enabled, we must increase stck size.
5546
ulimit -s 16384
5647

5748
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/$EVM.xml"
58-
SOLTEST_ARGS="--evm-version=$EVM --ipcpath "${WORKDIR}/geth.ipc" $flags"
59-
test "${SOLTEST_IPC}" = "1" || SOLTEST_ARGS="$SOLTEST_ARGS --no-ipc"
49+
SOLTEST_ARGS="--evm-version=$EVM --evmonepath /usr/lib/libevmone.so $flags"
6050
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize"
6151
test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2 --optimize-yul"
6252

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ include(EthPolicy)
1010
eth_policy()
1111

1212
# project name and version should be set after cmake_policy CMP0048
13-
set(PROJECT_VERSION "0.5.10")
14-
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX)
13+
set(PROJECT_VERSION "0.5.11")
14+
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
1515

1616
if (${CMAKE_VERSION} VERSION_LESS "3.9.0")
1717
# needed for the big endian test for older cmake versions

Changelog.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
### 0.5.11 (2019-08-12)
2+
3+
4+
Language Features:
5+
* Inline Assembly: Support direct constants of value type in inline assembly.
6+
7+
Compiler Features:
8+
* ABI: Additional internal type info in the field ``internalType``.
9+
* eWasm: Highly experimental eWasm output using ``--ewasm`` in the commandline interface or output selection of ``ewasm.wast`` in standard-json.
10+
* Metadata: Update the swarm hash to the current specification, changes ``bzzr0`` to ``bzzr1`` and urls to use ``bzz-raw://``.
11+
* Standard JSON Interface: Compile only selected sources and contracts.
12+
* Standard JSON Interface: Provide secondary error locations (e.g. the source position of other conflicting declarations).
13+
* SMTChecker: Do not erase knowledge about storage pointers if another storage pointer is assigned.
14+
* SMTChecker: Support string literal type.
15+
* Standard JSON Interface: Provide AST even on errors if ``--error-recovery`` commandline switch or StandardCompiler `settings.parserErrorRecovery` is true.
16+
* Yul Optimizer: Do not inline function if it would result in expressions being duplicated that are not cheap.
17+
18+
Bugfixes:
19+
* ABI decoder: Ensure that decoded arrays always point to distinct memory locations.
20+
* Code Generator: Treat dynamically encoded but statically sized arrays and structs in calldata properly.
21+
* SMTChecker: Fix internal error when inlining functions that contain tuple expressions.
22+
* SMTChecker: Fix pointer knowledge erasing in loops.
23+
* SMTChecker: Fix internal error when using compound bitwise assignment operators inside branches.
24+
* SMTChecker: Fix internal error when inlining a function that returns a tuple containing an unsupported type inside a branch.
25+
* SMTChecker: Fix internal error when inlining functions that use state variables and belong to a different source.
26+
* SMTChecker: Fix internal error when reporting counterexamples concerning state variables from different source files.
27+
* SMTChecker: Fix SMT sort mismatch when using string literals.
28+
* View/Pure Checker: Properly detect state variable access through base class.
29+
* Yul Analyzer: Check availability of data objects already in analysis phase.
30+
* Yul Optimizer: Fix an issue where memory-accessing code was removed even though ``msize`` was used in the program.
31+
32+
133
### 0.5.10 (2019-06-25)
234

335
Important Bugfixes:
@@ -6,7 +38,7 @@ Important Bugfixes:
638

739

840
Compiler Features:
9-
* Commandline Interface: Experimental parser error recovery via the ``--error-recovery`` commandline switch.
41+
* Commandline Interface: Experimental parser error recovery via the ``--error-recovery`` commandline switch or StandardCompiler `settings.parserErrorRecovery` boolean.
1042
* Optimizer: Add rule to simplify ``SUB(~0, X)`` to ``NOT(X)``.
1143
* Yul Optimizer: Make the optimizer work for all dialects of Yul including eWasm.
1244

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Solidity is a statically typed, contract-oriented, high-level language for imple
1717

1818
Solidity is a statically-typed curly-braces programming language designed for developing smart contracts
1919
that run on the Ethereum Virtual Machine. Smart contracts are programs that are executed inside a peer-to-peer
20-
network where nobody has special authority over the execution and thus they allow to implement tokens of value,
20+
network where nobody has special authority over the execution, and thus they allow to implement tokens of value,
2121
ownership, voting and other kinds of logics.
2222

2323
When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).
2424

2525
## Build and Install
2626

27-
Instructions about how to build and install the Solidity compiler can be found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source)
27+
Instructions about how to build and install the Solidity compiler can be found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source).
2828

2929

3030
## Example
@@ -61,10 +61,10 @@ Please follow the
6161
if you want to help.
6262

6363
## Maintainers
64-
[@axic](https://github.com/axic)
65-
[@chriseth](https://github.com/chriseth)
64+
* [@axic](https://github.com/axic)
65+
* [@chriseth](https://github.com/chriseth)
6666

6767
## License
68-
Solidity is licensed under [GNU General Public License v3.0](LICENSE.txt)
68+
Solidity is licensed under [GNU General Public License v3.0](LICENSE.txt).
6969

7070
Some third-party code has its [own licensing terms](cmake/templates/license.h.in).

ReleaseChecklist.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
### Release solc-js
4444
- [ ] Increment the version number, create a pull request for that, merge it after tests succeeded.
4545
- [ ] Run ``npm publish`` in the updated ``solc-js`` repository.
46+
- [ ] Make sure to push the tag ``npm publish`` created with ``git push --tags``.
4647

4748
### Post-release
4849
- [ ] Create a commit to increase the version number on ``develop`` in ``CMakeLists.txt`` and add a new skeleton changelog entry.

appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#
66
# http://solidity.readthedocs.org
77
#
8-
# TODO - Tests currently disabled, because Tests-over-IPC code is using UNIX
9-
# sockets unconditionally at the time of writing.
10-
#
118
# ------------------------------------------------------------------------------
129
# This file is part of solidity.
1310
#
@@ -71,7 +68,7 @@ build_script:
7168

7269
test_script:
7370
- cd %APPVEYOR_BUILD_FOLDER%\build\test\%CONFIGURATION%
74-
- soltest.exe --show-progress -- --testpath %APPVEYOR_BUILD_FOLDER%\test --no-ipc --no-smt
71+
- soltest.exe --show-progress -- --testpath %APPVEYOR_BUILD_FOLDER%\test --no-smt
7572
# Skip bytecode compare if private key is not available
7673
- cd %APPVEYOR_BUILD_FOLDER%
7774
- ps: if ($env:priv_key) {

0 commit comments

Comments
 (0)