Empeiria Installation Guide
This guide provides step-by-step instructions for installing a Empeiria node on your system. Before you begin, ensure you have the necessary prerequisites.
Prerequisites
- Operating System: Linux (Ubuntu/Debian recommended) or macOS
- Go: Version 1.18 or higher
- Git: For cloning the repository
- Terminal: Access to a command-line interface
Hardware Requirement
Ensure your system meets the following hardware requirements to run the Empeiria node efficiently:
- CPU: 4 cores or more
- RAM: 8 GB or more
- Disk Space: 200 GB SSD or more
- Network: Broadband internet connection with at least 1 Mbps upload/download speed
Installation
1. Setup prerequisites
sudo apt update -q
sudo apt install -y -qq make unzip clang pkg-config lz4 libssl-dev build-essential git jq ncdu bsdmainutils htop aria2 pvGO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n1)
wget "https://dl.google.com/go/${GO_VERSION}.linux-amd64.tar.gz"
sudo tar -C /usr/local -xzf "${GO_VERSION}.linux-amd64.tar.gz"
rm "${GO_VERSION}.linux-amd64.tar.gz"
echo "export GOROOT=/usr/local/go" | tee -a ~/.profile
echo "export GOPATH=\$HOME/go" | tee -a ~/.profile
echo "export PATH=\$PATH:/usr/local/go/bin:\$HOME/go/bin" | tee -a ~/.profile
source ~/.profile2. Install Empe Binary
OS_TYPE=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH_TYPE=$(uname -m)
ARCH_TYPE=$(echo $ARCH_TYPE | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
EMPE_NAME="emped_v0.2.2_${OS_TYPE}_${ARCH_TYPE}.tar.gz"
EMPE_DOWNLOAD_URL="https://github.com/empe-io/empe-chain-releases/raw/refs/heads/master/v0.2.2/${EMPE_NAME}"
wget -O $EMPE_DOWNLOAD_URL
tar -xvf $EMPE_NAME
sudo chmod +x emped
sudo mv emped /usr/local/bin/empedVerify the installation by checking the version
emped version3. Configure the Node
Use emped init to set up your node for the Odyssey testnet. Replace 'Your Node Name' with a unique identifier.
CHAIN_ID='empe-testnet-2'
MONIKER='Your Node Name'
DAEMON_HOME=$HOME/.empe-chain
emped init $MONIKER --chain-id $CHAIN_ID --home $DAEMON_HOME4. Configure the Settings
DAEMON_HOME=$HOME/.empe-chain
git clone https://github.com/empe-io/empe-chains.gitDAEMON_HOME=$HOME/.empe-chain
rm -rf ~/.empe-chain/config/genesis.json
cp empe-chains/testnet-2/genesis.json $DAEMON_HOME/config/genesis.json
sed -e "s|persistent_peers = \".*\"|persistent_peers = \"$(cat empe-chains/testnet-2/.data | grep -oP 'Persistent peers\s+\K\S+')\"|g" $DAEMON_HOME/config/config.toml > $DAEMON_HOME/config/config.toml.tmp
mv $DAEMON_HOME/config/config.toml.tmp $DAEMON_HOME/config/config.toml
sed -e "s|minimum-gas-prices = \".*\"|minimum-gas-prices = \"$(cat empe-chains/testnet-2/.data | grep -oP 'Minimum Gas Price\s+\K\S+')\"|g" $DAEMON_HOME/config/app.toml > $DAEMON_HOME/config/app.toml.tmp
mv $DAEMON_HOME/config/app.toml.tmp $DAEMON_HOME/config/app.tomlChange custom port (optional)
DAEMON_HOME=$HOME/.empe-chain
PORT_PREFIX=26
sed -i.bak -e "s%:26656%:${PORT_PREFIX}656%g;" ${DAEMON_HOME}/config/client.toml
sed -i.bak -e "s%:1317%:${PORT_PREFIX}317%g; s%:8080%:${PORT_PREFIX}080%g; s%:9090%:${PORT_PREFIX}090%g; s%:9091%:${PORT_PREFIX}091%g; s%:8545%:${PORT_PREFIX}545%g; s%:8546%:${PORT_PREFIX}546%g; s%:6065%:${PORT_PREFIX}065%g" ${DAEMON_HOME}/config/app.toml
sed -i.bak -e "s%:26658%:${PORT_PREFIX}658%g; s%:26657%:${PORT_PREFIX}657%g; s%:6060%:${PORT_PREFIX}060%g; s%:26656%:${PORT_PREFIX}656%g; s%:26660%:${PORT_PREFIX}660%g" ${DAEMON_HOME}/config/config.toml5. Install and Initialize Cosmovisor
Download the Cosmovisor binary using the go install command
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
cosmovisor versionInitialize Cosmovisor
DAEMON_NAME=emped DAEMON_HOME=$HOME/.empe-chain cosmovisor init $(which emped)6. Create Service
To ensure that the Empeiria processes run continuously and restart automatically on failure, you can create a systemd service. This will help manage the lifecycle of the processes and ensure they start on boot.
Create a new systemd service file :
sudo tee /etc/systemd/system/emped.service >/dev/null <<EOF
[Unit]
Description=Cosmovisor Empeiria Node
After=network-online.target
[Service]
User=$USER
Type=simple
WorkingDirectory=$HOME/.empe-chain
ExecStart=$(which cosmovisor) run start --home $HOME/.empe-chain
Restart=on-failure
RestartSec=3
LimitNOFILE=infinity
LimitNPROC=infinity
Environment="DAEMON_NAME=emped"
Environment="DAEMON_HOME=$HOME/.empe-chain"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=$PATH"
[Install]
WantedBy=multi-user.target
EOFNow apply the service configuration and start the services
sudo systemctl enable emped.service
sudo systemctl restart emped.serviceTo check the logs for the empeiria service, use the following command:
sudo journalctl -fu emped -o cat6. Applying Peers
To enhance network synchronization, we recommend applying our peers by following the steps below, or you can change the RPC URL to your own desired RPC URL:
PERSISTENT_PEERS=$(curl "https://scan.aldebaranode.xyz/api/scan/peers?rpc_url=https://rpc-empe-testnet.aldebaranode.xyz" | jq -r 'flatten | join(",")')
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.empe-chain/config/config.tomlsudo systemctl restart emped.service7. Applying Snapshot
To apply a snapshot for faster synchronization, follow the steps below:
Download snapshot
SNAP_NAME=$(curl -s https://snapshot.cryptonode.id/empe-testnet/ | egrep -o ">empe-testnet-snapshot.*.tar.lz4" | tr -d ">")
SNAPSHOT_URL="https://snapshot.cryptonode.id/empe-testnet/${SNAP_NAME}"
(echo $SNAPSHOT_URL;) | aria2c -x 16 -s 16 -k 1M -i -Stop Service
sudo systemctl stop empedBackup Files
cp $HOME/.empe-chain/data/priv_validator_state.json $HOME/.empe-chain/priv_validator_state.json.backupRemove Old Data
rm -rf $HOME/.empe-chain/dataExtract Snapshot
mkdir -p $HOME/.empe-chain/data
lz4 -d -c $SNAP_NAME | pv | tar xv -C $HOME/.empe-chain/ > /dev/nullRestore Files
cp $HOME/.empe-chain/priv_validator_state.json.backup $HOME/.empe-chain/data/priv_validator_state.jsonStart Service
sudo systemctl start emped