November 7, 2023

Namada testnet (install guid)

Details

Preparing the server

cd $HOME
sudo apt update && sudo apt upgrade -y
sudo apt install curl wget clang pkg-config git make tar libssl-dev libclang-dev  -y
sudo apt install jq build-essential ncdu gcc git-core chrony liblz4-tool -y
cd $HOME
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
. $HOME/.cargo/env
curl https://deb.nodesource.com/setup_18.x | sudo bash
sudo apt install cargo nodejs -y < "/dev/null"

install Go

ver="1.20.3" && \ 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

Build binary

cd $HOME
git clone https://github.com/anoma/namada
cd namada && git checkout v0.23.2
make build-release
cd $HOME
git clone https://github.com/cometbft/cometbft.git
cd cometbft
git checkout v0.37.2
make build
cd $HOME 
mv $HOME/cometbft/build/cometbft /usr/local/bin/cometbft
mv "$HOME/namada/target/release/namada" /usr/local/bin/namada 
mv "$HOME/namada/target/release/namadac" /usr/local/bin/namadac
mv "$HOME/namada/target/release/namadan" /usr/local/bin/namadan
mv "$HOME/namada/target/release/namadaw" /usr/local/bin/namadaw
mv "$HOME/namada/target/release/namadar" /usr/local/bin/namadar

create service

sudo tee $HOME/namadad.service > /dev/null <<EOF
[Unit]
Description=namada
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.local/share/namada
Environment=TM_LOG_LEVEL=p2p:none,pex:error
Environment=NAMADA_CMT_STDOUT=true
ExecStart=/usr/local/bin/namada node ledger run 
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

sudo mv $HOME/namadad.service /etc/systemd/system/

sudo systemctl daemon-reload
sudo systemctl enable namadad

Init node

cd $HOME && namada client utils join-network --chain-id public-testnet-14.5d79b6958580
sudo systemctl start namadad && sudo journalctl -u namadad -f -o cat

Check sync status

curl -s localhost:26657/status | jq

Make wallet

namada wallet address gen --alias $YOUR_WALLET --unsafe-dont-encrypt
namada wallet address find --alias $YOUR_WALLET

Then copy wallet address and then use in faucet

Create validator

cd $HOME
namadac init-validator \
--alias $YOUR_ALIAS \
--commission-rate 0.05 \
--max-commission-rate-change 0.01 \
--signing-keys $YOUR_WALLET \
--account-keys $YOUR_WALLET \
--unsafe-dont-encrypt

To increase the size of your validator voting power, you must also use a faucet to the validator address

namada wallet address find --alias $YOUR_ALIAS

and stake your funds

namada client bond \
--validator $YOUR_ALIAS \
--amount 1000 \
--source $YOUR_ALIAS