# Run a Full Node (Testnet)

Testnets are testing instances of the Nibiru blockchain. Testnet tokens are separate and distinct from real assets. In order to join a network, you'll need to use its corresponding version of the binary to run a full node.

# Available Networks

On Nibiru Chain, the term "network" encompasses a collective system of interconnected nodes. These nodes, which are essentially individual computers or servers, collaboratively maintain and validate the blockchain's ongoing operations.

You can find a table of each Nibiru testnet and its current status below.

Chain ID Description Genesis Version Upgrade History Status
nibiru-testnet-1 Nibiru Chain Permanent Testnet. Has IBC channels and web faucet (opens new window) v1.0.0 (opens new window) block 48759 - v1.1.0 (opens new window)
block 3067771 - v1.2.0 (opens new window)
block 3095130 - v1.3.0-rc1 (opens new window)
block 3537069 - v1.3.0 (opens new window)
block 4566080 - v1.4.0 (opens new window)
block 5117602 - v1.5.0 (opens new window)
⚡ Active

See Nibiru Networks for RPC information.

# Running a node in a network that underwent upgrade(s)

When a network undergoes an update at a specific block height, the process of upgrading your node requires precise steps to ensure continuity and compatibility with the network's new state. The upgrade workflow can take several forms depending on the approach you choose.

  1. Sync with Manual Binary Swap This method involves a hands-on approach where you oversee the progression of your node through network updates.

    Steps: Initialize your node with Genesis Binary: Initialize your node using the binary version corresponding to the genesis block of the blockchain.

    Monitor Upgrade Heights: Pay close attention to the block height as your node syncs with the network.

    Stop and Swap Binaries Manually: Once your node reaches the designated upgrade height, stop your node and manually swap out the old binary with the new version tailored to that upgrade.

    Resume Syncing: Restart your node with the updated binary, and continue this process each time an upgrade is reached.

  2. Sync with Cosmovisor Cosmovisor is a process manager that automates binary swapping during network upgrades, simplifying the update process significantly.

    Steps: Initialize your node with Genesis Binary: Initialize your node using the binary version corresponding to the genesis block of the blockchain.

    Configure Cosmovisor: Set up Cosmovisor to monitor the block height and handle the automatic swapping of binaries when an upgrade point is hit.

    Automated Upgrades: Let Cosmovisor manage the transition, providing a smoother and less error-prone upgrade experience as it will automatically change the binary when necessary.

  3. State Sync State syncing allows a node to catch up quicker by getting a snapshot of the state at a certain height, instead of syncing from the genesis block.

    Steps: Current Binary Version: Start with the binary version that corresponds to the current network state rather than the genesis version.

    Configure State Sync: Enable and configure state sync in your node's settings, allowing it to synchronize by jumping directly to a near-recent state.

  4. Downloading a Snapshot This method involves downloading a complete data snapshot which can accelerate the upgrade and syncing process.

    Steps: Download Data Snapshot: Obtain a complete data snapshot from a trusted server. This typically includes all the data up to a recent block height.

    Start with Current Binary: Use the current binary version compatible with the snapshot's block height, and start your node.

    Resume Syncing: Your node will begin syncing from the snapshot's height, bypassing the earlier history for a faster setup.

# Block Explorers

You can see current status of the blockchain on a block explorer. Explorers allow you to search through transactions, blocks, wallet addresses, and other on-chain data.


# Full Node: Pre-requisites

# Minimum hardware requirements

  • 4CPU
  • 16GB RAM
  • 1TB of disk space (SSD)

# Update the system

Copy sudo apt update && sudo apt upgrade --yes

# Install nibid

Option 1: Use this version if you plan to sync from genesis block; you will need to swap it to the current one at the upgrade height (either manually or with Cosmovisor)

Copy curl -s https://get.nibiru.fi/@v1.0.0! | bash

Option 2: Use this version if you plan to use state-sync or data snapshot

Copy curl -s https://get.nibiru.fi/@v1.5.0! | bash

# Verify nibid version

Copy nibid version # Should output v1.0.0 or v1.5.0 depending on chosen approach

# Init the Chain

  1. Init the chain

    Copy nibid init <moniker-name> --chain-id=nibiru-testnet-1 --home $HOME/.nibid
  2. Copy the genesis file to the $HOME/.nibid/config folder.

    You can get genesis from our networks endpoint with:

    Copy NETWORK=nibiru-testnet-1 curl -s https://networks.testnet.nibiru.fi/$NETWORK/genesis > $HOME/.nibid/config/genesis.json

    Or you can download it from the Tendermint RPC endpoint.

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

    (Optional) Verify Genesis File Checksum

    Copy shasum -a 256 $HOME/.nibid/config/genesis.json # 23c95807de3c663e8d2018a7f10aa27cb773a84d99f331e4e07d367aceca19f5 $HOME/.nibid/config/genesis.json
  3. Update persistent peers list in the configuration file $HOME/.nibid/config/config.toml.

    Copy NETWORK=nibiru-testnet-1 sed -i 's|\<persistent_peers\> =.*|persistent_peers = "'$(curl -s https://networks.testnet.nibiru.fi/$NETWORK/peers)'"|g' $HOME/.nibid/config/config.toml
  4. Set minimum gas prices

    Copy sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.025unibi"/g' $HOME/.nibid/config/app.toml
  5. (Optional) Configure one of the following options to catch up faster with the network

    Option 1: Setup state-sync

    Copy NETWORK=nibiru-testnet-1 config_file="$HOME/.nibid/config/config.toml" sed -i "s|enable =.*|enable = true|g" "$config_file" sed -i "s|rpc_servers =.*|rpc_servers = \"$(curl -s https://networks.testnet.nibiru.fi/$NETWORK/rpc_servers)\"|g" "$config_file" sed -i "s|trust_height =.*|trust_height = \"$(curl -s https://networks.testnet.nibiru.fi/$NETWORK/trust_height)\"|g" "$config_file" sed -i "s|trust_hash =.*|trust_hash = \"$(curl -s https://networks.testnet.nibiru.fi/$NETWORK/trust_hash)\"|g" "$config_file"

    Option 2: Download and extract data snapshot

    You can check available snapshots list for nibiru-testnet-1 (opens new window) to locate the snapshot with the date and type that you need

    Copy curl -o nibiru-testnet-1-<timestamp>-<type>.tar.gz https://storage.googleapis.com/nibiru-testnet-1-snapshots/nibiru-testnet-1-<timestamp>-<type>.tar.gz tar -zxvf nibiru-testnet-1-<timestamp>-<type>.tar.gz -C $HOME/.nibid/
  6. Start your node (choose one of the options)

    Option 1: Systemd + Systemctl

    After defining a service file for use with systemctl, you can execute:

    Copy sudo systemctl start nibiru

    Option 2: Cosmovisor

    After defining a service file for use with cosmovisor, you can execute:

    Copy sudo systemctl start cosmovisor-nibiru

    Option 3: Without a daemon

    Copy nibid start
  7. Request tokens from the Web Faucet for nibiru-testnet-1 (opens new window) if required.

    To create a local key pair, you may use the following command:

    Copy nibid keys add <key-name>

# Next Steps

See the validator docs on how to participate as a validator.

# Example nibid commands

Ex: query an account's balance

Copy nibid query bank balances nibi1gc6vpl9j0ty8tkt53787zps9ezc70kj88hluw4

For the full list of nibid commands, see: