Validator Node
Validator nodes are critical to the Sonic chain, responsible for validating transactions and creating new blocks in accordance with the consensus protocol. These nodes ensure the integrity and security of the network by verifying data, participating in block creation, and maintaining the chain’s state.
Unlike archive nodes, validator nodes focus on real-time operations rather than storing extensive historical data or responding to general API requests.
To run a validator node on the Sonic mainnet or Blaze testnet, follow the steps below.
Steps to Run a Validator
Minimum self-stake amount: 500,000 S
Maximum validator size: 15x self-stake
Rewards: ~6% APR initially, plus 15% of delegators' rewards and network fees
1. 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 Hardware Specifications
At least 4 vCPUs and 32 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.
Required Storage Capacity
1 TB of local SSD/NVMe is sufficient for a validator database.
Network Settings
A Sonic 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 Sonic client and its bundled tools. Example (Ubuntu/Debian):
sudo apt-get update
sudo apt-get install -y build-essential git
Install 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
EOT
source /etc/profile.d/golang.sh
3. Build the Sonic Node Software
Check the latest Sonic release and adjust commands if necessary:
git clone https://github.com/0xsoniclabs/Sonic.git
cd Sonic
git fetch --tags && git checkout -b v2.0.1 tags/v2.0.1
make all
You can confirm the Sonic release by running:
build/sonicd version
Optionally, copy the binaries to a system-wide location:
sudo mv build/sonic* /usr/local/bin/
4. Prime the Sonic Database
To participate in the Sonic network, you need a valid state database. The fastest way is to use a genesis file from the official repository. Download the appropriate genesis file. For the mainnet, for example:
wget https://genesis.soniclabs.com/sonic-mainnet/genesis/sonic.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
.
GOMEMLIMIT=54GiB sonictool --datadir ~/.sonic \
--cache 12000 genesis \
--mode validator sonic.g
After processing, you should see a confirmation of a successfully imported state.
5. 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 ~/.sonic --cache 12000 --mode validator
The Sonic 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.
6. Create a Validator Wallet
Your Sonic 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 S).
We recommend creating the wallet securely (e.g. a hardware wallet). If you choose to create it locally using sonictool:
sonictool --datadir ~/.sonic account new
Important: Keep your wallet and keys secure. Never share them.
7. Create a Validator Signing Key
A Sonic validator node signs consensus messages. Your node needs a validator signing key to participate. Create it on the server:
sonictool --datadir ~/.sonic 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.
8. 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 S). 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 Sonic explorer and navigate to the SFC address.
The contract is validated and you can interact with it using SonicScan 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.
9. Run Your Validator Node
Stop the currently running node:
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:
GOMEMLIMIT=50GiB sonicd \
--datadir ~/.sonic \
--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.
10. Validator Name and Logo
Create a config file in JSON
format that contains the following parameters (you can also leave parameters empty):
{
"name": "VALIDATOR_NAME", /* Name of the validator */
"logoUrl": "LOGO_URL", /* Validator logo (PNG|JPEG|SVG 100x100) starting https:// */
"website": "WEBSITE_URL", /* Website icon on the right */
"contact": "CONTACT_URL" /* Contact icon on the right */
}
/* It could look something like this 👇 */
{
"name": "SonicLabs",
"logoUrl": "https://repository.sonic.soniclabs.com/validator/sonic.svg",
"website": "https://www.soniclabs.com",
"contact": "https://www.soniclabs.com/contact"
}
Host it somewhere so it is publicly accessible, such as in this example. Make sure anybody can download the JSON file using a browser and that the hosting site supports HTTPS. A 100x100 logo size is sufficient.
Now you need to insert the JSON URL into the STI contract.
Go to SonicScan and open the STI contract.
Hit Contract -> Write Contract.
Find the function updateInfo and paste the JSON URL.
Connect using your validator account Web3 wallet (the one you used to register).
Sign and execute the update.
11. Next Steps
Congratulations! You are now running a Sonic validator node.
Last updated