Empeiria Validator Node Installation
Hardware Requirements
Section titled “Hardware Requirements”Component | Testnet |
---|---|
Memory | 32 GB |
CPU | 6 cores |
Disk | 240GB NVME SSD |
Operating System | Ubuntu 18.04 or later LTS |
1. Update & install dependencies
Section titled “1. Update & install dependencies”sudo apt update && sudo apt upgrade -ysudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq htop tmux chrony liblz4-tool -y
2. Install Go
Section titled “2. Install Go”cd $HOMEVER="1.22.2"wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"rm "go$VER.linux-amd64.tar.gz"[ ! -f ~/.bash_profile ] && touch ~/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profilesource $HOME/.bash_profile[ ! -d ~/go/bin ] && mkdir -p ~/go/bingo version
3. Set Vars
Section titled “3. Set Vars”MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>echo "export MONIKER=$MONIKER" >> $HOME/.bash_profileecho "export EMPE_CHAIN_ID="empe-testnet-2"" >> $HOME/.bash_profileecho "export EMPE_PORT="43"" >> $HOME/.bash_profilesource $HOME/.bash_profile
4. Download Binary
Section titled “4. Download Binary”cd $HOMEcurl -LO https://github.com/empe-io/empe-chain-releases/raw/master/v0.2.2/emped_v0.2.2_linux_amd64.tar.gztar -xvf emped_v0.2.2_linux_amd64.tar.gz[ ! -f ~/.bash_profile ] && touch ~/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profilesource $HOME/.bash_profile[ ! -d ~/go/bin ] && mkdir -p ~/go/binchmod +x empedsudo mv emped ~/go/binsource ~/.bash_profileemped version
5. Config and Init app
Section titled “5. Config and Init app”emped config node tcp://localhost:${EMPE_PORT}657emped config keyring-backend osemped config chain-id $EMPE_CHAIN_IDemped init $MONIKER --chain-id $EMPE_CHAIN_ID
6. Download Genesis file and Addrbook
Section titled “6. Download Genesis file and Addrbook”wget -O $HOME/.empe-chain/config/genesis.json https://testnet-files.syanodes.my.id/empe-genesis.jsonwget -O $HOME/.empe-chain/config/addrbook.json https://testnet-files.syanodes.my.id/empe-addrbook.json
7. Set custom port (Optional)
Section titled “7. Set custom port (Optional)”sed -i.bak -e "s%:1317%:${EMPE_PORT}317%g;s%:8080%:${EMPE_PORT}080%g;s%:9090%:${EMPE_PORT}090%g;s%:9091%:${EMPE_PORT}091%g;s%:8545%:${EMPE_PORT}545%g;s%:8546%:${EMPE_PORT}546%g;s%:6065%:${EMPE_PORT}065%g" $HOME/.empe-chain/config/app.tomlsed -i.bak -e "s%:26658%:${EMPE_PORT}658%g;s%:26657%:${EMPE_PORT}657%g;s%:6060%:${EMPE_PORT}060%g;s%:26656%:${EMPE_PORT}656%g;s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${EMPE_PORT}656\"%;s%:26660%:${EMPE_PORT}660%g" $HOME/.empe-chain/config/config.toml
8. Config Seeds and Peers
Section titled “8. Config Seeds and Peers”SEEDS=""sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.empe-chain/config/config.tomlsed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001uempe\"/" $HOME/.empe-chain/config/app.tomlsed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.empe-chain/config/config.tomlsed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.empe-chain/config/config.toml
9. Config Pruning
Section titled “9. Config Pruning”pruning="custom"pruning_keep_recent="100"pruning_keep_every="0"pruning_interval="10"sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.empe-chain/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.empe-chain/config/app.tomlsed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.empe-chain/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.empe-chain/config/app.toml
10. Create service file
Section titled “10. Create service file”sudo tee /etc/systemd/system/emped.service > /dev/null <<EOF[Unit]Description=empe-testnetAfter=network-online.target
[Service]User=$USERExecStart=$(which emped) start --home $HOME/.empe-chainRestart=on-failureRestartSec=3LimitNOFILE=65535
[Install]WantedBy=multi-user.targetEOF
Enable and start
sudo systemctl daemon-reloadsudo systemctl enable empedsudo systemctl start emped && sudo journalctl -fu emped -o cat
Check status
Section titled “Check status”emped status | jq
emped status | jq '{ latest_block_height: .SyncInfo.latest_block_height, catching_up: .SyncInfo.catching_up }'
Block sync left:
Section titled “Block sync left:”while true; do local_height=$(emped status | jq -r '.SyncInfo.latest_block_height'); network_height=$(curl -s https://rpc.empe.josephtran.xyz/status | jq -r '.result.sync_info.latest_block_height') blocks_left=$((network_height - local_height));
echo -e "\033[1;38mYour node height:\033[0m \033[1;34m$local_height\033[0m | \033[1;35mNetwork height:\033[0m \033[1;36m$network_height\033[0m | \033[1;29mBlocks left:\033[0m \033[1;31m$blocks_left\033[0m"; sleep 5;done