Skip to content

Commit ae1c972

Browse files
committed
Merge branch 'testnet' into accelerator
2 parents d6eb770 + ca2a79f commit ae1c972

File tree

141 files changed

+4926
-1306
lines changed

Some content is hidden

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

141 files changed

+4926
-1306
lines changed

.github/workflows/build-ton-linux-x86-64-appimage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
- name: Install system libraries
2222
run: |
2323
sudo apt update
24-
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache
25-
sudo apt remove libgsl-dev
24+
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache libgsl-dev libblas-dev
2625
mkdir ~/.ccache 3pp
2726
2827
- name: Install clang-16

.github/workflows/ton-x86-64-windows.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ defaults:
99
jobs:
1010
build:
1111

12-
runs-on: windows-2019
12+
runs-on: windows-2022
1313

1414
steps:
1515
- name: Get Current OS version
@@ -30,15 +30,15 @@ jobs:
3030
uses: actions/cache@v4
3131
with:
3232
path: third_libs
33-
key: ${{ runner.os }}-${{ runner.arch }}-windows-2019-3pp-${{ hashFiles('**/assembly/native/build-windows-2019.bat') }}
33+
key: ${{ runner.os }}-${{ runner.arch }}-windows-2022-3pp-${{ hashFiles('**/assembly/native/build-windows-2022.bat') }}
3434

3535
- name: Build TON
3636
run: |
3737
git submodule sync --recursive
3838
git submodule update
39-
copy assembly\native\build-windows-github-2019.bat .
40-
copy assembly\native\build-windows-2019.bat .
41-
build-windows-github-2019.bat Enterprise
39+
copy assembly\native\build-windows-github-2022.bat .
40+
copy assembly\native\build-windows-2022.bat .
41+
build-windows-github-2022.bat Enterprise
4242
ccache -sp
4343
4444
# - name: Run Tests

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ set(CMAKE_CXX_STANDARD 20)
3333
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
3434
set(CMAKE_CXX_EXTENSIONS FALSE)
3535

36+
set(CMAKE_COLOR_DIAGNOSTICS TRUE)
37+
3638
#BEGIN internal
3739
option(BUILD_SHARED_LIBS "Use \"ON\" to build shared libraries instead of static where it's not specified (not recommended)" OFF)
3840
option(USE_EMSCRIPTEN "Use \"ON\" for config building wasm." OFF)
@@ -56,6 +58,16 @@ option(TON_USE_TSAN "Use \"ON\" to enable ThreadSanitizer." OFF)
5658
option(TON_USE_UBSAN "Use \"ON\" to enable UndefinedBehaviorSanitizer." OFF)
5759
set(TON_ARCH "native" CACHE STRING "Architecture, will be passed to -march=")
5860

61+
option(TON_PRINT_BACKTRACE_ON_CRASH "Attempt to print a backtrace when a fatal signal is caught" ON)
62+
63+
option(TON_USE_LLD "Use LLD for linking" OFF)
64+
65+
if (TON_USE_LLD)
66+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
67+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
68+
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
69+
endif()
70+
5971
#BEGIN M1 support
6072
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
6173

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN mkdir build && \
2929
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DTON_USE_JEMALLOC=ON .. && \
3030
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console \
3131
generate-random-id dht-server lite-client tolk rldp-http-proxy dht-server proxy-liteserver create-state \
32-
blockchain-explorer emulator tonlibjson http-proxy adnl-proxy
32+
blockchain-explorer emulator tonlibjson http-proxy adnl-proxy dht-ping-servers dht-resolve
3333

3434
FROM ubuntu:22.04
3535
ARG DEBIAN_FRONTEND=noninteractive
@@ -50,6 +50,8 @@ COPY --from=builder /ton/build/blockchain-explorer/blockchain-explorer /usr/loca
5050
COPY --from=builder /ton/build/crypto/create-state /usr/local/bin/
5151
COPY --from=builder /ton/build/utils/proxy-liteserver /usr/local/bin/
5252
COPY --from=builder /ton/build/dht-server/dht-server /usr/local/bin/
53+
COPY --from=builder /ton/build/dht/dht-ping-servers /usr/local/bin/
54+
COPY --from=builder /ton/build/dht/dht-resolve /usr/local/bin/
5355
COPY --from=builder /ton/build/rldp-http-proxy/rldp-http-proxy /usr/local/bin/
5456
COPY --from=builder /ton/build/http/http-proxy /usr/local/bin/
5557
COPY --from=builder /ton/build/adnl/adnl-proxy /usr/local/bin/

