My guide for installing and launching the validator node of the 0G labs project
This article will tell you how to install the validator node of the 0G LABS project. I decided to write a guide for this particular project, as I really like its technical part and once I myself faced the problem of installing it.
Testnet Configuration
Let's talk about the parameters of this project. The data is presented below in an easy-to-understand format, just come back here if you forgot anything.
- Chain-Name - 0G-Newton-Testnet
- Chain-ID - zgtendermint_16600-2
- Token-Symbol - A0GI
- Chain-RPC - https://rpc-testnet.0g.ai
- Chain-Websocket - wss://rpc-testnet.0g.ai/ws
- Storage-RPC - https://rpc-storage-testnet.0g.ai
Also, for your convenience, I will post the official explorers and a link to the faucet here:
- FAUCET - https://faucet.0g.ai/
- Chain-Explorer - https://chainscan-newton.0g.ai/
- Storage-Explorer - https://storagescan-newton.0g.ai/
Hardware Requirement
Before you start, make sure that you have a UTC time zone set, if you have a different time zone, then you may get an error!
Install 0g via CLI
git clone -b v0.2.3 https://github.com/0glabs/0g-chain.git ./0g-chain/networks/testnet/install.sh source ~/.profile
Set Chain ID
0gchaind config chain-id zgtendermint_16600-2
Initialize Node
0gchaind init <your_validator_name> --chain-id zgtendermint_16600-2
Download genesis.json
file
sudo apt install -y unzip wget rm ~/.0gchain/config/genesis.json wget -P ~/.0gchain/config https://github.com/0glabs/0g-chain/releases/download/v0.2.3/genesis.js 0gchaind validate-genesison
The last command from the list verifies that genesis is correct.if you have an error at this stage, then try to delete the downloaded file and install it again.
Add Seeds
In order for our node to start and be able to connect to the network, we need to specify the seeds. I suggest using the following seeds, which are presented in the official community of the project.
[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656
The data should be inserted in this format: seeds = "<node-id>@<ip>:<p2p port>"
. The configuration file is located in this path: $HOME/.0gchain/config/config.toml
Start Testnet
Now we have to start the node and wait for the synchronization to take place. The node is launched with the following command:
0gchaind start
Create Validator
As soon as the synchronization takes place, you will be able to create a wallet and replenish it through the FAUCET.
0gchaind keys add <key_name> --eth
The command to create a validator. It only works after you have touched the faucet and checked that your balance has been replenished!
0gchaind tx staking create-validator \ --amount=<staking_amount>ua0gi \ --pubkey=$(0gchaind tendermint show-validator) \ --moniker="<your_validator_name>" \ --chain-id=zgtendermint_16600-2 \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1" \ --from=<key_name> \ --gas=auto \ --gas-adjustment=1.4
I congratulate you, if you have come this far, then most likely you have managed to create your own validator. Remember that only the top 125 validators will become validators!