📦Validator Node Setup
This section will guide you through setting up a Validator Node on W Chain.
Step 1: Prepare the System
Before starting, ensure your system meets the minimum requirements for running a node:
vCPUs: 4 or more
Memory: At least 16GB
Disk Space: At least 1TB (SSD or NVMe recommended for optimal performance)
Operating System: Ubuntu 20.04, 22.04, or 24.04
Internet Connection: A broadband connection with at least 5Mbps upload/download speed.
It's possible to run a node from a local dedicated server, but it's recommended to run it on a professional cloud providers such as AWS, Digital Ocean, Azure or GCP.
Step 2: Install Dependencies
Make sure you have up-to-date version of Ubuntu, Git and NPM installed.
Step 3: Prepare Directory
Step 4: Download files from latest Release
To initiate a Node, you need the latest binary and genesis.json. It always available at W Chain's Github Repository for W chain Node.
You need to select the suitable binary based on your Operating System and architecture. You can contact your Cloud Computing Provider if you are not sure about yours.
In this guide, we will use the most common one: Linux (amd64), as it's widely used in AWS EC2 instances.
Download BInary File
In this example we are using v.1.0.6
After the download complete, print your directory contents to get the downloaded file name:
The file name will be in this format: "w-chain-node_" + version tag
+ system
+ "_" + architecture
+ ".tar.gz". Extract the file:
Rename the file (Optional, but important for better UX):
Download genesis.json
genesis.json
You don't need to change anything from this genesis.json, just make sure it exists in the same directory with your binary file.
Step 5: Verify Files
Make sure both binary file and genesis.json is correctly downloaded and in stored in same directory.
Turn the binary file into executable:
Verify the version:
[VERSION INFO]
Release version = 1.0.6
Step 6: Initialize Keys and Blockchain Data Directories
This command will initialize data directory and validator keys:
You will see the newly created public keys printed like this:
You can copy-paste it to some quick note to be used in next steps. We will also need the Private Key of this newly created Public Key.
You will see a single line of string. This is the Private Key.
Same as above, copy the Private Key and store it somewhere safe, we will use it in next step.
When you are done, exit the text editor, no need to save anything. And go back to root directory of your Node:
Step 7: Create Server Config
The node is basically a server that will run 24/7, responding to queries and persisting blocks to database. Instead of passing the configs as flags to server
command, it's strongly recommended to store the server configs in a json/yaml file.
Run this command (in /w-chain
directory) to generate server config template:
You will see a file, default-config.json
created.
Now, we will edit this config file to adjust with your actual server configuration.
This config below assuming you are following previous steps convention on directory creation. It also recommended to use absolute path, which can be different from system to system (usually /home/user/w-chain)
genesis.json
location
genesis.json
locationPath to Data Directory
Ports
NAT Address is your server/instance's Public IP
Minimum Gas Price accepted and Seal flag
Step 9: Staking Contract
To join W Chain Network as a Validator Node, each node must stake at least 10,000,000 (10 Million) WCO. This is to ensure the Node operators to act honestly and follow the consensus, as any malicious act will result to stake slashing (rogue node will lose a part of its staked WCO).
Clone Staking Contract Script from W Chain Repository
It should create new directory: staking-contract. Enter the directory and install the node dependencies
The process will only take few seconds, run this command next:
This will copy the template .env and open it in a text editor, you will see this:
Replace your_private_key_here with the actual Private Key you copied back in Step 6. Do not change anything else, save and exit the text editor.
Step 10: Load up the Stake
The next important step is to fund the Validator address (Public Key) with WCO. Please remember, you need some WCO for gas fee, too! Ideally, you should have at least 10,000,001 WCO inside this address.
After you fund the address, go to /staking-contract
directory and run the stake
script:
Wait for the script to process, if everything is correct, you will get the transaction hash returned.
Next, we will register BLS Public Key (obtained from Step 6). Run this command:
This is an example, use your actual BLS Public Key
Wait for the script to process the on-chain call, if everything is correct, you will get the transaction hash returned.
After you done the stake
and registerBLSPublicKey
, your Validator Node is ready to run!
Step 11: Create a System Service
To keep your Node instance running as a background service, you need to define the service. Run this on your terminal (inside your server/instance).
The text editor will open a blank page. Copy-paste the texts below into it:
Then save and exit the text editor.
Once again, this is assuming you are following the directory and filename convention from previous steps. Your system may have different absolute path and different user, please adjust as needed.
Step 12: Enable and Run the Node Service
After installing new service, you have to reload the service daemon and enable the service.
Then start the service:
Congratulations! Your node is now running and will start to catch up with the network, this may take few days, depends on the block-height and the I/O performance of your node.
Important Commands to Maintain and Monitor Your Node
Service
Logging
Last updated