assembly/appimage/create-appimages.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ for file in ../artifacts/*; do
3535
/lib/$ARCH-linux-gnu/libmicrohttpd.so.12 \
3636
/lib/$ARCH-linux-gnu/libreadline.so.8 \
3737
/lib/$ARCH-linux-gnu/libstdc++.so.6 \
38+
/lib/$ARCH-linux-gnu/libgsl.so.27 \
39+
/lib/$ARCH-linux-gnu/libblas.so.3 \
3840
$appName.AppDir/usr/lib/
3941

4042
chmod +x ./$appName.AppDir/usr/bin/$appName

assembly/native/build-macos-portable.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
150150
if [ "$with_tests" = true ]; then
151151
ninja storage-daemon storage-daemon-cli blockchain-explorer \
152152
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
153-
lite-client validator-engine-console generate-random-id json2tlo dht-server \
153+
lite-client validator-engine-console generate-random-id json2tlo dht-server dht-ping-servers dht-resolve \
154154
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
155155
test-ed25519 test-bigint test-vm test-fift test-cells test-smartcont \
156156
test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp \
@@ -159,7 +159,7 @@ if [ "$with_tests" = true ]; then
159159
else
160160
ninja storage-daemon storage-daemon-cli blockchain-explorer \
161161
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
162-
lite-client validator-engine-console generate-random-id json2tlo dht-server \
162+
lite-client validator-engine-console generate-random-id json2tlo dht-server dht-ping-servers dht-resolve \
163163
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator proxy-liteserver
164164
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
165165
fi
@@ -184,6 +184,8 @@ if [ "$with_artifacts" = true ]; then
184184
cp build/http/http-proxy artifacts/
185185
cp build/rldp-http-proxy/rldp-http-proxy artifacts/
186186
cp build/dht-server/dht-server artifacts/
187+
cp build/dht/dht-ping-servers artifacts/
188+
cp build/dht/dht-resolve artifacts/
187189
cp build/lite-client/lite-client artifacts/
188190
cp build/validator-engine/validator-engine artifacts/
189191
cp build/utils/generate-random-id artifacts/

assembly/native/build-macos-shared.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ else
6161
echo "Using compiled lz4"
6262
fi
6363

64+
if [ ! -d "zlib" ]; then
65+
git clone https://github.com/madler/zlib.git
66+
cd zlib
67+
zlibPath=`pwd`
68+
./configure --static
69+
make -j4
70+
test $? -eq 0 || { echo "Can't compile zlib"; exit 1; }
71+
cd ..
72+
else
73+
zlibPath=$(pwd)/zlib
74+
echo "Using compiled zlib"
75+
fi
76+
6477
brew unlink [email protected]
6578
brew install openssl@3
6679
brew unlink openssl@3 && brew link --overwrite openssl@3
@@ -75,7 +88,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
7588
if [ "$with_tests" = true ]; then
7689
ninja storage-daemon storage-daemon-cli blockchain-explorer \
7790
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
78-
lite-client validator-engine-console generate-random-id json2tlo dht-server \
91+
lite-client validator-engine-console generate-random-id json2tlo dht-server dht-ping-servers dht-resolve \
7992
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
8093
test-ed25519 test-bigint test-vm test-fift test-cells test-smartcont \
8194
test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp \
@@ -84,7 +97,7 @@ if [ "$with_tests" = true ]; then
8497
else
8598
ninja storage-daemon storage-daemon-cli blockchain-explorer \
8699
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
87-
lite-client validator-engine-console generate-random-id json2tlo dht-server \
100+
lite-client validator-engine-console generate-random-id json2tlo dht-server dht-ping-servers dht-resolve \
88101
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator proxy-liteserver
89102
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
90103
fi
@@ -109,6 +122,8 @@ if [ "$with_artifacts" = true ]; then
109122
cp build/http/http-proxy artifacts/
110123
cp build/rldp-http-proxy/rldp-http-proxy artifacts/
111124
cp build/dht-server/dht-server artifacts/
125+
cp build/dht/dht-ping-servers artifacts/
126+
cp build/dht/dht-resolve artifacts/
112127
cp build/lite-client/lite-client artifacts/
113128
cp build/validator-engine/validator-engine artifacts/
114129
cp build/utils/generate-random-id artifacts/

assembly/native/build-ubuntu-appimages.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
6161
if [ "$with_tests" = true ]; then
6262
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
6363
validator-engine lite-client validator-engine-console blockchain-explorer \
64-
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
64+
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy dht-ping-servers dht-resolve \
6565
adnl-proxy create-state emulator test-ed25519 test-bigint \
6666
test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils \
6767
test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain \
@@ -71,7 +71,7 @@ else
7171
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
7272
validator-engine lite-client validator-engine-console blockchain-explorer \
7373
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
74-
adnl-proxy create-state emulator proxy-liteserver
74+
adnl-proxy create-state emulator proxy-liteserver dht-ping-servers dht-resolve
7575
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
7676
fi
7777

@@ -104,6 +104,7 @@ if [ "$with_artifacts" = true ]; then
104104
build/tonlib/libtonlibjson.so build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy \
105105
build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine \
106106
build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.so \
107+
build/dht/dht-ping-servers build/dht/dht-resolve \
107108
artifacts
108109
test $? -eq 0 || { echo "Can't copy final binaries"; exit 1; }
109110
cp -R crypto/smartcont artifacts

assembly/native/build-ubuntu-portable.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
135135
if [ "$with_tests" = true ]; then
136136
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
137137
validator-engine lite-client validator-engine-console blockchain-explorer \
138-
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
138+
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy dht-ping-servers dht-resolve \
139139
adnl-proxy create-state emulator test-ed25519 test-bigint \
140140
test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils \
141141
test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain \
@@ -145,7 +145,7 @@ else
145145
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
146146
validator-engine lite-client validator-engine-console blockchain-explorer \
147147
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
148-
adnl-proxy create-state emulator proxy-liteserver
148+
adnl-proxy create-state emulator proxy-liteserver dht-ping-servers dht-resolve
149149
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
150150
fi
151151

@@ -167,6 +167,7 @@ if [ "$with_artifacts" = true ]; then
167167
build/tonlib/libtonlibjson.so build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy \
168168
build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine \
169169
build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.so \
170+
build/dht/dht-ping-servers build/dht/dht-resolve \
170171
artifacts
171172
test $? -eq 0 || { echo "Can't copy final binaries"; exit 1; }
172173
cp -R crypto/smartcont artifacts

assembly/native/build-ubuntu-shared.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
6464
if [ "$with_tests" = true ]; then
6565
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
6666
validator-engine lite-client validator-engine-console blockchain-explorer \
67-
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
67+
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy dht-ping-servers dht-resolve \
6868
adnl-proxy create-state emulator test-ed25519 test-bigint \
6969
test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils \
7070
test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain \
@@ -74,7 +74,7 @@ else
7474
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
7575
validator-engine lite-client validator-engine-console blockchain-explorer \
7676
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
77-
adnl-proxy create-state emulator proxy-liteserver
77+
adnl-proxy create-state emulator proxy-liteserver dht-ping-servers dht-resolve
7878
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
7979
fi
8080

@@ -99,6 +99,7 @@ if [ "$with_artifacts" = true ]; then
9999
build/tonlib/libtonlibjson.so build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy \
100100
build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine \
101101
build/utils/generate-random-id build/utils/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.so \
102+
build/dht/dht-ping-servers build/dht/dht-resolve \
102103
artifacts
103104
test $? -eq 0 || { echo "Can't copy final binaries"; exit 1; }
104105
cp -R crypto/smartcont artifacts

0 commit comments

Comments
 (0)