Run a validator node
Steps to Run a Validator
Requirements
- Minimum stake 500,000 TQF
- Minimum hardware requirements: 8 vCPUs 16GB RAM and at least 1 TB of Amazon EBS General.
Procedure overview
- Launch a Server Instance
- Build the Torus Node Software
- Prime the Torus Database
- Install Required Development Tools
- Register Your Validator
- Run Your Validator Node
- Synchronize With the Network)
- Create a Validator Wallet
- Create a Validator Signing Key
- Validator Name and Logo
- How to Shutdown a validator
- Next Steps
Launch a Server Instance
You can run your validator node on dedicated hardware (bare metal) or use a cloud provider. We recommend choosing one of the established providers, such as Google GCP or Amazon AWS.
Node Specifications
- At least 8 vCPUs and 16 GB of RAM
- At least 1 Gbps redundant backbone connectivity for stable and uninterrupted network traffic
- At least 1 TB of local SSD/NVMe storage. Remote block devices (e.g., AWS EBS) typically do not provide the required latency and random access performance. Google GCP N2D instances with local SSD or AWS i3en.xlarge with instance storage are good options.
- Ubuntu LTS Server (64-bit) or a similar Linux distribution is recommended.
Storage
- 1 TB of local SSD/NVMe is sufficient for a validator database.
Network Settings
A Torus node requires both TCP and UDP network traffic allowed on port 5050 by default. You can use --port <port> to customize this if needed.
2. Install Required Development Tools
You need the essential build tools and the latest Go compiler, version 1.22 or newer, to build the Torus client and its bundled tools. Example (Ubuntu/Debian):
sudo apt-get update
sudo apt-get install -y build-essential gitInstall Go language compiler (Ubuntu/Debian):
sudo rm -rf /usr/local/go
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo tar -xzf go1.23.4.linux-amd64.tar.gz -C /usr/local/
rm -f go1.23.4.linux-amd64.tar.gz
sudo tee /etc/profile.d/golang.sh > /dev/null <<EOT
export GOROOT=/usr/local/go
export GOPATH=\$HOME/go
export PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin
source /etc/profile.d/golang.shBuild the Torus Node Software
Check the latest Torus release and adjust commands if necessary:
git clone https://github.com/0xsoniclabs/Sonic.git
cd Sonic
git fetch --tags && git checkout -b v2.0.6 tags/v2.0.6
make allYou can confirm the release by running:
build/sonicd versionOptionally, copy the binaries to a system-wide location:
sudo cp build/sonic* /usr/local/bin/Prime the Torus Database
To participate in the Torus network, you need a valid state database. The fastest way is to use a genesis file from the official repository. Download the genesis file. For the mainnet, for example:
wget https://genesis.toruschain.com/mainnet/genesis.gUse sonictool to prime the state database. Adjust GOMEMLIMIT and --cache according to your available RAM size. For the most common cases, use 12GiB as --cache and ~90% of RAM as GOMEMLIMIT.
GOMEMLIMIT=54GiB sonictool --datadir /data/torus \
--cache 12000 genesis --experimental \
--mode validator genesis.gAfter processing, you should see a confirmation of a successfully imported state.
Synchronize With the Network
Now that your database is primed, start the node to synchronize it with the network. Ensure your firewall is configured correctly.
GOMEMLIMIT=54GiB sonicd --datadir /data/torus --cache 12000 --mode validatorThe Torus node will connect to the network and advance its state by processing new blocks. Once fully synchronized, the "age" of new blocks should be only a few seconds.
Create a Validator Wallet
Your Torus node is now synchronizing. Next, create a wallet to identify and control your validator account. This wallet must hold the minimum amount you are going to use as the self-stake (500,000 TQF).
We recommend creating the wallet securely (e.g. a hardware wallet). If you choose to create it locally using :
sonictool --datadir /data/torus account newImportant: Keep your wallet and keys secure. Never share them.
Create a Validator Signing Key
A Torus validator node signs consensus messages. Your node needs a validator signing key to participate. Create it on the server:
sonictool --datadir /data/torus validator newFollow the prompts and set a secure password. Note the public key (starts with 0xc00). This key will be used during registration.
Important: Back up your signing key. Although it cannot move funds, misuse could lead to penalties.
Register Your Validator
The network must recognize your validator key. Register by invoking the SFC (Staking and Consensus) contract:
- SFC Contract Address: 0xFC00FACE00000000000000000000000000000000
Call createValidator with your validator public key and at least the minimum required stake (500,000 TQF). Sign this transaction with your validator wallet. After confirmation, query your validator ID using the getValidatorID function. The easiest way would be to open the Torus explorer and navigate to the SFC address.
The contract is validated and you can interact with it using TorusScan and a connected Web3 wallet. The control validator account can be imported into your Web3 wallet either using the generated JSON key store or as your hardware wallet. With the account open, you can sign the createValidator transaction call specifying the amount of stake and the public key obtained in the previous step.
Run Your Validator Node
Stop the currently running node:
pkill sonicdWait for it to gracefully shut down. Never force-terminate it, as it could corrupt the database. Restart your node in validator mode, providing the validator ID, public key, and password file:
GOMEMLIMIT=50GiB sonicd \
--datadir /data/torus \
--cache 12000 \
--mode validator \
--validator.id <your_validator_ID> \
--validator.pubkey <your_public_key> \
--validator.password <path_to_password_file>Your validator node will now participate in consensus and produce blocks.
Congratulations! You are now running a Torus validator node.
How to Shutdown a Validator
- Before shutting down the server or stopping the sonic service . User has to unstake everything from the staking dashboard.
- Refer below for unstaking rules.
Validator Unstaking Rules:
-
The minimum required self-stake (500,000 TQF) cannot be unstaked immediately.
-
To unstake or exit below the minimum 500,000 TQF, validators must provide a 3-month advance notice to the network.
-
If a validator unstakes the full minimum amount without providing the required 3-month notice, a 20% penalty is applied to the unstaked amount.
-
-
Validators may stake more than 500,000 TQF. Any stake above the minimum requirement can be unstaked following standard unstaking rules.
-
All validator unstake requests are subject to a 14-day unbonding period before funds are released to the wallet.
-
Validators can unstake a maximum of 10% of their total staked amount per request.
-
After submitting an unstake request, validators must wait 10 days before submitting another unstake request.
-
-
During the unbonding period:
- Unstaked tokens do not earn rewards
- Unstaked tokens cannot be transferred
Delegators Unstaking Rules(Non-Validator Staker) :
-
Delegators may unstake their delegated TQF at any time, subject to protocol limits.
-
There is no minimum delegation amount required to stake or unstake.
-
Delegators may partially unstake their delegated amount following standard unstaking rules.
-
No advance notice is required for delegators.
-
No penalty applies for normal delegator unstaking.
-
All delegator unstake requests are subject to a 14-day unbonding period before funds are released to the wallet.
-
Delegators can unstake a maximum of 10% of their delegated amount per request.
-
After submitting an unstake request, delegators must wait 10 days before submitting another unstake request.
-
-
During the unbonding period:
- Unstaked tokens do not earn rewards
- Unstaked tokens cannot be transferred