ValiTech
  • ℹ️Intro
  • Initia
    • 🐢Introduction
    • 🕖Services
    • ♾️Node guide
  • 0G - Zero Gravity
    • 🐢Introduction
    • 🕖Services
    • ♾️Node guide
  • Aligned Layer
    • 🐢Introduction
    • ♾️Node guide
Powered by GitBook
On this page
  • Installation
  • Additional
  1. 0G - Zero Gravity

Node guide

PreviousServicesNextIntroduction

Last updated 10 months ago

Installation

Use our installation script, specify a name for your node and wait for the installation to complete.

wget -q -O 0g.sh https://api.vali.tech/0g.sh && sudo chmod +x 0g.sh && ./0g.sh && source $HOME/.bash_profile

Create a wallet, don’t forget to save the mnemonic:

0gchaind keys add wallet --eth

If you already have a wallet, you can recover with:

0gchaind keys add wallet --recover --eth

If you want to get the public address which starts with 0x, you could first run the following command to get your key’s private key. Then import the returned private key to a wallet (Metamask for example) to get the public address.

0gchaind keys unsafe-export-eth-key wallet

Request tokens at the . After full synchronization, check the balance, if everything is okay, proceed to create a validator.

0gchaind q bank balances $(0gchaind keys show wallet -a)

Create a validator:

0gchaind tx staking create-validator \  --amount=1000000ua0gi \  --pubkey=$(0gchaind tendermint show-validator) \  --moniker="$VALIDATOR" \  --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 \  --from=wallet -y

Additional

View logs

sudo journalctl -u 0g -f

Restart node:

sudo systemctl restart 0g

Check node status:

curl localhost:26657/status

Find out if the node is synchronized, if the result is false – it means the node is synchronized

curl -s localhost:26657/status | jq .result.sync_info.catching_up

Find out your valoper address:

0gchaind keys show wallet --bech val -a

Delegate tokens (to increase your stake delegate to your valoper address):

0gchaind tx staking delegate YOUR_VALOPER_ADDRESS 1000000ua0gi --from wallet --chain-id zgtendermint_16600-2 --gas="500000" --gas-prices="50ua0gi"

Remove node:

sudo systemctl stop 0gsudo systemctl disable 0gsudo rm -rf $(which 0gchaind) $HOME/.0gchain
♾️
faucet