Validator Setup Manual for SatoshiChain
The Validator Setup Manual is designed to help individuals and organizations become validators on the SatoshiChain network and contribute to the security and stability of the system.
NOTE: During the PoA period (approximately one year), Validators will be accepted by approval only. To apply to be a validator on SatoshiChain, please fill out this form.
This manual provides step-by-step instructions on how to set up and run a validator node, as well as best practices and important considerations for operating a successful and secure validator.
Minimum server requirements should be as listed below for testing phase:
•4 core CPU, 8 GB RAM, 100GB SSD or Nvme storage
•Linux Ubuntu Server 22.04 (LTS) x64 OS
•Screen service installed
•Node is installed (version v12 or newer)
•zip service installed
•Should be open port 1478 in your network For both installation we will share prepareNode.zip file.
We created a ZIP file to prepare a node. You need to upload this ZIP file to the server and unzip it. Required SSH commands are as below.
Our node folder is /home/satoshiNode. In this tutorial (if you are not root user, you need to use "~/" instead of "/home/" path from commands. Only use like: mkdir satoshiNode).
Server commands after connecting ssh(as root):
- mkdir /home/satoshiNode
- cd /home/satoshiNode
- upload prepareNode.zip file to /home/satoshiNode folder
- unzip prepareNode.zip
- chmod +x prepareNodeforPOS.sh
- Write your server public IP address there and press enter
After IP address is entered the script will manage all and run the node automatically. When the process will be completed “All done!" message will be displayed.
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
apt install screen -y
apt install git -y
apt install zip -y
Create validator folder and upload chain files:
Upload prepareNode.zip file to ~/satoshiNode/ folder
You should have below 4 files for installation:
We need to make below files executable:
chmod +x satoshi-blockchain
chmod +x faucet
chmod +x genesis.json
Now create Satoshi Chain files and export validator info (Public wallet address, BLS Public address and NodeID) to secrets.txt:
./satoshi-blockchain secrets init --data-dir data > secrets.txt
Run below command to get 100 SATS in your wallet, we will use 1 SATS in stake stage:
./faucet -wallet VALIDATOR_PUBLIC_WALLET_ADDRESS(from secrets.txt)
Add your public server IP address instead of serverIP in command and run your node as validator. We can call this as your validator start command:
screen -L -A -m -d -S satoshi-posNode ./satoshi-blockchain server --price-limit 500000000000000 --data-dir ./data --chain genesis.json --libp2p 0.0.0.0:1478 --nat serverIP --seal
System will start to sync all blocks in network, you need to wait to finish sync. You can check blocks with below command and go to next-step after see latest blocks(you can check current blocks from explorer):
tail -f screenlog.0
Unzip smart contracts to server for stake and register your validator:
Now you need to create environment variables to declare your validator:
Create .env file using vi command or any editor you want like Nano. Press A for edit file. You can use CTRL + C and type :wq and enter to save added variables.
Paste below variables in .env file, change PRIVATE_KEYS and BLS_PUBLIC_KEY and save file:
Install all modules:
Stake as validator:
npm run stake
Move to the parent directory of current directory:
Check if validator command works right. If you see there "satoshi-posNode" after execute below command means validator app working fine:
You can see logs via tail command:
tail -f screenlog.0
If you want to stop your validator app:
screen -S satoshi-posNode -X quit