Skip to content

Commit 51b20bc

Browse files
authored
Merge pull request #9915 from ethereum/develop
Merge develop into release for 0.7.2
2 parents f4a555b + da78529 commit 51b20bc

File tree

1,004 files changed

+13854
-3941
lines changed

Some content is hidden

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

1,004 files changed

+13854
-3941
lines changed

Diff for: .circleci/build_win.ps1

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
cd "$PSScriptRoot\.."
4+
5+
if ("$Env:FORCE_RELEASE") {
6+
New-Item prerelease.txt -type file
7+
Write-Host "Building release version."
8+
}
9+
10+
mkdir build
11+
cd build
12+
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
13+
..\deps\cmake\bin\cmake -G "Visual Studio 16 2019" -DBoost_DIR="$boost_dir\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="$PSScriptRoot\..\upload" ..
14+
if ( -not $? ) { throw "CMake configure failed." }
15+
msbuild solidity.sln /p:Configuration=Release /m:5 /v:minimal
16+
if ( -not $? ) { throw "Build failed." }
17+
..\deps\cmake\bin\cmake --build . -j 5 --target install --config Release
18+
if ( -not $? ) { throw "Install target failed." }

Diff for: .circleci/config.yml

+114-13
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@ version: 2.1
99
parameters:
1010
ubuntu-1804-docker-image:
1111
type: string
12-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1804-2
13-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:9ab317e583c395e50884ba82e9f99811c374344cea4c550725be8ec836e07acc"
12+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1804-3
13+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:19f613d2ac47fedff654dacef984d8a64726c4d67ae8f2667a85ee7d97ac4c1c"
1414
ubuntu-2004-docker-image:
1515
type: string
16-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-2
17-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:cbfa42d8ecbe94391ba8837e218869242666de7a0da6ccac065a856c85b6a6a0"
16+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-3
17+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:aeedbe7390a7383815f0cf0f8a1b8bf84dc5e334a3b0043ebcdf8b1bdbe80a81"
1818
ubuntu-2004-clang-docker-image:
1919
type: string
20-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-2
21-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:7a4d5271b5552139d9f2caefc50d42f401bf74132cf8f253e199e11c80ab42de"
20+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-3
21+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:2593c15689dee5b5bdfff96a36c8c68a468cd3b147c41f75b820b8fabc257be9"
2222
ubuntu-1604-clang-ossfuzz-docker-image:
2323
type: string
24-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-3
25-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:6fa6914bd81abcac4b162c738e6ff05d87cefe7655e3859c7a827e5a8ec20dc7"
24+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-4
25+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:842126b164b3542f05bff2611459e21edc7e3e2c81ca9d1f43396c8cf066f7ca"
2626
emscripten-docker-image:
2727
type: string
28-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc"
28+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:23dad3b34deae8107c8551804ef299f6a89c23ed506e8118fac151e2bdc9018c"
29+
30+
orbs:
31+
win: circleci/[email protected]
2932

3033
defaults:
3134

@@ -64,6 +67,10 @@ defaults:
6467
path: build/solc/solc
6568
destination: solc
6669

70+
# windows artifacts
71+
- artifact_solc_windows: &artifact_solc_windows
72+
path: upload/
73+
6774
# compiled tool executable target
6875
- artifacts_tools: &artifacts_tools
6976
path: build/tools/solidity-upgrade
@@ -107,14 +114,17 @@ defaults:
107114

108115
- run_soltest: &run_soltest
109116
name: soltest
117+
no_output_timeout: 30m
110118
command: ./.circleci/soltest.sh
111119

112120
- run_soltest_all: &run_soltest_all
113121
name: soltest_all
122+
no_output_timeout: 30m
114123
command: ./.circleci/soltest_all.sh
115124

116125
- run_cmdline_tests: &run_cmdline_tests
117126
name: command line tests
127+
no_output_timeout: 30m
118128
command: ./test/cmdlineTests.sh
119129

120130
- run_docs_pragma_min_version: &run_docs_pragma_min_version
@@ -163,7 +173,6 @@ defaults:
163173
at: build
164174
- run:
165175
<<: *run_soltest
166-
no_output_timeout: 30m
167176
- store_test_results: *store_test_results
168177
- store_artifacts: *artifacts_test_results
169178

