Skip to content

baabeetaa/chihuahua

Repository files navigation

ChihuahuaChain logo

ChihuahuaChain

The Cosmos MEME Coin

Stay up to date with the latest news on our Socials

Node Installation

  • Install Prerequisites

# update the local package list and install any available upgrades 
sudo apt-get update && sudo apt upgrade -y 

# install toolchain and ensure accurate time synchronization 
sudo apt-get install make build-essential gcc git jq chrony -y
  • Install Go

# download the latest version
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz

# remove old version (if any)
sudo rm -rf /usr/local/go

# install the new version
sudo tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
  • Configure Environmental Variables

# run these commands
cat <<EOF >> ~/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF

source ~/.profile

go version

The output should be go version go1.19 linux/amd64

  • Install Chihuahua from sources

# run these commands
git clone https://github.com/ChihuahuaChain/chihuahua.git
cd chihuahua
git fetch --tags
git checkout v2.0.2
make install

To verify the installation you can run chihuahuad version and it should return v2.0.2

  • Initialize the Chain

Replace $MONIKERNAME with your choosen node name

chihuahuad init $MONIKER_NAME --chain-id chihuahua-1

  • Download the Genesis

wget -O ~/.chihuahua/config/genesis.json https://raw.githubusercontent.com/ChihuahuaChain/chihuahua/main/mainnet/genesis.json
  • Add Seeds & Persistent Peers

seeds="4936e377b4d4f17048f8961838a5035a4d21240c@chihuahua-seed-01.mercury-nodes.net:29540"
peers="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:29538,[email protected]:30758,[email protected]:26656,[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.chihuahua/config/config.toml
  • Update minimum-gas-price in app.toml

sed -i.bak 's/minimum-gas-prices =.*/minimum-gas-prices = "1uhuahua"/' $HOME/.chihuahua/config/app.toml
  • Setting up Cosmovisor

Install cosmovisor

go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected]

which cosmovisor

# should return 
'/home/<your-user>/go/bin/cosmovisor'

# run these commands
cat <<EOF >> ~/.profile
export DAEMON_NAME=chihuahuad
export DAEMON_HOME=$HOME/.chihuahua
EOF

source ~/.profile

echo $DAEMON_NAME

# should return
'chihuahuad'

# create the directories
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades

# check the binary path with
which chihuahuad

# this should return
'/home/your-user/go/bin/chihuahuad'

# copy the binary into
cp $(which chihuahuad) $DAEMON_HOME/cosmovisor/genesis/bin

Set up the service file

sudo nano /etc/systemd/system/chihuahuad.service

# paste and edit <your-user> with your username
[Unit]
Description=Chihuahua Daemon (cosmovisor)
After=network-online.target

[Service]
User=<your-user>
ExecStart=/home/<your-user>/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=chihuahuad"
Environment="DAEMON_HOME=/home/<your-user>/.chihuahua"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"

[Install]
WantedBy=multi-user.target

Enable the service

sudo -S systemctl daemon-reload
sudo -S systemctl enable chihuahuad

Get the latest snapshot (Thanks to Polkachu) and follow the Pruning tips to save some GB

  • Start the node

You can start the node by running

sudo systemctl start chihuahuad

# check the logs by running
journalctl -u chihuahuad -f

The node will take some time to catch-up with the blockchain. You can follow the blocks being indexed by running

journalctl -u chihuahuad -f | grep indexed

Join the Validators (mainnet)

ChihuahuaChain Governance voted a proposal enabling the minimum 5% Commission enforced by the blockchain.

# create a new wallet for the validator

chihuahuad keys add <key-name>

# save the seed phrase (mnemonic) in a safe place
# copy the 'chihuahua...' address and send some HUAHUA
# in order to pay for the validator creation's transaction

# Make sure the Validator has fully synced before running 
chihuahuad tx staking create-validator \
  --from "<key-name>" \
  --amount "1000000uhuahua" \
  --pubkey "$(chihuahuad tendermint show-validator)" \
  --chain-id "chihuahua-1" \
  --moniker "<moniker>" \
  --commission-max-change-rate 0.01 \
  --commission-max-rate 0.20 \
  --commission-rate 0.10 \
  --min-self-delegation 1 \
  --details "<details>" \
  --security-contact "<contact>" \
  --website "<website>" \
  --gas-prices "1uhuahua"
  
# Make sure to backup the priv_validator_key.json file in your
# /home/<your-user>/.chihuahua/config directory
# and store it in a safe place

Congratulation! Your Validator node should be up and running

Make sure to join our Discord and contact a moderator if you have a mainnet node so we can invite you to the validator's channel to follow up the latest updates and future upgrades.


Chain Upgrades

About

chihuahuad binary repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 89.1%
  • Shell 7.9%
  • Makefile 3.0%