Main.ton.dev
Everscale main network configuration
Install / Use
/learn @everx-labs/Main.ton.devREADME
README
This HOWTO contains instructions on how to build and configure a RUST validator node in TON blockchain. The instructions and scripts below were verified on Ubuntu 20.04.
Table of Contents
Getting Started
1. System Requirements
| Configuration | CPU (threads) | RAM (GiB) | Storage (GiB) | Network (Gbit/s)| |---|:---|:---|:---|:---| | Minimum |48|128|1000|1|
SSD/NVMe disks are obligatory.
2. Prerequisites
2.1 Set the Environment
Adjust (if needed) main.ton.dev/scripts/env.sh:
Set export DEPOOL_ENABLE=yes in env.sh for a depool validator (an elector request is sent to a depool from a validator multisignature wallet).
Set export DEPOOL_ENABLE=no in env.sh for a direct staking validator (an elector request is sent from a multisignature wallet directly to the elector).
cd main.ton.dev/scripts/
. ./env.sh
Note: Make sure to run the script as
. ./env.sh, not./env.sh
2.2 Install Dependencies
install_deps.sh script supports Ubuntu OS only.
./install_deps.sh
Install and configure Docker according to the official documentation.
Note: Make sure to add your user to the docker group, or run subsequent command as superuser:
sudo usermod -a -G docker $USER
3. Deploy RUST Validator Node
Do this step when the network is launched. Deploy the node:
./deploy.sh 2>&1 | tee ./deploy.log
Note: the log generated by this command will be located in the main.ton.dev/scripts/ folder and can be useful for troubleshooting.
Wait until the node is synced. Depending on network throughput this step may take significant time (up to several hours).
4. Check Node synchronization
Use the following command to check if the node is synced:
docker exec -it rnode /ton-node/tools/console -C /ton-node/configs/console.json --cmd getstats
Script output example:
tonlabs console 0.1.254
COMMIT_ID:
BUILD_DATE: 2021-12-24 10:53:20 +0300
COMMIT_DATE:
GIT_BRANCH:
{
"sync_status": "synchronization finished",
"masterchainblocktime": 1640343840,
"masterchainblocknumber": 13393489,
"timediff": 4,
"in_current_vset_p34": true,
"in_next_vset_p36": false,
"last_applied_masterchain_block_id": {"shard":"-1:8000000000000000","seq_no":13393489,"rh":"e74d505222bbe64617bbd42939cf01334b035990ae4b4e285e67ecbb1b537dd3","fh":"fc0be7c22310389400a7bdbd000b3737b317ce44d92e9a5ed72086c4fa404afa"},
"processed_workchain": 0,
"validation_stats": {
"-1:8000000000000000": "1 sec ago",
"0:e800000000000000": "1 sec ago"
},
"collation_stats": {
"-1:8000000000000000": "never",
"0:e800000000000000": "6 sec ago"
},
"tps_10": 2,
"tps_300": 1
}
If the timediff parameter is less than 10 seconds, synchronization with masterchain is complete.
"sync_status": "synchronization finished" means synchronization with workchains is complete
Note: The sync process may not start for up to one hour after node deployment, during which this command may result in error messages. If errors persist for more than an hour after deployment, review deployment log for errors and check the network status.
5. Configure validator multisignature wallet
There is a small difference between direct staking and DePool validators on this step:
- For direct staking validator it is necessary to create and deploy a validator SafeMultisig wallet in
-1chain. - For a DePool validator it is necessary to create and deploy a validator SafeMultisig wallet in
0chain.
You can use TONOS-CLI for this purpose. It should be configured to connect to the main.ton.dev network.
Refer to this document for the detailed wallet creation procedure, or follow the links in the short guide below:
- All wallet custodians should create seed phrases and public keys for themselves. At least three custodians are recommended for validator wallet, one of which will be used by the validator node. All seed phrases should be kept secret by their owners and securely backed up.
- The wallet deployer (who may or may not be one of the custodians) should gather the public keys from all custodians.
- The wallet deployer should obtain SafeMultisig contract code from the repository.
- The wallet deployer should generate deployment keys.
- The wallet deployer should generate validator wallet address: in -1 chain for direct staking validator or in 0 chain for a DePool validator.
- Any user should send at least 1 token to the generated wallet address to create it in the blockchain.
- The wallet deployer should deploy the wallet contact to the blockchain and set all gathered public keys as its custodians. At this step the number of custodian signatures required to make transactions from the wallet is also set (>=2 recommended for validator wallets). Deploy to -1 chain for direct staking validator or to 0 chain for a DePool validator.
- In case of direct staking, the funds for staking should be transferred to the newly created validator wallet.
Once the wallet is deployed, place 2 files on the validator node:
/ton-node/configs/${VALIDATOR_NAME}.addrshould contain validator multisignature wallet address in formX:XXX...XXX(the folder on the host ismain.ton.dev/docker-compose/ton-node/configs)/ton-node/configs/keys/msig.keys.jsonshould contain validator multisignature custodian's keypair (the folder on the host ismain.ton.dev/docker-compose/ton-node/configs/keys/)
The node will use the wallet address and the keys provided to it to generate election requests each validation cycle.
Note: If the validator wallet requires more than 1 custodian signature to make transactions, make sure each transaction sent by the validator node is confirmed by the required amount of custodians.
6. Configure DePool
For a DePool validator it is necessary to deploy a DePool contract to workchain 0.
You can use TONOS-CLI for this purpose. It should be configured to connect to the main.ton.dev network.
Refer to this document for the detailed DePool creation procedure, or follow the links in the short guide below:
- Obtain contract code from the repository.
- Generate deployment keys.
- Calculate contract addresses.
- Send tokens to the calculated addresses.
- Deploy contracts. Make sure to specify your validator wallet in the DePool contract at this step.
- Configure DePool [state up
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
