Skip to content

Commit 342bad2

Browse files
authored
Install and upgrade TON blockchain using OpenSSL 3 (#148)
* upgrade TON using openssl-3 * install and upgrade TON using openssl-3
1 parent 966f1a7 commit 342bad2

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

scripts/toninstaller.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ git clone --recursive https://github.com/ton-blockchain/mytonctrl.git
137137
git config --global --add safe.directory $SOURCES_DIR/ton
138138
git config --global --add safe.directory $SOURCES_DIR/mytonctrl
139139

140+
cd $BIN_DIR
141+
rm -rf openssl_3
142+
git clone https://github.com/openssl/openssl openssl_3
143+
cd openssl_3
144+
opensslPath=`pwd`
145+
git checkout openssl-3.1.4
146+
./config
147+
make build_libs -j12
148+
140149
# Подготавливаем папки для компиляции
141150
echo -e "${COLOR}[3/6]${ENDC} Preparing for compilation"
142151
rm -rf $BIN_DIR/ton
@@ -163,7 +172,7 @@ if [[ "$OSTYPE" =~ darwin.* ]]; then
163172
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja
164173
fi
165174
else
166-
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja
175+
cmake -DCMAKE_BUILD_TYPE=Release $SOURCES_DIR/ton -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$opensslPath/include -DOPENSSL_CRYPTO_LIBRARY=$opensslPath/libcrypto.a
167176
fi
168177

169178
# Компилируем из исходников

scripts/upgrade.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,23 @@ export CC=/usr/bin/clang
5656
export CXX=/usr/bin/clang++
5757
export CCACHE_DISABLE=1
5858

59+
cd ${bindir}
60+
rm -rf openssl_3
61+
git clone https://github.com/openssl/openssl openssl_3
62+
cd openssl_3
63+
opensslPath=`pwd`
64+
git checkout openssl-3.1.4
65+
./config
66+
make build_libs -j12
67+
5968
# Update binary
6069
cd ${bindir}/${repo}
6170
ls --hide=global.config.json | xargs -d '\n' rm -rf
6271
rm -rf .ninja_*
6372
memory=$(cat /proc/meminfo | grep MemAvailable | awk '{print $2}')
6473
let "cpuNumber = memory / 2100000" || cpuNumber=1
65-
cmake -DCMAKE_BUILD_TYPE=Release ${srcdir}/${repo} -GNinja
74+
75+
cmake -DCMAKE_BUILD_TYPE=Release ${srcdir}/${repo} -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$opensslPath/include -DOPENSSL_CRYPTO_LIBRARY=$opensslPath/libcrypto.a
6676
ninja -j ${cpuNumber} fift validator-engine lite-client pow-miner validator-engine-console generate-random-id dht-server func tonlibjson rldp-http-proxy
6777
systemctl restart validator
6878

0 commit comments

Comments
 (0)