Skip to content

0xtnpxsgt/Empeiria-Node-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Empeiria-Node-Setup

🖥️System Requirements
- OS: Linux
- CPU: 6 Core(s)
- Memory: 32GB
- Storage: 300GB
  • This guide is created under the assumption you are using Ubuntu 22.04 LTS
  • You can buy from : Contabo
  • You should buy VPS which is fulfilling all these requirements :

Install dependencies

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential snapd unzip nginx
sudo apt -qy upgrade

Set environment

export INSTALLATION_DIR=${HOME}/empe-chain
export DAEMON_NAME=emped
export DAEMON_HOME=${HOME}/.empe-chain
export SERVICE_NAME=emped
export MONIKER="YOUR_NODE_NAME_HERE"
export WALLET="YOUR_WALLET_NAME_HERE"

Write env to .profile

echo 'export DAEMON_NAME=${DAEMON_NAME}' >> ~/.profile
echo 'export DAEMON_HOME=${DAEMON_HOME}' >> ~/.profile
echo 'export DAEMON_ALLOW_DOWNLOAD_BINARIES=true' >> ~/.profile
echo 'export DAEMON_RESTART_AFTER_UPGRADE=true' >> ~/.profile
echo 'export DAEMON_LOG_BUFFER_SIZE=512' >> ~/.profile
echo 'export WALLET=${WALLET}' >> ~/.profile
source ~/.profile

Prepare installation

mkdir -p ${INSTALLATION_DIR}/bin
mkdir -p ${DAEMON_HOME}/cosmovisor/genesis/bin
mkdir -p ${DAEMON_HOME}/cosmovisor/upgrades

Install and Setup Empeiria Daemon

cd ${INSTALLATION_DIR}
#Download Empe Daemon and basic setup
wget -qO - https://github.com/empe-io/empe-chain-releases/raw/master/v0.1.0/emped_linux_amd64.tar.gz | tar -xzf -
mv ${DAEMON_NAME} ${INSTALLATION_DIR}/bin
#Download and install cosmovisor
wget https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-amd64.tar.gz
tar -xvzf cosmovisor-v1.5.0-linux-amd64.tar.gz
#Copy Binaries
cp cosmovisor ${INSTALLATION_DIR}/bin/cosmovisor
cp ${INSTALLATION_DIR}/bin/${DAEMON_NAME} ${DAEMON_HOME}/cosmovisor/genesis/bin
sudo ln -s ${INSTALLATION_DIR}/bin/cosmovisor /usr/local/bin/cosmovisor -f
sudo ln -s ${DAEMON_HOME}/cosmovisor/genesis ${DAEMON_HOME}/cosmovisor/current -f
sudo ln -s ${DAEMON_HOME}/cosmovisor/current/bin/${DAEMON_NAME} /usr/local/bin/${DAEMON_NAME} -f

Check emped version

emped --home ${DAEMON_HOME} version

Download Genesis

wget -O $HOME/.empe-chain/config/genesis.json "https://raw.githubusercontent.com/empe-io/empe-chains/master/testnet-2/genesis.json"
wget -O $HOME/.empe-chain/config/addrbook.json "https://raw.githubusercontent.com/MictoNode/empe-chain/main/addrbook.json"

Peers

SEEDS=""
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:43656,[email protected]:26656,[email protected]:43656,[email protected]:29056,[email protected]:26656,[email protected]:12656,[email protected]:26656,[email protected]:43656,[email protected]:26656,[email protected]:29056,[email protected]:43656,[email protected]:43656,[email protected]:11756,[email protected]:23656,[email protected]:43656,[email protected]:43656,[email protected]:43656,[email protected]:29056,[email protected]:25656,[email protected]:26656,[email protected]:16610"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.empe-chain/config/config.toml

Create or Restore Wallet

#If you want to create new wallet
emped --home ${DAEMON_HOME} keys add ${WALLET}

#If you already have wallet and want to use same phrase
emped --home ${DAEMON_HOME} keys add ${WALLET} --recover

Check your wallet

emped --home ${DAEMON_HOME} keys list

Setup pruning config

sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
  ${DAEMON_HOME}/config/app.toml

Setting minimum gas fee

