# Update OS if needed# Install packages# Install GO 1.18.3****go version# go version go1.18.3 linux/amd64git checkout main && git pullgit checkout v2.0.0make install# come up with **your names**CANTO_NODENAME="TargetNodes"CANTO_WALLET="TargetNodes"CANTO_CHAIN="canto_7700-1" # do not change# save varsecho 'export CANTO_NODENAME='${CANTO_NODENAME}>> $HOME/.bash_profileecho 'export CANTO_WALLET='${CANTO_WALLET} >> $HOME/.bash_profileecho 'export CANTO_CHAIN='${CANTO_CHAIN} >> $HOME/.bash_profilesource $HOME/.bash_profile# do initcantod init $CANTO_NODENAME --chain-id $CANTO_CHAIN# genesisrm $HOME/.cantod/config/genesis.jsonwget -O $HOME/.cantod/config/genesis.json "<https://raw.githubusercontent.com/maxzonder/canto/main/genesis.json>"Config Pruning & Snapshots
**# Set your desired pruning**# config pruningpruning="custom"pruning_keep_recent="10000"pruning_keep_every="0"pruning_interval="10"sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \\"$pruning_keep_every\\"/" $HOME/.cantod/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \\"$pruning_interval\\"/" $HOME/.cantod/config/app.toml# for pruning "100-0-10" you should decrease snapshots interval to avoid conflict with 100 blocks pruning and 1500 blocks snapshot-interval# sed -i 's/snapshot-interval *=.*/snapshot-interval = 100' $HOME/.cantod/config/app.toml# resetcantod tendermint unsafe-reset-all --home $HOME/.cantod# create servicetee $HOME/cantod.service > /dev/null <<EOF[Unit] Description=cantod After=network-online.target[Service] User=$USER ExecStart=$(which cantod) start --home $HOME/.cantod Restart=on-failure RestartSec=10 LimitNOFILE=65535[Install] WantedBy=multi-user.targetEOFsudo mv $HOME/cantod.service /etc/systemd/system/sudo systemctl enable cantodsudo systemctl daemon-reloadcantod tendermint unsafe-reset-all --home $HOME/.cantod --keep-addr-booksed -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/.cantod/config/config.tomlwget -O $HOME/.cantod/config/addrbook.json "<https://raw.githubusercontent.com/maxzonder/canto/main/addrbook.json>"sudo systemctl start cantod && journalctl -u cantod -f -o catCreate New Key (or recover old one)
# create new keycantod keys add $CANTO_WALLET# !!!! SAVE MNEMONIC FROM OUTPUT !!!!# save addr and valoper to varsCANTO_ADDR=$(cantod keys show $CANTO_WALLET -a)echo $CANTO_ADDRecho 'export CANTO_ADDR='${CANTO_ADDR} >> $HOME/.bash_profileCANTO_VALOPER=$(cantod keys show $CANTO_WALLET --bech val -a)echo $CANTO_VALOPERecho 'export CANTO_VALOPER='${CANTO_VALOPER} >> $HOME/.bash_profilesource $HOME/.bash_profileSend create-validator Transaction
cantod tx staking create-validator \--from TargetNodes \--chain-id canto_7700-1 \--moniker="TargetNodes" \--commission-max-change-rate=0.01 \--commission-max-rate=1.0 \--commission-rate=0.05 \--details="Validator Node by TargetNodes" \--security-contact="abacus.caria@gmail.com" \--website="https://targetnodes.com" \--pubkey $(cantod tendermint show-validator) \--min-self-delegation=1 \--amount 1acanto \--fees 30000000000000000acanto \--gas 300000#Check the current cantod version
cantod version
4.0.0
#Go into specific location
cd <HOME>/Canto
#First sync Tags to your local -
git fetch --all --tags --prune
#Checkout the code with specific version
git checkout v5.0.0
#Then install the version
make install
#Check the current cantod version
cantod version
5.0.0
#Restart cantod & check status
sudo systemctl restart cantod
sudo systemctl status cantof
journalctl -u cantod -f -o cat