Skip to content

Commit 27d5176

Browse files
authored
Merge pull request #9467 from ethereum/develop
Merge develop into release for 0.6.12
2 parents 5ef660b + 4a478f0 commit 27d5176

File tree

721 files changed

+4584
-1001
lines changed

Some content is hidden

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

721 files changed

+4584
-1001
lines changed

Diff for: .circleci/config.yml

+33-38
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
# - ems: Emscripten
88
version: 2.1
99
parameters:
10-
ubuntu-1804-docker-image-rev:
10+
ubuntu-1804-docker-image:
1111
type: string
12-
default: "4"
13-
ubuntu-2004-docker-image-rev:
12+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:4484ac3da8fdc337cc77a7a7be1af71cd0f28f9c890d934f1d6ae7532beb66b1"
13+
ubuntu-2004-docker-image:
1414
type: string
15-
default: "2"
16-
ubuntu-2004-clang-docker-image-rev:
15+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:48b5bb6b91ac7dddfe9345c88876ebed126c652258800f114caed69db73b29bf"
16+
ubuntu-2004-clang-docker-image:
1717
type: string
18-
default: "2"
19-
ubuntu-1604-clang-ossfuzz-docker-image-rev:
18+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d8775de58167db5a11690fdb6ef639317fe1e579ec5d46e9732d2d903b55d135"
19+
ubuntu-1604-clang-ossfuzz-docker-image:
2020
type: string
21-
default: "2"
21+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:db52f3257396814215744a19904e42c07e040ab36b68be72a27ba71ad2f1083c"
22+
emscripten-docker-image:
23+
type: string
24+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc"
2225

2326
defaults:
2427

@@ -33,26 +36,11 @@ defaults:
3336
3437
- run_build: &run_build
3538
name: Build
36-
command: |
37-
set -ex
38-
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
39-
echo -n "$CIRCLE_SHA1" > commit_hash.txt
40-
mkdir -p build
41-
cd build
42-
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
43-
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS -G "Unix Makefiles"
44-
make -j4
39+
command: scripts/ci/build.sh
4540

4641
- run_build_ossfuzz: &run_build_ossfuzz
4742
name: Build_ossfuzz
48-
command: |
49-
mkdir -p build
50-
cd build
51-
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
52-
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
53-
protoc --proto_path=../test/tools/ossfuzz solProto.proto --cpp_out=../test/tools/ossfuzz
54-
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS
55-
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j4
43+
command: scripts/ci/build_ossfuzz.sh
5644

5745
- run_proofs: &run_proofs
5846
name: Correctness proofs for optimization rules
@@ -97,6 +85,7 @@ defaults:
9785
- test/tools/ossfuzz/strictasm_diff_ossfuzz
9886
- test/tools/ossfuzz/strictasm_opt_ossfuzz
9987
- test/tools/ossfuzz/yul_proto_diff_ossfuzz
88+
- test/tools/ossfuzz/yul_proto_diff_custom_mutate_ossfuzz
10089
- test/tools/ossfuzz/yul_proto_ossfuzz
10190
- test/tools/ossfuzz/sol_proto_ossfuzz
10291

@@ -130,7 +119,7 @@ defaults:
130119

131120
- test_ubuntu1604_clang: &test_ubuntu1604_clang
132121
docker:
133-
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
122+
- image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
134123
steps:
135124
- checkout
136125
- attach_workspace:
@@ -141,7 +130,7 @@ defaults:
141130

142131
- test_ubuntu2004_clang: &test_ubuntu2004_clang
143132
docker:
144-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
133+
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
145134
steps:
146135
- checkout
147136
- attach_workspace:
@@ -152,7 +141,8 @@ defaults:
152141

153142
- test_ubuntu2004: &test_ubuntu2004
154143
docker:
155-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
144+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
145+
parallelism: 6
156146
steps:
157147
- checkout
158148
- attach_workspace:
@@ -387,7 +377,7 @@ jobs:
387377

388378
chk_docs_pragma_min_version:
389379
docker:
390-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
380+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
391381
environment:
392382
TERM: xterm
393383
steps:
@@ -396,7 +386,7 @@ jobs:
396386

397387
b_ubu_clang: &build_ubuntu2004_clang
398388
docker:
399-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
389+
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
400390
environment:
401391
CC: clang
402392
CXX: clang++
@@ -409,7 +399,7 @@ jobs:
409399

410400
b_ubu_asan_clang: &build_ubuntu2004_clang
411401
docker:
412-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-clang-<< pipeline.parameters.ubuntu-2004-clang-docker-image-rev >>
402+
- image: << pipeline.parameters.ubuntu-2004-clang-docker-image >>
413403
environment:
414404
CC: clang
415405
CXX: clang++
@@ -421,8 +411,11 @@ jobs:
421411
- persist_to_workspace: *artifacts_executables
422412

