CNHO

Minimum Hardware

NODE CPU RAM SSD OS
CNHO 4 8 400 GB Ubuntu 22.04 LTS

Install Dependencies

				
					sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc jq chrony liblz4-tool -y
				
			

Install Go

				
					VER="1.21.6"
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go$VER.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
				
			

Download Binary

				
					cd $HOME
rm -rf ChainCNHO-CNHOStables
wget https://github.com/alashooinc/ChainCNHO/archive/refs/tags/CNHOStables.tar.gz
tar -xvzf CNHOStables.tar.gz
cd ChainCNHO-CNHOStables
go build -o cnhod ./cmd/cnhod
sudo mv cnhod /usr/local/bin/
cnho version
				
			

Config and Init App

				
					cnhod init "mainnet" --chain-id cnho_stables-1
				
			

Download Genesis and Addrbook

				
					curl -L https://raw.githubusercontent.com/alashooinc/ChainCNHO/master/mainnet/genesis.json -o $HOME/.cnho/config/genesis.json
				
			

Custom Ports

				
					sed -i -e "s%:1317%:11317%; s%:8080%:11380%; s%:9090%:11390%; s%:9091%:11391%; s%:8545%:11345%; s%:8546%:11346%; s%:6065%:11365%" $HOME/.cnho/config/app.toml
sed -i -e "s%:26658%:11358%; s%:26657%:11357%; s%:6060%:11360%; s%:26656%:11356%; s%:26660%:11361%" $HOME/.cnho/config/config.toml
				
			

Pruning, Gas and Prometheus

				
					sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "17"|' \
  $HOME/.cnho/config/app.toml

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.00001ucnho\"|" $HOME/.cnho/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.cnho/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.cnho/config/config.toml
				
			

Create Service File

				
					sudo tee /etc/systemd/system/cnhod.service > /dev/null <<EOF 
[Unit] 
Description=cnho mainnet node 
After=network-online.target 
[Service] 
User=$USER 
ExecStart=$(which cnhod) start 
Restart=always 
RestartSec=3 
LimitNOFILE=65535 
[Install] 
WantedBy=multi-user.target 
EOF
				
			

Start

				
					sudo systemctl daemon-reload 
sudo systemctl enable cnhod.service 
sudo systemctl restart cnhod.service 
sudo journalctl -u cnhod.service -f --no-hostname -o cat
				
			

Create and Restore Address

				
					# create wallet 
cnhod keys add wallet 
# Restore wallet 
cnhod keys add wallet --recover 
# List 
cnhod keys list wallet
				
			

Check Balance

				
					cnhod q bank balances $(cnhod keys show wallet -a)
				
			

Create Validator

				
					cnhod tx staking create-validator \ 
--amount=1000000ucnho \ 
--from wallet \ 
--pubkey=$(cnhod tendermint show-validator) \ 
--moniker="" \ 
--identity="" \ 
--details="" \ 
--website="" \ 
--security-contact= \ 
--chain-id=cnho_stables-1 \ 
--commission-rate=0.05 \ 
--commission-max-rate=0.20 \ 
--commission-max-change-rate=0.01 \ 
--min-self-delegation=1 \ 
--gas-prices 0.00001ucnho \ 
--gas "auto" \ 
--gas-adjustment "1.5" \ 
-y
				
			

Delegate to own

				
					cnhod tx staking delegate \ 
  $(cnhod keys show wallet --bech val -a) \ 
  1000000ucnho \ 
  --from wallet \ 
  --chain-id=cnho_stables-1 \ 
  --gas="auto" \ 
  --gas-adjustment=1.5 \ 
  --gas-prices=0.00001ucnho \ 
  -y
				
			

Unjail Validator

				
					cnhod tx slashing unjail --from wallet --chain-id cnho_stables-1 --gas auto --gas-adjustment 1.5
				
			

Vote

				
					cnhod tx gov vote 1 yes --from wallet --chain-id cnho_stables-1 --gas auto --gas-adjustment 1.5
				
			

Delete node

				
					sudo systemctl stop cnhod.service
sudo systemctl disable cnhod.service
sudo rm /etc/systemd/system/cnhod.service
sudo systemctl daemon-reload
rm -rf $(which cnhod)
rm -rf .cnhod