0G fullnode one line installation
Quick Links
RPC, API, JSON-RPC, and Explorer Links
Hardware Requirements to run 0g full node:
- RAM: 64GB
- CPU: 8-Core
- Disk: 1 TB NVME SSD
- Bandwidth: 100 MBps (Download/Upload)
Step 1 ; 0g full node installation
Copy&Paste our OG FullNode auto installation script
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Paknodesarmy/scripts/main/0g/0g_validator.sh)"
- When you copy paste this script, within a few seconds you will be asked to "Enter node name" you have to give the name with which you gonna create your validator.
now wait for the synchronization process to complete... you can track block hight at our explorer https://explorer.paknodesarmy.xyz/0g/staking
Once the synchronization process is complete, you can proceed to step 2.
Step 2; Create validator
Create a wallet, don’t forget to save the mnemonic:
0gchaind keys add wallet --eth
- If you already have wallet, you can recover with this command:
0gchaind keys add wallet --recover --eth
Once you have created or imported a wallet, the next step is to get the public address which starts with 0x, run the following command to get your private key.
0gchaind keys unsafe-export-eth-key wallet
- now import the returned private key to a web3 wallet (eg.Metamask) and copy eth address. and Request testnet tokens at https://faucet.0g.ai/
- Create a validator : change "Validator-Army" to the name with which you want to create your validator
领英推è
0gchaind tx staking create-validator \
--amount=1000000ua0gi \
--pubkey=$(0gchaind tendermint show-validator) \
--moniker="Validator-Army" \
--chain-id="zgtendermint_16600-2" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas=auto \
--gas-adjustment=1 \
--identity="" \
--website="-" \
--security-contact="-" \
--from=wallet -y
Node Management Commands:
View Logs
To view the logs of your 0g node, use the following command:
sudo journalctl -u 0gd -f
Restart Node
To restart your 0g node, use the following command:
sudo systemctl restart 0gd
Check Node Status
- To check the status of your node, use the following command:
curl localhost:26657/status
- To find out if your node is synchronized (if the result is false, it means the node is synchronized), use the following command:
curl -s localhost:26657/status | jq .result.sync_info.catching_up
Find Your Valoper Address
0gchaind keys show wallet --bech val -a
Delegate Tokens
in order to delegate tokens (to increase your stake, delegate to your valoper address), use the following command:
0gchaind tx staking delegate YOUR_VALOPER_ADDRESS 1000000ua0gi --from wallet --chain-id zgtendermint_16600-2 --gas="500000" --gas-prices="50ua0gi"
Remove/delete node
To remove or delete your 0g node, use the following commands:
sudo systemctl stop 0gchaind
sudo systemctl disable 0gchaind
sudo rm /etc/systemd/system/0gchaind.service
rm -rf $HOME/.0gchain
sudo rm /usr/local/bin/0gchain
If you face any problem in node installation or validator creation then comment below we'll help you.