Skip to content

Commit

Permalink
Merge pull request #9915 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.7.2
  • Loading branch information
chriseth authored Sep 28, 2020
2 parents f4a555b + da78529 commit 51b20bc
Show file tree
Hide file tree
Showing 1,004 changed files with 13,854 additions and 3,941 deletions.
18 changes: 18 additions & 0 deletions .circleci/build_win.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$ErrorActionPreference = "Stop"

cd "$PSScriptRoot\.."

if ("$Env:FORCE_RELEASE") {
New-Item prerelease.txt -type file
Write-Host "Building release version."
}

mkdir build
cd build
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
..\deps\cmake\bin\cmake -G "Visual Studio 16 2019" -DBoost_DIR="$boost_dir\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="$PSScriptRoot\..\upload" ..
if ( -not $? ) { throw "CMake configure failed." }
msbuild solidity.sln /p:Configuration=Release /m:5 /v:minimal
if ( -not $? ) { throw "Build failed." }
..\deps\cmake\bin\cmake --build . -j 5 --target install --config Release
if ( -not $? ) { throw "Install target failed." }
127 changes: 114 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@ version: 2.1
parameters:
ubuntu-1804-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1804-2
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:9ab317e583c395e50884ba82e9f99811c374344cea4c550725be8ec836e07acc"
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1804-3
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:19f613d2ac47fedff654dacef984d8a64726c4d67ae8f2667a85ee7d97ac4c1c"
ubuntu-2004-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-2
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:cbfa42d8ecbe94391ba8837e218869242666de7a0da6ccac065a856c85b6a6a0"
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-3
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:aeedbe7390a7383815f0cf0f8a1b8bf84dc5e334a3b0043ebcdf8b1bdbe80a81"
ubuntu-2004-clang-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-2
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:7a4d5271b5552139d9f2caefc50d42f401bf74132cf8f253e199e11c80ab42de"
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-3
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:2593c15689dee5b5bdfff96a36c8c68a468cd3b147c41f75b820b8fabc257be9"
ubuntu-1604-clang-ossfuzz-docker-image:
type: string
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-3
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:6fa6914bd81abcac4b162c738e6ff05d87cefe7655e3859c7a827e5a8ec20dc7"
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-4
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:842126b164b3542f05bff2611459e21edc7e3e2c81ca9d1f43396c8cf066f7ca"
emscripten-docker-image:
type: string
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc"
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:23dad3b34deae8107c8551804ef299f6a89c23ed506e8118fac151e2bdc9018c"

orbs:
win: circleci/[email protected]

defaults:

Expand Down Expand Up @@ -64,6 +67,10 @@ defaults:
path: build/solc/solc
destination: solc

# windows artifacts
- artifact_solc_windows: &artifact_solc_windows
path: upload/

# compiled tool executable target
- artifacts_tools: &artifacts_tools
path: build/tools/solidity-upgrade
Expand Down Expand Up @@ -107,14 +114,17 @@ defaults:

- run_soltest: &run_soltest
name: soltest
no_output_timeout: 30m
command: ./.circleci/soltest.sh

- run_soltest_all: &run_soltest_all
name: soltest_all
no_output_timeout: 30m
command: ./.circleci/soltest_all.sh

- run_cmdline_tests: &run_cmdline_tests
name: command line tests
no_output_timeout: 30m
command: ./test/cmdlineTests.sh

- run_docs_pragma_min_version: &run_docs_pragma_min_version
Expand Down Expand Up @@ -163,7 +173,6 @@ defaults:
at: build
- run:
<<: *run_soltest
no_output_timeout: 30m
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results

Expand All @@ -175,7 +184,6 @@ defaults:
at: build
- run:
<<: *run_soltest
no_output_timeout: 30m
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results

Expand Down Expand Up @@ -207,6 +215,11 @@ defaults:
requires:
- b_ubu_release

- workflow_archlinux: &workflow_archlinux
<<: *workflow_trigger_on_tags
requires:
- b_archlinux

- workflow_ubuntu2004_codecov: &workflow_ubuntu2004_codecov
<<: *workflow_trigger_on_tags
requires:
Expand Down Expand Up @@ -237,6 +250,16 @@ defaults:
requires:
- b_ubu_ossfuzz

- workflow_win: &workflow_win
<<: *workflow_trigger_on_tags
requires:
- b_win

- workflow_win_release: &workflow_win_release
<<: *workflow_trigger_on_tags
requires:
- b_win_release

