> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/testnet/empeiria.md).

# Empeiria

**Public Endpoints**

> RPC   <https://empeiria-testnet-rpc.validator247.com>
>
> API: <https://empeiria-testnet-api.validator247.com>

**Explorer**

```
waitting
```

software

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

GO

Download Go Binary and place in /usr/local:

```
wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz
```

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 prebuild binary

Pre-Built Package

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
```

## Install binary from source code (option B)

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
```

## 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 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 run 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
```

## 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-17.tar](https://archive-testnet.empe.io/empe-chain-1_2024-06-06.tar))

```
ARCHIVE=empe-chain-1_2024-06-17.tar
```

Download this file and untar

```

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 <a href="#becoming-a-validator" id="becoming-a-validator"></a>

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

#### Requirements <a href="#requirements" id="requirements"></a>

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](https://docs.empe.io/validators/configure-a-node) and [Cosmovisor setup](https://docs.empe.io/validators/cosmovisor-setup)
2. The node must be synchronized

```
emped status | jq .SyncInfo.catching_up
```

The command above should return

```
false
```

1. \
   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 faucet: [https://faucet-testnet.empe.io](https://faucet-testnet.empe.io/#/)

#### 1. Add wallet key <a href="#id-1-add-wallet-key" id="id-1-add-wallet-key"></a>

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:

Copy

```
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

Copy

```
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

Copy

```
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 (<http://faucet-testnet.empe.io>) or contact us and send your account address.

#### What is a Validator? <a href="#what-is-a-validator" id="what-is-a-validator"></a>

[Validators](https://hub.cosmos.network/master/validators/overview.html) 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](https://hub.cosmos.network/master/validators/validator-faq.html#how-can-validators-protect-themselves-from-denial-of-service-attacks) to protect your node from DDOS attacks and to ensure high availability.

#### Create Your Validator <a href="#create-your-validator" id="create-your-validator"></a>

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:

Copy

```
emped tendermint show-validator
```

To create your validator use the following command:

Copy

```
emped tx staking create-validator \
  --amount=1000000uempe \
  --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 <a href="#confirm-your-validator-is-running" id="confirm-your-validator-is-running"></a>

Your validator is active if the following command returns anything:

Copy

```
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.
