Node Setup

  1. Prepare the server:
sudo apt update && sudo apt upgrade -y && \\
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop screen unzip bc fail2ban htop -y

  1. Install go:
ver="1.19" && \\
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

  1. Download the binary:
cd $HOME
git clone <https://github.com/NibiruChain/nibiru>
cd nibiru
git checkout v0.19.2
make install

  1. Change "f5nodes" during setup:
nibid init f5nodes --chain-id=nibiru-itn-1
nibid config chain-id nibiru-itn-1

  1. Add wallet (modify "f5nodes"): 5.1 Create a new one:
nibid keys add f5nodes

5.2 Restore an old one using mnemonic:

nibid keys add f5nodes --recover

  1. Download the genesis file:
wget -O $HOME/.nibid/config/genesis.json "<https://raw.githubusercontent.com/obajay/nodes-Guides/main/Nibiru/genesis.json>"

  1. Verify the genesis setup with the following command:
sha256sum $HOME/.nibid/config/genesis.json

💭 e162ace87f5cbc624aa2a4882006312ef8762a8a549cf4a22ae35bba12482c72 genesis.json

  1. Next, configure pruning, indexer, minimum gas price, and peers:
pruning="custom" && \\
pruning_keep_recent="100" && \\
pruning_keep_every="0" && \\
pruning_interval="10" && \\
sed -i -e "s/^pruning *=.*/pruning = \\"$pruning\\"/" ~/.nibid/config/app.toml && \\
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \\"$pruning_keep_recent\\"/" ~/.nibid/config/app.toml && \\
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \\"$pruning_keep_every\\"/" ~/.nibid/config/app.toml && \\
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \\"$pruning_interval\\"/" ~/.nibid/config/app.toml
indexer="null" && \\
sed -i -e "s/^indexer *=.*/indexer = \\"$indexer\\"/" $HOME/.nibid/config/config.toml
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \\"0.0unibi\\"/;" ~/.nibid/config/app.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \\"true\\"/" $HOME/.nibid/config/config.toml
external_address=$(wget -qO- eth0.me) 
sed -i.bak -e "s/^external_address *=.*/external_address = \\"$external_address:26656\\"/" $HOME/.nibid/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \\"$peers\\"/" $HOME/.nibid/config/config.toml
seeds="[email protected]:40656"
sed -i.bak -e "s/^seeds =.*/seeds = \\"$seeds\\"/" $HOME/.nibid/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.nibid/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.nibid/config/config.toml