Source Protocol Validator Nodes Installation

Source Protocol Testnet Installation

By otomatis | pramonoutomo | 8 Sep 2022


In this tutorial i recomended using Contabo (choose the NVME DISK!) and Vultr (SSD are also good for this one).

Minimum Hardware Requirement:
CPU: 4 or more physical CPU cores
RAM: At least 8GB of memory (RAM)
Disk: At least 160GB of SSD disk storage
Connection: At least 100mbps network bandwidth
OS: Ubuntu 20.04

Automatic installation script

wget -O source.sh https://raw.githubusercontent.com/xsons/TestnetNode/main/Source/source.sh && chmod +x source.sh && ./source.sh
sourced status 2>&1 | jq .SyncInfo

 

State Sync (fast sync the blocks)

sudo systemctl stop sourced
sourced unsafe-reset-all
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.source/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.source/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.source/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.source/config/app.toml
wget -O $HOME/.source/config/addrbook.json "https://raw.githubusercontent.com/StakeTake/guidecosmos/main/source/sourcechain-testnet/addrbook.json"
cd
rm -rf ~/.source/data; \
wget -O - http://snap.stake-take.com:8000/source.tar.gz | tar xf -
mv $HOME/root/.source/data $HOME/.source
rm -rf $HOME/root
sudo systemctl restart sourced && journalctl -u sourced -f -o cat

Start State Sync

sudo systemctl stop sourced
sourced unsafe-reset-all --home $HOME/.source
SEEDS=""; \
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:36656"; \
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.source/config/config.toml
wget -O $HOME/.source/config/addrbook.json "https://raw.githubusercontent.com/StakeTake/guidecosmos/main/source/sourcechain-testnet/addrbook.json"
SNAP_RPC="https://testnet.sourceprotocol.io:26657"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -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\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.source/config/config.toml
sudo systemctl restart sourced && journalctl -u sourced -f -o cat

Add Address Book

sudo systemctl stop sourced
rm $HOME/.source/config/addrbook.json
wget -O $HOME/.source/config/addrbook.json "https://raw.githubusercontent.com/StakeTake/guidecosmos/main/source/sourcechain-testnet/addrbook.json"
sudo systemctl restart sourced && journalctl -u sourced -f -o cat

================

RPC

https://testnet.sourceprotocol.io:26657

Delete node

sudo systemctl stop sourced && sudo systemctl disable sourced
rm -rf $HOME/source $HOME/.source /etc/systemd/system/sourced.service $HOME/go/bin/sourced

================

Create New Wallet

sourced keys add wallet

Recover Old (generated) Wallet

sourced keys add wallet --recover

List All Keys/Wallet

sourced keys list

Add Wallet To System Variable

SRC_WALLET_ADDRESS=$(sourced keys show wallet -a)
SRC_VALOPER_ADDRESS=$(sourced keys show wallet --bech val -a)
echo 'export SRC_WALLET_ADDRESS='${SRC_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export SRC_VALOPER_ADDRESS='${SRC_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

Faucet Links on Discord: https://discord.gg/zCkrhVjqZJ 

Check Wallet Balances

sourced query bank balances $SRC_WALLET_ADDRESS

Create New Validator

sourced tx staking create-validator \
  --amount 999750usource \
  --from $SRC_WALLET \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.07" \
  --min-self-delegation "1" \
  --pubkey  $(sourced tendermint show-validator) \
  --moniker $SRC_NODENAME \
  --chain-id $SRC_ID \
  --fees 250usource

============

Check Logs

journalctl -fu sourced -o cat

Start Source Protocol Services

sudo systemctl start sourced

Stop Source Protocol Services

sudo systemctl stop sourced

Restart Source Protocol Services

sudo systemctl restart sourced

Sync Information

sourced status 2>&1 | jq .SyncInfo

Validator Information

seid status 2>&1 | jq .ValidatorInfo

Node Info

sourced status 2>&1 | jq .NodeInfo

Show Node ID

sourced tendermint show-node-id

 

==============

Wallet Commands

==============

Wallet/Key List

sourced keys list

Recover Wallet

sourced keys add $SRC_WALLET --recover

Remove Wallet

sourced keys delete $SRC_WALLET

Export Key (backup)

sourced keys export $SRC_WALLET --unarmored-hex --unsafe

Wallet Balance

sourced query bank balances $SRC_WALLET_ADDRESS

Transfer Balance

sourced tx bank send $SRC_WALLET_ADDRESS <TO_WALLET_ADDRESS> 10000000usource

Voting / Vote to Governance poll

sourced tx gov vote 1 yes --from $SRC_WALLET --chain-id=$SRC_ID

Delegate to Validator

sourced tx staking delegate $SRC_VALOPER_ADDRESS 10000000usource --from=$SRC_WALLET --chain-id=$SRC_ID --gas=auto --fees 250usource

Re-Delegate to another Validator

sourced tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 10000000usource --from=$SRC_WALLET --chain-id=$SRC_ID --gas=auto --fees 250usource

Withdraw Distribution Rewards

sourced tx distribution withdraw-all-rewards --from=$SRC_WALLET --chain-id=$SRC_ID --gas=auto --fees 250usource

Withdraw Rewards With Commission

sourced tx distribution withdraw-rewards $SRC_VALOPER_ADDRESS --from=$SRC_WALLET --commission --chain-id=$SRC_ID

 

=============

Validator Management

=============

Edit Validator

sourced tx staking edit-validator \
--moniker=NEWNODENAME \
--chain-id=$SRC_ID \
--from=$SRC_WALLET

UnJail Validator

sourced tx slashing unjail \
  --broadcast-mode=block \
  --from=$SRC_WALLET \
  --chain-id=$SRC_ID \
  --gas=auto --fees 250usource

Remove (Delete) Nodes and all it's data

sudo systemctl stop sourced
sudo systemctl disable sourced
sudo rm /etc/systemd/system/sourced* -rf
sudo rm $(which sourced) -rf
sudo rm $HOME/.source* -rf
sudo rm $HOME/source -rf
sed -i '/SRC_/d' ~/.bash_profile

Join MoneyCamp Discord https://Lihat.info/moneycamp   

Join CodeBlock Labs Telegram https://t.me/codeblocklabs 

Subscribe to Youtube https://youtube.com/c/pramonoutomo 

 

 

How do you rate this article?

2



pramonoutomo
pramonoutomo

Hey it's pram here, join my universe https://youtube.com/c/pramonoutomo and https://twitter.com/pramonoutomo also don't forget to check out my portofolio on https://pramonoutomo.com

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.