Skip to content

Commit d42d0f1

Browse files
Merge pull request #92 from yanghang8612/merge_from_v0.8.26
Merge from v0.8.26
2 parents 77bd169 + 6ef4690 commit d42d0f1

File tree

1,108 files changed

+13679
-15483
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,108 files changed

+13679
-15483
lines changed

.circleci/config.yml

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ version: 2.1
99
parameters:
1010
ubuntu-2004-docker-image:
1111
type: string
12-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-21
13-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:6f64c7b35aabddb416d28f621a3c4bbae768c257d6866f6a7f05f8225acc94f0"
12+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-23
13+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:84a1fb8771236e8d9aa5c615a425b8929e56a6e4f150a60078c8d74a1ceaa6c2"
1414
ubuntu-2204-docker-image:
1515
type: string
16-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204-6
17-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:6eee10420382588b274374c6a18cb2e5d4f8a9fef5cf440b3a1acfc32bf52837"
16+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204-8
17+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:1c3a4118218640b2bf632242979a63d48f3d9c70d48be9574332f2dbbd04b192"
1818
ubuntu-2204-clang-docker-image:
1919
type: string
20-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204.clang-5
21-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:e991421ce9f44d6476b29588fc355da1c3b3fedcc424fd12d844bbe310ad7851"
20+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204.clang-7
21+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:0f47e733e100080c4174381c262cfcf974bc8e7c3c41b8dff611b9641c82f714"
2222
ubuntu-clang-ossfuzz-docker-image:
2323
type: string
24-
# solbuildpackpusher/solidity-buildpack-deps:ubuntu.clang.ossfuzz-4
25-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:b122ef9dca71a8f90b74f3ba13cda4453681506e4a4ff047e7bc2130c76b0d1e"
24+
# solbuildpackpusher/solidity-buildpack-deps:ubuntu.clang.ossfuzz-6
25+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:8883fa2845bbc1e0922af60439313666e4ba325f67a117e17d78cca3ea6589b3"
2626
emscripten-docker-image:
2727
type: string
28-
# NOTE: Please remember to update the `build_emscripten.sh` whenever the hash of this image changes.
29-
# solbuildpackpusher/solidity-buildpack-deps:emscripten-16
30-
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:19fcb5ac029bbc27ec36e10f7d14ea224d8010145f9690562ef084fd16146b0c"
28+
# NOTE: Please remember to update the `scripts/build_emscripten.sh` whenever the hash of this image changes.
29+
# solbuildpackpusher/solidity-buildpack-deps:emscripten-17
30+
default: "solbuildpackpusher/solidity-buildpack-deps@sha256:c57f2bfb8c15d70fe290629358dd1c73dc126e3760f443b54764797556b887d4"
3131
evm-version:
3232
type: string
3333
default: london
@@ -331,9 +331,6 @@ commands:
331331
- checkout
332332
- attach_workspace:
333333
at: build
334-
- run:
335-
name: Install dependencies
336-
command: pip install --user deepdiff colorama
337334
- run:
338335
name: Executing solc LSP test suite
339336
command: test/lsp.py build/solc/solc --non-interactive
@@ -801,13 +798,6 @@ defaults:
801798
compile_only: 1
802799
image: cimg/node:18.16
803800

804-
- job_native_test_ext_perpetual_pools: &job_native_test_ext_perpetual_pools
805-
<<: *requires_b_ubu_static
806-
name: t_native_test_ext_perpetual_pools
807-
project: perpetual-pools
808-
binary_type: native
809-
image: cimg/node:18.16
810-
811801
- job_native_test_ext_uniswap: &job_native_test_ext_uniswap
812802
<<: *requires_b_ubu_static
813803
name: t_native_test_ext_uniswap
@@ -934,19 +924,9 @@ jobs:
934924
- matrix_notify_failure_unless_pr
935925

