🔑Installation
Prerequisites
Before setting up the validator node, make sure you have the following:
A Linux-based server (Ubuntu recommended) with at least 4 GB RAM, 2 CPU cores, and 50 GB of free disk space.
Root (or sudo) privileges on your server.
Basic knowledge of the command line in Linux/Ubuntu.
CrowdControl CLI tool to interact with the network.
A CrowdControl wallet with sufficient funds to stake as a validator (minimum stake may vary, check the CrowdControl documentation).
Step 1: Installing Dependencies
First, you need to install some essential packages on your server.
Update your system:
sudo apt update && sudo apt upgrade -y
Install required dependencies:
sudo apt install -y build-essential curl wget git jq unzip
Install Go (Golang):
CrowdControl's node software is built using Go. Install Go to compile and run the validator node.
wget https://golang.org/dl/go1.20.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xvzf go1.20.5.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
Verify Go installation:
go version
You should see output similar to go version go1.20.5 linux/amd64
.
Step 2: Clone the CrowdControl Repository
Now, we will clone the CrowdControl repository that contains the code for the validator node.
cd ~
git clone https://github.com/crowdcontrolnetwork/crowdcontrol.git
cd crowdcontrol
Checkout the latest stable release (replace v1.0.0
with the current stable release tag):
v1.0.0
with the current stable release tag):git checkout v1.0.0
Step 3: Build the Validator Node
Now that you have the CrowdControl repository, let's build the node software.
make build
This command will compile the validator node binaries. After this process, you should see the compiled binaries under the bin/
directory.
Check that the build was successful:
ls bin/
You should see an executable file, for example: crowdcontrol-validator
.
Step 4: Configure the Validator Node
Next, configure your validator node. This involves setting up configuration files and connecting to the CrowdControl network.
Create the configuration directory:
mkdir -p ~/.crowdcontrol
Initialize the Validator Node:
~/crowdcontrol/bin/crowdcontrol-validator init
This will generate the necessary configuration files in the ~/.crowdcontrol/
directory.
Step 5: Set Up Your Validator Wallet
In order to participate as a validator, you need to have a wallet and some tokens to stake. If you don't have a wallet yet, you can create one using the CrowdControl CLI.
crowdcontrol-wallet create
This command will generate a wallet for you. Make sure to back up your mnemonic phrase, as you will need it to recover your wallet in case something goes wrong.
Check wallet balance:
crowdcontrol-wallet balance
Transfer tokens to your wallet:
To participate as a validator, you need to stake some tokens. Follow the CrowdControl staking instructions to transfer tokens from your exchange or another wallet into your CrowdControl wallet.
Step 6: Configure Validator Parameters
In your ~/.crowdcontrol/config
directory, you'll find the validator.toml
file. Open this file and update the following parameters:
validator_address
: Your validator address (this will be provided once you set up the wallet).staking_amount
: The amount of tokens you want to stake to become a validator.rpc_address
: The IP and port of the RPC server for communication (defaults to0.0.0.0:26657
).
Example validator.toml
:
[validator]
validator_address = "crowdcontrol1xxxxxx...YourValidatorAddress"
staking_amount = "1000000"
rpc_address = "0.0.0.0:26657"
Step 7: Start the Validator Node
Now that your configuration is complete, it's time to start your validator node.
Run the following command:
~/crowdcontrol/bin/crowdcontrol-validator start
This will start the validator node and begin syncing it with the CrowdControl blockchain network. Depending on the network size and your internet speed, this process might take a while.
Check node status:
To check the status of your validator node, you can use the following command:
crowdcontrol-validator status
This will show you information about your node's synchronization status, current block, and whether your validator is actively participating in the consensus.
Step 8: Monitor and Maintain the Validator Node
Once your validator node is up and running, you need to monitor its performance and make sure it's working properly.
Monitor logs:
To monitor the logs of your validator node, use the following command:
tail -f ~/.crowdcontrol/logs/validator.log
This will show you real-time logs. If there are any issues with your node, they'll be displayed here.
Set up automatic restarts:
To ensure your node restarts automatically in case of failure, use a service manager like systemd
.
Create a new service unit for crowdcontrol-validator
:
sudo nano /etc/systemd/system/crowdcontrol-validator.service
Add the following content to the file:
[Unit]
Description=CrowdControl Validator Node
After=network.target
[Service]
ExecStart=/home/username/crowdcontrol/bin/crowdcontrol-validator start
WorkingDirectory=/home/username/crowdcontrol
User=username
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Save the file and enable the service:
sudo systemctl enable crowdcontrol-validator.service
sudo systemctl start crowdcontrol-validator.service
Now your node will automatically restart if it crashes or if the system reboots.
Step 9: Participate in Consensus and Earn Rewards
Once your validator is fully synced, you will start participating in the consensus process by validating transactions and blocks. You will earn rewards for securing the network based on the amount of tokens you have staked and the performance of your node.
Last updated