Skip to content

ZETA validator node

ZETA banner”

# Hardware requirements

We recommend the following hardware specifications:

CharacteristicSpecification
Operating SystemUbuntu 18.04 or later LTS
Number of CPUs6
RAM16GB
Storage500Gb NVMe SSD
Bandwidth100mps for Download / Upload
System updates
Terminal window
sudo apt update
sudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 pv -y
Install Go
Terminal window
cd $HOME && \
ver="1.22.0" && \
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" && \
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile && \
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bash_profile && \
source ~/.bash_profile && \
go version
Download Binary
Terminal window
cd $HOME
wget -O $HOME/zetacored https://github.com/zeta-chain/node/releases/download/v26.0.0/zetacored-linux-amd64
chmod +x $HOME/zetacored
mv $HOME/zetacored $HOME/go/bin
Variable settings
Terminal window
echo "export WALLET='josephtran'" >> $HOME/.bash_profile
echo "export MONIKER='J-Node'" >> $HOME/.bash_profile
echo "export ZETACHAIN_CHAIN_ID='zetachain_7000-1'" >> $HOME/.bash_profile
echo "export ZETACHAIN_PORT='26'" >> $HOME/.bash_profile
source $HOME/.bash_profile
Node init
Terminal window
zetacored config keyring-backend os
zetacored config chain-id $ZETACHAIN_CHAIN_ID
zetacored init $MONIKER --chain-id $ZETACHAIN_CHAIN_ID
zetacored config node tcp://localhost:${ZETACHAIN_PORT}657
Download genesis.json file
Terminal window
rm $HOME/.zetacored/config/genesis.json
wget -O $HOME/.zetacored/config/genesis.json https://zeta.j-node.net/genesis.json
Custom port setting (Optional)
Terminal window
sed -i -e "
s%:1317%:${ZETACHAIN_PORT}317%g;
s%:8080%:${ZETACHAIN_PORT}080%g;
s%:9090%:${ZETACHAIN_PORT}090%g;
s%:9091%:${ZETACHAIN_PORT}091%g;
s%:8545%:${ZETACHAIN_PORT}545%g;
s%:8546%:${ZETACHAIN_PORT}546%g;
s%:6065%:${ZETACHAIN_PORT}065%g
" $HOME/.zetacored/config/app.toml
Terminal window
sed -i -e "
s%:26658%:${ZETACHAIN_PORT}658%g;
s%:26657%:${ZETACHAIN_PORT}657%g;
s%:6060%:${ZETACHAIN_PORT}060%g;
s%:26656%:${ZETACHAIN_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ZETACHAIN_PORT}656\"%;
s%:26660%:${ZETACHAIN_PORT}660%g
" $HOME/.zetacored/config/config.toml
PEERS, SEED setting
Terminal window
SEEDS="912d07ae1c869e7a573c09cb7397304874388b5b@104.154.216.162:26656,4e668be2d80d3475d2350e313bc75b8f0646884f@zetachain-mainnet-seed.itrocket.net:39656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:22556,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:22556"
PEERS="5561807330bef1c3ef3d36567c184d9085e711d6@167.235.32.188:21850,cd48a06521de9f97e6413fec1188ffabb7069b19@5.9.106.71:21850,c0ce318fcc98e89ce906bfba0f68df5a3774652d@65.108.197.253:21850,e0b89511a7a31d7867c00cfba748b474f853ac49@148.251.140.252:26656,d98525ae59a00f7a099ddaec2a7e416e818bb210@15.235.115.91:26656,77a26a60e44730311d05b2b653031badb52d493d@64.176.57.149:26656,927860d6e888a5dee988cceed734e9dad0b569bc@176.9.137.150:26656,55947af1b1db1192b649563a01fa69f0b5d6ee03@142.132.198.157:26656,35e621bf11455cee613833243f268a1ba83aabb5@64.176.47.152:26656,e766cd79f5dcdc5eff8f56092cbaf52f64d774c4@148.113.199.230:26256"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.zetacored/config/config.toml
Config pruning, set gas price, enable prometheus, disable indexer
Terminal window
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.zetacored/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.zetacored/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.zetacored/config/app.toml
Terminal window
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.00025ua0gi"|g' $HOME/.zetacored/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.zetacored/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.zetacored/config/config.toml
Create service file
Terminal window
sudo tee /etc/systemd/system/zetacored.service > /dev/null <<EOF
[Unit]
Description=Zetachain Node
After=network.target
[Service]
User=$USER
Type=simple
WorkingDirectory=$HOME/.zetacored
ExecStart=$(which zetacored) start --home $HOME/.zetacored
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Reload daemon
Terminal window
sudo systemctl daemon-reload && \
sudo systemctl enable zetacored
Start node
Terminal window
sudo systemctl start zetacored && sudo systemctl status zetacored

Check log

Terminal window
sudo journalctl -u zetacored -fo cat
Check Latest Block Height
Terminal window
zetacored status | jq '{ latest_block_height: .SyncInfo.latest_block_height, catching_up: .SyncInfo.catching_up }'
Block sync left
Terminal window
while true; do
local_height=$(zetacored status | jq -r '.SyncInfo.latest_block_height');
network_height=$(curl -s https://zetachain-mainnet-rpc.itrocket.net/status | jq -r '.result.sync_info.latest_block_height')
blocks_left=$((network_height - local_height));
echo -e "\033[1;38mYour node height:\033[0m \033[1;34m$local_height\033[0m | \033[1;35mNetwork height:\033[0m \033[1;36m$network_height\033[0m | \033[1;29mBlocks left:\033[0m \033[1;31m$blocks_left\033[0m";
sleep 5;
done
Wallet config
Terminal window
zetacored keys add "wallet_name"
Check Balance | Create Validator | Check Validator
  • Check balances
Terminal window
zetacored q bank balances $(0gchaind keys show "wallet_name" -a)
  • Create validator
Terminal window
zetacored tx staking create-validator \
--amount=1000000azeta \
--pubkey=$(zetacored tendermint show-validator) \
--moniker="Your_node_name" \
--chain-id=zetachain_7000-1 \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--details="Zeta to the moon" \
--min-self-delegation="1" \
--from="wallet_name" \
--gas=auto \
--gas-adjustment=1.5 \
--fees 2100000000000000azeta \
-y
  • Check validator
Terminal window
zetacored q staking validator $(zetacored keys show "wallet_name" --bech val -a)
Delegation
Terminal window
zetacored tx staking delegate $(zetacored keys show "your_wallet" --bech val -a) 1000000azeta \
--from "your_wallet" \
--chain-id=zetachain_7000-1 \
--gas=auto \
--gas-adjustment=1.5 \
--fees 2100000000000000azeta \
-y
Remove node:
Terminal window
cd $HOME
sudo systemctl stop zetacored
sudo systemctl disable zetacored
sudo rm /etc/systemd/system/zetacored.service
sudo systemctl daemon-reload
sudo rm -f $(which zetacored)
sudo rm -rf $HOME/.zetacored