936926
chk_pylint:
937-
<<: *base_cimg_small
927+
<<: *base_ubuntu2204_small
938928
steps:
939929
- checkout
940-
- install_python3:
941-
packages: >
942-
pylint
943-
z3-solver
944-
pygments-lexer-solidity
945-
parsec
946-
tabulate
947-
deepdiff
948-
colorama
949-
requests
950930
- run: pylint --version
951931
- run:
952932
name: Linting Python Scripts
@@ -983,11 +963,9 @@ jobs:
983963
- matrix_notify_failure_unless_pr
984964

985965
chk_proofs:
986-
<<: *base_cimg_small
966+
<<: *base_ubuntu2204_small
987967
steps:
988968
- checkout
989-
- install_python3:
990-
packages: z3-solver
991969
- run_proofs
992970
- matrix_notify_failure_unless_pr
993971

@@ -1002,10 +980,6 @@ jobs:
1002980
<<: *base_ubuntu2204_small
1003981
steps:
1004982
- checkout
1005-
- run:
1006-
# TODO: Add these to the base image
1007-
name: Install gas_diff_stats.py dependencies
1008-
command: python3 -m pip install --user parsec tabulate
1009983
- run:
1010984
name: Python unit tests
1011985
command: python3 test/pyscriptTests.py
@@ -1181,7 +1155,7 @@ jobs:
11811155
- run:
11821156
name: Install build dependencies
11831157
command: |
1184-
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake cvc4 git openssh tar
1158+
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake git openssh tar
11851159
- checkout
11861160
- run_build
11871161
- store_artifacts_solc
@@ -1308,7 +1282,7 @@ jobs:
13081282
- run:
13091283
name: Install runtime dependencies
13101284
command: |
1311-
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
1285+
pacman --noconfirm -Syu --noprogressbar --needed z3
13121286
- soltest
13131287

13141288
t_ubu_clang_soltest: &t_ubu_clang_soltest
@@ -1461,7 +1435,7 @@ jobs:
14611435
name: Install dependencies
14621436
command: |
14631437
cd hardhat
1464-
pnpm install
1438+
pnpm install --no-frozen-lockfile
14651439
- run:
14661440
name: Run hardhat-core test suite
14671441
command: |
@@ -1517,14 +1491,6 @@ jobs:
15171491
if command -v npm &> /dev/null; then
15181492
sudo npm install -g pnpm
15191493
fi
1520-
- install_python3:
1521-
packages: requests
1522-
- run:
1523-
name: Install lsof
1524-
command: |
1525-
# lsof is used by Colony in its stop-blockchain-client.sh script
1526-
sudo apt update
1527-
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
15281494
- when:
15291495
condition: << parameters.python2 >>
15301496
steps:
@@ -1771,8 +1737,8 @@ jobs:
17711737
- run: git config --global core.autocrlf false
17721738
- checkout
17731739
- run:
1774-
name: Force install python3.12.2
1775-
command: choco install python3 --pre --force --version=3.12.2
1740+
name: Force install python3.12
1741+
command: choco install python312 --pre --force
17761742
- run:
17771743
name: Create a symlink for python3
17781744
command: ln -s /c/ProgramData/chocolatey/bin/python3.12 /c/ProgramData/chocolatey/bin/python3
@@ -1917,7 +1883,6 @@ workflows:
19171883
- t_ext: *job_native_test_ext_zeppelin
19181884
- t_ext: *job_native_test_ext_ens
19191885
- t_ext: *job_native_test_ext_yield_liquidator
1920-
- t_ext: *job_native_test_ext_perpetual_pools
19211886
- t_ext: *job_native_test_ext_uniswap
19221887
- t_ext: *job_native_test_ext_prb_math
19231888
- t_ext: *job_native_test_ext_elementfi
@@ -1939,7 +1904,6 @@ workflows:
19391904
- t_native_test_ext_zeppelin
19401905
- t_native_test_ext_ens
19411906
- t_native_test_ext_yield_liquidator
1942-
- t_native_test_ext_perpetual_pools
19431907
- t_native_test_ext_uniswap
19441908
- t_native_test_ext_elementfi
19451909
- t_native_test_ext_brink

