Installation
v0.1.0
dbb59ade85571fa00f2f795385b88a7083750575
Minimum hardware Requirements #
CPU : 4x CPUs
Ram : 8GB RAM
Storage: 100GB of storage (SSD or NVME)
Setting Variables
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export empe_CHAIN_ID="empe-testnet-2"" >> $HOME/.bash_profile
echo "export empe_PORT="290"" >> $HOME/.bash_profile
echo "export DAEMON_NAME="emped"" >> $HOME/.bash_profile
echo "export DAEMON_HOME=$HOME/.empe-chain"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Install dependencies
sudo apt update && sudo apt upgrade -y && sudo apt-get install make build-essential gcc git jq chrony lz4 tmux unzip bc -y && sudo apt install -y curl git jq lz4 build-essential unzip
INSTALL GO
ver="1.20.5" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
# Adding Go's location to profile
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Download and build binary
# Download Pre Built 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
sudo mv emped ~/go/bin/
chmod u+x ~/go/bin/emped
# Prepare binaries for Cosmovisor
mkdir -p $HOME/.empe-chain/cosmovisor/genesis/bin
mv build/emped $HOME/.empe-chain/cosmovisor/genesis/bin/
rm -rf build
# Create application symlinks
sudo ln -s $HOME/.empe-chain/cosmovisor/genesis $HOME/.empe-chain/cosmovisor/current -f
sudo ln -s $HOME/.empe-chain/cosmovisor/current/bin/emped /usr/local/bin/emped -f
Installing Cosmovisor
# Download and install Cosmovisor
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
# Create service
sudo tee /etc/systemd/system/empe.service > /dev/null << EOF
[Unit]
Description=empe node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.empe-chain"
Environment="DAEMON_NAME=emped"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
# Reload Daemon
sudo systemctl daemon-reload
sudo systemctl enable empe.service
Initialize Node & Configuring Node Port
# Set node configuration
emped init $MONIKER --chain-id empe-testnet-2
emped config node tcp://localhost:29057
emped config keyring-backend file
# Set custom ports in client.toml
sed -i.bak -e "s%:26457%:${empe_PORT}57%g" $HOME/.empe-chain/config/client.toml
# Set custom ports in app.toml
sed -i.bak -e "s%:1317%:${empe_PORT}17%g;
s%:8080%:${empe_PORT}80%g;
s%:9090%:${empe_PORT}90%g;
s%:9091%:${empe_PORT}91%g;
s%:8545%:${empe_PORT}45%g;
s%:8546%:${empe_PORT}46%g;
s%:6065%:${empe_PORT}65%g" $HOME/.empe-chain/config/app.toml
# Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${empe_PORT}58%g;
s%:26657%:${empe_PORT}57%g;
s%:6060%:${empe_PORT}60%g;
s%:26656%:${empe_PORT}56%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${empe_PORT}56\"%;
s%:26660%:${empe_PORT}60%g" $HOME/.empe-chain/config/config.toml
# Download genesis and addrbook
wget -O $HOME/.empe-chain/config/genesis.json https://files.nodeshub.online/testnet/empe/genesis.json
wget -O $HOME/.empe-chain/config/addrbook.json https://files.nodeshub.online/testnet/empe/addrbook.json
# Add Seeds and Peers
SEEDS="https://empe.test.seeds.nodeshub.online:29056"
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.empe-chain/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0001uempe\"|" $HOME/.empe-chain/config/app.toml
# Set pruning and indexer to Null
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 = "50"/" $HOME/.empe-chain/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.empe-chain/config/config.toml
Download Snapshot
# Back up priv_validator_state.json if needed
cp ~/.empe-chain/data/priv_validator_state.json ~/.empe-chain/priv_validator_state.json
# On some tendermint chains
emped unsafe-reset-all --home $HOME/.empe-chain --keep-addr-book
# On other tendermint chains
emped tendermint unsafe-reset-all --home $HOME/.empe-chain --keep-addr-book
curl https://files.nodeshub.online/testnet/empe/snapshot/empe_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.empe-chain
mv $HOME/.empe-chain/priv_validator_state.json.backup $HOME/.empe-chain/data/priv_validator_state.json
sudo systemctl restart empe && sudo journalctl -u empe -f -o cat
Start service and check the logs
sudo systemctl start empe.service && sudo journalctl -u empe -f -o cat
Last updated