Install

Recommended Hardware: 8 Cores, 16GB RAM, 250GB of storage (NVME)

Chain ID: gitopia | Latest Version Tag: v6.0.0

Dependencies Installation

Update system and install build tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install GO

cd $HOME
ver="1.24.2" && \
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

Manual installation

Come up with the name of your node and replace it instead <your_moniker>

MONIKER=<your_moniker>

Download binary files

cd $HOME
rm -rf gitopia
git clone https://github.com/gitopia/gitopia.git
cd gitopia
git checkout v6.0.0
make install

Initialize the node

# config and init app
gitopiad config chain-id gitopia
gitopiad config keyring-backend file
gitopiad config node tcp://localhost:14257

gitopiad init $MONIKER --chain-id gitopia

Set node configuration

# download genesis and addrbook
wget -O $HOME/.gitopia/config/genesis.json "https://server-1.stavr.tech/Mainnet/Gitopia/genesis.json"
wget -O $HOME/.gitopia/config/addrbook.json "https://server-1.stavr.tech/Mainnet/Gitopia/addrbook.json"

SEEDS="[email protected]:57656,[email protected]:11356"
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.gitopia/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.001ulore\"|" $HOME/.gitopia/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.gitopia/config/app.toml

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:14258\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:14257\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14260\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14256\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14266\"%" $HOME/.gitopia/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:14217\"%; s%^address = \":8080\"%address = \":14280\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:14290\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:14291\"%; s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:14245\"%; s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:14246\"%" $HOME/.gitopia/config/app.toml

# set goleveldb
db_backend="goleveldb"
sed -i "s/^db_backend *=.*/db_backend = \"$db_backend\"/" $HOME/.gitopia/config/config.toml
sed -i "s/^app-db-backend *=.*/app-db-backend = \"$db_backend\"/" $HOME/.gitopia/config/app.toml 

Create a service

sudo tee /etc/systemd/system/gitopiad.service > /dev/null <<EOF
[Unit]
Description=gitopia
After=network-online.target

[Service]
User=$USER
ExecStart=$(which gitopiad) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable gitopiad

Download latest chain snapshot

LATEST_SNAPSHOT=$(curl -s https://server-1.stavr.tech/Mainnet/Gitopia/ | grep -oE 'gitopia-snap-[0-9]+\.tar\.lz4' | while read SNAPSHOT; do HEIGHT=$(curl -s "https://server-1.stavr.tech/Mainnet/Gitopia/${SNAPSHOT%.tar.lz4}-info.txt" | awk '/Block height:/ {print $3}'); echo "$SNAPSHOT $HEIGHT"; done | sort -k2 -nr | head -n 1 | awk '{print $1}')
curl -o - -L https://server-1.stavr.tech/Mainnet/Gitopia/$LATEST_SNAPSHOT | lz4 -c -d - | tar -x -C $HOME/.gitopia

Start service and check the logs

sudo systemctl start gitopiad && sudo journalctl -u gitopiad -f --no-hostname -o cat

Create wallet

# to create a new wallet, use the following command. don’t forget to save the mnemonic
gitopiad keys add wallet

# to restore exexuting wallet, use the following command
gitopiad keys add wallet --recover

# list all keys
gitopiad keys list

# before creating a validator, you need to fund your wallet and check balance
gitopiad q bank balances $(gitopiad keys show wallet -a)

Create validator

gitopiad tx staking create-validator \
--amount 1000000ulore \
--pubkey $(gitopiad tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id gitopia \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.001ulore \
-y

Last updated