About
About TorusWhitepaper
Ecosystem
Developers
Developer HubContract DeployerContract WizardContract ExplorerDocumentationTestnet Faucet
Staking
Stake TQFValidator CalculatorVesting Portal
Community
Contact

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

  1. Launch a Server Instance
  2. Build the Torus Node Software
  3. Prime the Torus Database
  4. Install Required Development Tools
  5. Register Your Validator
  6. Run Your Validator Node
  7. Synchronize With the Network)
  8. Create a Validator Wallet
  9. Create a Validator Signing Key
  10. Validator Name and Logo
  11. How to Shutdown a validator
  12. 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):

bash
sudo apt-get update
sudo apt-get install -y build-essential git

Install Go language compiler (Ubuntu/Debian):

bash
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.sh

Build the Torus Node Software

Check the latest Torus release and adjust commands if necessary:

bash
git clone https://github.com/0xsoniclabs/Sonic.git

cd Sonic

git fetch --tags && git checkout -b v2.0.6 tags/v2.0.6

make all

You can confirm the release by running:

bash
build/sonicd version

Optionally, copy the binaries to a system-wide location:

bash
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:

bash
wget https://genesis.toruschain.com/mainnet/genesis.g

Use 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.

bash
GOMEMLIMIT=54GiB sonictool --datadir /data/torus \
    --cache 12000 genesis --experimental \
    --mode validator genesis.g

After 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.

bash
GOMEMLIMIT=54GiB sonicd --datadir /data/torus --cache 12000 --mode validator

The 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 :

bash
sonictool --datadir /data/torus account new

Important: 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:

bash
sonictool --datadir /data/torus validator new

Follow 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:

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:

bash
pkill sonicd

Wait 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:

bash
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