Testnet
Union
How To Install Full Node Union Testnet
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export UNION_CHAIN_ID=union-testnet-8" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install go
if ! [ -x "$(command -v go)" ]; then
ver="1.21.4"
cd $HOME
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" >> ~/.bash_profile
source ~/.bash_profile
fi
Download and build binaries
cd $HOME
wget -O uniond https://snapshot.konsortech.xyz/union/uniond-v0.22.0-linux-amd64
chmod +x uniond
sudo mv uniond /root/go/bin
Config app
alias uniond='uniond --home=$HOME/.union/'
uniond config chain-id $UNION_CHAIN_ID
Init app
uniond init $NODENAME --chain-id $UNION_CHAIN_ID
Download configuration
curl -Ls https://snapshot.konsortech.xyz/union/genesis.json > $HOME/.union/config/genesis.json
curl -Ls https://snapshot.konsortech.xyz/union/addrbook.json > $HOME/.union/config/addrbook.json
Set seeds and peers
sed -i -e "s|^seeds *=.*|seeds = \"0cdeec25dd52cc48c3b52e990fd80ba5f9839162@testnet-seed.konsortech.xyz:39165\"|" $HOME/.union/config/config.toml
Disable indexing
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.union/config/config.toml
Config pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.union/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.union/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.union/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.union/config/app.toml
Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0muno\"|" $HOME/.union/config/app.toml
Create service
sudo tee /etc/systemd/system/uniond.service > /dev/null <<EOF
[Unit]
Description=Union Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which uniond) start --home $HOME/.union
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable uniond
sudo systemctl restart uniond && sudo journalctl -u uniond -f -o cat
Guidance for Validator
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
uniond keys add $WALLET
To recover your wallet using seed phrase
uniond keys add $WALLET --recover
Show your wallet list
uniond keys list
Save wallet info
Add wallet and validator address into variables
UNION_WALLET_ADDRESS=$(uniond keys show $WALLET -a)
UNION_VALOPER_ADDRESS=$(uniond keys show $WALLET --bech val -a)
echo 'export UNION_WALLET_ADDRESS='${UNION_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export UNION_VALOPER_ADDRESS='${UNION_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Fund your wallet
In order to create validator first you need to fund your wallet with discord faucet.
N/A
Create validator
check your wallet balance:
uniond query bank balances $UNION_WALLET_ADDRESS
To create your validator run command below
uniond comet show-validator
The output will be similar to this (with a different key):
{"@type":"/cosmos.crypto.bn254.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="}
Create a Proof of Possession
export POSSESSION_PROOF=$(uniond prove-possession $(jq -r 'priv_key.value' ~/.union/config/priv_validator_key.json))
Then, create a file named validator.json with the following content:
{
"pubkey": {"@type":"/cosmos.crypto.bn254.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000muno",
"moniker": "your-node-moniker",
"identity": "testnet validator",
"website": "optional website for your validator",
"security": "optional security contact for your validator",
"details": "optional details for your validator",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
Finally, we’re ready to submit the transaction to create the validator:
uniond union-staking create-union-validator validator.json $POSSESSION_PROOF \
--from $WALLET \
--chain-id union-testnet-8
Check your validator key
[[ $(uniond q staking validator $UNION_VALOPER_ADDRESS -oj --node https://testnet-union-rpc.konsortech.xyz:443 | jq -r .validator.consensus_pubkey.value) = $(uniond status --node tcp://localhost:39657 | jq -r .validator_info.pub_key.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
uniond q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu uniond -o cat
Start service
sudo systemctl start uniond
Stop service
sudo systemctl stop uniond
Restart service
sudo systemctl restart uniond
Node info
Synchronization info
uniond status 2>&1 | jq .SyncInfo
Validator info
uniond status 2>&1 | jq .ValidatorInfo
Node info
uniond status 2>&1 | jq .NodeInfo
Show node id
uniond tendermint show-node-id
Wallet operations
List of wallets
uniond keys list
Recover wallet
uniond keys add $WALLET --recover
Delete wallet
uniond keys delete $WALLET
Get wallet balance
uniond query bank balances $UNION_WALLET_ADDRESS
Transfer funds
uniond tx bank send $UNION_WALLET_ADDRESS <TO_UNION_WALLET_ADDRESS> 1000000muno
Voting
uniond tx gov vote 1 yes --from $WALLET --chain-id=$UNION_CHAIN_ID
Staking, Delegation and Rewards
Delegate stake
uniond tx staking delegate $UNION_VALOPER_ADDRESS 1000000muno --from=$WALLET --chain-id=$UNION_CHAIN_ID --gas=auto
Redelegate stake from validator to another validator
uniond tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000muno --from=$WALLET --chain-id=$UNION_CHAIN_ID --gas=auto
Withdraw all rewards
uniond tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$UNION_CHAIN_ID --gas=auto
Withdraw rewards with commision
uniond tx distribution withdraw-rewards $UNION_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$UNION_CHAIN_ID
Validator management
Edit validator
uniond tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$UNION_CHAIN_ID \
--from=$WALLET
Unjail validator
uniond tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$UNION_CHAIN_ID \
--gas=auto
Custom Explorers
https://testnet-explorer.konsortech.xyz/union
Public Endpoint
RPC
https://testnet-union-rpc.konsortech.xyz
API
https://testnet-union-api.konsortech.xyz
gRPC
testnet-union.konsortech.xyz:32090
Peers and Seeds
Peers
4f35610bfbd5669852174c22a331329f4339dc2f@testnet-union.konsortech.xyz:32656
Seeds
b1f219f27a459b175ece0f1eadb138050072ff09@testnet-seed.konsortech.xyz:39165
Genesis & Address Book
Address Book
https://snapshot.konsortech.xyz/union/addrbook.json
Genesis
https://snapshot.konsortech.xyz/union/genesis.json
State Sync
sudo systemctl stop uniond
cp $HOME/.union/data/priv_validator_state.json $HOME/.union/priv_validator_state.json.backup
uniond tendermint unsafe-reset-all --home $HOME/.union --keep-addr-book
SNAP_RPC="https://testnet-union-rpc.konsortech.xyz:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
PEERS="4f35610bfbd5669852174c22a331329f4339dc2f@testnet-union.konsortech.xyz:32656"
sed -i -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.union/config/config.toml
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.union/config/config.toml
mv $HOME/.union/priv_validator_state.json.backup $HOME/.union/data/priv_validator_state.json
sudo systemctl restart uniond
sudo journalctl -u uniond -f --no-hostname -o cat
Snapshot
sudo systemctl stop uniond
cp $HOME/.union/data/priv_validator_state.json $HOME/.union/priv_validator_state.json.backup
rm -rf $HOME/.union/data
SNAP_NAME=$(curl -s https://snapshot.konsortech.xyz/union/ | egrep -o ">union-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot.konsortech.xyz/union/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.union
mv $HOME/.union/priv_validator_state.json.backup $HOME/.union/data/priv_validator_state.json
sudo systemctl restart uniond && journalctl -u uniond -f --no-hostname -o cat