Merhabalar, Source Protocol için testnet kurulumunu gerçekleştireceğiz. Sağ üstten yıldızlayıp forklayabilirsiniz. Sorularınız olursa: LossNode Chat
NODE TİPİ | CPU | RAM | SSD |
---|---|---|---|
Testnet | 4 | 8 | 160 |
sudo su
cd
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 screen unzip bc fail2ban htop -y
ver="1.18.3" && \
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" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
git clone -b testnet https://github.com/Source-Protocol-Cosmos/source.git
cd ~/source
make install
sourced init <MONIKERADI> --chain-id=sourcechain-testnet
Bu kısımda <MONIKERADI>
yerine kendi validator isminizi yazın.
sourced keys add <CUZDANIADI>
Bu kısımda <CUZDANIADI>
yerine kendi cüzdan isminizi yazın.
Discord'a gidip faucet alalım.
curl -s https://raw.githubusercontent.com/Source-Protocol-Cosmos/testnets/master/sourcechain-testnet/genesis.json > ~/.source/config/genesis.json
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0usource\"/;" ~/.source/config/app.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.source/config/config.toml
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
wget -O $HOME/.source/config/addrbook.json "https://raw.githubusercontent.com/obajay/nodes-Guides/main/Source/addrbook.json"
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
Snapshot kullanalım. Kullanmazsak çok ileride olduğu için güncel bloğu yakalamanız uzun sürecektir. Ayrıca node fazla yer kaplayacaktır.
sudo systemctl stop sourced
rm -rf $HOME/.source/data/
mkdir $HOME/.source/data/
cd $HOME
wget http://116.202.236.115:8000/sourcedata.tar.gz
tar -C $HOME/ -zxvf sourcedata.tar.gz --strip-components 1
wget -O $HOME/.source/data/priv_validator_state.json "https://raw.githubusercontent.com/obajay/StateSync-snapshots/main/priv_validator_state.json"
cd && cat .source/data/priv_validator_state.json
{
"height": "0",
"round": 0,
"step": 0
}
cd $HOME
rm sourcedata.tar.gz
sudo systemctl daemon-reload && \
sudo systemctl enable sourced && \
systemctl restart systemd-journald.service && \
sudo systemctl restart sourced && \
sudo journalctl -u sourced -f -o cat
sourced status 2>&1 | jq .SyncInfo
Eğer yakaladıysanız, görseldeki yer false
olacaktır. Hala true
ise yakalamasını bekleyin.
sourced tx staking create-validator \
--amount=990000usource \
--pubkey=$(sourced tendermint show-validator) \
--moniker=<MONIKERADI> \
--chain-id sourcechain-testnet \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.2" \
--commission-rate "0.07" \
--min-self-delegation "1" \
--fees=500usource \
--from=<CÜZDANADI> \
--website="http://linktr.ee/LossNode" \
--details="Testing the Source" \
-y
Bu kısımda;
<MONIKERADI>
yerine kendi validator isminizi yazın.<CUZDANIADI>
yerine kendi cüzdan isminizi yazın.
Discord'a tekrar gidip validator-role-request
kanalına Explorer linkimizi atalım ve validator rolü alalım.
sourced tx staking delegate <SOURCE_VALOPER_ADRESI> <MIKTAR>usource --from=<CUZDANIADI> --chain-id=sourcechain-testnet --fees=500usource -y
journalctl -u sourced -f -o cat
sourced status 2>&1 | jq .SyncInfo