Installation

Installation

The complete infrastructure for cross-chain smart contracts, applications, and modular functionality.

Chain ID: zgtendermint_9000-1

Chain explorer

https://explorer-cosmos.codeblocklabs.com/0G-testnet

Public endpoints

Peering

seed-node

d813235cc2326983e0ea071ffa8acba341df0adb@89.117.56.219:16456,ac1d78038dfa515ec5e44db02831ceb2d1d1d57e@75.119.136.242:26656,dc464abcf3ba07f8ce96fa4736039a7edc754a55@213.199.52.115:26656,bf7bdcaf6cc807e53d3a63e64018ea3f57530bd5@213.199.40.126:26656,e6c9527811c955397939a92c681ad8b13687d1ba@135.181.192.137:55655,7b9157f4e7e04bd650514c41a66bd844252c3e13@149.50.109.79:12656,8ff0124d5f1881b708f459cc464f894b5bcc99be@38.242.212.146:26656,13b748e30700d662dd7516064d08f31a3a7c8e18@62.169.16.169:26656,4091fc5a27a91c717b8ce84a3e76f81b96474df1@207.180.252.190:26656,d38878f7c32215cc08c9b09bcaf2e9338de37d15@162.244.80.143:16456,dd772d521df254a6e6cf8eb59ac4fae24fc49a46@194.34.232.169:12656,ea224a77f8aa0805561da4047b0a8b2d89ecce2a@213.199.61.159:26656,6b644af890863f830d3e6b37a3e82d7b8847f342@173.212.221.121:16456,84ee5874d03a659dd18b886ea82c1c17b973db50@65.108.209.212:26656,1b06fd4dd3fcd7e530b60a2b6a7f228130906322@141.94.99.181:33656

Don't have vps yet? Go Grab One Here: https://Lihat.info/contabo

Install dependencies

Update system and install build tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential liblz4-tool jq make lz4 gcc unzip -y

Install Go

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.22.2.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version

Download and build binaries

# Clone project repository
cd $HOME
rm -rf 0g-evmos
git clone https://github.com/0glabs/0g-evmos.git
cd 0g-evmos
git checkout v1.0.0-testnet
make install
make build
evmosd version #make sure version match the latest.

Initialize Node & Genesis

# Set the chain ID:
evmosd config chain-id zgtendermint_9000-1

# Configure the keyring backend:
evmosd config keyring-backend os

# Set the node endpoint (you can change to any port):
evmosd config node tcp://localhost:16457

# Init
evmosd init YOUR_NODE_NAME --chain-id zgtendermint_9000-1

# Download genesis file
curl -Ls https://github.com/0glabs/0g-evmos/releases/download/v1.0.0-testnet/genesis.json > $HOME/.evmosd/config/genesis.json

# Setting Up Peers
PEERS="d813235cc2326983e0ea071ffa8acba341df0adb@89.117.56.219:16456,ac1d78038dfa515ec5e44db02831ceb2d1d1d57e@75.119.136.242:26656,dc464abcf3ba07f8ce96fa4736039a7edc754a55@213.199.52.115:26656,bf7bdcaf6cc807e53d3a63e64018ea3f57530bd5@213.199.40.126:26656,e6c9527811c955397939a92c681ad8b13687d1ba@135.181.192.137:55655,7b9157f4e7e04bd650514c41a66bd844252c3e13@149.50.109.79:12656,8ff0124d5f1881b708f459cc464f894b5bcc99be@38.242.212.146:26656,13b748e30700d662dd7516064d08f31a3a7c8e18@62.169.16.169:26656,4091fc5a27a91c717b8ce84a3e76f81b96474df1@207.180.252.190:26656,d38878f7c32215cc08c9b09bcaf2e9338de37d15@162.244.80.143:16456,dd772d521df254a6e6cf8eb59ac4fae24fc49a46@194.34.232.169:12656,ea224a77f8aa0805561da4047b0a8b2d89ecce2a@213.199.61.159:26656,6b644af890863f830d3e6b37a3e82d7b8847f342@173.212.221.121:16456,84ee5874d03a659dd18b886ea82c1c17b973db50@65.108.209.212:26656,1b06fd4dd3fcd7e530b60a2b6a7f228130906322@141.94.99.181:33656" && \
sed -i.bak -e "s/^persistent_peers =.*/persistent_peers = \"$PEERS\"/" $HOME/.evmosd/config/config.toml

# Update Gas Price (for priority transaction)
sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00252aevmos\"/" $HOME/.evmosd/config/app.toml

Setting up cosmovisor

// setup cosmovisor
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
// create 0G-labs cosmovisor folder
mkdir -p ~/.evmosd/cosmovisor/genesis/bin
mkdir -p ~/.evmosd/cosmovisor/upgrades
// copy the binary to cosmovisor
mv build/evmosd $HOME/.evmosd/cosmovisor/genesis/bin/

Setting up services

Now we’ll create a systemd service evmosd.service to control the node via cosmovisor. As root and with a text editor, open /etc/systemd/system/evmosd.service ( nano /etc/systemd/system/evmosd.service ) and type the following:

[Unit]
Description=evmosd node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.evmosd"
Environment="DAEMON_NAME=evmosd"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.evmosd/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target

Start Services

// Enable
sudo systemctl enable evmosd
// Reload
sudo systemctl daemon-reload
// Start
sudo systemctl start evmosd


// Stop (if there is any problem)
sudo systemctl stop evmosd
// Restart
sudo systemctl restart evmosd

// Check Log
journalctl -fu evmosd

Make sure your nodes are already synced before creating your validator

use this command check your nodes status: evmosd status | jq

Last updated