Skip to content

Commit

Permalink
Merge branch 'testnet' into accelerator
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Nov 18, 2024
2 parents 1dfe79b + 52b010f commit 62ede18
Show file tree
Hide file tree
Showing 216 changed files with 23,301 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .github/script/amd64-20.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ENV CC clang
ENV CXX clang++
ENV CCACHE_DISABLE 1
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" ..
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func tolk validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client
2 changes: 1 addition & 1 deletion .github/script/amd64-22.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ENV CC clang
ENV CXX clang++
ENV CCACHE_DISABLE 1
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" ..
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func tolk validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client
2 changes: 1 addition & 1 deletion .github/script/arm64-20.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ENV CC clang
ENV CXX clang++
ENV CCACHE_DISABLE 1
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= ..
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id dht-server lite-client
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func tolk validator-engine validator-engine-console create-state generate-random-id dht-server lite-client
2 changes: 1 addition & 1 deletion .github/script/arm64-22.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ENV CC clang
ENV CXX clang++
ENV CCACHE_DISABLE 1
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= ..
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id dht-server lite-client
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func tolk validator-engine validator-engine-console create-state generate-random-id dht-server lite-client
32 changes: 32 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ jobs:
asset_name: func.exe
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Windows 2019 single artifact - tolk
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-win-binaries/tolk.exe
asset_name: tolk.exe
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Windows 2019 single artifact - lite-client
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -257,6 +265,14 @@ jobs:
asset_name: func-mac-x86-64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac x86-64 single artifact - tolk
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-x86_64-macos-binaries/tolk
asset_name: tolk-mac-x86-64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac x86-64 single artifact - lite-client
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -348,6 +364,14 @@ jobs:
asset_name: func-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - tolk
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-arm64-macos-binaries/tolk
asset_name: tolk-mac-arm64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac arm64 single artifact - lite-client
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -438,6 +462,14 @@ jobs:
asset_name: func-linux-x86_64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Linux x86-64 single artifact - tolk
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-x86_64-linux-binaries/tolk
asset_name: tolk-linux-x86_64
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Linux x86-64 single artifact - lite-client
uses: svenstaro/upload-release-action@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ton-arm64-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
artifacts/lite-client -V
artifacts/fift -V
artifacts/func -V
artifacts/tolk -v
- name: Upload artifacts
uses: actions/upload-artifact@master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ton-x86-64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
artifacts/lite-client -V
artifacts/fift -V
artifacts/func -V
artifacts/tolk -v
- name: Upload artifacts
uses: actions/upload-artifact@master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ton-x86-64-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
artifacts/lite-client -V
artifacts/fift -V
artifacts/func -V
artifacts/tolk -v
- name: Upload artifacts
uses: actions/upload-artifact@master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ test/regression-tests.cache/
**/*build*/
.idea
.vscode
.DS_Store
dev/
zlib/
libsodium/
libmicrohttpd-0.9.77-w32-bin/
Expand Down
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ add_subdirectory(adnl)
add_subdirectory(crypto)
add_subdirectory(lite-client)
add_subdirectory(emulator)
add_subdirectory(tolk)

#BEGIN tonlib
add_subdirectory(tonlib)
Expand Down Expand Up @@ -626,6 +627,30 @@ if (NOT NIX)
endif()
endif()

# Tolk tests
if (NOT NIX)
if (MSVC)
set(PYTHON_VER "python")
else()
set(PYTHON_VER "python3")
endif()
add_test(
NAME test-tolk
COMMAND ${PYTHON_VER} tolk-tester.py tests/
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tolk-tester)
if (WIN32)
set_property(TEST test-tolk PROPERTY ENVIRONMENT
"TOLK_EXECUTABLE=${CMAKE_CURRENT_BINARY_DIR}/tolk/tolk.exe"
"FIFT_EXECUTABLE=${CMAKE_CURRENT_BINARY_DIR}/crypto/fift.exe"
"FIFTPATH=${CMAKE_CURRENT_SOURCE_DIR}/crypto/fift/lib/")
else()
set_property(TEST test-tolk PROPERTY ENVIRONMENT
"TOLK_EXECUTABLE=${CMAKE_CURRENT_BINARY_DIR}/tolk/tolk"
"FIFT_EXECUTABLE=${CMAKE_CURRENT_BINARY_DIR}/crypto/fift"
"FIFTPATH=${CMAKE_CURRENT_SOURCE_DIR}/crypto/fift/lib/")
endif()
endif()

#BEGIN internal
if (NOT TON_ONLY_TONLIB)
add_test(test-adnl test-adnl)
Expand Down
23 changes: 3 additions & 20 deletions assembly/native/build-macos-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }

