⚙️Installation

🛠️ Hardware Requirements

Node Type
CPU
RAM
Storage

Full (Recommended)

4 CPU

8 GB

200 GB

Additional requirements

Chain ID
Version tag
Binary Name
Binary Home

gardia-2

v4.7.1

zenrockd

$HOME/.zrchain

⏱️ Installation time: ~10-30 minutes

The installation time depends on many factors, such as your skills, resources and characteristics of your server, the most important: disk speed, internet connection, server load CPU, RAM, so this value may differ from the one indicated by us.

⚡ Automatic installation

bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/refs/heads/main/zenrock-network/install-zenrock-testnet.sh)

With the help of a one-line script, all the necessary commands will be executed automatically, you only need to check the operation of your node at the end

📝 Manual installation

📌Step 1: Installation packeges and dependencies

# Install dependencies for building from source
sudo apt update
sudo apt install -y lz4 jq make git gcc build-essential curl chrony unzip gzip snapd tmux bc

# Install Go
sudo rm -rf /usr/local/go
curl -L https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source .bash_profile

📌Step 2: Set moniker and install node

Give your validator a name by which you can find yourself in explorer, put it in ""

MONIKER=""

After that, insert the following node installation command

# Clone project repository
cd $HOME
curl -o zenrockd https://releases.gardia.zenrocklabs.io/zenrockd-latest
chmod +x $HOME/zenrockd
mv $HOME/zenrockd $HOME/go/bin/

# Set node CLI configuration
# config and init app
zenrockd init $MONIKER --chain-id gardia-2
zenrockd config set client chain-id gardia-2
zenrockd config set client node tcp://localhost:26657

# Initialize the node
zenrockd init $MONIKER --chain-id gardia-2

# Download genesis and addrbook files
curl -Ls https://snapshots-testnet.unitynodes.com/zenrock-testnet/genesis.json > $HOME/.zrchain/config/genesis.json
curl -Ls https://snapshots-testnet.unitynodes.com/zenrock-testnet/addrbook.json > $HOME/.zrchain/config/addrbook.json

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0urock\"|" $HOME/.zrchain/config/app.toml

# Enable prometheus, disable indexer
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.zrchain/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.zrchain/config/config.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
  $HOME/.zrchain/config/app.toml

# Download latest chain data snapshot
curl https://snapshots-testnet.unitynodes.com/zenrock-testnet/zenrock-testnet-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.zrchain

# Create a service
sudo tee /etc/systemd/system/zenrockd.service > /dev/null <<EOF
[Unit]
Description=empe
After=network-online.target