@@ -175,7 +184,6 @@ defaults:
175184
at: build
176185
- run:
177186
<<: *run_soltest
178-
no_output_timeout: 30m
179187
- store_test_results: *store_test_results
180188
- store_artifacts: *artifacts_test_results
181189

@@ -207,6 +215,11 @@ defaults:
207215
requires:
208216
- b_ubu_release
209217

218+
- workflow_archlinux: &workflow_archlinux
219+
<<: *workflow_trigger_on_tags
220+
requires:
221+
- b_archlinux
222+
210223
- workflow_ubuntu2004_codecov: &workflow_ubuntu2004_codecov
211224
<<: *workflow_trigger_on_tags
212225
requires:
@@ -237,6 +250,16 @@ defaults:
237250
requires:
238251
- b_ubu_ossfuzz
239252

253+
- workflow_win: &workflow_win
254+
<<: *workflow_trigger_on_tags
255+
requires:
256+
- b_win
257+
258+
- workflow_win_release: &workflow_win_release
259+
<<: *workflow_trigger_on_tags
260+
requires:
261+
- b_win_release
262+
240263
# --------------------------------------------------------------------------
241264
# Notification Templates
242265
- gitter_notify_failure: &gitter_notify_failure
@@ -656,6 +679,25 @@ jobs:
656679
t_ubu_soltest: &t_ubu_soltest
657680
<<: *test_ubuntu2004
658681

682+
t_archlinux_soltest: &t_archlinux_soltest
683+
docker:
684+
- image: archlinux/base
685+
environment:
686+
EVM: constantinople
687+
OPTIMIZE: 0
688+
TERM: xterm
689+
steps:
690+
- run:
691+
name: Install runtime dependencies
692+
command: |
693+
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
694+
- checkout
695+
- attach_workspace:
696+
at: build
697+
- run: *run_soltest
698+
- store_test_results: *store_test_results
699+
- store_artifacts: *artifacts_test_results
700+
659701
t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
660702
docker:
661703
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
@@ -709,7 +751,6 @@ jobs:
709751
at: build
710752
- run:
711753
<<: *run_cmdline_tests
712-
no_output_timeout: 30m
713754
- store_test_results: *store_test_results
714755
- store_artifacts: *artifacts_test_results
715756

@@ -745,6 +786,7 @@ jobs:
745786
apt-get install -qqy --no-install-recommends nodejs npm cvc4
746787
- run:
747788
name: Test solcjs
789+
no_output_timeout: 30m
748790
command: |
749791
node --version
750792
npm --version
@@ -851,6 +893,56 @@ jobs:
851893
- run: *gitter_notify_failure
852894
- run: *gitter_notify_success
853895

896+
b_win: &b_win
897+
executor:
898+
name: win/default
899+
shell: powershell.exe
900+
steps:
901+
- checkout
902+
- restore_cache:
903+
keys:
904+
- dependencies-win-{{ checksum "scripts/install_deps.ps1" }}
905+
- run:
906+
name: "Installing dependencies"
907+
command: if ( -not (Test-Path .\deps\boost) ) { .\scripts\install_deps.ps1 }
908+
- save_cache:
909+
key: dependencies-win-{{ checksum "scripts/install_deps.ps1" }}
910+
paths:
911+
- .\deps\boost
912+
- .\deps\cmake
913+
- run:
914+
name: "Building solidity"
915+
command: .circleci/build_win.ps1
916+
- run:
917+
name: "Run solc.exe to make sure build was successful."
918+
command: .\build\solc\Release\solc.exe --version
919+
- store_artifacts: *artifact_solc_windows
920+
- persist_to_workspace: *artifacts_build_dir
921+
922+
b_win_release:
923+
<<: *b_win
924+
environment:
925+
FORCE_RELEASE: ON
926+
927+
t_win: &t_win
928+
executor:
929+
name: win/default
930+
shell: powershell.exe
931+
steps:
932+
- checkout
933+
- attach_workspace:
934+
at: build
935+
- run:
936+
name: "Install evmone"
937+
command: scripts/install_evmone.ps1
938+
- run:
939+
name: "Run soltest"
940+
command: .circleci/soltest.ps1
941+
- store_artifacts: *artifacts_test_results
942+
943+
t_win_release:
944+
<<: *t_win
945+
854946
workflows:
855947
version: 2
856948

