TON White Paper Technical Brief
1. Introduction
This document aims to summarize the core themes, important concepts and key facts described in the TON White Paper, supplemented by original citations.
2. Main Content
The TON White Paper details the technical architecture, network design and service applications of the TON blockchain platform. The project is committed to building a high-throughput, scalable blockchain platform with the goal of processing millions of transactions per second.
2.1 TON Blockchain: 2-Blockchain Collection
Multi-level blockchain architecture: The TON blockchain is not a single blockchain, but a multi-level system consisting of a main chain, a work chain and a shard chain.
"The TON blockchain is actually a collection of blockchains (or even a collection of blockchains of blockchains, or 2-blockchains, which will be further explained in Section 2.1.17), because no single blockchain project can achieve our goal of processing millions of transactions per second, while the existing standard is only tens of transactions per second."
Unlimited Sharding Paradigm: TON adopts a bottom-up sharding approach, treating each account as being in its own independent shard chain, and enabling interaction between accounts through message passing.
"The infinite sharding paradigm dictates that we consider each account (or smart contract) to be in its own shard chain. Then, the only way for one account to affect the state of another account is to send it a message (this is a special case of the so-called actor model, where accounts act as actors; see 2.4.2)."
Main chain: The only main chain is responsible for maintaining the global state and coordinating the work chain.
Work chain: Up to 2^32 work chains, each with independent rules and transaction types.
Shard chain: Each work chain can be subdivided into up to 2^60 shard chains, which are responsible for handling part of the accounts and are distinguished by the first few bits of the account address.
Dynamic sharding: The number of shard chains can be automatically split and merged according to the load to achieve dynamic expansion.
“An important feature of the TON blockchain is that it implements dynamic sharding, which means that the number of shards is not fixed. Instead, shard (w, s) can be automatically subdivided into shards (w, s.0) and (w, s.1) if certain formal conditions are met (essentially, if the transaction load on the original shard is high enough for a long time). Conversely, if the load remains too low for a period of time, shards (w, s.0) and (w, s.1) can be automatically merged back into shard (w, s).”
2-Blockchain Mechanism: Each block is actually a small blockchain (vertical blockchain) used to repair invalid blocks without a real fork.
"Each block in each shard chain (and the main chain) is actually not just a block, but a mini-blockchain. Usually, this "blockchain" or "vertical blockchain" contains exactly one block, which we can then consider to be just the corresponding block of the shard chain (also called the "horizontal blockchain" in this case). However, if an incorrect shard chain block needs to be fixed, a new block is submitted in the "vertical blockchain" containing a replacement block for the invalid "horizontal blockchain" block, or a block containing a "block difference" containing only the description of the part of the previous version of the block that needs to be changed. This is a TON-specific mechanism for replacing detected invalid blocks without a real fork of all related shard chains; it will be explained in more detail in Section 2.1.17. For now, we just point out that each shard chain (and the main chain) is not a traditional blockchain, but a blockchain of blockchains, or a two-dimensional blockchain, or 2-blockchain for short."
Fast message passing: Instant hypercube routing technology is used to achieve fast message passing and processing between shard chains.
"The infinite sharding paradigm dictates that we consider each account (or smart contract) to be in its own shard chain. Then, the only way for one account to affect the state of another account is to send it a message (this is a special case of the so-called actor model, where accounts act as actors; see 2.4.2)."
TON Virtual Machine (TVM): Used to execute smart contract code, supporting advanced features such as arbitrary algebraic data types, hash maps, and closures.
"TVM represents all data as a collection of (TVM) cells (see 2.3.14). Each cell contains at most 128 bytes of data and at most 4 references to other cells. As a result of the "everything is a cell bag" philosophy (see 2.5.14), this enables TVM to handle all data related to the TON blockchain, including blocks and blockchain global state when necessary."
Multi-currency support: Supports up to 2^32 different cryptocurrencies, each distinguished by a 32-bit currency_id.
2.2 TON Network
Abstract Datagram Network Layer (ADNL): Built on the UDP protocol, it provides secure and reliable inter-node communication.
"It uses UDP as a transport protocol, but has its own abstract address, packet format, encryption and traffic camouflage technology, as well as mechanisms for node discovery and connection establishment."
Kademlia Distributed Hash Table (DHT): Used for node discovery, storage of network information, and quick location of required data.
"TON Distributed Hash Table (DHT) plays a vital role in the network part of the TON project, used to locate other nodes in the network."
Overlay Network: Built on top of ADNL, used for message broadcasting and data synchronization for specific purposes.
"In a multi-blockchain system like the TON blockchain, even full nodes are usually only interested in getting updates (i.e. new blocks) about certain shard chains. To do this, a special overlay (sub)network must be built inside the TON network, on top of the ADNL protocol discussed in Section 3.1, one for each shard chain."
2.3 TON Services and Applications
The TON platform supports a variety of services and applications, including:
TON Payments: Fast and low-cost off-chain transactions based on payment channels and Lightning Network technology.
“To achieve the necessary scalability, we propose the TON Blockchain, a “tightly coupled” multi-blockchain system with a bottom-up sharding approach (see 2.8.14 and 2.1.2). To further improve potential performance, we introduce a 2-blockchain mechanism to replace invalid blocks (see 2.1.17) and instant hypercube routing for faster communication between shards (see 2.4.20). A brief comparison of the TON Blockchain with existing and proposed blockchain projects (see 2.8 and 2.9) highlights the benefits of this approach for systems seeking to process millions of transactions per second.”
TON DNS: Maps human-readable domain names to TON network addresses and blockchain accounts.
“TON DNS is a predefined service that uses a collection of smart contracts to map human-readable domain names to (256-bit) addresses of ADNL network nodes and TON blockchain accounts and smart contracts.”
TON Storage: Provides users with a secure and reliable distributed file storage service.
"TON Storage (see 4.1.7) uses this technique to find nodes with copies of the required files (e.g., snapshots of shard chain states or old blocks). However, its more important use is to create "overlay multicast subnets" and "network interest groups" (see 3.3). The idea is that only certain nodes are interested in updates to a particular shard chain. If the number of shard chains becomes very large, even finding a node interested in the same shard may become complicated. This "distributed torrent tracker" provides a convenient way to find some of these nodes. Another option is to request them from validators, but this will not be a scalable approach, and validators may choose not to respond to such queries from arbitrary unknown nodes."
TON Proxy: Provides anonymous access to the network and access to TON services.
"TON Proxy Service solves the problem of anonymous access and hidden services in the TON network, similar to the role of Tor or I2P in the traditional Internet."
3. Summary
The TON white paper presents an ambitious plan to build a high-performance, scalable blockchain ecosystem. Its unique multi-level blockchain architecture, innovative sharding technology, fast network communication and rich service applications provide a solid foundation for the development and deployment of the next generation of decentralized applications.
4. Appendix
The TON white paper also includes a classification and comparison of other blockchain projects, as well as a detailed description of the TON coin.
This briefing is intended to provide an overview of the main contents of the TON white paper. Readers are advised to refer to the original text for more detailed information.
TON Blockchain Learning Guide
Glossary
Term DefinitionsTONThe Open Network, Open Network 2-BlockchainA blockchain composed of blocks where each block in a "horizontal" blockchain is itself a small "vertical" blockchain, used to correct invalid blocks without a hard forkUnlimited Sharding ParadigmA conceptual model that views sharding as the extreme case of splitting each account or smart contract into its own shard, and then grouping these account chains into more manageable shardsInstant Hypercube RoutingA novel feature in the TON blockchain that allows messages to be created in a block in one shard and processed in the next block of the target shard, regardless of the total number of shardsMainchainThe only blockchain in the TON blockchain that stores global configuration data and the current state of all workchainsHashWorkchainA blockchain with specific rules and transactions that can define up to 2^32 shardsChainA sub-blockchain of a workchain that is responsible for processing a subset of accounts based on the first few digits of the account addressValidatorsDeposit a large amount of TON coins as collateral, nodes responsible for generating and validating new blocksNominators stake their TON A user who delegates coins to a validator in exchange for a portion of the rewards, while taking on the risk of the validator misbehaving Fisherman A node that earns rewards by identifying and proving invalid blocks Collaborator A node that helps the validator by collecting transactions and preparing new block candidates TON Virtual Machine (TVM) A virtual machine unit used to execute smart contract code in the main chain and the base working chain Basic data structure in TVM, containing up to 128 data bytes and up to 4 references to other units Message A way of passing values and information between accounts, similar to messages in the actor model External messages Messages that originate from outside the TON blockchain, such as transaction logs from users Messages that are recorded in a specific shard chain for observation, representing external outputs of the blockchain "supercomputer" Merkle-Patricia tree A data structure for efficiently storing and verifying large data sets (such as blockchain states) Merkle proof A cryptographic proof that allows light nodes to verify the integrity of data without downloading the entire data set ADN An abstract datagram network layer protocol used in the TON network TON DHT A distributed hash table based on Kademlia, used to locate nodes and data in the TON network TON Storage A distributed file storage technology for storing arbitrary files that can be accessed through TON Network Access TON Proxy A service for anonymous network access and access to TON services TON Payments A platform for instant off-chain money transfers in the TON ecosystem Payment Channels A technology that allows two parties to conduct multiple transactions off-chain without submitting each transaction to the blockchain Short Answer Questions
Describe the architecture of the TON blockchain.
The TON blockchain is a multi-blockchain system consisting of a main chain and multiple work chains. Each work chain can be further divided into multiple shard chains. The main chain is responsible for storing global configuration data and the current state hash of all work chains. Shard chains are responsible for processing transactions and maintaining account status.
Explain the role of the infinite sharding paradigm in the TON blockchain.
The infinite sharding paradigm is a thought experiment that pushes the concept of sharding to the extreme. It assumes that each account or smart contract is located on its own independent shard chain and interacts with each other through messages. This paradigm helps understand the design decisions of the TON blockchain, such as instant hypercube routing and the account as a participant model.
How does the TON blockchain solve the problem of invalid blocks?
The TON blockchain uses a 2-blockchain mechanism to solve the invalid block problem. The blocks in each shard chain are themselves a small "vertical" blockchain. If a block is found to be invalid, it can be corrected without a hard fork by adding a new block to the "vertical" blockchain.
Compare and contrast Delegated Proof of Stake (DPoS) and Byzantine Fault Tolerant (BFT) PoS algorithms.
DPoS systems use pre-selected validators to take turns producing blocks, while BFT PoS systems require a subset of validators to reach consensus on each block. DPoS systems are generally faster but more vulnerable to attack, while BFT PoS systems are more secure but slower.
What role does messaging play in the TON blockchain?
Messages are the primary way to pass value and information between accounts in the TON blockchain. Each transaction consists of an account receiving a message, changing its state according to specific rules, and generating multiple (possibly one or zero) new messages to other accounts.
Describe some key features of the TON Virtual Machine (TVM).
TVM is a stack-based virtual machine used to execute smart contracts on the TON blockchain. It supports features such as arbitrary algebraic data types, built-in hash maps, and 256-bit elliptic curve cryptography.
Explain the "everything is a bag of cells" philosophy in the TON blockchain.
The "everything is a bag of cells" philosophy means that all data structures in the TON blockchain, such as blocks, states, and Merkle proofs, can ultimately be represented as a collection of cells. This approach simplifies the storage, serialization, and network transmission of data.
What is the use of TON DHT in the TON network?
TON DHT is a Kademlia-based distributed hash table used to locate nodes and data in the TON network. It can be used to find validators, collaborators, and nodes storing specific data.
How does TON DNS work?
TON DNS is a hierarchical domain name service that uses smart contracts to map human-readable domain names to TON network addresses and TON blockchain accounts. It allows users to interact with TON services and smart contracts using easy-to-remember names.
Give a brief overview of TON Payments and its role in the TON ecosystem.
TON Payments is a platform for instant off-chain currency transfers in the TON ecosystem. It uses payment channels and other technologies to enable fast, low-cost transactions, making it suitable forMicropayments and other use cases.
Argumentative Essay Topics
Discuss how the architecture of the TON blockchain facilitates scalability.
Analyze the strengths and weaknesses of the TON virtual machine relative to other blockchain platforms (e.g., the Ethereum virtual machine).
Evaluate the effectiveness of the TON network in supporting decentralized applications and services.
Compare and contrast the TON blockchain with other blockchain projects that aim to achieve high transaction throughput (e.g., Solana, Algorand).
Explore the potential use cases and strengths of the TON ecosystem in specific industries such as decentralized finance (DeFi), supply chain management, or social media.
TON Blockchain FAQs
1. What is the TON blockchain?
The TON (The Open Network) blockchain is a scalable general-purpose blockchain project designed to handle millions of transactions per second. It achieves its scalability using a novel approach called the "infinite sharding paradigm," which views the blockchain as a collection of potentially large numbers of "account chains," each of which describes the state and state transitions of an account.
2. How does the TON blockchain achieve its scalability?
The TON blockchain uses several key technologies to achieve scalability:
**Sharding:** The TON blockchain is actually a collection of blockchains, each responsible for processing a portion of accounts. This sharding approach allows transactions to be processed in parallel, thereby increasing throughput.
**Dynamic Sharding:** Unlike static sharding, the number of shards in the TON blockchain is not fixed and can be automatically split or merged based on network load, allowing for greater efficiency and flexibility.
**Instant Hypercube Routing:** This novel messaging system allows for fast message delivery in the system regardless of the total number of shards, ensuring fast communication between different shards.
3. What are "workchains" and "shardchains" in the TON blockchain?
**Workchains:** The TON blockchain can accommodate up to 2^32 workchains, each of which defines specific rules and transaction types. For example, "Workchain Zero" is the base workchain used for TON smart contracts and TON coins.
**Shardchains:** Each workchain is further subdivided into up to 2^60 shardchains, each of which follows the same rules as its workchain but is responsible for only a portion of accounts.
4. How does the TON blockchain ensure security?
The TON blockchain uses a Proof of Stake (PoS) consensus mechanism to ensure security. Validators need to deposit a large amount of TON coins as "stake" to participate in block generation and verification. If validators behave improperly (such as signing invalid blocks), they will be punished and lose some or all of their stake.
5. How does the TON blockchain handle invalid blocks?
The TON blockchain uses a unique mechanism called "two-dimensional blockchain" to handle invalid blocks without hard forks or rollbacks. When an invalid block is detected, a new block is added to its "vertical blockchain" that contains a correction or replacement of the invalid block, ensuring the consistency and correctness of the system state.
6. What are the characteristics of the TON Virtual Machine (TVM)?
TVM is a virtual machine used to execute smart contract code on the TON blockchain. Unlike other virtual machines, TVM does not just use 256-bit integers, but supports arbitrary algebraic data types, making it more suitable for executing code written in high-level languages (especially functional languages).
7. How is the concept of "everything is a bag of cells" reflected in the TON blockchain?
The TON blockchain adopts the concept of "everything is a bag of cells" and represents all data (including blocks, states, smart contract storage, and Merkle proofs) as a collection of TVM cells. This universal approach simplifies data storage, serialization, and network transmission, and allows developers to focus on high-level application logic.
8. How does the TON blockchain compare to other blockchain projects?
The TON blockchain is a "fifth-generation" blockchain project that combines BFT PoS consensus, dynamic sharding, instant hypercube routing, and support for heterogeneous work chains. These features make it a truly scalable general-purpose blockchain platform that can meet the needs of applications that need to process millions of transactions per second. Compared with other projects, the TON blockchain has significant advantages in scalability, security, and flexibility.