.circleci/osx_install_dependencies.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ then
5757
brew install coreutils
5858
brew install diffutils
5959
brew install grep
60+
# JRE is required to run eldarica solver
61+
brew install openjdk@11
62+
brew install unzip
6063

6164
# install historical cmake
6265
chmod +x .circleci/install_cmake.sh
@@ -76,6 +79,14 @@ then
7679
cd ..
7780
sudo rm -rf "$boost_dir"
7881

82+
# eldarica
83+
eldarica_version="2.1"
84+
wget "https://github.com/uuverifiers/eldarica/releases/download/v${eldarica_version}/eldarica-bin-${eldarica_version}.zip" -O /tmp/eld_binaries.zip
85+
validate_checksum /tmp/eld_binaries.zip 0ac43f45c0925383c9d2077f62bbb515fd792375f3b2b101b30c9e81dcd7785c
86+
unzip /tmp/eld_binaries.zip -d /tmp
87+
sudo mv /tmp/eldarica/{eld,eld-client,target,eldEnv} /usr/local/bin
88+
rm -rf /tmp/{eldarica,eld_binaries.zip}
89+
7990
# z3
8091
z3_version="4.12.1"
8192
z3_dir="z3-z3-$z3_version"

.github/workflows/buildpack-deps.yml

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

CMakeLists.txt

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ include(EthPolicy)
2121
eth_policy()
2222

