1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
No description
Find a file
tolk-vm 989629a832
[Tolk] Compiler built-in __expect_type() for testing purposes
Currently, tolk-tester can test various "output" of the compiler:
pass input and check output, validate fif codegen, etc.
But it can not test compiler internals and AST representation.

I've added an ability to have special functions to check/expose
internal compiler state. The first (and the only now) is:
> __expect_type(some_expr, "<type>");
Such a call has special treatment in a compilation process.
Compilation fails if this expression doesn't have requested type.

It's intended to be used in tests only. Not present in stdlib.
2025-01-27 15:30:21 +03:00
.github Merge branch 'master' into testnet 2025-01-27 10:33:58 +03:00
adnl Retry dht query in adnl-peer if peer does not respond for too long 2025-01-13 17:41:10 +03:00
assembly Fix wasm artifacts (#1499) 2025-01-27 10:18:51 +03:00
blockchain-explorer Accelerator: partial fullnodes (#1393) 2024-11-26 14:46:58 +03:00
catchain celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164) 2024-09-23 17:34:37 +03:00
CMake Improve windows build scripts (#1416) 2024-12-11 14:41:45 +03:00
common Merge pull request #1202 from ton-blockchain/tvm-patch 2024-09-23 21:10:57 +03:00
create-hardfork tonNode.getOutMsgQueueProof query in public shard overlays (#1413) 2024-12-04 14:38:57 +03:00
crypto Fix printing TLB NatWidth (#1501) 2025-01-27 12:55:00 +03:00
dht Improve dht lookup in overlays (#1104) 2024-08-15 15:26:35 +03:00
dht-server Accelerator: partial fullnodes (#1393) 2024-11-26 14:46:58 +03:00
doc Enable VmState::jump_to bugfix in version 9 (#1491) 2025-01-24 17:48:05 +03:00
docker * update links to docker image (#1109) 2024-08-23 11:59:40 +03:00
emulator Fix BUILD_SHARED_LIBS issue (#1496) 2025-01-27 14:34:21 +03:00
example TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404) 2024-11-26 16:23:17 +03:00
fec Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
http Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
keyring Export all keys command in validator-engine-console (#1412) 2024-12-03 17:19:12 +03:00
keys Accelerator, part 1 (#1119) 2024-08-23 11:46:40 +03:00
lite-client Fix loading library cell in contract code 2024-12-18 12:57:21 +03:00
lite-client-docs Update links to global configs (#398) 2022-08-15 18:29:02 +03:00
memprof Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
overlay Send validator telemetry to the private overlay (#1325) 2024-11-25 22:37:18 +03:00
rldp Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
rldp-http-proxy Improve DHT store/load, pinging overlay peers (#840) 2023-12-28 09:43:10 +03:00
rldp2 celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164) 2024-09-23 17:34:37 +03:00
storage Remove redundant linking dependencies (#1198) 2024-09-23 17:31:01 +03:00
tdactor celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164) 2024-09-23 17:34:37 +03:00
tddb Limit RocksDB logs size (#1278) 2024-10-15 17:43:09 +03:00
tdfec celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164) 2024-09-23 17:34:37 +03:00
tdnet Improve TON build scripts and some tests (#855) 2024-01-15 23:48:04 +03:00
tdtl celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164) 2024-09-23 17:34:37 +03:00
tdutils tonNode.getOutMsgQueueProof query in public shard overlays (#1413) 2024-12-04 14:38:57 +03:00
terminal Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
test tonNode.getOutMsgQueueProof query in public shard overlays (#1413) 2024-12-04 14:38:57 +03:00
third-party TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404) 2024-11-26 16:23:17 +03:00
tl Validate Merkle proofs and updates in TLB validate (#1479) 2025-01-16 09:42:05 +03:00
tl-utils LS getDispatchQueueInfo and getDispatchQueueMessages methods (#1161) 2024-09-13 20:47:30 +03:00
tolk [Tolk] Compiler built-in __expect_type() for testing purposes 2025-01-27 15:30:21 +03:00
tolk-tester [Tolk] Compiler built-in __expect_type() for testing purposes 2025-01-27 15:30:21 +03:00
ton Improve readability of validator-engine-console commands (#1426) 2024-12-11 14:48:48 +03:00
tonlib Fix BUILD_SHARED_LIBS issue (#1496) 2025-01-27 14:34:21 +03:00
utils Merge branch 'testnet' into tvm-v9 2025-01-17 12:32:09 +03:00
validator Merge branch 'testnet' into tvm-v9 2025-01-17 12:32:09 +03:00
validator-engine Patch tonlib and validator-engine (#1417) 2024-12-05 18:50:12 +03:00
validator-engine-console Improve readability of validator-engine-console commands (#1426) 2024-12-11 14:48:48 +03:00
validator-session Send only first block candidate optimistically (#1260) 2024-10-09 13:53:46 +03:00
.clang-format initial commit 2019-09-07 14:33:36 +04:00
.clang_complete Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
.editorconfig Add Editorconfig (#800) 2024-01-16 09:59:47 +03:00
.gitattributes initial commit 2019-09-07 14:33:36 +04:00
.gitignore TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404) 2024-11-26 16:23:17 +03:00
.gitmodules TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404) 2024-11-26 16:23:17 +03:00
Changelog.md Fix typos in changelog 2025-01-27 14:33:52 +03:00
CMakeLists.txt Fix BUILD_SHARED_LIBS issue (#1496) 2025-01-27 14:34:21 +03:00
Dockerfile Improve windows build scripts (#1416) 2024-12-11 14:41:45 +03:00
git.cc.in Automatically integrates git build information into executables. 2021-02-27 14:34:43 +03:00
git.h Automatically integrates git build information into executables. 2021-02-27 14:34:43 +03:00
git_watcher.cmake Fix missing git revision when built with Nix. (#680) 2023-05-04 16:49:43 +03:00
GPLv2 updated tonlib 2020-02-06 21:56:46 +04:00
LGPLv2 updated liteserver 2020-02-02 16:53:37 +04:00
LICENSE.LGPL initial commit 2019-09-07 14:33:36 +04:00
README.md fix broken link (#1497) 2025-01-27 10:35:56 +03:00
recent_changelog.md Fix typos in changelog 2025-01-27 14:33:52 +03:00
run-clang-format.sh initial commit 2019-09-07 14:33:36 +04:00

TON logo

Reference implementation of TON Node and tools


Ton Research Telegram Community Group Telegram Foundation Group Telegram Community Chat

Twitter Group TON Overflow Group Stack Overflow Group

Main TON monorepo, which includes the code of the node/validator, lite-client, tonlib, FunC compiler, etc.

The Open Network

The Open Network (TON) is a fast, secure, scalable blockchain focused on handling millions of transactions per second (TPS) with the goal of reaching hundreds of millions of blockchain users.

Updates flow

  • master branch - mainnet is running on this stable branch.

    Only emergency updates, urgent updates, or updates that do not affect the main codebase (GitHub workflows / docker images / documentation) are committed directly to this branch.

  • testnet branch - testnet is running on this branch. The branch contains a set of new updates. After testing, the testnet branch is merged into the master branch and then a new set of updates is added to testnet branch.

  • backlog - other branches that are candidates to getting into the testnet branch in the next iteration.

Usually, the response to your pull request will indicate which section it falls into.

"Soft" Pull Request rules

  • Thou shall not merge your own PRs, at least one person should review the PR and merge it (4-eyes rule)
  • Thou shall make sure that workflows are cleanly completed for your PR before considering merge

Build TON blockchain

Ubuntu 20.4, 22.04, 24.04 (x86-64, aarch64)

Install additional system libraries

  sudo apt-get update
  sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev
          
  wget https://apt.llvm.org/llvm.sh
  chmod +x llvm.sh
  sudo ./llvm.sh 16 all

Compile TON binaries

  cp assembly/native/build-ubuntu-shared.sh .
  chmod +x build-ubuntu-shared.sh
  ./build-ubuntu-shared.sh  

MacOS 11, 12 (x86-64, aarch64)

  cp assembly/native/build-macos-shared.sh .
  chmod +x build-macos-shared.sh
  ./build-macos-shared.sh

Windows 10, 11, Server (x86-64)

You need to install MS Visual Studio 2022 first. Go to https://www.visualstudio.com/downloads/ and download MS Visual Studio 2022 Community.

Launch installer and select Desktop development with C++. After installation, also make sure that cmake is globally available by adding C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin to the system PATH (adjust the path per your needs).

Open an elevated (Run as Administrator) x86-64 Native Tools Command Prompt for VS 2022, go to the root folder and execute:

  copy assembly\native\build-windows.bat .
  build-windows.bat

Building TON to WebAssembly

Install additional system libraries on Ubuntu

  sudo apt-get update
  sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev
          
  wget https://apt.llvm.org/llvm.sh
  chmod +x llvm.sh
  sudo ./llvm.sh 16 all

Compile TON binaries with emscripten

  cd assembly/wasm
  chmod +x fift-func-wasm-build-ubuntu.sh
  ./fift-func-wasm-build-ubuntu.sh

Building TON tonlib library for Android (arm64-v8a, armeabi-v7a, x86, x86-64)

Install additional system libraries on Ubuntu

  sudo apt-get update
  sudo apt-get install -y build-essential git cmake ninja-build automake libtool texinfo autoconf libgflags-dev \
  zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev \
  libtool autoconf libsodium-dev libsecp256k1-dev

Compile TON tonlib library

  cp assembly/android/build-android-tonlib.sh .
  chmod +x build-android-tonlib.sh
  ./build-android-tonlib.sh

TON portable binaries

Linux portable binaries are wrapped into AppImages, at the same time MacOS portable binaries are statically linked executables. Linux and MacOS binaries are available for both x86-64 and arm64 architectures.

Running tests

Tests are executed by running ctest in the build directory. See doc/Tests.md for more information.