[Service]
User=$USER
ExecStart=$(which zenrockd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

# Start the service and check the logs
sudo systemctl daemon-reload
sudo systemctl enable zenrockd 
sudo systemctl start zenrockd.service
sudo journalctl -u zenrockd.service -f -o cat

📌Step 3: Node Health Check

Follow the commands to check if your node is working properly

  1. Check version

zenrockd version
  1. View sync status

while true; do 
  local_height=$(zenrockd status | jq -r .sync_info.latest_block_height)
  network_height=$(curl -s https://rpc.zenrock-testnet.unitynodes.com/status | jq -r '.result.sync_info.latest_block_height')
  blocks_left=$((network_height - local_height))

  echo -e "\033[1;33m[Sync Status]\033[0m \033[1;32mNode Height:\033[0m \033[1;37m$local_height\033[0m | \033[1;32mNetwork Height:\033[0m \033[1;37m$network_height\033[0m | \033[1;32mBlocks Left:\033[0m \033[1;31m$blocks_left\033[0m"

  sleep 5
done

Blocks left - 0-1 everything is fine and your node catches up with the last block of the network.

  1. Check logs

sudo journalctl -u zenrockd.service -f -o cat

If your node is installed and fully synchronized with the network, proceed with the creation of the validator.

For any questions you may have during installation, please contact our chat team or other project validators.

  1. [OPTIONAL] Change port

If you get an error that the default ports are busy, you can change them with the following command Example this error: ERR failure when running app err="failed to listen on 127.0.0.1:26657: listen tcp 127.0.0.1:26657: bind: address already in use"

#PORT 35
sed -i.bak -e "s%:1317%:2217%g; 
s%:8080%:8980%g;
s%:9090%:9990%g;
s%:9091%:9991%g;
s%:8545%:9445%g;
s%:8546%:9446%g;
s%:6065%:6965%g" $HOME/.zrchain/config/app.toml	
sed -i.bak -e "s%:26658%:35658%g;
s%:26657%:35657%g;
s%:6060%:6960%g;
s%tcp://0.0.0.0:26656%tcp://0.0.0.0:35656%g;
s%:26660%:35660%g" $HOME/.zrchain/config/config.toml
sed -i.bak -e "s%:26657%:35657%g" $HOME/.zrchain/config/client.toml
sudo systemctl restart zenrockd && sudo journalctl -u zenrockd -f -o cat 

📝 Create Validator

📌Step 1: Create wallet

emped keys add wallet

Save all information after entering the command, without this you will not be able to restore data to the wallet. SAVE SEED PHRASE (12 words). ▶️ Example:

address: zen1vstkg7zupdyefu9usn82hdjvpqacwewh9sazjh name: wallet pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ar+fS10q2ImLkQVpzNxcqpUeWutZ9qxuC0cnv1dvYg0r"}' type: local

Important write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password.

upon strong bonus rock absorb ginger orphan oppose aspect crew close soda finger output turn remind over girl nothing fury again language hip silver

📌Step 2: Request test tokens to your wallet address

Go to the Zenrock Discord and request test tokens to the address you created earlier.

After that, you can check your wallet balance with the following command.

zenrockd q bank balances $(zenrockd keys show wallet -a)

If the node has synchronized and the tokens have arrived in the wallet, create a validator with the command below.

📌Step 3: Install Side Car

  1. Create directories

mkdir -p $HOME/.zrchain/sidecar/bin
mkdir -p $HOME/.zrchain/sidecar/keys
  1. Downoload binary files

wget -O $HOME/.zrchain/sidecar/bin/zenrock-sidecar https://releases.gardia.zenrocklabs.io/validator_sidecar-1.2.3
chmod +x $HOME/.zrchain/sidecar/bin/zenrock-sidecar
  1. Copy zenrock-validators

cd $HOME
git clone https://github.com/zenrocklabs/zenrock-validators
  1. Create a password for the sidecar wallet

read -p "Enter password for the keys: " key_pass
  1. Build BLS Binary

cd $HOME/zenrock-validators/utils/keygen/bls/
go mod tidy
go build
  1. Create BLS key

bls_output_file=$HOME/.zrchain/sidecar/keys/bls.key.json
$HOME/zenrock-validators/utils/keygen/bls/bls --password $key_pass -output-file $bls_output_file
  1. Build ecdsa binary

cd $HOME/zenrock-validators/utils/keygen/ecdsa/
go mod tidy
go build
  1. Create ecdsa key

ecdsa_output_file=$HOME/.zrchain/sidecar/keys/ecdsa.key.json
ecdsa_creation=$($HOME/zenrock-validators/utils/keygen/ecdsa/ecdsa --password $key_pass -output-file $ecdsa_output_file)
ecdsa_address=$(echo "$ecdsa_creation" | grep "Public address" | cut -d: -f2)
echo "ecdsa address: $ecdsa_address"
  1. Get Holesky Ethereum test tokens to your address

Faucet-1

Faucet-2

Faucet-3

  1. Register or log in to an existing Infura account

Infura Link

We get the following endpoints:

  • mainnet eth - https://xxx

  • holesky eth - https://xxx

  • holesky eth - wss://xxx

  1. Set the variables

EIGEN_OPERATOR_CONFIG="$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
TESTNET_HOLESKY_ENDPOINT="<HTTPS_TESTNET_HOLESKY_ENDPOINT>"
MAINNET_ENDPOINT="<HTTPS_MAINNET_ENDPOINT>"
OPERATOR_VALIDATOR_ADDRESS_TBD="<ADDR_zenrockVALOPER>"
OPERATOR_ADDRESS_TBU=$ecdsa_address
ETH_RPC_URL="<HTTPS_TESTNET_HOLESKY_ENDPOINT>"
ETH_WS_URL="<WSS_TESTNET_HOLESKY_ENDPOINT>"
ECDSA_KEY_PATH=$ecdsa_output_file
BLS_KEY_PATH=$bls_output_file
  1. We copy the configuration files

cp $HOME/zenrock-validators/configs/eigen_operator_config.yaml $HOME/.zrchain/sidecar/
cp $HOME/zenrock-validators/configs/config.yaml $HOME/.zrchain/sidecar/
  1. Replace the data in config.toml

sed -i "s|EIGEN_OPERATOR_CONFIG|$EIGEN_OPERATOR_CONFIG|g" "$HOME/.zrchain/sidecar/config.yaml"
sed -i "s|TESTNET_HOLESKY_ENDPOINT|$TESTNET_HOLESKY_ENDPOINT|g" "$HOME/.zrchain/sidecar/config.yaml"
sed -i "s|MAINNET_ENDPOINT|$MAINNET_ENDPOINT|g" "$HOME/.zrchain/sidecar/config.yaml"
  1. We replace the data in eigen_operator_config.yaml

sed -i "s|OPERATOR_VALIDATOR_ADDRESS_TBD|$OPERATOR_VALIDATOR_ADDRESS_TBD|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|OPERATOR_ADDRESS_TBU|$OPERATOR_ADDRESS_TBU|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ETH_RPC_URL|$ETH_RPC_URL|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ETH_WS_URL|$ETH_WS_URL|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|ECDSA_KEY_PATH|$ECDSA_KEY_PATH|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
sed -i "s|BLS_KEY_PATH|$BLS_KEY_PATH|g" "$HOME/.zrchain/sidecar/eigen_operator_config.yaml"
  1. We create the zenrock-sidecar service file

tee /etc/systemd/system/zenrock-sidecar.service > /dev/null <<EOF
[Unit]
Description=Zenrock-sidecar
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/.zrchain/sidecar/bin/zenrock-sidecar
Restart=on-failure
RestartSec=30
LimitNOFILE=65535
Environment="OPERATOR_BLS_KEY_PASSWORD=$key_pass"
Environment="OPERATOR_ECDSA_KEY_PASSWORD=$key_pass"
Environment="SIDECAR_CONFIG_FILE=$HOME/.zrchain/sidecar/config.yaml"

[Install]
WantedBy=multi-user.target
EOF
  1. We run the service file

systemctl daemon-reload
systemctl enable zenrock-sidecar
systemctl restart zenrock-sidecar 
journalctl -u zenrock-sidecar -f -o cat

📌Step 4: Create validator

Create a validator.json file

touch $HOME/.zrchain/config/validator.json

To find out your pubkey, use the command (Save your Pubkey)

zenrockd comet show-validator

Output Example:

The output will be similar to this (with a different key):

{"@type":"/cosmos.crypto.ed25519.PubKey","key":"+vMHVm134I+Rh4kNqLG/YwvQqDy+YqcZqWtgp7ABUop0="}

Open a validator.json file

nano $HOME/.zrchain/config/validator.json

Paste this into the open validator.json file, pre-replacing all values ​​that start with $ (you can do it in any convenient editor, not directly in nano mode)

{
  "pubkey": {
    "@type": "/cosmos.crypto.ed25519.PubKey",
    "key": ""
  },
  "amount": "1000000urock",
  "moniker": "Oliver",
  "identity": "", 
  "website": "", 
  "security": "", 
  "details": "Trusted Blockchain validator", 
  "commission-rate": "0.05",
  "commission-max-rate": "0.2",
  "commission-max-change-rate": "0.2",
  "min-self-delegation": "1"
}

Replace the following values with your own: WALLET - usually it's 'wallet', or your wallet's name. MONIKER - any convenient name for your validator, displayed in the explorer. IDENTITY - validator's avatar, displayed in the explorer. Create a KeyBase ID following the instructions or leave it empty, and it will default to a standard one. DETAILS - details about your validator, also displayed in the explorer.

WEBSITE - your website/github/twitter, etc., if you don't want to specify anything - leave it blank

Replace all necessary values indicated above with the $ sign to successfully create your validator. Example:

{
  "pubkey": {
    "@type": "/cosmos.crypto.ed25519.PubKey",
    "key": "+vMHVm134I+Rh4kNqLG/YwvQqDy+YqcZqWtgp7ABUop0="
  },
  "amount": "1000000uttnt",
  "moniker": "Oliver",
  "identity": "", #if you have your identifier, replace it, or leave it blank
  "website": "", #if you have your website, replace it, or leave it blank
  "security": "", 
  "details": "Trusted Blockchain validator", 
  "commission-rate": "0.05",
  "commission-max-rate": "0.2",
  "commission-max-change-rate": "0.2",
  "min-self-delegation": "1"
}

After entering and changing all values, save the file with the key combination Ctrl + X and press Enter

After creating the validator.json and entering all the necessary information, as well as provided that there are tokens in the wallet, run the create command:

zenrockd tx staking create-validator $HOME/.zrchain/config/validator.json \
--chain-id gardia-2 \
--gas-adjustment="1.5" \
--fees 500urock \
--from wallet

After entering the command, you will receive hash transactions, check the status in the explorer if the status is successful - you have created a validator. You can find your validator here: explorer In the Active / Inactive lists.

📌Step 5: Backup

If you have successfully created a validator, be sure to save your validator.

Show priv_validator_key.json

cat $HOME/.zrchain/config/priv_validator_key.json

SAVE YOUR PRIVATE KEY AFTER ENTERING THE COMMAND The priv_validator_key.json is the key with which you can always restore the operation of your validator, so keep it and in case of reinstallation/transfer of the validator to another server - transfer it too.

Also remember, if you are a validator with a sufficient number of delegated tokens and you are in an active set, signing blocks, always save priv_validator_state.json - this file contains information about the signed blocks of your validators, and in case of restoring the validator after reinstallation or on another server , this file won't give you the old blocks again, otherwise you'll end up in jail with no way out 💡 Hint:

  • View private key: cat $HOME/.zrchain/config/priv_validator_key.json

  • View private state: cat $HOME/.zrchain/config/priv_validator_key.json

All the useful commands to manage your node in the section - Useful commands

Last updated