Nibiru

Introduction Nibiru


Nibiru is a sovereign proof-of-stake blockchain, open-source platform, and member of a family of interconnected blockchains that comprise the Cosmos Ecosystem.

Nibiru unifies leveraged derivatives trading, spot trading, staking, and bonded liquidity provision into a seamless user experience, enabling users of over 40 blockchains to trade with leverage using a suite of composable decentralized applications.

Nibiru Chain #7 | Nibiru Incentivized Testnet #1 node tutorial

Sections
Description

Install golang. Command to check the version

Clone repository. Compilation project

Initialize node. Create configuration files. Check logs & sync status.

Create valdator & wallet, check your balance.

The other administration commands.

Check whether your validator is created successfully

2 CPU4 GB RAM (The requirements written in the official tutorial are too high, the actual 8GB+ is enough)100GB SSDManual Instalation-Install the basic environmentThe system used in this tutorial is Ubuntu20.04, please adjust some commands of other systems by yourself. It is recommended to use a foreign VPS.

Install golang (start here)

if ! [ -x "$(command -v go)" ]; then
  ver="1.18.2"
  cd $HOME
  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" >> ~/.bash_profile
  source ~/.bash_profile
fi

After the installation is complete, run the following command to check the version

go version

Up to sections ↑

-Install other necessary environments

Update apt

sudo apt update && sudo apt full-upgrade -y
sudo apt list --upgradable
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
cd
git clone https://github.com/NibiruChain/nibiru
cd nibiru
git checkout v0.19.2
make install
nibid version # v0.19.2

After the installation is complete, you can run nibid version to check whether the installation is successful.

Display should be # v0.19.2

-Run node

Initialize node

Change XXX with your moniker name

moniker=XXX
echo 'export moniker='$moniker >> $HOME/.bash_profile
source ~/.bash_profile
nibid config keyring-backend test
nibid config chain-id nibiru-itn-1
nibid init "$moniker" --chain-id nibiru-itn-1

Download the Genesis file

curl -s https://rpc.itn-1.nibiru.fi/genesis | jq -r .result.genesis > $HOME/.nibid/config/genesis.json

Set peer and seed

SEEDS="3f472746f46493309650e5a033076689996c8881@nibiru-testnet.rpc.kjnodes.com:39659,[email protected]:26656,[email protected]:26656"
PEERS="[email protected]:12656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:39656,[email protected]:26656,[email protected]:26656,[email protected]:35656,[email protected]:60556,[email protected]:26656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.nibid/config/config.toml
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.nibid/config/config.toml

Up to sections ↑

Pruning settings

sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.nibid/config/app.toml
sed -i 's|^pruning-keep-recent  *=.*|pruning-keep-recent = "100"|g' $HOME/.nibid/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.nibid/config/app.toml
sed -i 's|^snapshot-interval *=.*|snapshot-interval = 2000|g' $HOME/.nibid/config/app.toml

Set minimum gas prices and prometheus

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001unibi"|g' $HOME/.nibid/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.nibid/config/config.toml

Up to sections ↑

Start node

sudo tee /etc/systemd/system/nibid.service > /dev/null << EOF
[Unit]
Description=Nibiru Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which nibid) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable nibid
sudo systemctl start nibid

Show log

sudo journalctl -u nibid -f --no-hostname -o cat 

Check sync status

curl -s localhost:26657/status | jq .result | jq .sync_info

The display "catching_up": shows false that it has been synchronized. Synchronization takes a while, maybe half an hour to an hour. If the synchronization has not started, it is usually because there are not enough peers. You can consider adding a Peer or using someone else's addrbook.

State-sync fast synchronization

sudo systemctl stop nibid

cp $HOME/.nibid/data/priv_validator_state.json $HOME/.nibid/priv_validator_state.json.backup
rm -rf $HOME/.nibid/data 
curl https://files.itrocket.net/testnet/nibiru/snap_nibiru.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.nibid

mv $HOME/.nibid/priv_validator_state.json.backup $HOME/.nibid/data/priv_validator_state.json && sudo systemctl restart nibid

Up to sections ↑

Create a validator

Create wallet

nibid keys add wallet

Note please save the mnemonic and priv_validator_key.json file! If you don't save it, you won't be able to restore it later.

SAVE PRIVATE VALIDATOR KEY

cat $HOME/.nibid/config/priv_validator_key.json

Receive test coins

Go to nibiru discord https://discord.gg/p8EudUCrPH

Up to sections ↑

Sent in #faucet channel discord

$request WALLET_ADDRESS

  • or with command

FAUCET_URL="https://faucet.itn-1.nibiru.fi/"
ADDR="nibi1rehrzrxl7kesyutlktncnqkrue0f6u50z06suc" # paste your address
curl -X POST -d '{"address": "'"$ADDR"'", "coins": ["11000000unibi","100000000unusd","100000000uusdt"]}' $FAUCET_URL

Can be used later

nibid q bank balances $(nibid keys show wallet -a)

Query the test currency balance.

Create a validator

After enough test coins are obtained and the node is synchronized, a validator can be created. Only validators whose pledge amount is in the top 100 are active validators.

CHANGE YOUR_KEYBASE , FILL_YOUR_DETAILS ,FILL_YOUR_WEBSITE OR TWITTER

# create validator
nibid tx staking create-validator \
--amount=1000000unibi \
--pubkey=$(nibid tendermint show-validator) \
--moniker="$moniker" \
--identity="YOUR_KEYBASE" \
--details="FILL_YOUR_DETAILS" \
--website="FILL_YOUR_WEBSITE OR TWITTER" \
--chain-id=nibiru-itn-1 \
--commission-rate="0.1" \
--commission-max-rate="0.10" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--from=wallet \
--gas-adjustment="1.4" \
--gas=auto \
--gas-prices=0.025unibi \
-y

make sure you see the validator details

nibid q staking validator $(nibid keys show wallet --bech val -a)

After that, you can go to the validator table explorer to check whether your validator is created successfully.

More information

Last updated