🔌Installation
💻 Hardware Requirements
Components | Minimum Requirements |
---|---|
CPU | 4 |
RAM | 8 GB |
STORAGE | 200 GB SSD |
1️⃣ Installation packeges and dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
➡️ Go Installation
cd $HOME
VER="1.23.1"
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:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
➡️ Set Vars
You can replace 57 with anything you want. Please write 2 digits.
echo "export ZENROCK_PORT="57"" >> $HOME/.bash_profile
source $HOME/.bash_profile
2️⃣ Install node
cd $HOME
mkdir -p $HOME/.zrchain/cosmovisor/genesis/bin
curl -o zenrockd https://releases.gardia.zenrocklabs.io/zenrockd-latest
chmod +x $HOME/zenrockd
mv $HOME/zenrockd $HOME/.zrchain/cosmovisor/genesis/bin/
sudo ln -s $HOME/.zrchain/cosmovisor/genesis $HOME/.zrchain/cosmovisor/current -f
sudo ln -s $HOME/.zrchain/cosmovisor/current/bin/zenrockd /usr/local/bin/zenrockd -f
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.6.0
➡️ Create a service
sudo tee /etc/systemd/system/zenrockd.service > /dev/null << EOF
[Unit]
Description=zenrock 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/.zrchain"
Environment="DAEMON_NAME=zenrockd"
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/.zrchain/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable zenrockd
➡️ Initialize the node
zenrockd init --chain-id gardia-2
zenrockd config set client chain-id gardia-2
zenrockd config set client node tcp://localhost:${ZENROCK_PORT}657
➡️ Genesis
wget -O $HOME/.zrchain/config/genesis.json https://raw.githubusercontent.com/MictoNode/zenrock-micto/refs/heads/main/genesis.json
➡️Addrbook
wget -O $HOME/.zrchain/config/addrbook.json https://raw.githubusercontent.com/MictoNode/zenrock-micto/refs/heads/main/addrbook.json
➡️ Port
sed -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
sed -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
➡️ Peers and Seeds
SEEDS="50ef4dd630025029dde4c8e709878343ba8a27fa@zenrock-testnet-seed.itrocket.net:56656"
PEERS="5458b7a316ab673afc34404e2625f73f0376d9e4@zenrock-testnet-peer.itrocket.net:11656,a98484ac9cb8235bd6a65cdf7648107e3d14dab4@95.217.74.22:18256,a75e49f5185b6b31f0f14cc1385960347a369b2b@159.69.109.34:56656,ace905113977a21ff5e6f134ab95b959d95482ed@144.217.68.182:18256,a412c87699b151a02d1385cbb68b6df396a81c3f@95.217.196.224:26656,ade6ea25c70e32ae0fcbc2af0b70000c59daaed5@141.95.151.107:26656,6e2b3de14694e49d3b660404fb43373a52b2e005@[2a03:cfc0:8000:13::b910:27be]:14156,39bf4210b1e47b9df1de0d30a6ab94e18b7c4e9f@[2a03:cfc0:8000:13::b910:277f]:14156,6ef43e8d5be8d0499b6c57eb15d3dd6dee809c1e@52.30.152.47:26656,1dfbd854bab6ca95be652e8db078ab7a069eae6f@52.30.152.47:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.zrchain/config/config.toml
➡️ Gas Settings
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0urock"|g' $HOME/.zrchain/config/app.toml
➡️ Pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.zrchain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.zrchain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" $HOME/.zrchain/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.zrchain/config/config.toml
➡️ Snap (soon)
zenrockd tendermint unsafe-reset-all --home $HOME/.zrchain
if curl -s --head curl https://snapshots.kjnodes.com/zenrock-testnet/snapshot_latest.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://snapshots.kjnodes.com/zenrock-testnet/snapshot_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.zrchain
else
echo no have snap
fi
➡️ Let's get started
sudo systemctl restart zenrockd
➡️ Create wallet
zenrockd keys add
➡️ Import wallet
zenrockd keys add --recover
➡️ Faucet
$request [chain ID] [zenrock address]
➡️ Wallet Address
zenrockd keys show -a
➡️ Valoper Address
zenrockd keys show --bech val -a
➡️ Block check
if “Blocks Left” is 0, it is sync
local_height=$(curl -s localhost:${ZENROCK_PORT}657/status | jq -r .result.sync_info.latest_block_height); network_height=$(curl -s https://zenrock-testnet-rpc.mictonode.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"
Your node height - the current block of your node
Blocks left - how many blocks your node has left to sync.
Network height - the last block of the network
➡️ Create Validator
Reminder: You can't create a validator without Sync. You must have to catch the latest block.
cd $HOME
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(zenrockd comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
\"amount\": \"1000000urock\",
\"moniker\": \"MictoNode\",
\"identity\": \"\",
\"website\": \"\",
\"security\": \"\",
\"details\": \"Life is beautiful with Web3\",
\"commission-rate\": \"0.05\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}" > validator.json
zenrockd tx validation create-validator validator.json \
--from \
--chain-id gardia-2 \
--fees 30urock
➡️ Delegation
zenrockd tx validation delegate $(zenrockd keys show --bech val -a) 000000urock \
--chain-id gardia-2 \
--from "" \
--fees 30urock
➡️ Complete deletion
cd $HOME
sudo systemctl stop zenrockd
sudo systemctl disable zenrockd
sudo rm -rf /etc/systemd/system/zenrockd.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/zenrockd
sudo rm -f $(which zenrockd)
sudo rm -rf $HOME/.zrchain
sed -i "/ZENROCK_PORT_/d" $HOME/.bash_profile
Last updated