if [ "$with_tests" = true ]; then
ninja storage-daemon storage-daemon-cli blockchain-explorer \
tonlib tonlibjson tonlib-cli validator-engine func fift \
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
lite-client pow-miner validator-engine-console generate-random-id json2tlo dht-server \
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont \
Expand All @@ -162,30 +162,12 @@ if [ "$with_tests" = true ]; then
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli blockchain-explorer \
tonlib tonlibjson tonlib-cli validator-engine func fift \
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
lite-client pow-miner validator-engine-console generate-random-id json2tlo dht-server \
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
fi

strip -s storage/storage-daemon/storage-daemon
strip -s storage/storage-daemon/storage-daemon-cli
strip -s blockchain-explorer/blockchain-explorer
strip -s crypto/fift
strip -s crypto/func
strip -s crypto/create-state
strip -s crypto/tlbc
strip -s validator-engine-console/validator-engine-console
strip -s tonlib/tonlib-cli
strip -s http/http-proxy
strip -s rldp-http-proxy/rldp-http-proxy
strip -s dht-server/dht-server
strip -s lite-client/lite-client
strip -s validator-engine/validator-engine
strip -s utils/generate-random-id
strip -s utils/json2tlo
strip -s adnl/adnl-proxy

cd ..

if [ "$with_artifacts" = true ]; then
Expand All @@ -197,6 +179,7 @@ if [ "$with_artifacts" = true ]; then
cp build/blockchain-explorer/blockchain-explorer artifacts/
cp build/crypto/fift artifacts/
cp build/crypto/func artifacts/
cp build/tolk/tolk artifacts/
cp build/crypto/create-state artifacts/
cp build/crypto/tlbc artifacts/
cp build/validator-engine-console/validator-engine-console artifacts/
Expand Down
24 changes: 3 additions & 21 deletions assembly/native/build-macos-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test $? -eq 0 || { echo "Can't configure ton"; exit 1; }

if [ "$with_tests" = true ]; then
ninja storage-daemon storage-daemon-cli blockchain-explorer \
tonlib tonlibjson tonlib-cli validator-engine func fift \
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
lite-client pow-miner validator-engine-console generate-random-id json2tlo dht-server \
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont \
Expand All @@ -90,31 +90,12 @@ if [ "$with_tests" = true ]; then
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli blockchain-explorer \
tonlib tonlibjson tonlib-cli validator-engine func fift \
tonlib tonlibjson tonlib-cli validator-engine func tolk fift \
lite-client pow-miner validator-engine-console generate-random-id json2tlo dht-server \
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
fi


strip -s storage/storage-daemon/storage-daemon
strip -s storage/storage-daemon/storage-daemon-cli
strip -s blockchain-explorer/blockchain-explorer
strip -s crypto/fift
strip -s crypto/func
strip -s crypto/create-state
strip -s crypto/tlbc
strip -s validator-engine-console/validator-engine-console
strip -s tonlib/tonlib-cli
strip -s http/http-proxy
strip -s rldp-http-proxy/rldp-http-proxy
strip -s dht-server/dht-server
strip -s lite-client/lite-client
strip -s validator-engine/validator-engine
strip -s utils/generate-random-id
strip -s utils/json2tlo
strip -s adnl/adnl-proxy

cd ..

if [ "$with_artifacts" = true ]; then
Expand All @@ -126,6 +107,7 @@ if [ "$with_artifacts" = true ]; then
cp build/blockchain-explorer/blockchain-explorer artifacts/
cp build/crypto/fift artifacts/
cp build/crypto/func artifacts/
cp build/tolk/tolk artifacts/
cp build/crypto/create-state artifacts/
cp build/crypto/tlbc artifacts/
cp build/validator-engine-console/validator-engine-console artifacts/
Expand Down
28 changes: 3 additions & 25 deletions assembly/native/build-ubuntu-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ cmake -GNinja .. \
test $? -eq 0 || { echo "Can't configure ton"; exit 1; }

if [ "$with_tests" = true ]; then
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
validator-engine lite-client pow-miner validator-engine-console blockchain-explorer \
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
adnl-proxy create-state emulator test-ed25519 test-ed25519-crypto test-bigint \
Expand All @@ -153,35 +153,13 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
validator-engine lite-client pow-miner validator-engine-console blockchain-explorer \
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
adnl-proxy create-state emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
fi

strip -s storage/storage-daemon/storage-daemon \
storage/storage-daemon/storage-daemon-cli \
blockchain-explorer/blockchain-explorer \
crypto/fift \
crypto/tlbc \
crypto/func \
crypto/create-state \
validator-engine-console/validator-engine-console \
tonlib/tonlib-cli \
tonlib/libtonlibjson.so.0.5 \
http/http-proxy \
rldp-http-proxy/rldp-http-proxy \
dht-server/dht-server \
lite-client/lite-client \
validator-engine/validator-engine \
utils/generate-random-id \
utils/json2tlo \
adnl/adnl-proxy \
emulator/libemulator.*

