Hardware Minimum requirements
Copy - Memory: 8 GB RAM
- CPU: 4 cores
- Disk: 500 GB NVME SSD
- Bandwidth: 100mbps Gbps for Download / Upload
- Linux amd64 arm64 (The guide was tested on Ubuntu 20.04 LTS)
Copy sudo apt update && sudo apt upgrade -y
sudo apt install make curl git wget htop unzip tmux build-essential jq make lz4 gcc unzip -y
Copy ver="1.22.2"
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
Copy cd $HOME
git clone -b v1.0.0-testnet https://github.com/0glabs/0g-evmos.git
./0g-evmos/networks/testnet/install.sh
source .profile
Copy evmosd config keyring-backend test
evmosd config chain-id zgtendermint_9000-1
evmosd config node tcp://localhost:14257
evmosd init NodeName --chain-id zgtendermint_9000-1
Copy sed -i \
-e 's|^chain-id *=.*|chain-id = "zgtendermint_9000-1"|' \
-e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
-e 's|^node *=.*|node = "tcp://localhost:14257"|' \
$HOME/.evmosd/config/client.toml
Copy ### downlaod genesis file
wget https://github.com/0glabs/0g-evmos/releases/download/v1.0.0-testnet/genesis.json -O $HOME/.evmosd/config/genesis.json
PEERS="1248487ea585730cdf5d3c32e0c2a43ad0cda973@peer-zero-gravity-testnet.trusted-point.com:26326" && \
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" && \
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.evmosd/config/config.toml
Copy sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://0.0.0.0:14258\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:14257\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14260\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14256\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14266\"%" $HOME/.evmosd/config/config.toml
sed -i.bak -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://0.0.0.0:14217\"%; s%^address = \":8080\"%address = \":14280\"%; s%^address = \"localhost:9090\"%address = \"0.0.0.0:14290\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:14291\"%; s%:8545%:14245%; s%:8546%:14246%; s%:6065%:14265%" $HOME/.evmosd/config/app.toml
Copy ###set gas
sed -i "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00252aevmos\"/" $HOME/.evmosd/config/app.toml
Copy sudo tee /etc/systemd/system/evmosd.service > /dev/null <<EOF
[Unit]
Description=evmosd Protocol
After=network-online.target
[Service]
User=root
ExecStart=$(which evmosd) start --home $HOME/.evmosd
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Copy cd $HOME
sudo systemctl daemon-reload
sudo systemctl enable evmosd
sudo systemctl restart evmosd && sudo journalctl -u evmosd -f --no-hostname -o cat
Download Snapshot
Download latest snapshot from our endpoint
Copy wget https://rpc-zero-gravity-testnet.trusted-point.com/latest_snapshot.tar.lz4
Stop the node
Copy sudo systemctl stop evmosd
Reset DB
Copy evmosd tendermint unsafe-reset-all --home $HOME/.evmosd --keep-addr-book
Extract files fromt the arvhive
Copy lz4 -d -c ./latest_snapshot.tar.lz4 | tar -xf - -C $HOME/.evmosd
Re-start the node
Copy sudo systemctl restart evmosd && sudo journalctl -fu evmosd -f -o cat
Check the synchronization status
Copy evmosd status | jq .SyncInfo
Create a wallet for your validator
Copy evmosd keys add wallet
Copy echo "0x$(evmosd debug addr $(evmosd keys show $WALLET_NAME -a) | grep hex | awk '{print $3}')"
Request tokens from the faucet
-> FAUCET <-
Check wallet balance
Copy evmosd q bank balances $(evmosd keys show wallet -a)
Note: The faucet gives you 100000000000000000aevmos . To make the validator join the active set you need at least 1000000000000000000aevmos (10 times more )
Create a validator
Copy #set name for your validator
MONIKER=<your_name>
Copy evmosd tx staking create-validator \
--amount=10000000000000000aevmos \
--pubkey=$(evmosd tendermint show-validator) \
--moniker=$MONIKER \
--chain-id=zgtendermint_9000-1 \
--commission-rate=0.05 \
--commission-max-rate=0.10 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=wallet \
--identity="" \
--website="" \
--details="0G to the moon!" \
--gas=500000 --gas-prices=99999aevmos \
-y
Do not forget to save priv_validator_key.json
file located in $HOME/.evmosd/config/
Last updated 5 months ago