Skip to main content

Installation

Minimum hardware requirement

4 Cores, 8G Ram, 160G NVME, Ubuntu 22.04

Installation of required packages

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

Installation GO

cd ~
VER="1.23.4" # Make sure that this version does not broke any other apps you run!
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
echo "export HIPPO_PORT="19"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Downloading and installing node

cd $HOME
rm -rf hippo
git clone https://github.com/hippocrat-dao/hippo-protocol hippo
cd hippo
git checkout v1.0.1
make install
hippod version

Set node configuration

hippod init NodeName --chain-id hippo-protocol-1
sed -i "s/chain-id = .*/chain-id = \"hippo-protocol-1\"/" $HOME/.hippo/config/client.toml
sed -i "s/keyring-backend = .*/keyring-backend = \"os\"/" $HOME/.hippo/config/client.toml
sed -i "s/node = .*/node = \"tcp:\/\/localhost:${HIPPO_PORT}657\"/" $HOME/.hippo/config/client.toml

Downloading genesis and addressbook

curl -Ls https://snapshots.nodesync.top/Mainnet/Hippo/genesis.json > $HOME/.hippo/config/genesis.json
curl -Ls https://snapshots.nodesync.top/Mainnet/Hippo/addrbook.json > $HOME/.hippo/config/addrbook.json
# Set seeds and peers

SEEDS="[email protected]:10156"
PEERS="$(curl -sS https://rpc.hippo.revonode.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^seeds *=.*|seeds = '"$SEEDS"'|; s|^persistent_peers *=.*|persistent_peers = '"$PEERS"'|" $HOME/.hippo/config/config.toml

# Set minimum gas price
sed -i "s/minimum-gas-prices = .*/minimum-gas-prices = \"5000000000000ahp\"/" $HOME/.hippo/config/app.toml

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


# Change ports
sed -i.bak -e "s%:1317%:${HIPPO_PORT}317%g;
s%:8080%:${HIPPO_PORT}080%g;
s%:9090%:${HIPPO_PORT}090%g;
s%:9091%:${HIPPO_PORT}091%g;
s%:8545%:${HIPPO_PORT}545%g;
s%:8546%:${HIPPO_PORT}546%g;
s%:6065%:${HIPPO_PORT}065%g" $HOME/.hippo/config/app.toml

sed -i.bak -e "s%:26658%:${HIPPO_PORT}658%g;
s%:26657%:${HIPPO_PORT}657%g;
s%:6060%:${HIPPO_PORT}060%g;
s%:26656%:${HIPPO_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${HIPPO_PORT}656\"%;
s%:26660%:${HIPPO_PORT}660%g" $HOME/.hippo/config/config.toml

# Download latest chain data snapshot
curl https://snapshots.nodesync.top/Mainnet/Hippo/hippo-latest.tar.lz4 | lz4 -dc - | tar -xf - -C "$HOME/.hippo"

Creating service file

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

[Service]
User=$USER
WorkingDirectory=$HOME
ExecStart=$(which hippod) start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable hippod

Start node

sudo systemctl start hippod && sudo journalctl -fu hippod -o cat