Skip to main content

Installation

Install Dependencies:

sudo apt update && sudo apt upgarade -y
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip make bc -y

Install GO: (amd64 - x86)

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.23.4.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.bash_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 $HOME/.bash_profile
go version

Set variables:

echo "export NIBIRU_PORT="36"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Install binary:

cd $HOME
rm -rf nibiru
git clone https://github.com/NibiruChain/nibiru.git
cd nibiru
git checkout v2.7.0
make install

Set min gas & Nibiru Chain:

nibid init Node39-Guide --chain-id cataclysm-1
sed -i "s/chain-id = .*/chain-id = \"cataclysm-1\"/" $HOME/.nibid/config/client.toml
sed -i "s/keyring-backend = .*/keyring-backend = \"os\"/" $HOME/.nibid/config/client.toml
sed -i "s/node = .*/node = \"tcp:\/\/localhost:${NIBIRU_PORT}657\"/" $HOME/.nibid/config/client.toml

Custom ports:

sed -i.bak -e "s%:1317%:${NIBIRU_PORT}317%g;
s%:8080%:${NIBIRU_PORT}080%g;
s%:9090%:${NIBIRU_PORT}090%g;
s%:9091%:${NIBIRU_PORT}091%g;
s%:8545%:${NIBIRU_PORT}545%g;
s%:8546%:${NIBIRU_PORT}546%g;
s%:6065%:${NIBIRU_PORT}065%g" $HOME/.nibid/config/app.toml
sed -i.bak -e "s%:26658%:${NIBIRU_PORT}658%g;
s%:26657%:${NIBIRU_PORT}657%g;
s%:6060%:${NIBIRU_PORT}060%g;
s%:26656%:${NIBIRU_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${NIBIRU_PORT}656\"%;
s%:26660%:${NIBIRU_PORT}660%g" $HOME/.nibid/config/config.toml

Set min gas:

sed -i "s/minimum-gas-prices = .*/minimum-gas-prices = \"0.025unibi\"/" $HOME/.nibid/config/app.toml

Set indexer:

sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.nibid/config/config.toml

Set DB goleveldb:

sed -i "s|db_backend =.*|db_backend=\"goleveldb\"|g" "$HOME/.nibid/config/config.toml"
sed -i "s|app-db-backend =.*|app-db-backend=\"goleveldb\"|g" "$HOME/.nibid/config/app.toml"

Pruning:

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $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

Download Genesis & addressbook:

curl -Ls https://file2.node39.top/Mainnet/Nibiru/genesis.json > $HOME/.nibid/config/genesis.json
curl -Ls https://file2.node39.top/Mainnet/Nibiru/addrbook.json > $HOME/.nibid/config/addrbook.json

Peers:

peers="[email protected]:14656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.nibid/config/config.toml

Create Service:

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

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

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

Download snapshot: Here.

Check sync:

(False -> Done)

nibid status 2>&1 | jq .SyncInfo

Set up Price Feeder

Install binary:

curl -s https://get.nibiru.fi/[email protected]! | bash
sudo mv /usr/local/bin/pricefeeder /usr/local/bin/nibiru-pricefeeder

Create wallet:

Save 24 mnemonic. Send some token to the nibiru-pricefeeder

nibid keys add nibiru-pricefeeder

Set variables & Setup systemd service:

export FEEDER_MNEMONIC="<Your mnemonic>"
export CHAIN_ID="cataclysm-1"
export GRPC_ENDPOINT="localhost:${NIBIRU_PORT}090"
export WEBSOCKET_ENDPOINT="ws://localhost:${NIBIRU_PORT}657/websocket"
EXCHANGE_SYMBOLS_MAP='{"bitfinex":{"ubtc:unusd":"tBTCUSD","ubtc:uusd":"tBTCUSD","ueth:unusd":"tETHUSD","ueth:uusd":"tETHUSD","uusdc:uusd":"tUDCUSD","uusdc:unusd":"tUDCUSD"},"coingecko":{"ubtc:uusd":"bitcoin","ubtc:unusd":"bitcoin","ubtc:btc":"bitcoin","ueth:uusd":"ethereum","ueth:unusd":"ethereum","uusdt:uusd":"tether","uusdt:unusd":"tether","uusdc:uusd":"usd-coin","uusdc:unusd":"usd-coin","uatom:uusd":"cosmos","uatom:unusd":"cosmos","ubnb:uusd":"binancecoin","ubnb:unusd":"binancecoin","uavax:uusd":"avalanche-2","uavax:unusd":"avalanche-2","usol:uusd":"solana","usol:unusd":"solana","uada:uusd":"cardano","uada:unusd":"cardano","susda:usda":"usda"}}'
export VALIDATOR_ADDRESS=$(nibid keys show wallet --bech val -a)

sudo tee /etc/systemd/system/nibiru-pricefeeder.service<<EOF
[Unit]
Description=Nibiru Pricefeeder
After=network-online.target

[Service]
Type=exec
User=$USER
ExecStart=/usr/local/bin/nibiru-pricefeeder
Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
PermissionsStartOnly=true
LimitNOFILE=65535
Environment=CHAIN_ID='$CHAIN_ID'
Environment=GRPC_ENDPOINT='$GRPC_ENDPOINT'
Environment=WEBSOCKET_ENDPOINT='$WEBSOCKET_ENDPOINT'
Environment=EXCHANGE_SYMBOLS_MAP='$EXCHANGE_SYMBOLS_MAP'
Environment=FEEDER_MNEMONIC='$FEEDER_MNEMONIC'
Environment=VALIDATOR_ADDRESS='$VALIDATOR_ADDRESS'

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable nibiru-pricefeeder
sudo systemctl start nibiru-pricefeeder
journalctl -fu nibiru-pricefeeder -o cat

Set a pricefeeder for a validator

nibid tx oracle set-feeder $(nibid keys show nibiru-pricefeeder -a) \
--from wallet \
--chain-id=cataclysm-1 \
--gas-prices 0.025unibi \
--node=https://nibiru-rpc.node39.top:443 \
-y