test $? -eq 0 || { echo "Can't strip final binaries"; exit 1; }

# simple binaries' test
./storage/storage-daemon/storage-daemon -V || exit 1
./validator-engine/validator-engine -V || exit 1
Expand All @@ -195,7 +173,7 @@ if [ "$with_artifacts" = true ]; then
mkdir artifacts
mv build/tonlib/libtonlibjson.so.0.5 build/tonlib/libtonlibjson.so
cp build/storage/storage-daemon/storage-daemon build/storage/storage-daemon/storage-daemon-cli \
build/crypto/fift build/crypto/tlbc build/crypto/func build/crypto/create-state build/blockchain-explorer/blockchain-explorer \
build/crypto/fift build/crypto/tlbc build/crypto/func build/tolk/tolk build/crypto/create-state build/blockchain-explorer/blockchain-explorer \
build/validator-engine-console/validator-engine-console build/tonlib/tonlib-cli \
build/tonlib/libtonlibjson.so build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy \
build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine \
Expand Down
28 changes: 3 additions & 25 deletions assembly/native/build-ubuntu-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cmake -GNinja -DTON_USE_JEMALLOC=ON .. \
test $? -eq 0 || { echo "Can't configure ton"; exit 1; }

if [ "$with_tests" = true ]; then
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
validator-engine lite-client pow-miner validator-engine-console blockchain-explorer \
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
adnl-proxy create-state emulator test-ed25519 test-ed25519-crypto test-bigint \
Expand All @@ -61,35 +61,13 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
ninja storage-daemon storage-daemon-cli fift func tolk tonlib tonlibjson tonlib-cli \
validator-engine lite-client pow-miner validator-engine-console blockchain-explorer \
generate-random-id json2tlo dht-server http-proxy rldp-http-proxy \
adnl-proxy create-state emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
fi

strip -s storage/storage-daemon/storage-daemon \
storage/storage-daemon/storage-daemon-cli \
blockchain-explorer/blockchain-explorer \
crypto/fift \
crypto/tlbc \
crypto/func \
crypto/create-state \
validator-engine-console/validator-engine-console \
tonlib/tonlib-cli \
tonlib/libtonlibjson.so.0.5 \
http/http-proxy \
rldp-http-proxy/rldp-http-proxy \
dht-server/dht-server \
lite-client/lite-client \
validator-engine/validator-engine \
utils/generate-random-id \
utils/json2tlo \
adnl/adnl-proxy \
emulator/libemulator.*

test $? -eq 0 || { echo "Can't strip final binaries"; exit 1; }

# simple binaries' test
./storage/storage-daemon/storage-daemon -V || exit 1
./validator-engine/validator-engine -V || exit 1
Expand All @@ -105,7 +83,7 @@ if [ "$with_artifacts" = true ]; then
mkdir artifacts
mv build/tonlib/libtonlibjson.so.0.5 build/tonlib/libtonlibjson.so
cp build/storage/storage-daemon/storage-daemon build/storage/storage-daemon/storage-daemon-cli \
build/crypto/fift build/crypto/tlbc build/crypto/func build/crypto/create-state build/blockchain-explorer/blockchain-explorer \
build/crypto/fift build/crypto/tlbc build/crypto/func build/tolk/tolk build/crypto/create-state build/blockchain-explorer/blockchain-explorer \
build/validator-engine-console/validator-engine-console build/tonlib/tonlib-cli \
build/tonlib/libtonlibjson.so build/http/http-proxy build/rldp-http-proxy/rldp-http-proxy \
build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine \
Expand Down
5 changes: 3 additions & 2 deletions assembly/native/build-windows-2019.bat
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ IF %errorlevel% NEQ 0 (
)

IF "%1"=="-t" (
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tonlib tonlibjson ^
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tolk tonlib tonlibjson ^
tonlib-cli validator-engine lite-client pow-miner validator-engine-console generate-random-id ^
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator ^
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net ^
Expand All @@ -166,7 +166,7 @@ IF %errorlevel% NEQ 0 (
exit /b %errorlevel%
)
) else (
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tonlib tonlibjson ^
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tolk tonlib tonlibjson ^
tonlib-cli validator-engine lite-client pow-miner validator-engine-console generate-random-id ^
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator
IF %errorlevel% NEQ 0 (
Expand Down Expand Up @@ -204,6 +204,7 @@ build\blockchain-explorer\blockchain-explorer.exe ^
build\crypto\fift.exe ^
build\crypto\tlbc.exe ^
build\crypto\func.exe ^
build\tolk\tolk.exe ^
build\crypto\create-state.exe ^
build\validator-engine-console\validator-engine-console.exe ^
build\tonlib\tonlib-cli.exe ^
Expand Down
Loading

0 comments on commit 62ede18

Please sign in to comment.