Empe Testnet Validators Guide

Empe Testnet Validators Guide

Empeiria
9 min readJul 25, 2024

Empeiria is moving into the next, open phase of its Empe Testnet program. Do you want to join as node validators and help us build a robust and secure network? You’ve come to the right place!

This guide will equip you with the knowledge and steps needed to set up your validator on the Empe Testnet. Before you jump in, here are some of the participation benefits:

  • Network Security & Stability: Your validator node will contribute to the overall health and security of the Empe network.
  • Hands-on Experience: You will gain valuable practical experience with our End-to-End Verifiable Data Infrastructure (EVDI).

In this guide, you will find all the essential information necessary to become an Empe Testnet validator, including hardware requirements and detailed installation and configuration instructions.

For any additional questions or suggestions, please contact us at validators@empe.io.

You can find further information in the Empeiria Technical Documentation.

Ready to dive in? Let’s get started!

Participation

Who can participate in the testnet as a validator?

To participate, read the Empeiria Technical Documentation and follow the node setup instructions.

Follow Empeiria on X and join the Empe Testnet Validators Telegram channel to stay updated on the latest developments, including the upcoming launch of Empe Mainnet.

What are the hardware and software requirements for running a validator node?

These are the recommended hardware configurations that can be used to create a new Empe Testnet validator machine. Please note that the higher the effort you put into creating a stable and robust machine and lower the chances of getting slashed due to downtime.

Validator Operations

How do I configure my node to connect to the testnet?

Please see the validators instructions below for complete configuration instructions.

Troubleshooting & Support

Where can I find support if I encounter issues with my validator node?

For support, join the Empe Testnet Validators Telegram channel or contact the Empeiria tech team at validators@empe.io

How do I report a bug or security vulnerability?

Please report bugs or security vulnerabilities via email at validators@empe.io

What should I do if I suspect my node has been compromised?

If you suspect that your node has been compromised, please turn it off and report it to us via email at validators@empe.io

Community & Communication

How can I stay updated with the latest news and updates about the testnet?

Follow Empeiria on X and join the Empe Testnet Validators Telegram channel for the latest announcements, including updates on the upcoming transition to the next open phase.

Validators Instructions

Hardware requirements

Below, you will find the recommended hardware configurations that can be used to create a new Empe Testnet validator machine. Please note that the higher the effort you put into creating a stable and robust machine and lower the chances of getting slashed due to downtime.

  • Operating System: Ubuntu 18.04 or later LTS
  • Number of CPUs: 6
  • RAM: 32 GB
  • SSD: 240 GB

In addition, make sure that the following requirements are met:

  • Allow incoming connections on port 26656
  • Have a static IP address
  • Have access to the root user

Required software installation

Install the required software:

sudo apt update && sudo apt upgrade -y
sudo apt install -y git gcc make unzip jq

Add Go to the path:

echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
echo 'export PATH=$PATH:/home/$USER/go/bin' >> ~/.profile

source ~/.profile

Install binary from source code (option A)

As our chain is not yet publicly open-sourced, please contact us (at validators@empe.io) if you want to get access to the repository.

Clone repository and checkout to proper tag:

git clone --depth 1 --branch  release/v0.1.0  https://github.com/empe-io/empe-chain

Go to dir and build project:

cd empe-chain/
make install

Check binary version should be equal

emped version

output: v0.1.0

Install prebuild binary (option B)

The emped binary serves as the node client and the application client. In other words, the emped binary can be used to both run a node and interact with it.

For Linux Distributions

Download the tar.gz file:

curl -LO https://github.com/empe-io/empe-chain-releases/raw/master/v0.1.0/emped_linux_amd64.tar.gz

Verify the checksum:

sha256sum emped_linux_amd64.tar.gz

You should see the following:

5353de7004bbacc516d6fc89d7bbcbde251fbba8c4bdccb2a58f8376e47ab753  emped_linux_amd64.tar.gz

Unpack the tar.gz file:

tar -xvf emped_linux_amd64.tar.gz

Move the binary to your local bin directory and make it executable:

mkdir -p ~/go/bin
sudo mv emped ~/go/bin
chmod u+x ~/go/bin/emped

Open a new terminal window and check if the installation was successful:

emped version

You should see the following:

v0.1.0

Configure a node

Select a chain:

export CHAINID=empe-testnet-2
export MONIKER=<your moniker>

Init chain and delete generated genesis:

emped init $MONIKER --chain-id $CHAINID
rm -rf ~/.empe-chain/config/genesis.json

