Network
Cosmos
Empeiria
Installation

Empe

ℹ️

Recommended Hardware: 6 Cores, 32GB RAM, 500GB of storage (NVME)

Install 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
# install go, if needed
cd $HOME
VER="1.21.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
 
# 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="18"" >> $HOME/.bash_profile
echo "export EMPED_PATH=".empe-chain"" >> $HOME/.bash_profile
source $HOME/.bash_profile
 
# download binary
cd $HOME
curl -LO https://github.com/empe-io/empe-chain-releases/raw/master/v0.1.0/emped_linux_amd64.tar.gz
tar -xvf emped_linux_amd64.tar.gz
chmod +x $HOME/emped
mv $HOME/emped /usr/local/bin/
rm -rf emped_linux_amd64.tar.gz $HOME/bin
 
# config and init app
emped init $MONIKER --chain-id $EMPED_CHAIN_ID
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${EMPED_PORT}657\"|" $HOME/$EMPED_PATH/config/client.toml
 
# download genesis and addrbook
wget -O $HOME/$EMPED_PATH/config/genesis.json https://snapshot.dashnode.org/empe-testnet/genesis.json
wget -O $HOME/$EMPED_PATH/config/addrbook.json https://snapshot.dashnode.org/empe-testnet/addrbook.json
 
# set seeds and peers
SEEDS=""
PEERS = "45bdc8628385d34afc271206ac629b07675cd614@empe-testnet-peer.dashnode.org:25656,[email protected]:25656,[email protected]:25656,[email protected]:25656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/$EMPED_PATH/config/config.toml
 
# set custom ports in app.toml file
sed -i.bak -e "s|:1317|:${EMPED_PORT}317|g;
s|:8080|:${EMPED_PORT}080|g;
s|:9090|:${EMPED_PORT}090|g;
s|:9091|:${EMPED_PORT}091|g;
s|:8545|:${EMPED_PORT}545|g;
s|:8546|:${EMPED_PORT}546|g;
s|:6065|:${EMPED_PORT}065|g" $HOME/$EMPED_PATH/config/app.toml
 
# set custom ports in config.toml file
sed -i.bak -e "s|:26658|:${EMPED_PORT}658|g;
s|:26657|:${EMPED_PORT}657|g;
s|:6060|:${EMPED_PORT}060|g;
s|:26656|:${EMPED_PORT}656|g;
s|^external_address = \"\"|external_address = \"0.0.0.0:${EMPED_PORT}656\"|;
s|:26660|:${EMPED_PORT}660|g" $HOME/$EMPED_PATH/config/config.toml
 
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/$EMPED_PATH/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/$EMPED_PATH/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/$EMPED_PATH/config/app.toml
 
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "1000000000uempe"|g' $HOME/$EMPED_PATH/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/$EMPED_PATH/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/$EMPED_PATH/config/config.toml
 
# create service file
sudo tee /etc/systemd/system/emped.service > /dev/null <<EOF
[Unit]
Description=Empe node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/$EMPED_PATH
ExecStart=$(which emped) start --home $HOME/$EMPED_PATH
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
 
# reset and download snapshot
emped tendermint unsafe-reset-all --home $HOME/$EMPED_PATH
 
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable emped
sudo systemctl restart emped && sudo journalctl -u emped -f