Skip to main content
Although many people refer to TON only as a blockchain, The Open Network is a combination of the following components:
  • A flexible multi-blockchain platform with Turing-complete smart contracts (TON Blockchain)
  • A peer-to-peer network used by blockchain nodes (TON Network)
  • A distributed file storage technology (TON Storage)
  • A network proxy/anonymizer layer (TON Proxy)
  • A Kademlia-like distributed hash table (TON DHT)
  • A service for assigning human-readable names to accounts, smart contracts, services, and network nodes (TON DNS)
  • A platform for micro-payments (TON Payments)
This article provides a general overview of TON Services, beyond the blockchain.

TON Network

TON Network is a peer-to-peer network used for accessing the TON Blockchain, sending transactions, and receiving updates. Also, it can support arbitrary distributed services, blockchain-related or not. The cornerstone in TON networking is the ADNL protocol, built on top of the TCP/UDP stack. The TON Distributed Hash Table (DHT) plays a crucial role in the networking component of the TON Project, as it is used to locate other nodes in the network. You can think of it as a big, persistent key-value data storage. The keys of the TON DHT are simply 256-bit integers. In most cases, they are computed as sha256 hashes of a TL-serialized objects. The values assigned to these 256-bit keys are essentially arbitrary byte strings of limited length.

TON Storage

TON Storage allows users to share and store files using The Open Network. Since storing files on-chain isn’t practical, TON Storage only stores Merkle proofs for file content on-chain. It uses TON DHT to find the nodes that have a copy of a required file (e.g., a snapshot of the state of a shardchain, or an old block). Then, one might essentially create a torrent for this file and use TON DHT as a “distributed torrent tracker” for this torrent.

TON Proxy

TON Proxy provides a protocol where nodes wishing to offer their services (with or without compensation) as tunnels for ADNL network traffic can register. Those needing them can then choose one of these nodes based on the price, latency, and bandwidth offered. Since ADNL traffic is encrypted, Proxy can’t access tunneled data, meaning that this protocol is secure. Running TON Proxy enables access to TON Sites (HTTP over ADNL). This can be combined with TON DNS and other TON Services, forming together what is called “Open Network”.

Reverse proxy

To use TON Proxy, install Tonutils Reverse Proxy.
  1. Download
    • Linux:
    wget https://github.com/tonutils/reverse-proxy/releases/latest/download/tonutils-reverse-proxy-linux-amd64
    chmod +x tonutils-reverse-proxy-linux-amd64
    
    • For other OS:
    Build it from sources. A Go environment is required to build.
    git clone https://github.com/tonutils/reverse-proxy.git
    cd reverse-proxy
    make build
    
    To build for other operating systems, run make build.
  2. Run
    • with domain configuration:
    ./tonutils-reverse-proxy-linux-amd64 --domain <your-domain.ton>
    
    Then, scan the QR code shown in the terminal using the wallet. Confirm the transaction to link the required domain to the site.
    • without domain configuration:
    Alternatively, if there is no a .ton or .t.me domain, run the proxy in simple mode with an ADNL address (suffix .adnl):
    ./tonutils-reverse-proxy-linux-amd64
    
  3. Usage The TON Site is now accessible via the ADNL address or the domain. To change settings such as the proxy pass URL, edit the config.json file and restart the proxy. The default proxy pass URL is: http://127.0.0.1:80/. The proxy also adds the following headers:
    • X-Adnl-Ip – the client’s IP address.
    • X-Adnl-Id – the client’s ADNL ID.

TON DNS

TON DNS is a service that translates human-readable domain names like test.ton or mysite.temp.ton into TON smart contract addresses, ADNL addresses used by services on the TON Network such as TON Sites, and more. The standard is implemented using smart contracts and config parameters. TON Domain names are well-established in the ecosystem - various wallet applications and explorers recognize them. TON Domains can be assigned to any ADNL address, meaning that it is possible to assign names to TON Storage files (bags).

TON Payments

TON Payments platform enables “instant payments” - a way to transfer monetary values without the need to commit all transactions to the blockchain. This protocol is built on top of TON Blockchain, using a system of smart contracts. The core idea for such a “lightning network” is point-to-point payment channels. Two parties create a shared “money pool” and then update the balance inside it. The overall overhead of such instant payments is so small that one can use them for micro-payments. For example, a TON file-storing service might charge the user for every 128 KiB of downloaded data, or a paid TON Proxy might require some tiny micro-payment for every 128 KiB of traffic relayed.