@@ -869,7 +961,6 @@ workflows:
869961

870962
# build-only
871963
- b_docs: *workflow_trigger_on_tags
872-
- b_archlinux: *workflow_trigger_on_tags
873964
- b_ubu_cxx20: *workflow_trigger_on_tags
874965
- b_ubu_ossfuzz: *workflow_trigger_on_tags
875966

@@ -878,6 +969,10 @@ workflows:
878969
- t_osx_cli: *workflow_osx
879970
- t_osx_soltest: *workflow_osx
880971

972+
# ArchLinux build and tests
973+
- b_archlinux: *workflow_trigger_on_tags
974+
- t_archlinux_soltest: *workflow_archlinux
975+
881976
# Ubuntu build and tests
882977
- b_ubu: *workflow_trigger_on_tags
883978
- b_ubu18: *workflow_trigger_on_tags
@@ -899,6 +994,12 @@ workflows:
899994
- t_ems_compile_ext_gnosis: *workflow_emscripten
900995
- t_ems_compile_ext_zeppelin: *workflow_emscripten
901996

997+
# Windows build and tests
998+
- b_win: *workflow_trigger_on_tags
999+
- b_win_release: *workflow_trigger_on_tags
1000+
- t_win: *workflow_win
1001+
- t_win_release: *workflow_win_release
1002+
9021003
nightly:
9031004

9041005
triggers:

Diff for: .circleci/osx_install_dependencies.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ then
4343
./scripts/install_obsolete_jsoncpp_1_7_4.sh
4444

