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
EmelyanenkoK 0daee1d887
Merge message dispatch queue (#1030)
* Deferred messages and msg metadata

* Store out msg queue size in state

* Add checks for queue processing

1. Collator must process at least one message from AccountDispatchQueue (unless block is full)
2. The first message from a transaction is not counted, it cannot be deferred (unless AccountDispatchQueue is not empty)

* Return msg metadata from LS in listBlockTransactions[Ext]

* Enable new features by capabilities

* Changes in deferred messages

* Process deferred messages via new_msgs in collator
* Rework setting deferred_lt, bring back check_message_processing_order, check order of deferred_lt in validator

* Use have_unprocessed_account_dispatch_queue_ in collator

* Fix setting transaction lt for deferred messages

* Fix lite-client compilation error

* Changes in process_dispatch_queue, rename deferred_lt -> emitted_lt

* Fix compilation error

* Use uint64 for msg queue size

* Add liteServer.getBlockOutMsgQueueSize

* Fix compilation error

* Fix typos in comments

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
2024-06-27 16:12:23 +03:00
.github Fix TON compilation on Windows (github only) (#1020) 2024-06-24 17:09:25 +03:00
adnl chore: fix typos (#980) 2024-06-27 11:16:12 +03:00
assembly Fix TON compilation on Windows (github only) (#1020) 2024-06-24 17:09:25 +03:00
blockchain-explorer Blockchain explorer: use liteServer.runSmcMethod (#994) 2024-05-14 17:11:01 +03:00
catchain Add custom overlays for external messages (#949) 2024-04-01 16:44:08 +03:00
CMake Fix TON compilation on Windows (github only) (#1020) 2024-06-24 17:09:25 +03:00
common Soft send message validation (#1021) 2024-06-11 15:08:08 +03:00
create-hardfork Add candidates cache (#1000) 2024-05-24 09:58:07 +03:00
crypto Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
dht Improve DHT store/load, pinging overlay peers (#840) 2023-12-28 09:43:10 +03:00
dht-server Command to disable state serializer (#1011) 2024-05-31 20:50:31 +03:00
doc Soft send message validation (#1021) 2024-06-11 15:08:08 +03:00
docker Update Docker build (#816) 2024-01-11 22:42:57 +03:00
emulator Added nullptr check for emulation_result (#1037) 2024-06-27 15:45:59 +03:00
example lz4 support in multiple builds (#946) 2024-03-28 10:18:11 +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 Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
keys Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
lite-client Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +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 Fix bug of broadcast stop on receiving the last FEC piece (#1040) 2024-06-27 15:44:51 +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 Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
storage Fix typo in variable name (#940) 2024-03-26 14:54:20 +03:00
tdactor Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
tddb chore: fix typos (#980) 2024-06-27 11:16:12 +03:00
tdfec Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
tdnet Improve TON build scripts and some tests (#855) 2024-01-15 23:48:04 +03:00
tdtl Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
tdutils Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
terminal Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
test Add candidates cache (#1000) 2024-05-24 09:58:07 +03:00
third-party Various changes in TVM, github builds and tests (#793) 2023-11-03 14:43:34 +03:00
tl Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
tl-utils Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
ton Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
tonlib Tonlib patch (#966) 2024-04-15 13:44:30 +03:00
utils Add DUEPAYMENT and some others + small fixes of new opcodes (#881) 2024-01-29 16:38:42 +03:00
validator Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
validator-engine Merge message dispatch queue (#1030) 2024-06-27 16:12:23 +03:00
validator-engine-console Command to disable state serializer (#1011) 2024-05-31 20:50:31 +03:00
validator-session Decrease catchain_max_block_delay to 0.4 2024-06-20 16:44: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 Improve TON build scripts and some tests (#855) 2024-01-15 23:48:04 +03:00
.gitmodules TVM Upgrade (#686) 2023-05-24 21:14:13 +03:00
Changelog.md Add changelog 2024-06-08 17:57:38 +03:00
CMakeLists.txt Use jemalloc (#987) 2024-05-12 12:48:14 +03:00
Dockerfile Use jemalloc (#987) 2024-05-12 12:48:14 +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 Add TON Research Forum (#919) 2024-03-06 17:15:49 +03:00
recent_changelog.md Add changelog 2024-06-08 17:57:38 +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 (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

Build TON portable binaries with Nix package manager

You need to install Nix first.

   sh <(curl -L https://nixos.org/nix/install) --daemon

Then compile TON with Nix by executing below command from the root folder:

  cp -r assembly/nix/* .
  export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
  nix-build linux-x86-64-static.nix

More examples for other platforms can be found under assembly/nix.

Running tests

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