Skip to content

Commit

Permalink
Merge pull request #9467 from ethereum/develop
Browse files Browse the repository at this point in the history
Merge develop into release for 0.6.12
  • Loading branch information
chriseth committed Jul 22, 2020
2 parents 5ef660b + 4a478f0 commit 27d5176
Show file tree
Hide file tree
Showing 721 changed files with 4,584 additions and 1,001 deletions.
71 changes: 33 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
# - ems: Emscripten
version: 2.1
parameters:
ubuntu-1804-docker-image-rev:
ubuntu-1804-docker-image:
type: string
default: "4"
ubuntu-2004-docker-image-rev:
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:4484ac3da8fdc337cc77a7a7be1af71cd0f28f9c890d934f1d6ae7532beb66b1"
ubuntu-2004-docker-image:
type: string
default: "2"
ubuntu-2004-clang-docker-image-rev:
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:48b5bb6b91ac7dddfe9345c88876ebed126c652258800f114caed69db73b29bf"
ubuntu-2004-clang-docker-image:
type: string
default: "2"
ubuntu-1604-clang-ossfuzz-docker-image-rev:
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d8775de58167db5a11690fdb6ef639317fe1e579ec5d46e9732d2d903b55d135"
ubuntu-1604-clang-ossfuzz-docker-image:
type: string
default: "2"
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:db52f3257396814215744a19904e42c07e040ab36b68be72a27ba71ad2f1083c"
emscripten-docker-image:
type: string
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc"

defaults:

Expand All @@ -33,26 +36,11 @@ defaults:
- run_build: &run_build
name: Build
command: |
set -ex
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
echo -n "$CIRCLE_SHA1" > commit_hash.txt
mkdir -p build
cd build
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS -G "Unix Makefiles"
make -j4
command: scripts/ci/build.sh

- run_build_ossfuzz: &run_build_ossfuzz
name: Build_ossfuzz
command: |
mkdir -p build
cd build
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
protoc --proto_path=../test/tools/ossfuzz solProto.proto --cpp_out=../test/tools/ossfuzz
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j4
command: scripts/ci/build_ossfuzz.sh

- run_proofs: &run_proofs
name: Correctness proofs for optimization rules
Expand Down Expand Up @@ -97,6 +85,7 @@ defaults:
- test/tools/ossfuzz/strictasm_diff_ossfuzz
- test/tools/ossfuzz/strictasm_opt_ossfuzz
- test/tools/ossfuzz/yul_proto_diff_ossfuzz
- test/tools/ossfuzz/yul_proto_diff_custom_mutate_ossfuzz
- test/tools/ossfuzz/yul_proto_ossfuzz
- test/tools/ossfuzz/sol_proto_ossfuzz

Expand Down Expand Up @@ -130,7 +119,7 @@ defaults:

- test_ubuntu1604_clang: &test_ubuntu1604_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
steps:
- checkout
- attach_workspace:
Expand All @@ -141,7 +130,7 @@ defaults:

- test_ubuntu2004_clang: &test_ubuntu2004_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
steps:
- checkout
- attach_workspace:
Expand All @@ -152,7 +141,8 @@ defaults:

- test_ubuntu2004: &test_ubuntu2004
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
parallelism: 6
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -387,7 +377,7 @@ jobs:

chk_docs_pragma_min_version:
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment:
TERM: xterm
steps:
Expand All @@ -396,7 +386,7 @@ jobs:

b_ubu_clang: &build_ubuntu2004_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
environment:
CC: clang
CXX: clang++
Expand All @@ -409,7 +399,7 @@ jobs:

b_ubu_asan_clang: &build_ubuntu2004_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
environment:
CC: clang
CXX: clang++
Expand All @@ -421,8 +411,11 @@ jobs:
- persist_to_workspace: *artifacts_executables

b_ubu: &build_ubuntu2004
resource_class: xlarge
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment:
MAKEFLAGS: -j 10
steps:
- checkout
- run: *run_build
Expand All @@ -437,7 +430,7 @@ jobs:

b_ubu18: &build_ubuntu1804
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1804-<< pipeline.parameters.ubuntu-1804-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-1804-docker-image >>
environment:
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
CMAKE_BUILD_TYPE: RelWithDebugInfo
Expand Down Expand Up @@ -491,7 +484,7 @@ jobs:

b_ubu_ossfuzz: &build_ubuntu1604_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
environment:
CC: clang
CXX: clang++
Expand Down Expand Up @@ -597,9 +590,11 @@ jobs:
- store_artifacts: *artifacts_test_results

b_ems:
resource_class: xlarge
docker:
- image: ethereum/solidity-buildpack-deps:emsdk-1.39.15-2
- image: << pipeline.parameters.emscripten-docker-image >>
environment:
MAKEFLAGS: -j 10
TERM: xterm
steps:
- checkout
Expand Down Expand Up @@ -633,7 +628,7 @@ jobs:

b_docs:
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
steps:
- checkout
- run: *setup_prerelease_commit_hash
Expand All @@ -649,7 +644,7 @@ jobs:

t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment:
EVM: constantinople
SOLTEST_FLAGS: --enforce-via-yul
Expand All @@ -675,7 +670,7 @@ jobs:

t_ubu_cli: &t_ubu_cli
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
environment:
TERM: xterm
steps:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/soltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ get_logfile_basename() {
echo -ne "${filename}"
}

BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml"
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml ${BOOST_TEST_ARGS}"
SOLTEST_ARGS="--evm-version=$EVM $SOLTEST_FLAGS"
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize"
test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2"
Expand Down
47 changes: 43 additions & 4 deletions .circleci/soltest_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,49 @@ set -e

