Become a Validator
Running a validator node requires server based on any linux distributive, installed docker and basic unix shell skills.
Clone the repo
To get started, you need to clone a repository https://gitlab.com/chainfusion/cfnode-compose.git
, this project contains directories with different configurations that help to run a node in docker environment. Right after cloning the repo you need to open validator
directory:
Generate keystore file
A validator needs a key in order to sign blocks, process bridge events and receive a reward. To generate validator key, you need to execute the following command:
When generating the key, you will be asked to create new password that will encrypt your generated key. Generated key will be stored in the keystore/
directory.
Make sure you remember the password you gave when creating a key. Without it you are not able to unlock your account and lose access to validator stake.
Configure validator node
Copy file .env.example
as .env
. In this file you will need to put docker image tag into a IMAGE
variable, put the password of the generated key into a ACCOUNT_PWD
variable, put your public address without leading 0x
from generated key into a ADDRESS
variable. The resulting .env
file should look like this:
Launch validator node
Now let's launch your validator node in background using docker-compose
command:
See validator logs
Last 100 lines of validator logs:
All validator logs:
Staking
After your node is up and running, you can finally stake and become a validator to receive rewards during validation process.
You need to call stake()
method in ValidatorStaking contract. Minimum stake amount is 1000 CFN, more stake amount increases relative validation rewards in CFN.
Verify that node is producing blocks
In order for you to start validating, you must wait for the new epoch (i.e. validation cycle). If everything went correctly before and the committed stake was sufficient to enter the validator shortlist, your validator node will start to produce blocks in the next validation cycle.
Last updated