# --------------------------------------------------------------------------
# Notification Templates
- gitter_notify_failure: &gitter_notify_failure
Expand Down Expand Up @@ -656,6 +679,25 @@ jobs:
t_ubu_soltest: &t_ubu_soltest
<<: *test_ubuntu2004

t_archlinux_soltest: &t_archlinux_soltest
docker:
- image: archlinux/base
environment:
EVM: constantinople
OPTIMIZE: 0
TERM: xterm
steps:
- run:
name: Install runtime dependencies
command: |
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
- checkout
- attach_workspace:
at: build
- run: *run_soltest
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results

t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
docker:
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
Expand Down Expand Up @@ -709,7 +751,6 @@ jobs:
at: build
- run:
<<: *run_cmdline_tests
no_output_timeout: 30m
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results

Expand Down Expand Up @@ -745,6 +786,7 @@ jobs:
apt-get install -qqy --no-install-recommends nodejs npm cvc4
- run:
name: Test solcjs
no_output_timeout: 30m
command: |
node --version
npm --version
Expand Down Expand Up @@ -851,6 +893,56 @@ jobs:
- run: *gitter_notify_failure
- run: *gitter_notify_success

b_win: &b_win
executor:
name: win/default
shell: powershell.exe
steps:
- checkout
- restore_cache:
keys:
- dependencies-win-{{ checksum "scripts/install_deps.ps1" }}
- run:
name: "Installing dependencies"
command: if ( -not (Test-Path .\deps\boost) ) { .\scripts\install_deps.ps1 }
- save_cache:
key: dependencies-win-{{ checksum "scripts/install_deps.ps1" }}
paths:
- .\deps\boost
- .\deps\cmake
- run:
name: "Building solidity"
command: .circleci/build_win.ps1
- run:
name: "Run solc.exe to make sure build was successful."
command: .\build\solc\Release\solc.exe --version
- store_artifacts: *artifact_solc_windows
- persist_to_workspace: *artifacts_build_dir

b_win_release:
<<: *b_win
environment:
FORCE_RELEASE: ON

t_win: &t_win
executor:
name: win/default
shell: powershell.exe
steps:
- checkout
- attach_workspace:
at: build
- run:
name: "Install evmone"
command: scripts/install_evmone.ps1
- run:
name: "Run soltest"
command: .circleci/soltest.ps1
- store_artifacts: *artifacts_test_results

t_win_release:
<<: *t_win

workflows:
version: 2

Expand All @@ -869,7 +961,6 @@ workflows:

# build-only
- b_docs: *workflow_trigger_on_tags
- b_archlinux: *workflow_trigger_on_tags
- b_ubu_cxx20: *workflow_trigger_on_tags
- b_ubu_ossfuzz: *workflow_trigger_on_tags

Expand All @@ -878,6 +969,10 @@ workflows:
- t_osx_cli: *workflow_osx
- t_osx_soltest: *workflow_osx

# ArchLinux build and tests
- b_archlinux: *workflow_trigger_on_tags
- t_archlinux_soltest: *workflow_archlinux

# Ubuntu build and tests
- b_ubu: *workflow_trigger_on_tags
- b_ubu18: *workflow_trigger_on_tags
Expand All @@ -899,6 +994,12 @@ workflows:
- t_ems_compile_ext_gnosis: *workflow_emscripten
- t_ems_compile_ext_zeppelin: *workflow_emscripten

# Windows build and tests
- b_win: *workflow_trigger_on_tags
- b_win_release: *workflow_trigger_on_tags
- t_win: *workflow_win
- t_win_release: *workflow_win_release

nightly:

triggers:
Expand Down
14 changes: 7 additions & 7 deletions .circleci/osx_install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ then
./scripts/install_obsolete_jsoncpp_1_7_4.sh