REPODIR="$(realpath $(dirname $0)/..)"

for OPTIMIZE in 0 1; do
for EVM in homestead byzantium constantinople petersburg istanbul; do
EVM=$EVM OPTIMIZE=$OPTIMIZE ${REPODIR}/.circleci/soltest.sh
EVM_VALUES=(homestead byzantium constantinople petersburg istanbul)
OPTIMIZE_VALUES=(0 1)
STEPS=$(( 1 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))

if (( $CIRCLE_NODE_TOTAL )) && (( $CIRCLE_NODE_TOTAL > 1 ))
then
# Run step 1 as the only step on the first executor
# and evenly distribute the other steps among
# the other executors.
# The first step takes much longer than the other steps.
if (( $CIRCLE_NODE_INDEX == 0 ))
then
RUN_STEPS="1"
else
export CIRCLE_NODE_INDEX=$(($CIRCLE_NODE_INDEX - 1))
export CIRCLE_NODE_TOTAL=$(($CIRCLE_NODE_TOTAL - 1))
RUN_STEPS=$(seq 2 "$STEPS" | circleci tests split)
fi
else
RUN_STEPS=$(seq "$STEPS")
fi

# turn newlines into spaces
RUN_STEPS=$(echo $RUN_STEPS)

echo "Running steps $RUN_STEPS..."

STEP=1

[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))

for OPTIMIZE in ${OPTIMIZE_VALUES[@]}
do
for EVM in ${EVM_VALUES[@]}
do
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM="$EVM" OPTIMIZE="$OPTIMIZE" BOOST_TEST_ARGS="-t !@nooptions" "${REPODIR}/.circleci/soltest.sh"
STEP=$(($STEP + 1))
done
done

EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
if (($STEP != $STEPS + 1))
then
echo "Step counter not properly adjusted!" >2
exit 1
fi
43 changes: 43 additions & 0 deletions .github/workflows/buildpack-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: buildpack-deps

on:
pull_request:
branches: [ develop ]
paths:
- 'scripts/docker/buildpack-deps/Dockerfile.emscripten'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1804'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang'
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004'

jobs:
buildpack-deps:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKER_REPOSITORY: solbuildpackpusher/solidity-buildpack-deps
IMAGE_NAME: buildpack-deps

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
image_variant: [emscripten, ubuntu1604.clang.ossfuzz, ubuntu1804, ubuntu2004.clang, ubuntu2004]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Upgrade ${{ env.IMAGE_NAME }}-${{ matrix.image_variant }}
run: |
echo ${DOCKERHUB_TOKEN} | docker login -u solbuildpackpusher --password-stdin
scripts/ci/docker_upgrade.sh ${{ env.IMAGE_NAME }} ${{ matrix.image_variant }} ${{ env.DOCKER_REPOSITORY }}
docker logout
- name: comment PR
if: "env.DOCKER_IMAGE"
uses: aarlt/comment-on-pr@v1.2.0
with:
msg: "`${{ env.DOCKER_IMAGE }} ${{ env.DOCKER_REPO_DIGEST }}`."
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ prerelease.txt

# Build directory
build/
build*/
/build*/
emscripten_build/
docs/_build
docs/utils/__pycache__
__pycache__
docs/utils/*.pyc
/deps/downloads/
deps/install
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ env:
- SOLC_TESTS=On
- SOLC_STOREBYTECODE=Off
- SOLC_DOCKER=Off
- MAKEFLAGS="-j 4"

matrix:
include:
Expand Down Expand Up @@ -112,7 +113,7 @@ matrix:
before_install:
- nvm install 10
- nvm use 10
- docker pull ethereum/solidity-buildpack-deps:emsdk-1.39.15-2
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc
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.6.11")
set(PROJECT_VERSION "0.6.12")
# 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
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
### 0.6.12 (2020-07-22)

Language Features:
* NatSpec: Implement tag ``@inheritdoc`` to copy documentation from a specific base contract.
* Wasm backend: Add ``i32.ctz``, ``i64.ctz``, ``i32.popcnt``, and ``i64.popcnt``.


Compiler Features:
* Code Generator: Avoid double cleanup when copying to memory.
* Code Generator: Evaluate ``keccak256`` of string literals at compile-time.
* Optimizer: Add rule to remove shifts inside the byte opcode.
* Peephole Optimizer: Add rule to remove swap after dup.
* Peephole Optimizer: Remove unnecessary masking of tags.
* Yul EVM Code Transform: Free stack slots directly after visiting the right-hand-side of variable declarations instead of at the end of the statement only.


Bugfixes:
* SMTChecker: Fix error in events with indices of type static array.
* SMTChecker: Fix internal error in sequential storage array pushes (``push().push()``).
* SMTChecker: Fix internal error when using bitwise operators on fixed bytes type.
* SMTChecker: Fix internal error when using compound bitwise operator assignments on array indices inside branches.
* Type Checker: Fix internal compiler error related to oversized types.
* Type Checker: Fix overload resolution in combination with ``{value: ...}``.


Build System:
* Update internal dependency of jsoncpp to 1.9.3.


### 0.6.11 (2020-07-07)

Language Features:
Expand Down
1 change: 1 addition & 0 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-pedantic)
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wimplicit-fallthrough)
add_compile_options(-Wsign-conversion)

# Configuration-specific compiler settings.
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DETH_DEBUG")
Expand Down
Loading

0 comments on commit 27d5176

Please sign in to comment.