Zenrock Validator
System Requirements
- RAM: 8 GB
- CPU: 4 cores
- Disk Space: 100 GB
Installation ⚙️
Auto Install
bash <(curl -s https://file.winsnip.xyz/file/uploads/zenrock.sh)
Manual Install
# install go, if neededcd $HOMEVER="1.23.1"wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"rm "go$VER.linux-amd64.tar.gz"[ ! -f ~/.bash_profile ] && touch ~/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profilesource $HOME/.bash_profile[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
# set varsecho "export WALLET="wallet"" >> $HOME/.bash_profileecho "export MONIKER="test"" >> $HOME/.bash_profileecho "export ZENROCK_CHAIN_ID="gardia-2"" >> $HOME/.bash_profileecho "export ZENROCK_PORT="56"" >> $HOME/.bash_profilesource $HOME/.bash_profile
# download binarycd $HOMEcurl -o zenrockd https://releases.gardia.zenrocklabs.io/zenrockd-latestchmod +x $HOME/zenrockdmv $HOME/zenrockd $HOME/go/bin/
# config and init appzenrockd init $MONIKER --chain-id $ZENROCK_CHAIN_IDzenrockd config set client chain-id $ZENROCK_CHAIN_IDzenrockd config set client node tcp://localhost:${ZENROCK_PORT}657
# download genesis and addrbookwget -O $HOME/.zrchain/config/genesis.json https://server-5.itrocket.net/testnet/zenrock/genesis.jsonwget -O $HOME/.zrchain/config/addrbook.json https://server-5.itrocket.net/testnet/zenrock/addrbook.json
# set seeds and peersSEEDS="50ef4dd630025029dde4c8e709878343ba8a27fa@zenrock-testnet-seed.itrocket.net:56656"PEERS="5458b7a316ab673afc34404e2625f73f0376d9e4@zenrock-testnet-peer.itrocket.net:11656,e0b3dca981c062de699402ce56f56b6adea6a286@194.163.178.114:13656,a75e49f5185b6b31f0f14cc1385960347a369b2b@159.69.109.34:56656,ace905113977a21ff5e6f134ab95b959d95482ed@144.217.68.182:18256,a412c87699b151a02d1385cbb68b6df396a81c3f@95.217.196.224:26656,5d3e4d6fcb0a20bc3d627092d94bc3ab6bf64cea@109.199.109.133:56656,3e68a389ea37f829f8e2b78170deb1993a9e112e@135.181.139.249:20656,39bf4210b1e47b9df1de0d30a6ab94e18b7c4e9f@[2a03:cfc0:8000:13::b910:277f]:14156,6ef43e8d5be8d0499b6c57eb15d3dd6dee809c1e@52.30.152.47:26656,10100d10c3bbbbfc4bd9c607b24802657cbd5709@69.67.150.107:56656,129c7d519999863cf214e9cb8172d910bffca7e8@213.199.43.242:13656,fdf8971eaef4a440394dd6e123128ff953630775@161.97.130.234:656"sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \ -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.zrchain/config/config.toml
# set custom ports in app.tomlsed -i.bak -e "s%:1317%:${ZENROCK_PORT}317%g;s%:8080%:${ZENROCK_PORT}080%g;s%:9090%:${ZENROCK_PORT}090%g;s%:9091%:${ZENROCK_PORT}091%g;s%:8545%:${ZENROCK_PORT}545%g;s%:8546%:${ZENROCK_PORT}546%g;s%:6065%:${ZENROCK_PORT}065%g" $HOME/.zrchain/config/app.toml
# set custom ports in config.toml filesed -i.bak -e "s%:26658%:${ZENROCK_PORT}658%g;s%:26657%:${ZENROCK_PORT}657%g;s%:6060%:${ZENROCK_PORT}060%g;s%:26656%:${ZENROCK_PORT}656%g;s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ZENROCK_PORT}656\"%;s%:26660%:${ZENROCK_PORT}660%g" $HOME/.zrchain/config/config.toml
# config pruningsed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.zrchain/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.zrchain/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.zrchain/config/app.toml
# set minimum gas price, enable prometheus and disable indexingsed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0urock"|g' $HOME/.zrchain/config/app.tomlsed -i -e "s/prometheus = false/prometheus = true/" $HOME/.zrchain/config/config.tomlsed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.zrchain/config/config.toml
# create service filesudo tee /etc/systemd/system/zenrockd.service > /dev/null <<EOF[Unit]Description=Zenrock nodeAfter=network-online.target[Service]User=$USERWorkingDirectory=$HOME/.zrchainExecStart=$(which zenrockd) start --home $HOME/.zrchainRestart=on-failureRestartSec=5LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF
# reset and download snapshotzenrockd tendermint unsafe-reset-all --home $HOME/.zrchainif curl -s --head curl https://server-5.itrocket.net/testnet/zenrock/zenrock_2024-10-09_465456_snap.tar.lz4 | head -n 1 | grep "200" > /dev/null; then curl https://server-5.itrocket.net/testnet/zenrock/zenrock_2024-10-09_465456_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.zrchain else echo "no snapshot founded"fi
# enable and start servicesudo systemctl daemon-reloadsudo systemctl enable zenrockdsudo systemctl restart zenrockd && sudo journalctl -u zenrockd -f
Service operations ⚙️
Check logs
sudo journalctl -u zenrockd -f
Start service
sudo systemctl start zenrockd
Stop service
sudo systemctl stop zenrockd
Restart service
sudo systemctl restart zenrockd
Check service status
sudo systemctl status zenrockd
Reload services
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable zenrockd
Disable Service
sudo systemctl disable zenrockd
Node info
zenrockd status 2>&1| jq
Key management
Add New Wallet
zenrockd keys add$WALLET
Restore executing wallet
zenrockd keys add$WALLET --recover
List All Wallets
zenrockd keys list
Delete wallet
zenrockd keys delete $WALLET
Check Balance
zenrockd q bank balances $WALLET_ADDRESS
Export Key (save to wallet.backup)
zenrockd keys export$WALLET
View EVM Prived Key
zenrockd keys unsafe-export-eth-key $WALLET
Import Key (restore from wallet.backup)
zenrockd keys import$WALLET wallet.backup
Tokens
To valoper address To wallet address Amount, urock
Withdraw all rewards
zenrockd tx distribution withdraw-all-rewards --from $WALLET --chain-id gardia-2 --fees 30urock
Withdraw rewards and commission from your validator
zenrockd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id gardia-2 --fees 30urock -y
Check your balance
zenrockd query bank balances $WALLET_ADDRESS
Delegate to Yourself
zenrockd tx staking delegate $(zenrockd keys show $WALLET --bech val -a) 1000000urock --from $WALLET --chain-id gardia-2 --fees 30urock -y
Delegate
zenrockd tx staking delegate <TO_VALOPER_ADDRESS> 1000000urock --from $WALLET --chain-id gardia-2 --fees 30urock -y
Redelegate Stake to Another Validator
zenrockd tx staking redelegate $VALOPER_ADDRESS<TO_VALOPER_ADDRESS> 1000000urock --from $WALLET --chain-id gardia-2 --fees 30urock -y
Unbond
zenrockd tx staking unbond $(zenrockd keys show $WALLET --bech val -a) 1000000urock --from $WALLET --chain-id gardia-2 --fees 30urock -y
Transfer Funds
zenrockd tx bank send $WALLET_ADDRESS<TO_WALLET_ADDRESS> 1000000urock --fees 30urock -y
Validator operations
Moniker Identity Details Amount, urock Commission rate Commission max rate Commission max change rate
Create New Validator
zenrockd tx staking create-validator \--amount 1000000urock \--from $WALLET\--commission-rate 0.1\--commission-max-rate 0.2\--commission-max-change-rate 0.01\--min-self-delegation 1\--pubkey $(zenrockd tendermint show-validator)\--moniker "$MONIKER"\--identity ""\--details "Winsnip team"\--chain-id gardia-2 \--fees 30urock \-y
Edit Existing Validator
zenrockd tx staking edit-validator \--commission-rate 0.1\--new-moniker "$MONIKER"\--identity ""\--details "Winsnip team"\--from $WALLET\--chain-id gardia-2 \--fees 30urock \-y
Validator info
zenrockd status 2>&1| jq
Validator Details
zenrockd q staking validator $(zenrockd keys show $WALLET --bech val -a)
Jailing info
zenrockd q slashing signing-info $(zenrockd tendermint show-validator)
Slashing parameters
zenrockd q slashing params
Unjail validator
zenrockd tx slashing unjail --from $WALLET --chain-id gardia-2 --fees 30urock -y
Active Validators List
zenrockd q staking validators -oj --limit=2000| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")'| jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker'|sort -gr |nl
Check Validator key
[[$(zenrockd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key)=$(zenrockd status | jq -r .ValidatorInfo.PubKey.value)]]&&echo -e "Your key status is ok"||echo -e "Your key status is error"
Signing info
zenrockd q slashing signing-info $(zenrockd tendermint show-validator)
Governance
Title Description Deposit, urock
Create New Text Proposal
zenrockd tx gov submit-proposal \--title ""\--description ""\--deposit 1000000urock \--type Text \--from $WALLET\--fees 30urock \-y
Proposals List
zenrockd query gov proposals
Proposal ID Proposal option Yes No No with veto Abstain
View proposal
zenrockd query gov proposal 1
Vote
zenrockd tx gov vote 1yes --from $WALLET --chain-id gardia-2 --fees 30urock -y