423413
b_ubu: &build_ubuntu2004
414+
resource_class: xlarge
424415
docker:
425-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
416+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
417+
environment:
418+
MAKEFLAGS: -j 10
426419
steps:
427420
- checkout
428421
- run: *run_build
@@ -437,7 +430,7 @@ jobs:
437430

438431
b_ubu18: &build_ubuntu1804
439432
docker:
440-
- image: ethereum/solidity-buildpack-deps:ubuntu1804-<< pipeline.parameters.ubuntu-1804-docker-image-rev >>
433+
- image: << pipeline.parameters.ubuntu-1804-docker-image >>
441434
environment:
442435
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
443436
CMAKE_BUILD_TYPE: RelWithDebugInfo
@@ -491,7 +484,7 @@ jobs:
491484

492485
b_ubu_ossfuzz: &build_ubuntu1604_clang
493486
docker:
494-
- image: ethereum/solidity-buildpack-deps:ubuntu1604-clang-ossfuzz-<< pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image-rev >>
487+
- image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
495488
environment:
496489
CC: clang
497490
CXX: clang++
@@ -597,9 +590,11 @@ jobs:
597590
- store_artifacts: *artifacts_test_results
598591

599592
b_ems:
593+
resource_class: xlarge
600594
docker:
601-
- image: ethereum/solidity-buildpack-deps:emsdk-1.39.15-2
595+
- image: << pipeline.parameters.emscripten-docker-image >>
602596
environment:
597+
MAKEFLAGS: -j 10
603598
TERM: xterm
604599
steps:
605600
- checkout
@@ -633,7 +628,7 @@ jobs:
633628

634629
b_docs:
635630
docker:
636-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
631+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
637632
steps:
638633
- checkout
639634
- run: *setup_prerelease_commit_hash
@@ -649,7 +644,7 @@ jobs:
649644

650645
t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
651646
docker:
652-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
647+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
653648
environment:
654649
EVM: constantinople
655650
SOLTEST_FLAGS: --enforce-via-yul
@@ -675,7 +670,7 @@ jobs:
675670

676671
t_ubu_cli: &t_ubu_cli
677672
docker:
678-
- image: ethereum/solidity-buildpack-deps:ubuntu2004-<< pipeline.parameters.ubuntu-2004-docker-image-rev >>
673+
- image: << pipeline.parameters.ubuntu-2004-docker-image >>
679674
environment:
680675
TERM: xterm
681676
steps:

Diff for: .circleci/soltest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ get_logfile_basename() {
5454
echo -ne "${filename}"
5555
}
5656

57-
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml"
57+
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml ${BOOST_TEST_ARGS}"
5858
SOLTEST_ARGS="--evm-version=$EVM $SOLTEST_FLAGS"
5959
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize"
6060
test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2"

Diff for: .circleci/soltest_all.sh

+43-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,49 @@ set -e
2828

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

31-
for OPTIMIZE in 0 1; do
32-
for EVM in homestead byzantium constantinople petersburg istanbul; do
33-
EVM=$EVM OPTIMIZE=$OPTIMIZE ${REPODIR}/.circleci/soltest.sh
31+
EVM_VALUES=(homestead byzantium constantinople petersburg istanbul)
32+
OPTIMIZE_VALUES=(0 1)
33+
STEPS=$(( 1 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))
34+
35+
if (( $CIRCLE_NODE_TOTAL )) && (( $CIRCLE_NODE_TOTAL > 1 ))
36+
then
37+
# Run step 1 as the only step on the first executor
38+
# and evenly distribute the other steps among
39+
# the other executors.
40+
# The first step takes much longer than the other steps.
41+
if (( $CIRCLE_NODE_INDEX == 0 ))
42+
then
43+
RUN_STEPS="1"
44+
else
45+
export CIRCLE_NODE_INDEX=$(($CIRCLE_NODE_INDEX - 1))
46+
export CIRCLE_NODE_TOTAL=$(($CIRCLE_NODE_TOTAL - 1))
47+
RUN_STEPS=$(seq 2 "$STEPS" | circleci tests split)
48+
fi
49+
else
50+
RUN_STEPS=$(seq "$STEPS")
51+
fi
52+
53+
# turn newlines into spaces
54+
RUN_STEPS=$(echo $RUN_STEPS)
55+
56+
echo "Running steps $RUN_STEPS..."
57+
58+
STEP=1
59+
60+
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 "${REPODIR}/.circleci/soltest.sh"
61+
STEP=$(($STEP + 1))
62+
63+
for OPTIMIZE in ${OPTIMIZE_VALUES[@]}
64+
do
65+
for EVM in ${EVM_VALUES[@]}
66+
do
67+
[[ " $RUN_STEPS " =~ " $STEP " ]] && EVM="$EVM" OPTIMIZE="$OPTIMIZE" BOOST_TEST_ARGS="-t !@nooptions" "${REPODIR}/.circleci/soltest.sh"
68+
STEP=$(($STEP + 1))
3469
done
3570
done
3671