Clone repository with chains:

git clone https://github.com/empe-io/empe-chains.git
cd empe-chains/testnet-2/

Copy genesis file from repo:

cp genesis.json ~/.empe-chain/config/

Change the persistent peers inside config.toml file:

sed -e "s|persistent_peers = \".*\"|persistent_peers = \"$(cat .data | grep -oP 'Persistent peers\s+\K\S+')\"|g" ~/.empe-chain/config/config.toml > ~/.empe-chain/config/config.toml.tmp
mv ~/.empe-chain/config/config.toml.tmp ~/.empe-chain/config/config.toml

Set minimum gas price in app.toml file:

sed -e "s|minimum-gas-prices = \".*\"|minimum-gas-prices = \"$(cat .data | grep -oP 'Minimum Gas Price\s+\K\S+')\"|g" ~/.empe-chain/config/app.toml > ~/.empe-chain/config/app.toml.tmp
mv ~/.empe-chain/config/app.toml.tmp ~/.empe-chain/config/app.toml

Change external_address value to contact your node using the public IP of your node:

PUB_IP=`curl –s –4 icanhazip.com`
sed -e "s|external_address = \".*\"|external_address = \"$PUB_IP:26656\"|g" ~/.empe-chain/config/config.toml > ~/.empe-chain/config/config.toml.tmp
mv ~/.empe-chain/config/config.toml.tmp ~/.empe-chain/config/config.toml

Cosmovisor setup

Install cosmovisor

Run go install to download cosmovisor:

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Create dir structure for cosmovisor:

export DAEMON_NAME=emped
export DAEMON_HOME=$HOME/.empe-chain/
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades

Copy emped binary to cosmovisor genesis bin:

cp ~/go/bin/emped $DAEMON_HOME/cosmovisor/genesis/bin
$DAEMON_HOME/cosmovisor/genesis/bin/emped version

Setup systemd:

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

[Service]
User=$USER
ExecStart=/home/$USER/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=emped"
Environment="DAEMON_HOME=/home/$USER/.empe-chain"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target

EOF

Run a node:

sudo systemctl enable cosmovisor  
sudo systemctl start cosmovisor

Check status:

sudo systemctl status cosmovisor

Logs from cosmovisor:

sudo journalctl -f -u cosmovisor

Sync with state-sync

State-sync is a module built into the Cosmos SDK to allow validators to rapidly join the network by syncing your node with a snapshot-enabled RPC from a trusted block height.

This greatly reduces the time required for a validator or sentry to sync with the network from days to minutes. The limitations of this are that there is not a full transaction history, just the most recent state that the state-sync RPC has stored. An advantage of state-sync is that the database is very small in comparison to a fully synced node, therefore using state-sync to resync your node to the network can help keep running costs lower by minimizing storage usage.

By syncing to the network with state-sync, a node can avoid having to go through all the upgrade procedures and can sync with the most recent binary only.

For nodes that are intended to serve data for dapps, explorers, or any other RPC requiring full history, state-syncing to the network would not be appropriate.

Testnet state-sync

Snapshot are operated on rpc1 and rpc2

WARNING: This documentation assumes you have followed all previous instructions.

The state-sync configuration (in app.toml) is as follows (no need to update it):

# snapshot-interval specifies the block interval at which local state sync snapshots are
# taken (0 to disable). Must be a multiple of pruning-keep-every.
snapshot-interval = 1000

# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all).
snapshot-keep-recent = 10

Set SNAP_RPC1 and SNAP_RPC2 variable

SNAP_RPC1="https://rpc-archive-testnet.empe.io:443"
SNAP_RPC2="https://rpc-archive-testnet.empe.io:443"

Fetch the LATEST_HEIGHT from the snapshot RPC, set the state-sync BLOCK_HEIGHT and fetch the TRUST_HASH from the snapshot RPC. The BLOCK_HEIGHT to sync is determined by subtracting the snapshot-interval from the LATEST_HEIGHT.

