π 0G Newton - V2
First Modular AI chain: Starting with the fastest programmable DA layer for AI dapps
Info
https://x.com/0G_labs https://discord.gg/0glabs https://linktr.ee/0g_labs
Public Endpoints
Explorer
https://explorer.validator247.com/zero-gravity-testnet/staking
Hardware Requirement
- Memory: 64 GB
- CPU: 8 cores
- Disk: 1 TB NVME SSD
- Bandwidth: 100 MBps for Download / Upload
Installation guide
Install required packages
sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
Install Go
cd $HOME && \
ver="1.21.3" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
Install 0gchaind
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 Gennesis
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.json
Peers
peers="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656" && \
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"${peers}\"/" $HOME/.0gchain/config/config.toml
Seeds
SEEDS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656" && \
sed -i.bak -e "s/^seeds *=.*/seeds = \"${SEEDS}\"/" $HOME/.0gchain/config/config.toml
Pruning
sed -i \
-e "s/^pruning *=.*/pruning = \"custom\"/" \
-e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" \
-e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" \
"$HOME/.0gchain/config/app.toml"
Set min gas price
sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ua0gi\"/" $HOME/.0gchain/config/app.toml
Create Service
sudo tee /etc/systemd/system/0gchaind.service > /dev/null << EOF
[Unit]
Description=0G node service
After=network-online.target
[Service]
User=root
ExecStart=/root/go/bin/0gchaind start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable 0gchaind
sudo systemctl daemon-reload
Launch Node
sudo systemctl restart 0gchaind && journalctl -u 0gchaind -f -o cat
Service command
sudo systemctl daemon-reload
sudo systemctl enable 0gchaind
sudo systemctl disable 0gchaind
sudo systemctl start 0gchaind
sudo systemctl stop 0gchaind
sudo systemctl restart 0gchaind
sudo systemctl status 0gchaind
sudo journalctl -u 0gchaind -f -o cat
Create Wallet
New wallet
0gchaind keys add wallet --eth
Recover existing key
0gchaind keys add wallet --recover --eth
Convert from Cosmos wallet to evm ( Use to receive tokens )
echo "0x$(0gchaind debug addr $(0gchaind keys show wallet -a) | grep hex | awk '{print $3}')"
Faucet at https://faucet.0g.ai/
Check balance
0gchaind q bank balances $(0gchaind keys show wallet -a)
Create Validator
0gchaind tx staking create-validator \
--amount=1000000ua0gi \
--pubkey=$(0gchaind tendermint show-validator) \
--moniker="nodename" \
--identity="keybase" \
--website="zzzzzzz" \
--security-contact="[email protected]" \
--details="love validator247" \
--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=wallet \
--gas=auto \
--gas-adjustment=1.4 \
-y
Edit Validator
0gchaind tx staking edit-validator \
--moniker="nodename" \
--identity="keybase" \
--website="zzzzzzz" \
--security-contact="[email protected]" \
--details="love validator247" \
--chain-id=zgtendermint_16600-2 \
--from=wallet \
--gas=auto \
--gas-adjustment=1.4 \
-y
Upgrade
cd $HOME
rm -rf 0g-chain
wget -O 0gchaind https://github.com/0glabs/0g-chain/releases/download/v0.5.2/0gchaind-linux-v0.5.2
chmod +x $HOME/0gchaind
sudo mv $HOME/0gchaind $(which 0gchaind)
sudo systemctl restart 0gchaind && sudo journalctl -u 0gchaind -f -o cat
DONE
Last updated