Steps 1–4 are for validator node installation
Step 5: Install the storage node
Discord group: https://discord.gg/gk6Y7YqunR
Telegram group: https://t.me/niuwuriji
Telegram channel: https://t.me/jiedubalaodi
0G is the first data availability system with a built-in universal storage layer that is super scalable and decentralized. 0G's scalability relies on the idea of splitting the data availability workflow into a data publishing lane and a data storage lane. The bulk of the data transfer happens on the data storage lane, which is backed by the storage layer, achieving horizontal scalability through well-designed partitions, while the data publishing lane guarantees data availability properties through consensus of data availability sampling, which only requires tiny data to be transmitted through the consensus protocol to avoid bottlenecks in transaction broadcasting.
This guide will walk you through the process of setting up a 0g.AI validator node. You will learn how to:
Install and configure the 0g.AI node
Get test tokens
Create validator information and participate in node verification
1. Since the project requires moderate performance of the equipment, you can use local equipment, or VPS (remote server), etc. to build the node
Recommended node configuration: dual-core 8G 300G hard disk
The following is a detailed construction tutorial:
Execute one-click deployment node script
wget -O 0g.sh https://raw.githubusercontent.com/a3165458/0g.ai/main/0g.sh && chmod +x 0g.sh && ./0g.sh
2. Import wallet/create new wallet (the example is to import wallet)
Get the corresponding EVM address
Extract EVM address command: echo "0x$(evmosd debug addr $(evmosd keys show change here to your wallet name -a) | grep hex | awk '{print $3}')"
3. Create a validator (need to claim water) (DC claiming water is temporarily invalid, only webpage can be used to claim water)
Official website for claiming water: https://faucet.0g.ai/ (You can only claim 0.1, which is quite disappointing)
Enter the official DC: https://discord.com/invite/0glabs
Admin ,bro could you please send me some testnet tokens
The corresponding EVM address extracted in the previous step
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
Here, both the token and synchronization height must be met before creation, otherwise an error will be reported
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
4. Go to the website to check your validator's work status:
Validator Explorer: https://explorer.validatorvn.com/OG-Testnet/uptime
At this point, the verifier node is built
If you have created a validator, be sure to back up the file `priv_validator_key.json` in the path $HOME/.evmosd/config/
— — — — — — — — — — — — — — — -
5.
Update storage node installation
Recommended Configuration
Dual core + 8G + 1T SSD
wget -O 0g.sh https://raw.githubusercontent.com/a3165458/0g.ai/main/0g.sh && chmod +x 0g.sh && ./0g.sh
screen -list
Enter the corresponding path to view logs information
cd log
ls
tail -f zgs.log.2024-04-08
At this point, the storage node deployment is complete
— — — — — — — — — — — — — — -
Common commands:
Checking Node Status
evmosd status | jq
Query your authenticator
evmosd q staking validator $(evmosd keys show $WALLET_NAME --bech val -a
Query a validator's missed block counter and jail details
evmosd q slashing signing-info $(evmosd tendermint show-validator)
Release your validator
evmosd tx slashing unjail --from $WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y
Delegate tokens to your validator
evmosd tx staking delegate $(evmosd keys show $WALLET_NAME --bech val -a) <AMOUNT>aevmos --from $WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y
address
evmosd status | jq -r '"\(.NodeInfo.id)@\(.NodeInfo.listen_addr)"'
Edit your validator
evmosd tx staking edit-validator--website="<WEBSITE>" --details="<DESCRIPTION>" --new-moniker="<NEW_MONIKER>" --identity="<KEY BASE PREFIX>" --from=$WALLET_NAME --gas=500000 --gas-prices=99999aevmos -y
control-small-size, 28px); height: var( — control-small-size, 28px);”>
Sending tokens between wallets
evmosd tx bank send $WALLET_NAME <TO_WALLET> <AMOUNT>aevmos --gas=500000 --gas-prices=99999aevmos -y
Check your wallet balance
evmosd q bank balances $(evmosd keys show $WALLET_NAME -a)
Monitor server load
sudo apt update
sudo apt install htop -y
htop
Query active validators
evmosd q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
Query inactive validators
evmosd q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
View node logs
pm2 logs evmosd
Restart the node
pm2 restart evmosd
Stop Node
pm2 stop evmosd
Upgrading Nodes
cd 0g-evmos
git fetch
git checkout tags/
make install
evmosd version
# Restrt the node
pm2 restart evmosd && pm2 logs evmosd
Deleting a node from a server
#If you create a validator, be sure to back up the file `priv_validator_key.json` in the path $HOME/.evmosd/config/
pm2 delete evmosd
rm -rf $HOME/.evmosd $HOME/0g-evmos
gRPC usage examples
wget https://github.com/fullstorydev/grpcurl/releases/download/v1.7.0/grpcurl_1.7.0_linux_x86_64.tar.gz
tar -xvf grpcurl_1.7.0_linux_x86_64.tar.gz
chmod +x grpcurl
./grpcurl -plaintext localhost:$GRPC_PORT list
### Make sure gRPC is enabled in app.toml
# grep -A 3 "\[grpc\]" /home/og-testnet-validator/.evmosd/config/app.toml
REST API query examples
curl localhost:$API_PORT/cosmos/staking/v1beta1/validators
### MAKE SURE API is enabled in app.toml
# grep -A 3 "\[api\]" /home/og-testnet-validator/.evmosd/config/app.toml