4545
# z3
46-
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-osx-10.14.6.zip
47-
unzip z3-4.8.8-x64-osx-10.14.6.zip
48-
rm -f z3-4.8.8-x64-osx-10.14.6.zip
49-
cp z3-4.8.8-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
50-
cp z3-4.8.8-x64-osx-10.14.6/bin/z3 /usr/local/bin
51-
cp z3-4.8.8-x64-osx-10.14.6/include/* /usr/local/include
52-
rm -rf z3-4.8.8-x64-osx-10.14.6
46+
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.9/z3-4.8.9-x64-osx-10.14.6.zip
47+
unzip z3-4.8.9-x64-osx-10.14.6.zip
48+
rm -f z3-4.8.9-x64-osx-10.14.6.zip
49+
cp z3-4.8.9-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
50+
cp z3-4.8.9-x64-osx-10.14.6/bin/z3 /usr/local/bin
51+
cp z3-4.8.9-x64-osx-10.14.6/include/* /usr/local/include
52+
rm -rf z3-4.8.9-x64-osx-10.14.6
5353

5454
# evmone
5555
wget https://github.com/ethereum/evmone/releases/download/v0.4.0/evmone-0.4.0-darwin-x86_64.tar.gz

Diff for: .circleci/soltest.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
cd "$PSScriptRoot\.."
4+
5+
.\build\solc\Release\solc.exe --version
6+
if ( -not $? ) { throw "Cannot execute solc --version." }
7+
8+
mkdir test_results
9+
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result.xml -- --no-smt
10+
if ( -not $? ) { throw "Unoptimized soltest run failed." }
11+
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result_opt.xml -- --optimize --no-smt
12+
if ( -not $? ) { throw "Optimized soltest run failed." }

Diff for: .circleci/soltest_all.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ REPODIR="$(realpath $(dirname $0)/..)"
3030

3131
EVM_VALUES=(homestead byzantium constantinople petersburg istanbul)
3232
OPTIMIZE_VALUES=(0 1)
33-
STEPS=$(( 1 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))
33+
STEPS=$(( 2 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))
3434

3535
if (( $CIRCLE_NODE_TOTAL )) && (( $CIRCLE_NODE_TOTAL > 1 ))
3636
then
@@ -57,7 +57,12 @@ echo "Running steps $RUN_STEPS..."
5757

5858
STEP=1
5959

60-
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 "${REPODIR}/.circleci/soltest.sh"
60+
# Run SMTChecker tests separately, as the heaviest expected run.
61+
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 BOOST_TEST_ARGS="-t smtCheckerTests/*" "${REPODIR}/.circleci/soltest.sh"
62+
STEP=$(($STEP + 1))
63+
64+
# Run without SMTChecker tests.
65+
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 BOOST_TEST_ARGS="-t !smtCheckerTests" "${REPODIR}/.circleci/soltest.sh"
6166
STEP=$(($STEP + 1))
6267

6368
for OPTIMIZE in ${OPTIMIZE_VALUES[@]}

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ matrix:
113113
before_install:
114114
- nvm install 10
115115
- nvm use 10
116-
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc
116+
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:23dad3b34deae8107c8551804ef299f6a89c23ed506e8118fac151e2bdc9018c
117117
env:
118118
- SOLC_EMSCRIPTEN=On
119119
- SOLC_INSTALL_DEPS_TRAVIS=Off

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(EthPolicy)
1010
eth_policy()
1111

1212
# project name and version should be set after cmake_policy CMP0048
13-
set(PROJECT_VERSION "0.7.1")
13+
set(PROJECT_VERSION "0.7.2")
1414
# OSX target needed in order to support std::visit
1515
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
1616
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)

Diff for: Changelog.md

+41
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
### 0.7.2 (2020-09-28)
2+
3+
Important Bugfixes:
4+
* Type Checker: Disallow two or more free functions with identical name (potentially imported and aliased) and parameter types.
5+
6+
7+
Compiler Features:
8+
* Export compiler-generated utility sources via standard-json or combined-json.
9+
* Optimizer: Optimize ``exp`` when base is 0, 1 or 2.
10+
* SMTChecker: Keep knowledge about string literals, even through assignment, and thus support the ``.length`` property properly.
11+
* SMTChecker: Support ``address`` type conversion with literals, e.g. ``address(0)``.
12+
* SMTChecker: Support ``revert()``.
13+
* SMTChecker: Support ``type(T).min``, ``type(T).max``, and ``type(I).interfaceId``.
14+
* SMTChecker: Support compound and, or, and xor operators.
15+
* SMTChecker: Support events and low-level logs.
16+
* SMTChecker: Support fixed bytes index access.
17+
* SMTChecker: Support memory allocation, e.g. ``new bytes(123)``.
18+
* SMTChecker: Support shifts.
19+
* SMTChecker: Support structs.
20+
* Type Checker: Explain why oversized hex string literals can not be explicitly converted to a shorter ``bytesNN`` type.
21+
* Type Checker: More detailed error messages why implicit conversions fail.
22+
* Type Checker: Report position of first invalid UTF-8 sequence in ``unicode""`` literals.
23+
* Yul IR Generator: Report source locations related to unimplemented features.
24+
* Yul Optimizer: Inline into functions further down in the call graph first.
25+
* Yul Optimizer: Prune unused parameters in functions.
26+
* Yul Optimizer: Try to simplify function names.
27+
28+
29+
Bugfixes:
30+
* Code generator: Fix internal error on stripping dynamic types from return parameters on EVM versions without ``RETURNDATACOPY``.
31+
* Type Checker: Add missing check against nested dynamic arrays in ABI encoding functions when ABIEncoderV2 is disabled.
32+
* Type Checker: Correct the error message for invalid named parameter in a call to refer to the right argument.
33+
* Type Checker: Correct the warning for homonymous, but not shadowing declarations.
34+
* Type Checker: Disallow ``virtual`` for modifiers in libraries.
35+
* Type system: Fix internal error on implicit conversion of contract instance to the type of its ``super``.
36+
* Type system: Fix internal error on implicit conversion of string literal to a calldata string.
37+
* Type system: Fix named parameters in overloaded function and event calls being matched incorrectly if the order differs from the declaration.
38+
* ViewPureChecker: Prevent visibility check on constructors.
39+
40+
141
### 0.7.1 (2020-09-02)
242

343
Language Features:
@@ -26,6 +66,7 @@ Bugfixes:
2666
* SMTChecker: Fix internal error on lvalue unary operators with tuples.
2767
* SMTChecker: Fix internal error on tuple assignment.
2868
* SMTChecker: Fix internal error on tuples of one element that have tuple type.
69+
* SMTChecker: Fix internal error when using imported code.
2970
* SMTChecker: Fix soundness of array ``pop``.
3071
* Type Checker: Disallow ``using for`` directive inside interfaces.
3172
* Type Checker: Disallow signed literals as exponent in exponentiation operator.

0 commit comments

Comments
 (0)