System Requirements: Make sure your system meets the following minimum requirements for running a validator node:
Operating System: Use a Linux distribution like Ubuntu 20.04 or CentOS 7+. Make sure it is up to date:
sudo apt update && sudo apt upgrade -y
Install Dependencies:
Install required software packages like git
, curl
, and build-essential
:
sudo apt install -y git curl build-essential
Install Go (Go is required to build Onomy’s validator node):
Onomy nodes are written in Go, so you'll need to install it. First, check if Go is already installed:
go version
If not, follow the steps below to install Go:
wget <https://go.dev/dl/go1.20.5.linux-amd64.tar.gz>
sudo tar -C /usr/local -xvzf go1.20.5.linux-amd64.tar.gz
Add Go binaries to your system PATH:
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
Install Docker (optional, but recommended for testing purposes):
If you want to use Docker for running your node in a containerized environment, install it:
sudo apt install -y docker.io
sudo systemctl enable --now docker
Clone the Onomy Repository:
Clone the Onomy GitHub repository, which contains the codebase for setting up the validator:
git clone <https://github.com/onomyprotocol/onomy>
cd onomy
Install Dependencies:
After cloning the repository, install the required dependencies:
make install
This command compiles the code and installs the Onomy validator executable onomy
.
Initialize the Validator Node:
Run the following command to initialize the Onomy validator node:
onomy init --name <validator_name>
Replace <validator_name>
with your preferred name for the validator node.
Set up your Validator Identity:
You need to create and configure your validator’s identity. If you already have a key, you can import it. Otherwise, generate a new key:
onomy keys add <key_name> --keyring-backend test
You will be prompted to enter a passphrase for securing your key. Store this passphrase securely.
Edit the Config File:
The configuration file is located in ~/.onomy/config/config.toml
. You can edit the file to set custom parameters for your validator. For example:
moniker
(validator name)chain-id
(network you are connecting to, e.g., onomy-testnet
)rpc
endpoint.nano ~/.onomy/config/config.toml
Update the necessary fields in the file. Make sure the moniker
is set to the name you specified earlier.
Start the Node:
To start your validator node, run the following command:
onomy start
This command will start the validator node and sync it with the Onomy network.
Check Node Syncing:
You can monitor the sync progress by checking the logs:
tail -f ~/.onomy/logs/onomy.log
You should see logs indicating that your node is syncing with the network.
Join the Validator Set:
To participate as a validator, you will need to stake some ONMY tokens (Onomy's native token). If you are working with the testnet, you can obtain test tokens from a faucet. If you are on the mainnet, ensure you have enough ONMY tokens in your account.
To delegate your tokens to your validator:
onomy tx staking delegate <validator_address> <amount> --from <your_key> --chain-id <network_id> --gas auto --yes
Replace <validator_address>
, <amount>
, <your_key>
, and <network_id>
with the appropriate values.
Check Validator Status:
You can check the status of your validator node using the following command:
onomy status
This will show whether your validator is active, the blocks it has signed, and the current staking state.
Validator Performance Monitoring:
Use Prometheus and Grafana for performance monitoring. Onomy supports exporting data to Prometheus for more advanced analytics and monitoring. You can configure Prometheus scraping by adding the required configuration in your config.toml
.
Alternatively, you can check basic node stats via:
onomy query staking validators