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.
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 sourcesudoaptupdatesudoaptinstall-ylz4jqmakegitgccbuild-essentialcurlchronyunzipgzipsnapdtmuxbc# Install Gosudorm-rf/usr/local/gocurl-Lhttps://go.dev/dl/go1.21.6.linux-amd64.tar.gz|sudotar-xzf--C/usr/localecho'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin'>> $HOME/.bash_profilesource.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 repositorycd $HOMEcurl-ozenrockdhttps://releases.gardia.zenrocklabs.io/zenrockd-latestchmod+x $HOME/zenrockdmv $HOME/zenrockd $HOME/go/bin/# Set node CLI configuration# config and init appzenrockdinit $MONIKER --chain-idgardia-2zenrockdconfigsetclientchain-idgardia-2zenrockdconfigsetclientnodetcp://localhost:26657# Initialize the nodezenrockdinit $MONIKER --chain-idgardia-2# Download genesis and addrbook filescurl-Lshttps://snapshots-testnet.unitynodes.com/zenrock-testnet/genesis.json> $HOME/.zrchain/config/genesis.jsoncurl-Lshttps://snapshots-testnet.unitynodes.com/zenrock-testnet/addrbook.json> $HOME/.zrchain/config/addrbook.json# Set minimum gas pricesed-i-e"s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0urock\"|" $HOME/.zrchain/config/app.toml# Enable prometheus, disable indexersed-i-e"s/prometheus = false/prometheus = true/" $HOME/.zrchain/config/config.tomlsed-i-e"s/^indexer *=.*/indexer = \"null\"/" $HOME/.zrchain/config/config.toml# Set pruningsed-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 snapshotcurl https://snapshots-testnet.unitynodes.com/zenrock-testnet/zenrock-testnet-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.zrchain
# Create a servicesudotee/etc/systemd/system/zenrockd.service>/dev/null<<EOF[Unit]Description=empeAfter=network-online.target[Service]User=$USERExecStart=$(which zenrockd) startRestart=on-failureRestartSec=3LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF# Start the service and check the logssudosystemctldaemon-reloadsudosystemctlenablezenrockdsudosystemctlstartzenrockd.servicesudojournalctl-uzenrockd.service-f-ocat
📌Step 3: Node Health Check
Follow the commands to check if your node is working properly
Blocks left - 0-1 everything is fine and your node catches up with the last block of the network.
Check logs
sudojournalctl-uzenrockd.service-f-ocat
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.
[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"
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.
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"
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)
◽ 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:
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: explorerIn 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: