cd $HOME
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop nano mc screen unzip bc fail2ban -y
wget -O go1.18.3.linux-amd64.tar.gz https://golang.org/dl/go1.18.3.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz && rm go1.18.3.linux-amd64.tar.gz
cat <<'EOF' >> $HOME/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
. $HOME/.bash_profile
cp /usr/local/go/bin/go /usr/bin
go version
cd $HOME
git clone -b testnet https://github.com/Source-Protocol-Cosmos/source.git
cd source
make install
sudo cp $HOME/go/bin/sourced /usr/local/bin
echo 'export SOURCE_MONIKER="Your Moniker name"'>> $HOME/.bash_profile
echo 'export SOURCE_WALLET="Your Wallet name"'>> $HOME/.bash_profile
echo 'export SOURCE_CHAIN="sourcechain-testnet"' >> $HOME/.bash_profile
. $HOME/.bash_profile
# let's check
echo $SOURCE_MONIKER
echo $SOURCE_WALLET
echo $SOURCE_CHAIN
sourced init $SOURCE_MONIKER --chain-id $SOURCE_CHAIN
sourced keys add $SOURCE_WALLET
curl -s https://raw.githubusercontent.com/Source-Protocol-Cosmos/testnets/master/sourcechain-testnet/genesis.json > ~/.source/config/genesis.json
sourced tendermint unsafe-reset-all --home ~/.source
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.source/config/config.toml
peers="6ca675f9d949d5c9afc8849adf7b39bc7fccf74f@164.92.98.17:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.source/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.source/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 100/g' $HOME/.source/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 100/g' $HOME/.source/config/config.toml
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0usource\"/;" ~/.source/config/app.toml
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="50"
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
sudo tee /etc/systemd/system/sourced.service > /dev/null <<EOF
[Unit]
Description=source
After=network-online.target
[Service]
User=$USER
ExecStart=$(which sourced) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable sourced
sudo systemctl daemon-reload
sudo systemctl restart sourced
sudo systemctl status sourced
journalctl -u sourced -f --output cat
strided status 2>&1 | jq .SyncInfo
curl http://localhost:26657/status | jq .result.sync_info.catching_up
curl localhost:26657/status | jq '.result.node_info.id'
Join to Discord and navigate to:
- #faucet to request test tokens
$request <you source wallet address>
sourced q bank balances $(sourced keys show $SOURCE_WALLET -a)
sourced tx staking create-validator \
--amount=1000000usource \
--pubkey=$(sourced tendermint show-validator) \
--from=$SOURCE_WALLET \
--moniker=$SOURCE_MONIKER \
--chain-id=$SOURCE_CHAIN \
--details="" \
--website="" \
--identity="" \
--commission-rate=0.08 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1
curl localhost:26657/status
sourced tx distribution withdraw-all-rewards \
--chain-id=$SOURCE_CHAIN \
--from $SOURCE_WALLET
sourced tx staking delegate $(sourced keys show $SOURCE_WALLET --bech val -a) <amountusource> \
--chain-id=$SOURCE_CHAIN \
--from=$SOURCE_WALLET
sourced tx slashing unjail \
--chain-id $SOURCE_CHAIN \
--from $SOURCE_WALLET
sudo systemctl stop source
sudo systemctl stop sourced
sudo systemctl disable sourced
rm /etc/systemd/system/sourced.service
rm -Rvf $HOME/source
rm -Rvf $HOME/.source