sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
wget https://dl.google.com/go/go1.22.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
Download the file, move it to the necessary locations, configure it, and install the Cosmovisor application.
git clone https://github.com/Titannet-dao/titan-chain.git
cd titan-chain
git fetch origin
git checkout origin/main
go build ./cmd/titand
mkdir -p /root/.titan/cosmovisor/genesis/bin
cp -r /root/titan-chain/titand /root/.titan/cosmovisor/genesis/bin/
sudo ln -sfn $HOME/.titan/cosmovisor/genesis $HOME/.titan/cosmovisor/current
sudo ln -sfn $HOME/.titan/cosmovisor/current/bin/titand /usr/local/bin/titand
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
sudo tee /etc/systemd/system/titan.service > /dev/null << EOF
[Unit]
Description=titan node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=${HOME}/.titan"
Environment="DAEMON_NAME=titand"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.titan/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable titan
Create the configuration files for our node, replace "monikername" with your desired name and enter the command.
titand init "monikername" --chain-id titan-test-3
wget -P ~/. https://raw.githubusercontent.com/Titannet-dao/titan-chain/main/genesis/genesis.json
mv ~/genesis.json ~/.titan/config/genesis.json
wget -P ~/. https://raw.githubusercontent.com/Titannet-dao/titan-chain/main/addrbook/addrbook.json
mv ~/addrbook.json ~/.titan/config/addrbook.json
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uttnt\"/;" ~/.titan/config/app.toml
SEEDS="bb075c8cc4b7032d506008b68d4192298a09aeea@47.76.107.159:26656"
PEERS="b656a30fd7585c68c72167805784bcd3bed2d67c@8.217.10.76:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.titan/config/config.toml
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.titan/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.titan/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.titan/config/app.toml
CUSTOM_PORT=352
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.titan/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"localhost:9090\"%address = \"localhost:${CUSTOM_PORT}90\"%; s%^address = \"localhost:9091\"%address = \"localhost:${CUSTOM_PORT}91\"%" $HOME/.titan/config/app.toml
sudo systemctl restart titan
sudo journalctl -u titan -f --no-hostname -o cat
titand keys add walletname
titand keys add walletname --recover
Use the code below to learn the pubkey
titand comet show-validator
Write the pubkey you learned into the specified place below using nano.
nano /root/titanvalidator.json
{
"pubkey": writeyourpubkey,
"amount": "1000000uttnt",
"moniker": "yourmoniker",
"commission-rate": "0.07",
"commission-max-rate": "1.0",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1",
"identity": "",
"website": "",
"security": "",
"details": ""
}
Use the code below to create validator
titand tx staking create-validator /root/titanvalidator.json --from walletname --fees 500uttnt --chain-id titan-test-3 --node=http://localhost:35257 -y
titand tx staking delegate $(titand keys show wallet-name --bech val -a) amount000000uttnt --from wallet-name --chain-id titan-test-3 --fees 500uttnt --node http://localhost:35257 -y
titand tx slashing unjail --from wallet-name --chain-id titan-test-3 --fees 500uttnt --node=http://localhost:35257 -y
sudo systemctl stop titan
sudo systemctl disable titan
sudo rm -rf /etc/systemd/system/titan.service
sudo rm $(which titan)
sudo rm -rf $HOME/.titan
sed -i "/TITAN_/d" $HOME/.bash_profile