Update packages and Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc -y
Replace your moniker "YOUR_MONIKER", save and import variables
into system
NIBIRU_PORT=12
echo "export NIBIRU_WALLET="wallet"" >> $HOME/.bash_profile
echo "export NIBIRU_MONIKER="YOUR_MONIKER"" >> $HOME/.bash_profile
echo "export NIBIRU_CHAIN_ID="nibiru-testnet-2"" >> $HOME/.bash_profile
echo "export NIBIRU_PORT="${NIBIRU_PORT}"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Install GO
cd $HOME
VER="1.19.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm -rf "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
Download and build binaries
cd $HOME
git clone https://github.com/NibiruChain/nibiru
cd nibiru
git checkout v0.16.3
make install
Config and init app
nibid config node tcp://localhost:${NIBIRU_PORT}657
nibid config chain-id $NIBIRU_CHAIN_ID
nibid config keyring-backend test
nibid init $NIBIRU_MONIKER --chain-id $NIBIRU_CHAIN_ID
Download and copy genesis file
NETWORK=nibiru-testnet-2
curl -s https://networks.testnet.nibiru.fi/$NETWORK/genesis > $HOME/.nibid/config/genesis.json
Set seeds and peers
NETWORK=nibiru-testnet-2
sed -i 's|seeds =.*|seeds = "'$(curl -s https://networks.testnet.nibiru.fi/$NETWORK/seeds)'"|g' $HOME/.nibid/config/config.toml
Set custom ports in app.toml file
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${NIBIRU_PORT}317\"%;
s%^address = \":8080\"%address = \":${NIBIRU_PORT}080\"%;
s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${NIBIRU_PORT}090\"%;
s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${NIBIRU_PORT}091\"%;
s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${NIBIRU_PORT}545\"%;
s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${NIBIRU_PORT}546\"%" $HOME/.nibid/config/app.toml
Set custom ports in config.toml file
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${NIBIRU_PORT}658\"%;
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${NIBIRU_PORT}657\"%;
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${NIBIRU_PORT}060\"%;
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${NIBIRU_PORT}656\"%;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${NIBIRU_PORT}656\"%;
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${NIBIRU_PORT}660\"%" $HOME/.nibid/config/config.toml
Config pruning
sed -i -e "s/^pruning *=.*/pruning = \"nothing\"/" $HOME/.nibid/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.nibid/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.nibid/config/app.toml
Set minimum gas price, enable prometheus and disable indexing
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.025unibi"/g' $HOME/.nibid/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.nibid/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.nibid/config/config.toml
Clean old data
nibid tendermint unsafe-reset-all --home $HOME/.nibid --keep-addr-book
Create Service file
sudo tee /etc/systemd/system/nibid.service > /dev/null <<
EOF
[Unit]
Description=nibiru
After=network-online.target
[Service]
User=$USER
ExecStart=$(which nibid) start --home $HOME/.nibid
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and start service file
sudo systemctl daemon-reload
sudo systemctl enable nibid
sudo systemctl restart nibid && sudo journalctl -u nibid -f
Create a wallet, don’t forget to save the mnemonic.
nibid keys add wallet
To restore exexuting wallet, use the following command (optional)
nibid keys add wallet --recover
Save wallet and validator address
NIBIRU_WALLET_ADDRESS=$(nibid keys show $NIBIRU_WALLET -a)
NIBIRU_VALOPER_ADDRESS=$(nibid keys show $NIBIRU_WALLET --bech val -a)
echo "export NIBIRU_WALLET_ADDRESS="${NIBIRU_WALLET_ADDRESS} >> $HOME/.bash_profile
echo "export NIBIRU_VALOPER_ADDRESS="${NIBIRU_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
After full synchronization, check the balance, if everything is
okay go to the next step.
Get tokens in the
discord, #faucet
section.
How check Sync status - if false - your node is fully synced
nibid status 2>&1 | jq .SyncInfo
Check your balance (replace your YOUR_WALLET_ADDRESS)
nibid status 2>&1 | jq .SyncInfo
Check your balance (replace your YOUR_WALLET_ADDRESS)
nibid q bank balances YOUR_WALLET_ADDRESS
Creating a validator
nibid tx staking create-validator \
--amount 1000000unibi \
--from $NIBIRU_WALLET \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.2" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey $(nibid tendermint show-validator) \
--moniker $NIBIRU_MONIKER \
--chain-id $NIBIRU_CHAIN_ID \
--fees 10000unibi