Run 0G Validator as a service
validator_name=<validator_name>
git clone -b testnet https://github.com/0glabs/0g-evmos.git
./0g-evmos/networks/testnet/install.sh
source .profile
evmosd config chain-id zgtendermint_9000-1
evmosd init $validator_name --chain-id zgtendermint_9000-1
# prepare genesis.json
sudo apt install -y unzip wget
mv ~/.evmosd/config/genesis.json ~/.evmosd/config/genesis.json.backup
wget -P ~/.evmosd/config https://github.com/0glabs/0g-evmos/releases/download/v1.0.0-testnet/genesis.json
evmosd validate-genesis
# prepare seeds
sed -i 's/^seeds =.*$/seeds = "8c01665f88896bca44e8902a30e4278bed08033f@54.241.167.190:26656,b288e8b37f4b0dbd9a03e8ce926cd9c801aacf27@54.176.175.48:26656,8e20e8e88d504e67c7a3a58c2ea31d965aa2a890@54.193.250.204:26656,e50ac888b35175bfd4f999697bdeb5b7b52bfc06@54.215.187.94:26656"/' $HOME/.evmosd/config/config.toml
# create service
sudo tee /etc/systemd/system/evmosd.service > /dev/null <<EOL
[Unit]
Description=0G Node
After=network.target
[Service]
User=root
ExecStart=/root/go/bin/evmosd start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOL
## start evmosd service
sudo systemctl daemon-reload
sudo systemctl enable evmosd
sudo systemctl restart evmosd
sudo journalctl -f -n 100 -u evmosd