# z3
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-osx-10.14.6.zip
unzip z3-4.8.8-x64-osx-10.14.6.zip
rm -f z3-4.8.8-x64-osx-10.14.6.zip
cp z3-4.8.8-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
cp z3-4.8.8-x64-osx-10.14.6/bin/z3 /usr/local/bin
cp z3-4.8.8-x64-osx-10.14.6/include/* /usr/local/include
rm -rf z3-4.8.8-x64-osx-10.14.6
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.9/z3-4.8.9-x64-osx-10.14.6.zip
unzip z3-4.8.9-x64-osx-10.14.6.zip
rm -f z3-4.8.9-x64-osx-10.14.6.zip
cp z3-4.8.9-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
cp z3-4.8.9-x64-osx-10.14.6/bin/z3 /usr/local/bin
cp z3-4.8.9-x64-osx-10.14.6/include/* /usr/local/include
rm -rf z3-4.8.9-x64-osx-10.14.6

# evmone
wget https://github.com/ethereum/evmone/releases/download/v0.4.0/evmone-0.4.0-darwin-x86_64.tar.gz
Expand Down
12 changes: 12 additions & 0 deletions .circleci/soltest.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$ErrorActionPreference = "Stop"

cd "$PSScriptRoot\.."

.\build\solc\Release\solc.exe --version
if ( -not $? ) { throw "Cannot execute solc --version." }

mkdir test_results
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result.xml -- --no-smt
if ( -not $? ) { throw "Unoptimized soltest run failed." }
.\build\test\Release\soltest.exe --color_output=no --show_progress=yes --logger=JUNIT,error,test_results/result_opt.xml -- --optimize --no-smt
if ( -not $? ) { throw "Optimized soltest run failed." }
9 changes: 7 additions & 2 deletions .circleci/soltest_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ REPODIR="$(realpath $(dirname $0)/..)"

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

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

STEP=1

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

# Run without SMTChecker tests.
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 BOOST_TEST_ARGS="-t !smtCheckerTests" "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))

for OPTIMIZE in ${OPTIMIZE_VALUES[@]}
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ matrix:
before_install:
- nvm install 10
- nvm use 10
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:23dad3b34deae8107c8551804ef299f6a89c23ed506e8118fac151e2bdc9018c
env:
- SOLC_EMSCRIPTEN=On
- SOLC_INSTALL_DEPS_TRAVIS=Off
Expand Down
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.7.1")
set(PROJECT_VERSION "0.7.2")
# OSX target needed in order to support std::visit
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
Expand Down
41 changes: 41 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
### 0.7.2 (2020-09-28)

Important Bugfixes:
* Type Checker: Disallow two or more free functions with identical name (potentially imported and aliased) and parameter types.


Compiler Features:
* Export compiler-generated utility sources via standard-json or combined-json.
* Optimizer: Optimize ``exp`` when base is 0, 1 or 2.
* SMTChecker: Keep knowledge about string literals, even through assignment, and thus support the ``.length`` property properly.
* SMTChecker: Support ``address`` type conversion with literals, e.g. ``address(0)``.
* SMTChecker: Support ``revert()``.
* SMTChecker: Support ``type(T).min``, ``type(T).max``, and ``type(I).interfaceId``.
* SMTChecker: Support compound and, or, and xor operators.
* SMTChecker: Support events and low-level logs.
* SMTChecker: Support fixed bytes index access.
* SMTChecker: Support memory allocation, e.g. ``new bytes(123)``.
* SMTChecker: Support shifts.
* SMTChecker: Support structs.
* Type Checker: Explain why oversized hex string literals can not be explicitly converted to a shorter ``bytesNN`` type.
* Type Checker: More detailed error messages why implicit conversions fail.
* Type Checker: Report position of first invalid UTF-8 sequence in ``unicode""`` literals.
* Yul IR Generator: Report source locations related to unimplemented features.
* Yul Optimizer: Inline into functions further down in the call graph first.
* Yul Optimizer: Prune unused parameters in functions.
* Yul Optimizer: Try to simplify function names.


Bugfixes:
* Code generator: Fix internal error on stripping dynamic types from return parameters on EVM versions without ``RETURNDATACOPY``.
* Type Checker: Add missing check against nested dynamic arrays in ABI encoding functions when ABIEncoderV2 is disabled.
* Type Checker: Correct the error message for invalid named parameter in a call to refer to the right argument.
* Type Checker: Correct the warning for homonymous, but not shadowing declarations.
* Type Checker: Disallow ``virtual`` for modifiers in libraries.
* Type system: Fix internal error on implicit conversion of contract instance to the type of its ``super``.
* Type system: Fix internal error on implicit conversion of string literal to a calldata string.
* Type system: Fix named parameters in overloaded function and event calls being matched incorrectly if the order differs from the declaration.
* ViewPureChecker: Prevent visibility check on constructors.


### 0.7.1 (2020-09-02)

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

0 comments on commit 51b20bc

Please sign in to comment.