diff --git a/ecosystem/node/overview.mdx b/ecosystem/node/overview.mdx index f68f83bf2..a792509ba 100644 --- a/ecosystem/node/overview.mdx +++ b/ecosystem/node/overview.mdx @@ -1,64 +1,78 @@ --- title: "Overview" -description: "Pick the right TON node setup and understand the operational work it requires." --- -A full node is a software that stores the whole blockchain state locally, opposite to lite-clients, which request small pieces of data from liteservers when needed. It does not solve any problem itself, but provides a base for other services requiring a full blockchain state (validator, liteserver, etc). Usually, full nodes keep only the latest part of the blockchain state, which is vital for ensuring client applications' network stability and operation. Full nodes _prune_ the state of the TON blockchain they keep. This means the full node automatically removes earlier blocks that become unnecessary for the network to manage its data volume effectively. To allow client applications to look for blocks and transactions and send new transactions into the TON blockchain, full nodes are equipped with the liteserver functionality. A full node can be set up using [mytonctrl](./setup-mytonctrl) tool, which also activates validator or liteserver mode for you. +import { Aside } from "/snippets/aside.jsx"; -## Full node modes +A blockchain full node is software that stores the current state of the [shardchains](/foundations/shards) defined in the node's configuration. -| Role | What it does | When to use it | -| ------------------ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| Liteserver | Stores the latest shards, tracks the masterchain, and serves data to lite-clients. | Required for custom infrastructure, analytics, or to back your own APIs. | -| Archive liteserver | Stores all blockchain data, including old blocks and states. | Required for explorers and other services working with historical data. | -| Validator | Signs blocks, participates in elections, and earns rewards. | Needed to run validation with your stake or to operate a nominator pool service. | -| Collator | Produces blocks for validators. | Needed to reduce load on your validators by setting up block creation on a separate machine. | -| Nominator pool | Accepts funds from stakers and runs a validator with their stake. | Needed when you want to securely accept stakes from multiple parties and share rewards between them. | -| Single nominator | Secure way to run a validator without depositing all funds to a hot wallet. | Generally, you should use it each time you want to run a new validator. | -| Liquid staking | | | +Full nodes keep only the most recent data and automatically prune outdated data to optimize storage usage. +They stay synchronized with other full nodes to maintain a consistent copy of the state across the network. -## Do you need your own node? +A full node can operate in two modes: +- [Liteserver](/ecosystem/node/overview#liteserver), which can also act as an [archive liteserver](/ecosystem/node/overview#archive-liteserver). +- [Validator](/ecosystem/node/overview#validator), which can also act as a collator. -- **Run your own full node** when you need guaranteed uptime or to serve high-volume workloads without third-party rate limits. Validators and staking services need to install a node and activate validator mode. -- **Rely on public endpoints** when building prototypes or light integrations. Community liteservers and APIs such as [Toncenter](../rpc/toncenter) or other [RPC providers](../rpc/overview) already expose the blockchain for read access and transaction submission. +Full nodes are managed through the [MyTonCtrl](/ecosystem/node/mytonctrl/overview) tool, which provides additional node management modes. -## Pick your target environment +## MyTonCtrl management modes -| If you need | Run | -| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Validator or nominator capacity | [Setting up a node using MyTonCtrl](./setup-mytonctrl) with the validator, nominator pool, or single nominator workflows; the wrapper automates validator wallets, overlays, elections, and upgrades. | -| Liteserver APIs | [Setting up a node using MyTonCtrl](./setup-mytonctrl) with liteserver option (and archive mode if needed) to expose API for applications. | -| An isolated development network | [Setting up a local blockchain using MyLocalTon](./setup-mylocalton) to spin up a local shard, explorer, and APIs for rapid iterations with no mainnet impact. | +| Mode | Description | +|:-----------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Liteserver](/ecosystem/node/overview#liteserver) | In this mode, node keeps the latest shardchain state and serves it to lite clients — external services that request blockchain data. For example, it provides up-to-date blockchain data for wallets. | +| [Archive liteserver](/ecosystem/node/overview#archive-liteserver) | In this mode, node stores all blockchain data, including old blocks and states. For example, it serves explorers with historical data. | +| [Validator](/ecosystem/node/overview#validator) | In this mode, node signs blocks, participates in elections, and earns rewards. It is used to run validation with your stake. | +| [Collator](/ecosystem/node/overview#collator) | In this mode, node produces blocks for validators. It reduces load on the validators by setting up block creation on a separate host machine. | +| [Nominator pool](/ecosystem/node/overview#nominator-pool) | In this mode, the smart contract accepts stakes from multiple users and operates a validator on their behalf, distributing rewards securely among participants. | +| [Single nominator](/ecosystem/node/overview#liquid-staking) | In this mode, the smart contract accepts stakes from a single user and operates a validator on the user’s behalf, distributing rewards securely using a cold wallet. | +| [Liquid staking](/ecosystem/node/overview#liquid-staking) | In this mode, the smart contract issues a liquid staking token. Users delegate funds for validation, and staking rewards increase the token’s value. | + +### Liteserver + +Liteserver provides an [ADNL](/foundations/network) API to fetch specific blocks, accounts, and transactions instead of synchronizing a full state. It is also useful to run HTTP API, which provide endpoints to interact with liteserver without a need to connect over ADNL. + +### Archive liteserver -## Full node +Archive nodes are full nodes that do not prune the blockchain state, which increases storage requirements. It requires 12 TB of disk space, compared to approximately 1 TB for other node types. -**The full node** is a basic node type within the TON blockchain. It serves as the backbone of the TON blockchain by keeping its block history — in other words, its _current state_. +### Validator -Compared to **archive nodes**, full nodes keep only the latest part of the blockchain state, which is vital for ensuring client applications' network stability and operation. Full nodes _prune_ the state of the TON blockchain they keep. This means the full node automatically removes earlier blocks that become unnecessary for the network to manage its data volume effectively. + -To allow client applications to look for blocks and transactions and send new transactions into the TON blockchain, full nodes are equipped with the liteserver functionality. +Validator nodes or validators are the TON network participants who propose new blocks and verify transactions according to TON's [_proof-of-stake_](https://en.wikipedia.org/wiki/Proof_of_stake) mechanism. The top 400 validators are selected based on network [configuration parameter](/foundations/config#param-16%3A-validators-limits). Validators receive rewards for validation. -## Archive node +### Collator -The archive node is a full node that keeps the entire block history of the TON blockchain. These nodes act as the decentralized point of truth to ensure consistency of the whole blockchain history. They are a backend for blockchain explorers and other applications relying on deep transaction history. + -Archive nodes do not prune the blockchain state, elevating system requirements, especially in storage. According to the latest estimations, while full and validator nodes require about 1 TB of disk space, archive nodes need about 12 TB to store the complete block history. +Collator produces new blocks. Usually it is a validator part, but it is possible to run it on a separate machine to improve performance of validation. -## Validator node +### Nominator pools -**Validator nodes** or **validators** are the TON network participants who propose new blocks and verify transactions according to the TON's _proof-of-stake_ mechanism. In this way, validators contribute to the overall blockchain security. + -Validators get rewards in TON for successful participation in the validation process. +### Liquid staking -To be entitled to propose and validate blocks, other participants elect validators based on the amount of TON they hold — in other words, their _stake_. The more TON a validator stakes, the higher its chances of being elected, validating blocks for the network, and earning rewards. As a rule, validator operators motivate other TON holders to stake with them to get passive income from the resulting rewards. In this way, validators ensure network stability and security and contribute to its growth. + -## Interacting with TON nodes +## When to run your own node -TON nodes can run in **liteserver mode**, which allows external applications to interact with the TON blockchain. In this mode, the nodes process requests from clients, enabling them to access blockchain data, send transactions, and retrieve information about blocks and transactions. Liteserver uses the Abstract Datagram Network Layer (ADNL) protocol, so you generally also use `ton-http-api` (a Toncenter-like API), which acts as an HTTP-to-ADNL frontend and exposes an HTTP API. +- **Use public endpoints when:** + - building prototypes or light integrations. -Full and archive nodes typically enable liteserver mode because they store blockchain history and handle external requests. In contrast, validator nodes do not need it as they focus on validating new blocks efficiently without extra workload from external queries. + -You have two options to allow your application to interact with the TON blockchain: +- **Run your own full node when:** + - running a validator or staking service. + - guaranteed uptime or high-volume access beyond third-party limits is required. -1. To have a stable connection, you can set up your own full or archive node with a liteserver mode and ton-http-api enabled using [MyTonCtrl](./setup-mytonctrl). -1. If you cannot set up your TON node with a liteserver, you can use [Toncenter](../rpc/toncenter) or other [RPC providers](../rpc/overview). + +## Select the target environment + +| If you need | Run | +|---------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Validator or nominator | [Setting up a node using MyTonCtrl](./setup-mytonctrl) with validator, nominator pool, or single nominator workflows. MyTonCtrl automates validator wallets, overlays, elections, and upgrades. | +| Liteserver APIs | [Setting up a node using MyTonCtrl](./setup-mytonctrl) with liteserver mode. Enable archive mode if required. | +| Isolated development network | [Setting up a local blockchain using MyLocalTon](./setup-mylocalton) with a local shard, explorer, and APIs for development and testing without affecting the mainnet. |