LATEST_HEIGHT=$(curl -s https://rpc-archive-testnet.empe.io:443/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "https://rpc-archive-testnet.empe.io:443/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

Check variables to ensure they have been set:

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

# output should be something similar to:
# 29604 28604 2BB3A74046C625CB67D477550D99F2439D48191FD0E840FA42A324B0629A612A

Stop cosmovisor service:

sudo systemctl stop cosmovisor

Set the required variables in ~/.emped/config/config.toml

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC1,$SNAP_RPC2\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.empe-chain/config/config.toml

Reset the node database

WARNING: This will erase your node database. If you are already running validator, be sure you backed up your `config/priv_validator_key.json` and `config/node_key.json` before running `unsafe-reset-all`.

It is recommended to copy data/priv_validator_state.json to a backup and restore it after unsafe-reset-all to avoid potential double signing.

emped tendermint unsafe-reset-all --home $HOME/.empe-chain

Restart the node and check the logs:

sudo systemctl restart cosmovisor && journalctl -u cosmovisor -f

Full state sync from archive snapshot

If a node needs a full state history but wants to synchronize faster, it can start the chain from a history snapshot, (updated daily).

Find the most recent state snapshot on the list https://archive-testnet.empe.io/ (eg https://archive-testnet.empe.io/empe-chain-1_2024-06-06.tar )


curl -O https://archive-testnet.empe.io/$ARCHIVE
tar -xvf $ARCHIVE -C ~/.empe-chain/data
rm $ARCHIVE

Start chain using cosmovisor

Run a Validator

Becoming a validator

Once you properly set up a full node, you can become a validator node and start earning by validating the chain transactions.

Requirements

If you want to become an Empe validator you need to:

  1. Be a full node and cosmovisor up. If you are not, please follow the full node configuration guide and Cosmovisor setup
  2. The node must be synchronized:
emped status | jq .SyncInfo.catching_up

The command above should return:

false

3. Own enough tokens. To become a validator you need at least 2 empe tokens to create the validator, and for transaction fee. You can obtain your tokens from the faucet: https://testnet.ping.pub/empe/faucet

  1. Add wallet key

Inside the testnet you can use the Ledger, but you can also use the wallet software with the emped. However, if you wish to use Ledger, please add the --ledger flat to any command.

Please remember to copy the 12-word seed phrase in a secure place. They are your mnemonic. If you lose them you lose all your tokens and access to your validator.

Create the first wallet with the following command:

emped keys add <KEY_NAME>
# Enter a password that you can remember

The output of the command will provide the 24 words that are the mnemonic.

Create two wallets one for the validator and the second for the vesting account: example

If you are using the Ledger device you must first connect it to your computer, start the Cosmos application (on the device), and run the command

emped keys add <KEY_NAME> --ledger
# Enter a password that you can remember

In this case, the 12 words are not provided because they have already been configured in the Ledger initialization

emped keys add validator
Enter keyring passphrase:
Re-enter keyring passphrase:

- name: validator
type: local
address: empe1atqq8lmeptgn2jlx2q8r42p572yhh6lzle7vng
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A8D47crCW+YkFGduj6brpuzectp3D61xRIx/qbEGGTif"}'
mnemonic: ""

emped keys add vesting
Enter keyring passphrase:

If you don’t have tokens get some from faucet https://testnet.ping.pub/empe/faucet or contact us and send your account address.

What is a Validator?

Validators are responsible for committing new blocks to the blockchain through voting. A validator’s stake is slashed if they become unavailable or sign blocks at the same height. Please read about Sentry Node Architecture to protect your node from DDOS attacks and to ensure high availability.

Create Your Validator

Your empevalconspub consensus public key from tendermint can be used to create a new validator by staking tokens. You can find your validator pubkey by running:

emped tendermint show-validator

To create your validator use the following command:

emped tx staking create-validator \
--amount=10000000uempe \
--pubkey=$(emped tendermint show-validator) \
--moniker=<YOUR_MONIKER> \
--chain-id=empe-testnet-2\
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--gas="auto" \
--min-self-delegation="1000000" \
--fees=20uempe \
--from=<KEY_NAME>

When specifying commission parameters, the commission-max-change-rate is used to measure % point change over the commission-rate. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point.

You can confirm that you are in the validator set by using an explorer.

Confirm Your Validator is Running

Your validator is active if the following command returns anything:

emped query tendermint-validator-set | grep "$(emped tendermint show-validator | jq .key  | tr -d \")"

You should now see your validator in one of the block explorers. You are looking for the bech32 encoded address in the ~/.emped-chain/config/priv_validator_key.json file.

To be in the validator set, you need to have more total voting power than the 50th validator.

For support, join the Empe Testnet Validators Telegram channel or contact the Empeiria tech team at validators@empe.io. Follow Empeiria on X for the latest announcements.

--

--

Empeiria

The first End-to-End Verifiable Data Infrastructure for cryptographic truth and decentralized trust.