2323
# project name and version should be set after cmake_policy CMP0048
24-
set(PROJECT_VERSION "0.8.25")
24+
set(PROJECT_VERSION "0.8.26")
2525
# OSX target needed in order to support std::visit
2626
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
2727
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
@@ -37,16 +37,23 @@ option(SOLC_STATIC_STDLIBS "Link solc against static versions of libgcc and libs
3737
option(STRICT_Z3_VERSION "Use the latest version of Z3" ON)
3838
option(PEDANTIC "Enable extra warnings and pedantic build flags. Treat all warnings as errors." ON)
3939
option(PROFILE_OPTIMIZER_STEPS "Output performance metrics for the optimiser steps." OFF)
40+
option(USE_SYSTEM_LIBRARIES "Use system libraries" OFF)
41+
option(ONLY_BUILD_SOLIDITY_LIBRARIES "Only build solidity libraries" OFF)
42+
option(STRICT_NLOHMANN_JSON_VERSION "Strictly check installed nlohmann json version" ON)
43+
mark_as_advanced(USE_SYSTEM_LIBRARIES)
44+
mark_as_advanced(ONLY_BUILD_SOLIDITY_LIBRARIES)
45+
mark_as_advanced(STRICT_NLOHMANN_JSON_VERSION)
4046

4147
# Setup cccache.
4248
include(EthCcache)
4349

4450
# Let's find our dependencies
4551
include(EthDependencies)
46-
include(fmtlib)
47-
include(jsoncpp)
48-
include(range-v3)
49-
include_directories(SYSTEM ${JSONCPP_INCLUDE_DIR})
52+
if (NOT USE_SYSTEM_LIBRARIES)
53+
include(fmtlib)
54+
include(nlohmann-json)
55+
include(range-v3)
56+
endif()
5057

5158
find_package(Threads)
5259

@@ -58,6 +65,10 @@ if (PROFILE_OPTIMIZER_STEPS)
5865
add_definitions(-DPROFILE_OPTIMIZER_STEPS)
5966
endif()
6067

68+
if (STRICT_NLOHMANN_JSON_VERSION)
69+
add_definitions(-DSTRICT_NLOHMANN_JSON_VERSION_CHECK)
70+
endif()
71+
6172
# Figure out what compiler and system are we using
6273
include(EthCompilerSettings)
6374

@@ -141,12 +152,15 @@ add_subdirectory(libyul)
141152
add_subdirectory(libsolidity)
142153
add_subdirectory(libsolc)
143154
add_subdirectory(libstdlib)
144-
add_subdirectory(tools)
145155

146-
if (NOT EMSCRIPTEN)
147-
add_subdirectory(solc)
148-
endif()
156+
if (NOT ONLY_BUILD_SOLIDITY_LIBRARIES)
157+
add_subdirectory(tools)
149158

150-
if (TESTS AND NOT EMSCRIPTEN)
151-
add_subdirectory(test)
159+
if (NOT EMSCRIPTEN)
160+
add_subdirectory(solc)
161+
endif()
162+
163+
if (TESTS AND NOT EMSCRIPTEN)
164+
add_subdirectory(test)
165+
endif()
152166
endif()

CODING_STYLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Yes:
2121
```cpp
2222
if (a == b[i])
23-
printf("Hello\n"); // NOTE spaces used instead of tab here for clarity - first byte should be '\t'.
23+
printf("Hello\n"); // NOTE spaces used instead of tab here for clarity - first byte should be '\t'.
2424
foo->bar(
2525
someLongVariableName,
2626
anotherLongVariableName,

Changelog.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
1-
### 0.8.25 (2023-03-14)
1+
### 0.8.26 (2024-05-21)
2+
3+
Language Features:
4+
* Introduce a new overload ``require(bool, Error)`` that allows usage of ``require`` functions with custom errors. This feature is available in the ``via-ir`` pipeline only.
5+
6+
7+
Compiler Features:
8+
* SMTChecker: Create balance check verification target for CHC engine.
9+
* Yul IR Code Generation: Cheaper code for reverting with errors of a small static encoding size.
10+
* Yul Optimizer: New, faster default optimizer step sequence.
11+
12+
13+
Bugfixes:
14+
* Commandline Interface: Fix ICE when the optimizer is disabled and an empty/blank string is used for ``--yul-optimizations`` sequence.
15+
* SMTChecker: Fix false positive when comparing hashes of same array or string literals.
16+
* SMTChecker: Fix internal error on mapping access caused by too strong requirements on sort compatibility of the index and mapping domain.
17+
* SMTChecker: Fix internal error when using an empty tuple in a conditional operator.
18+
* SMTChecker: Fix internal error when using bitwise operators with an array element as argument.
19+
* Standard JSON Interface: Fix ICE when the optimizer is disabled and an empty/blank string is used for ``optimizerSteps`` sequence.
20+
* StaticAnalyzer: Only raise a compile time error for division and modulo by zero when it's between literals.
21+
* TypeChecker: Fix compiler crash when the left-hand side of an assignment was a parenthesized non-tuple expression of a tuple type.
22+
* Yul Optimizer: Fix optimizer executing each repeating part of the step sequence at least twice, even if the code size already became stable after the first iteration.
23+
* Yul Optimizer: Fix the order of assignments generated by ``SSATransform`` being dependent on AST IDs, sometimes resulting in different (but equivalent) bytecode when unrelated files were added to the compilation pipeline.
24+
25+
26+
Build System:
27+
* Replace internal JSON library jsoncpp with nlohmann::json.
28+
29+
30+
### 0.8.25 (2024-03-14)
231

332
Compiler Features:
433
* Code Generator: Use ``MCOPY`` instead of ``MLOAD``/``MSTORE`` loop when copying byte arrays.
@@ -14,7 +43,6 @@ Bugfixes:
1443
* SMTChecker: Fix internal error caused by not respecting the sign of an integer type when constructing zero-value SMT expressions.
1544
* SMTChecker: Run Eldarica only when explicitly requested with `--model-checker-solvers eld`, even when it is present on the system.
1645

17-
1846
### 0.8.24 (2024-01-25)
1947

2048
Language Features:

0 commit comments

Comments
 (0)