Installation
This guide covers the installation of empe node.
To install empe node, you need to have several prerequisites in place. Here's a list of all the essential pre-requisites for setting up and working on this project.
Prerequisites
Hardware Requirements
- CPUS: 6 or more CPUs
- RAM: 8 GB RAM
- STORAGE: 500GB NVME
- Bandwith: 300Mbps or 1 Gbps (unmetered *recomended).
Dependencies
Update your system and make sure you installed this dependencies.
# install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Set Variable
Change with yours.
# set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export EMPED_CHAIN_ID="empe-testnet-2"" >> $HOME/.bash_profile
echo "export EMPED_PORT="28"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Installation
Go Installation
# install go, if needed
cd $HOME
VER="1.22.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
Download and Build Binaries
# download binary
cd $HOME
rm -rf bin
mkdir bin
cd $HOME/bin
curl -LO https://github.com/empe-io/empe-chain-releases/raw/master/v0.2.2/emped_v0.2.2_linux_amd64.tar.gz
tar -xvf emped_v0.2.2_linux_amd64.tar.gz
chmod +x $HOME/bin/emped
mv $HOME/bin/emped ~/go/bin
Initialize The Node
emped config node tcp://localhost:${EMPED_PORT}657
emped config keyring-backend os
emped config chain-id empe-testnet-2
emped init "test" --chain-id empe-testnet-2
# config and init app
emped config node tcp://localhost:${EMPED_PORT}657
emped config keyring-backend os
emped config chain-id empe-testnet-2
emped init "test" --chain-id empe-testnet-2
# download genesis and addrbook
wget -O $HOME/.empe-chain/config/genesis.json https://server-5.itrocket.net/testnet/empeiria/genesis.json
wget -O $HOME/.empe-chain/config/addrbook.json https://server-5.itrocket.net/testnet/empeiria/addrbook.json
# set seeds and peers
SEEDS="20ca5fc4882e6f975ad02d106da8af9c4a5ac6de@empeiria-testnet-seed.itrocket.net:28656"
PEERS="03aa072f917ed1b79a14ea2cc660bc3bac787e82@empeiria-testnet-peer.itrocket.net:28656,ceabbac01275c13b6e1db47922e1e21da5083c81@65.108.120.251:16656,e058f20874c7ddf7d8dc8a6200ff6c7ee66098ba@65.109.93.124:29056,78f766310a83b6670023169b93f01d140566db79@65.109.83.40:29056,38ca15d129e9f02ff4164649f1e8ba1325237e7f@194.163.145.153:26656,cbe1bfc8ee1a15a5e32ba85e0944d17812b5b244@65.21.67.40:34656,a1f6d359eaa3fb1fa3f8c8fdf000f9e68ce58801@144.76.70.103:15656,edfc10bbf28b5052658b3b8b901d7d0fc25812a0@193.70.45.145:26656,5ef5a43264a2f0feb69c0ed16b69c13772e5b97a@144.76.202.120:41656,0c1b0f7cb993973480c90cafcab2ba1b92829986@188.68.38.127:16656,8ed5256d33af3cda14347ab60b758a5baca63ed5@84.247.171.94:11156"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.empe-chain/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.empe-chain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.empe-chain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.empe-chain/config/app.toml
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.0001uempe"|g' $HOME/.empe-chain/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.empe-chain/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.empe-chain/config/config.toml
Create Service File
# create service file
sudo tee /etc/systemd/system/emped.service > /dev/null <<EOF
[Unit]
Description=Empeiria node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.empe-chain
ExecStart=$(which emped) start --home $HOME/.empe-chain
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Start service and check log
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable emped
sudo systemctl restart emped && sudo journalctl -u emped -fo cat
Now you can check syncronization Log
syncronization
You can check syncronization of you node block height
while true; do
local_height=$(curl -s http://localhost:28657/status | jq -r .result.sync_info.latest_block_height || echo "0")
network_height=$(curl -s https://trpc-empe.nodesemesta.cloud/status | jq -r .result.sync_info.latest_block_height || echo "0")
blocks_left=$((network_height - local_height))
n_peers=$(curl -Ss http://localhost:28657/net_info | jq -r .result.n_peers || echo "0")
echo "Curr block: $local_height (blocks left: $blocks_left) | Peers: $n_peers"
sleep 3
done
Example Output:
Curr block: 3549754 (blocks left: 1) | Peers: 38
Curr block: 3549755 (blocks left: 0) | Peers: 38
Curr block: 3549756 (blocks left: 0) | Peers: 38
Wallet Configuration
Option 1 New Wallet
If you have no wallet before, add new wallet:
emped keys add wallet
Mnemonic:
Save your mnemonic wallet to backup in case you can lost access control of your validator
Option 2 Recover Wallet
If you have a existing wallet address, recover wallet:
emped keys add wallet --recover
Show Wallet list
emped keys list
Fund Wallet
To create a validator, you need to fund the previously created wallet using https://testnet.ping.pub/empe/faucet
To check wallet balance use command below
emped q bank balances $(emped keys show wallet -a)
Validator Configuration and Installation
Create and make your node a Validator
Use the following command to make your node as a validator:
emped tx staking create-validator \
--amount 1000000uempe \
--from $WALLET \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(emped tendermint show-validator) \
--moniker "validator_name" \
--identity "your_keybase_id" \
--website "docs.nodesemesta.cloud" \
--details "Your_detail_desription" \
--chain-id empe-testnet-2 \
--gas auto --gas-adjustment 1.5 --fees 30uempe \
-y
Now You are Validator on Empeiria