Running a validator on a live network is a lot of responsibility! You will be accountable for not only your own stake, but also the stake of your current nominators. If you make a mistake and get slashed, your money and your reputation will be at risk. However, running a validator can also be very rewarding, knowing that you contribute to the security of a decentralized network while growing your stash.
Warning: It is highly recommended that you have significant system administration experience before attempting to run your own validator.
Initial Set-up
Requirements
The most common way for a beginner to run a validator is on a cloud server running Linux. You may choose whatever provider that your prefer, and whatever operating system you are comfortable with. For this guide we will be using Ubuntu 18.04, but the instructions should be similar for other platforms.
Note Prerequisites: Install Rust & Dependencies
This command will fetch the latest version of Rust and install it.
curl https://sh.rustup.rs -sSf | sh -s -- -y
To configure your shell, run the following command.
source $HOME/.cargo/env
Finally, run this command to install the necessary dependencies for compiling and running the Cherry Node.
# Clone the cherry-relay-node GitHub Repository
git clone https://github.com/CherryNetwork/cherry-relay-node.git
cd cherry-relay-node
# Always build from cherry branch
git checkout cherry
cargo build --release
Running the Cherry binary
If you were running a node previously(especially if the node was not a validator) run the following for purging the previous chain: ./target/release/cherry purge-chain --chain node/service/chain-specs/mainnet-relay-regenesis.json -y on Mainnet or ./target/release/cherry purge-chain --chain cherry-testnet -y on Testnet
1. Mainnet
Methods:
Binary:
./target/release/cherry --chain node/service/chain-specs/mainnet-relay-regenesis.json \
--name "<insert a name of your choice for your validator>" \
--bootnodes /ip4/13.39.104.56/tcp/30333/p2p/12D3KooWLeBxr6vEwv2vDmQMGgd1P72WvwuhcY1YGBD421B4PfuM \
--validator --base-path=/tmp/cherry-mainnet \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--rpc-methods=unsafe \
--rpc-cors all \
--rpc-external \
--ws external
./target/release/cherry --chain cherry-testnet \
--name "<insert a name of your choice for you validator>" \
--bootnodes /ip4/52.47.101.101/tcp/30333/p2p/12D3KooWNdDRo2BkTLfBr88SZpWn43tSbTFkUo5fMMa8byKVg8uz \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--rpc-methods=unsafe \
--rpc-cors all \
--rpc-external \
--ws external
You need to tell the chain your Session keys by signing and submitting an extrinsic. This is what associates your validator node with your Controller account on Cherry.
Since you’re using a remote server, it is easier to run this command on the same machine (while the node is running):