sed -i 's/minimum-gas-prices *=.*/minimum-gas-prices = "0.0001uempe"/' ${DAEMON_HOME}/config/app.toml

Setting up Cosmovisor

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

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home ${DAEMON_HOME}
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=${DAEMON_NAME}"
Environment="DAEMON_HOME=${DAEMON_HOME}"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"

[Install]
WantedBy=multi-user.target
EOF

Enable the service

sudo systemctl daemon-reload
sudo systemctl enable emped.service
sudo systemctl start emped.service

Download Snapshot

#Stop the service
sudo systemctl stop emped.service
cp $HOME/.empe-chain/data/priv_validator_state.json $HOME/.empe-chain/priv_validator_state.json.backup
apt install aria2c
if curl -s --head https://server-5.itrocket.net/testnet/empeiria/empeiria_2024-08-07_865547_snap.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
  echo "Snapshot found, downloading..."
  aria2c -x5 -s4 https://server-5.itrocket.net/testnet/empeiria/empeiria_2024-08-07_865547_snap.tar.lz4 -o empe_snapshot.lz4
  if [ $? -eq 0 ]; then
    echo "Download complete, extracting..."
    lz4 -dc empe_snapshot.lz4 | tar -xf - -C $HOME/.empe-chain
    if [ $? -eq 0 ]; then
      echo "Snapshot downloaded and extracted successfully."
    else
      echo "Failed to extract snapshot."
    fi
  else
    echo "Failed to download snapshot."
  fi
else
  echo "No snapshot found."
fi
mv $HOME/.empe-chain/priv_validator_state.json.backup $HOME/.empe-chain/data/priv_validator_state.json

Check logs

sudo systemctl restart emped && sudo journalctl -u emped -f --no-hostname -o cat

Check Sync Info

False = Fully Sync

emped status 2>&1 | jq .SyncInfo

If already Fully Sync - Please Proceed

Validator Setup - Fill this with your validator info

export MONIKER="YOUR_NODE_NAME_HERE"
export WALLET="YOUR_WALLET_NAME_HERE"
export DETAILS="YOUR_NODE_INFORMATION_HERE"
export WEBSITE="YOUR_WEBSITE_HERE"
export DISPLAY_PIC="YOUR_KEYBASE_IMAGE_PGP"
export CONTACT="YOUR_CONTACT"
Screenshot 1403-05-17 at 8 59 46 PM

Write env to .profile

echo 'export MONIKER=${MONIKER}' >> ~/.profile
echo 'export WALLET=${WALLET}' >> ~/.profile
echo 'export DETAILS=${DETAILS}' >> ~/.profile
echo 'export WEBSITE=${WEBSITE}' >> ~/.profile
echo 'export DISPLAY_PIC=${DISPLAY_PIC}' >> ~/.profile
echo 'export CONTACT=${CONTACT}' >> ~/.profile
source ~/.profile

Get Testnet EMPE -

You can obtain testnet tokens to fund your address from official EMPE faucet: https://faucet.cnd.biz.id/

or Join here https://t.me/empevalidators and request token from the admin

You can verify your balance with this command:

emped query bank balances $(emped keys show $WALLET -a)

Create Validator

emped tendermint show-validator

The output will be similar to this (with a different key):

{"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="}

You can create your validator by using command below :

emped tx staking create-validator \
  --amount=10000000uempe \
  --pubkey=$(emped tendermint show-validator) \
  --moniker=${MONIKER} \
  --identity=${DISPLAY_PIC} \
  --website=${WEBSITE} \
  --security-contact=${CONTACT} \
  --details=${DETAILS} \
  --chain-id=empe-testnet-2 \
  --commission-rate="0.05" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --gas="auto" \
  --min-self-delegation="1000000" \
  --fees=25uempe \
  --from=${WALLET}

Self Delegate

emped tx staking delegate $(emped keys show $WALLET --bech val -a) 1000000uempe \
--from $WALLET \
--chain-id empe-testnet-2 \
--gas auto \
--gas-adjustment 1.5 \
--fees 25uempe -y

Done Congratulation!

View Validator Info

emped q staking validator $(emped keys show "YOUR_WALLET_NAME" --bech val -a)

Other Commands

#Start 
sudo systemctl start emped
#Stop 
sudo systemctl stop emped
#Status
sudo systemctl status emped

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published