37-
EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V2=1 ${REPODIR}/.circleci/soltest.sh
72+
if (($STEP != $STEPS + 1))
73+
then
74+
echo "Step counter not properly adjusted!" >2
75+
exit 1
76+
fi

Diff for: .github/workflows/buildpack-deps.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: buildpack-deps
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
paths:
7+
- 'scripts/docker/buildpack-deps/Dockerfile.emscripten'
8+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz'
9+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1804'
10+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang'
11+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004'
12+
13+
jobs:
14+
buildpack-deps:
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
18+
DOCKER_REPOSITORY: solbuildpackpusher/solidity-buildpack-deps
19+
IMAGE_NAME: buildpack-deps
20+
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
image_variant: [emscripten, ubuntu1604.clang.ossfuzz, ubuntu1804, ubuntu2004.clang, ubuntu2004]
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Upgrade ${{ env.IMAGE_NAME }}-${{ matrix.image_variant }}
34+
run: |
35+
echo ${DOCKERHUB_TOKEN} | docker login -u solbuildpackpusher --password-stdin
36+
scripts/ci/docker_upgrade.sh ${{ env.IMAGE_NAME }} ${{ matrix.image_variant }} ${{ env.DOCKER_REPOSITORY }}
37+
docker logout
38+
39+
- name: comment PR
40+
if: "env.DOCKER_IMAGE"
41+
uses: aarlt/[email protected]
42+
with:
43+
msg: "`${{ env.DOCKER_IMAGE }} ${{ env.DOCKER_REPO_DIGEST }}`."

Diff for: .gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ prerelease.txt
3232

3333
# Build directory
3434
build/
35-
build*/
35+
/build*/
3636
emscripten_build/
3737
docs/_build
38-
docs/utils/__pycache__
38+
__pycache__
3939
docs/utils/*.pyc
4040
/deps/downloads/
4141
deps/install

Diff for: .travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ env:
4747
- SOLC_TESTS=On
4848
- SOLC_STOREBYTECODE=Off
4949
- SOLC_DOCKER=Off
50+
- MAKEFLAGS="-j 4"
5051

5152
matrix:
5253
include:
@@ -112,7 +113,7 @@ matrix:
112113
before_install:
113114
- nvm install 10
114115
- nvm use 10
115-
- docker pull ethereum/solidity-buildpack-deps:emsdk-1.39.15-2
116+
- docker pull solbuildpackpusher/solidity-buildpack-deps@sha256:d557d015918c3cf68b0d22839bab41013f0757b651a7fef21595f89721dbebcc
116117
env:
117118
- SOLC_EMSCRIPTEN=On
118119
- 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.6.11")
13+
set(PROJECT_VERSION "0.6.12")
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

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
### 0.6.12 (2020-07-22)
2+
3+
Language Features:
4+
* NatSpec: Implement tag ``@inheritdoc`` to copy documentation from a specific base contract.
5+
* Wasm backend: Add ``i32.ctz``, ``i64.ctz``, ``i32.popcnt``, and ``i64.popcnt``.
6+
7+
8+
Compiler Features:
9+
* Code Generator: Avoid double cleanup when copying to memory.
10+
* Code Generator: Evaluate ``keccak256`` of string literals at compile-time.
11+
* Optimizer: Add rule to remove shifts inside the byte opcode.
12+
* Peephole Optimizer: Add rule to remove swap after dup.
13+
* Peephole Optimizer: Remove unnecessary masking of tags.
14+
* 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.
15+
16+
17+
Bugfixes:
18+
* SMTChecker: Fix error in events with indices of type static array.
19+
* SMTChecker: Fix internal error in sequential storage array pushes (``push().push()``).
20+
* SMTChecker: Fix internal error when using bitwise operators on fixed bytes type.
21+
* SMTChecker: Fix internal error when using compound bitwise operator assignments on array indices inside branches.
22+
* Type Checker: Fix internal compiler error related to oversized types.
23+
* Type Checker: Fix overload resolution in combination with ``{value: ...}``.
24+
25+
26+
Build System:
27+
* Update internal dependency of jsoncpp to 1.9.3.
28+
29+
130
### 0.6.11 (2020-07-07)
231

332
Language Features:

Diff for: cmake/EthCompilerSettings.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
5050
add_compile_options(-pedantic)
5151
add_compile_options(-Wno-unknown-pragmas)
5252
add_compile_options(-Wimplicit-fallthrough)
53+
add_compile_options(-Wsign-conversion)
5354

5455
# Configuration-specific compiler settings.
5556
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DETH_DEBUG")

0 commit comments

Comments
 (0)