0G-Chain

0G The First Modular AI Chain, Build with infinitely scalable programmable DA layer for AI Dapps. Build with the latest Web3 modular infrastructure and the most advanced tools to unlock the full potential of Web3. Leverage our state-of-the-art Data Availability and storage solution today.

  • website : 0G-Chain

  • Task : Validator

  • Status : Ongoing

Validator installation

Requirement

  • Hardware

    • CPU : 4 Core

    • Memory : 16 GB

    • Disk : 1 TB NVME SSD

Installation

## Install Go
cd $HOME
VERSION=1.21.3
wget -O go.tar.gz https://go.dev/dl/go$VERSION.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gz && rm go.tar.gz
echo 'export GOROOT=/usr/local/go' >> $HOME/.bash_profile
echo 'export GOPATH=$HOME/go' >> $HOME/.bash_profile
echo 'export GO111MODULE=on' >> $HOME/.bash_profile
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && . $HOME/.bash_profile
go version

#install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env

#install binary
rm -rf $HOME/.0gchain
git clone -b v0.1.0 https://github.com/0glabs/0g-chain.git
cd $HOME/0g-chain
make build
chmod +x $HOME/0g-chain/out/linux/0gchaind
mv $HOME/0g-chain/out/linux/0gchaind $HOME/go/bin

#init
0gchaind init <your_validator_name> --chain-id zgtendermint_16600-1

#Download Genesis File
wget -O $HOME/.0gchain/config/genesis.json https://raw.githubusercontent.com/Idekubaguscom/testnet/main/0g-chain/genesis.json

#Update Peers
[email protected]:26656,[email protected]:14256,[email protected]:[email protected]:1020,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:31656,[email protected]:32656,[email protected]:47656,[email protected]:26656,[email protected]:[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:19656,[email protected]:26656,[email protected]:16656,[email protected]:26656,[email protected]:26656,[email protected]:26656
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.0gchain/config/config.toml

# create service file
sudo tee /etc/systemd/system/0gchaind.service > /dev/null <<EOF
[Unit]
Description=0gchain node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which 0gchaind) start --home $HOME/.0gchain
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

#start service
sudo systemctl daemon-reload
sudo systemctl enable 0gchaind
sudo systemctl restart 0gchaind && sudo journalctl -u 0gchaind -fo cat

Create Wallet

Faucet

You can Request faucet here

Registering as a Validator

Delete Node

Cheatsheet

Give me some coffee β˜•

if this info useful, Please give me some β˜• to stake to my validator here. thx ☺️

Last updated