This document describes:
- prerequisites for Mezo Validator Kit,
- how Mezo Validator Kit for native binaries works,
- deployment process for the validator.
Native binaries installation is tested on the following operating systems:
- Ubuntu 24 LTS and higher (x86_64 arch)
- Debian 13 Trixie and higher (x86_64 arch)
Important
If you are planning to install on older system versions or other distributions, it's not guaranteed it will work.
Before setup, make sure:
- You have
v-kit.shand the right*.envfile on your machine. - You can run the setup script as
rootor usingsudo.
Important
The following instruction uses mainnet environment as an example.
For testnet, follow the same steps but use testnet.env
(from the testnet.env.example template) as your configuration file and
point it using the --envfile flag while running the v-kit.sh script.
Copy the mainnet.env.example and create your own file mainnet.env.
For the validator to be successfully deployed, it's necessary to fill the environment file.
- Edit the following variables in
mainnet.env:
MEZOD_MONIKER- a human-readable name for the validator (Example:my-lovely-validator)MEZOD_KEYRING_NAME- a human-readable name for the mezod keyring (Example:my-lovely-keyring)MEZOD_KEYRING_PASSWORD- password for the keyring (to generate best possible password, you can useopenssl rand -hex 32command)MEZOD_KEYRING_MNEMONIC- mnemonic for keyring (the best option is to generate it usingv-kit.sh)MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS- address for the Ethereum node (required for the sidecar to run). The URL must be WebSocket, i.e. start withwss://(recommended) orws://.MEZOD_PUBLIC_IP- public IP address of the validatorMEZOD_DOWNLOAD_LINK- link to a public repository hosting atar.gzfile with mezo binaryMEZOD_PORT_P2P- the port for the P2P connection. Default is26656CONNECT_VERSION- version for the connect sidecarCONNECT_DOWNLOAD_SCRIPT- link (or path) for the connect download script
Note
You can use your custom connect installation script (example for that is install_skip.sh). This one is customized to set a connect version to be installed (default installation script always installs binary with latest tag on it).
Before running v-kit.sh, make sure it can be executed by your shell:
chmod +x v-kit.sh./v-kit.sh mnemonic
Output mnemonic of this command should be written to the environment file as MEZOD_KEYRING_MNEMONIC variable.
Sample output:
------------------------------------------------
Reading configuration from environment files
------------------------------------------------
Generating mnemonic...
Save it into your environment file under the variable MEZOD_KEYRING_MNEMONIC
---BEGIN MNEMONIC---
mention maid fashion vibrant nuclear humble welcome screen saddle beauty mango half actress bicycle thank crime shrug pizza car palace silk save credit man
---END MNEMONIC---
Removing temporary mezod binary...
In this case, you should copy mention maid fashion vibrant nuclear humble welcome screen saddle beauty mango half actress bicycle thank crime shrug pizza car palace silk save credit man to the environment file as instructed previously.
Deployment script has the following options:
Usage: ./v-kit.sh
[stop <opt>]
stop chosen mezo service (opts: mezo|ethereum-sidecar|connect-sidecar)
[start <opt>]
start chosen mezo service (opts: mezo|ethereum-sidecar|connect-sidecar)
[restart <opt>]
restart chosen mezo service (opts: mezo|ethereum-sidecar|connect-sidecar)
[logs <opt>]
show logs for chosen mezo service (opts: mezo|ethereum-sidecar|connect-sidecar)
[mnemonic]
generate keyring mnemonic (this is required to run validator kit!)
[-b/--backup]
backup mezo home dir to /var/mezod-backups
[-c/--cleanup]
clean up the installation
WARNING: this option removes whole Mezo directory (/var/mezod) INCLUDING PRIVATE KEYS
[--health]
check health of mezo systemd services
[-s/--show-variables]
output variables read from env files
[-v/--validator-info]
show validator info
[-e/--envfile <arg>]
set file with environment variables for setup script
[-h/--help]
show this prompt
To run full validator setup, run:
with sudo:
sudo ./v-kit.shor as root:
./v-kit.shImportant
If you are using an environment file other than mainnet.env make sure to set --envfile flag.
./v-kit.sh --envfile <your_custom_envfile>Backup creates a new folder using the name of mezo home dir suffixed by -backups
(example: /var/mezod-backups when home dir is /var/mezod).
After that it zips the whole home dir to the created folder.
./v-kit.sh -b./v-kit.sh --backupWarning
This option removes whole Mezo directory (/var/mezod) INCLUDING PRIVATE KEYS. It's highly recommended to backup the home dir before cleanup.
./v-kit.sh -c./v-kit.sh --cleanup./v-kit.sh --healthThis option views all env variables read by the script and activates shell flag that prints
all executed commands and their results (set -x).
./v-kit.sh -s./v-kit.sh --show-variablesYou can perform basic administrative actions using the script:
./v-kit.sh <start/stop/status/logs> <service>Example:
./v-kit.sh logs mezo