Testnet
We recommend the following hardware specifications:
Characteristic
Specification
Ubuntu 18.04 or later LTS
Update :
sudo apt update && sudo apt upgrade -y
sudo apt install -y git gcc make unzip jq
GO :
cd $HOME
VER="1.22.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
Add Go to the path:
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
echo 'export PATH=$PATH:/home/$USER/go/bin' >> ~/.profile
source ~/.profile
Install binary from source code :
If you want acsess file mail : validators@empe.io
git clone --depth 1 --branch release/v0.1.0 https://github.com/empe-io/empe-chain
cd empe-chain/
make install
Check binary version should be equal :
Result : output: v0.1.0
Configure a node
Change "Your Moniker"
export CHAINID=empe-testnet-2
export MONIKER=your moniker
Init chain and delete generated genesis:
emped init $MONIKER --chain-id $CHAINID
rm -rf ~/.empe-chain/config/genesis.json
Clone repository with chains:
git clone https://github.com/empe-io/empe-chains.git
cd empe-chains/testnet-2/
Copy genesis file from repo :
cp genesis.json ~/.empe-chain/config/
Change the persistent peers inside config.toml
file:
sed -e "s|persistent_peers = \".*\"|persistent_peers = \"$(cat .data | grep -oP 'Persistent peers\s+\K\S+')\"|g" ~/.empe-chain/config/config.toml > ~/.empe-chain/config/config.toml.tmp
mv ~/.empe-chain/config/config.toml.tmp ~/.empe-chain/config/config.toml
Set minimum gas price in app.toml file :
sed -e "s|minimum-gas-prices = \".*\"|minimum-gas-prices = \"$(cat .data | grep -oP 'Minimum Gas Price\s+\K\S+')\"|g" ~/.empe-chain/config/app.toml > ~/.empe-chain/config/app.toml.tmp
mv ~/.empe-chain/config/app.toml.tmp ~/.empe-chain/config/app.toml
Change external_address
value to contact your node using the public IP of your node:
PUB_IP=`curl –s –4 icanhazip.com`
sed -e "s|external_address = \".*\"|external_address = \"$PUB_IP:26656\"|g" ~/.empe-chain/config/config.toml > ~/.empe-chain/config/config.toml.tmp
mv ~/.empe-chain/config/config.toml.tmp ~/.empe-chain/config/config.toml
Cosmovisor setup
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.6.0
Create dir structure for cosmovisor :
export DAEMON_NAME=emped
export DAEMON_HOME=$HOME/.empe-chain/
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades
Copy emped binary to cosmovisor genesis bin :
cp ~/go/bin/emped $DAEMON_HOME/cosmovisor/genesis/bin
$DAEMON_HOME/cosmovisor/genesis/bin/emped version
Setup systemd :
sudo tee /etc/systemd/system/cosmovisor.service> /dev/null <<EOF
[Unit]
Description=cosmovisor
After=network-online.target
[Service]
User=$USER
ExecStart=/home/$USER/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=emped"
Environment="DAEMON_HOME=/home/$USER/.empe-chain"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
Run a node:
sudo systemctl enable cosmovisor
sudo systemctl start cosmovisor
Check status :
sudo systemctl status cosmovisor
Logs from cosmovisor :
sudo journalctl -f -u cosmovisor
Full state sync from archive snapshot
curl -O https://archive-testnet.empe.io/$ARCHIVE
tar -xvf $ARCHIVE -C ~/.empe-chain/data
rm $ARCHIVE
sudo systemctl daemon-reload
sudo systemctl restart
Run a Validator
Requirements :
emped status | jq .SyncInfo.catching_up
Result : false
Add wallet key ( change wallet ( wallet : walletname) )
emped keys add wallet
Example - Looks like a :
emped keys add validator
Enter keyring passphrase:
Re-enter keyring passphrase:
- name: validator
type: local
address: empe1atqq8lmeptgn2jlx2q8r42p572yhh6lzle7vng
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A8D47crCW+YkFGduj6brpuzectp3D61xRIx/qbEGGTif"}'
mnemonic: ""
Create Your Validator :
emped tendermint show-validator
Change - Keyname - validator name :
emped tx staking create-validator \
--amount=10000000uempe \
--pubkey=$(emped tendermint show-validator) \
--moniker=<YOUR_MONIKER> \
--chain-id=empe-testnet-2\
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--gas="auto" \
--min-self-delegation="1000000" \
--fees=20uempe \
--from=<KEY_NAME>
Check Your Validator :
emped query tendermint-validator-set | grep "$(emped tendermint show-validator | jq .key | tr -d \")"
SAVE THIS FILE !!!!!!!!!!!!!!!!!! SAVE !
~/.emped-chain/config/priv_validator_key.json