KiiChain
  • Learn
    • What is KiiChain?
    • KiiChain
      • Vision of KiiChain
      • The Problems We Solve
      • Use Cases
      • Roadmap
      • Whitepaper
      • Business Model
    • Tokenomics
      • Intro Coin Details
      • Coin Unlocking Schedule
      • Utility
      • Evergreen Model
    • Getting Started
      • Get a Wallet
      • Download a Mobile Wallet
      • Set Up a Web Wallet
      • Connect Wallet to Explorer App
  • BUILD ON KIICHAIN
    • Developer Hub
    • Testnet Oro
    • Endpoints - Cosmos
      • EVM
        • VM
        • ERC20
        • FeeMarket
      • IBC
      • Kiichain
        • TokenFactory
      • Cosmwasm
      • Cosmos
        • Auth
        • Authz
        • Bank
        • Tendermint
        • Consensus
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Slashing
        • Staking
        • Tx
        • Upgrade
    • Developer Tools
      • RWA Protocol
      • Rust SDK
      • JS/TS SDK
        • Kiijs-evm
        • Kiijs-proto
      • Deploy a smart contract
      • Deploy a dApp
      • Testnet faucet
    • Smart Contracts
    • Modules
      • TokenFactory
      • EVM
  • Validate the Network
    • Getting Started
      • What is a delegator?
      • What is a validator?
    • Run a Validator / Full Node
      • Getting started
      • Step-by-Step Guide
        • Becoming a Validator
        • Recovering Legacy Addresses
      • Maintaining a validator
      • Incentive
      • Technical requirements
      • Validator Security
    • Economics
      • Staking Requirements
      • Delegation / Staking
      • Rewards
      • Block Rewards Formula
      • APR
    • Delegator Information
      • Choosing a validator
      • Directives of delegators
      • Incentive to stake
      • Security considerations
      • Risks to consider
  • KII AMBASSADORS
    • What does it mean to be a KiiAmbassador?
    • Your Core Responsibilities
    • Participation Perks
    • Points System & Performance
    • How to lose the Role
    • Evaluation Process
  • KIIEX
    • Set Up KIIEX Account
      • Contact OTC Desk
    • Connect to KIIEX APIs
      • Introduction
        • New endpoints
        • Revised calls
        • Behavior Changes
        • Revised Calls 3.5.0
      • Background Information
        • Message Frame
        • Standard Response Objects and Common Error Codes
        • Modules
        • Users, Accounts, and Permissions
        • Products and Instruments
        • Quotes and Orders
        • Time– and Date-Stamp Formats
        • The Trading Day
      • Users
        • Activate2FA
        • AddUserAffiliateTag
        • Authenticate2FA
        • AuthenticateUser
        • CancelUserReport
        • GetAllUnredactedUserConfigsForUser
        • GetL2Snapshot
        • GetLevel1
        • GetUnredactedUserConfigByKey
        • GetUserAccountInfos
        • GetUserAccounts
        • GetUserAffiliateCount
        • GetUserAfilliateTag
        • GetUserConfig
        • GetUserDevices
        • GetUserReportTickets
        • GetUserReportWriterResultRecords
        • GetValidate2FARequiredEndpoints
        • LogOut
        • RegisterNewDevice
        • SubscribeAccountEvents
        • SubscribeBlockTrades
        • SuscribeLevel1
        • SubscribeLevel2
        • SubscribeTicker
        • SubscribeTrades
        • UnsuscribeBlockTrades
        • UnsubscribeLevel1
        • UnsubscribeLevel2
        • UnsubscribeTicket
        • UnsuscribeTrades
        • UpdateUserAffiliateTag
        • Validate2FA
      • Accounts
        • GetAccountInfo
        • GenerateTransactionActivityReport
        • GenerateTradeActivityReport
        • GenerateTreasuryActivityReport
        • GetAllAccountConfigs
        • GetAccountPositions
        • GetTreasuryProductsForAccount
        • ScheduleTradeActivityReport
      • Trades
        • GetAccountTrades
        • GetAccountTransactions
        • GetAllOpenTradeReports
        • GetOpenTradeReports
        • GetTickerHistory
        • GetTradesHistory
      • OMS Orders
        • CancelAllOrders
        • CancelOrder
        • CancelQuote
        • CancelReplaceOrder
        • CreateQuote
        • GetOMSFeeTiers
        • GetOpenOrders
        • GetOpenQuotes
        • GetOrderFee
        • GetOrderHistory
        • GetOrderHistoryByOrderId
        • GetOrdersHistory
        • GetOrderStatus
        • ModifyOrder
        • SendOrder
        • SubmitBlockTrade
        • UpdateQuote
      • Products
        • GetProduct
        • GetProducts
      • Instruments
        • GetInstrument
        • GetInstruments
      • Tickets
        • CreateDepositTicket
        • CancelWithdraw
        • CreateWithdrawTicket
        • Deposit withdraw template
        • GetAccountDepositTransactions
        • GetAccountWithdrawTransactions
        • GetAllDepositRequestInfoTemplates
        • GetDeposits
        • GetDepositInfo
        • GetDepositTicket
        • GetDepositRequestInfoTemplate
        • GetOMSWithdrawFees
        • GetStandardTemplateExample
        • GetTetherRPCWithdrawTemplateExample
        • GetWithdrawFee
        • GetWithdraws
        • GetWithdrawTemplate
        • GetWithdrawTemplateTypes
        • GetWithdrawTicket
        • GetWithdrawTickets
        • SubmitDepositTicketComment
        • SubmitWithdrawTicketComment
      • Misc
        • Ping
Powered by GitBook
LogoLogo
On this page
  • Install
  • Requirements
  • Binary installation
  • Joining the Testnet
  • Recommended configuration
  • Quick bootstrap
  • Running your node
  • Cosmosvisor
  • Configure state sync
  • Turning your node into an archival node
  • Node Architecture for Validators
  • References
Export as PDF
  1. Validate the Network
  2. Run a Validator / Full Node

Step-by-Step Guide

Onboarding for validators

PreviousGetting startedNextBecoming a Validator

Last updated 17 days ago

It's always nice to see new users onboarding into the Testnet Oro.

This will guide you through the process of running your own full node, then and finally running

Install

kiichaind is the command-line interface (CLI) for interacting with the Kiichain blockchain. This section covers the installation of the necessary binaries to run a Kiichain node.

Requirements

  • Golang version: v1.23.x

  • Build tools: build-essential package (Linux)

Binary installation

To install Kiichain, download the pre-built binaries:

git clone https://github.com/KiiChain/kiichain.git
cd kiichain
make install

Verify the installation by checking the version of kiichaind:

kiichaind version

Joining the Testnet

To join the Testnet Oro, you must have the daemon kiichaind installed in your machine.

Recommended configuration

For optimal performance, we recommend:

  • 4 vCPU x86_64

  • 8 GB RAM

  • 1 TB NVME SSD

Quick bootstrap

The easiest way to prepare a node is by using our provided scripts.

These scripts are designed for systems running Ubuntu 20.04 or Ubuntu 22.04. Ensure your operating system matches this requirement before proceeding.

  • Join Testnet Oro Script: Use this script to bootstrap a full node quickly.

curl -O https://raw.githubusercontent.com/KiiChain/testnets/refs/heads/main/testnet_oro/join_oro.sh
chmod +x join_oro.sh
./join_oro.sh
  • Join Testnet with Cosmosvisor Script: Use this script to set up a full node with Cosmosvisor for automated upgrades

curl -O https://raw.githubusercontent.com/KiiChain/testnets/refs/heads/main/testnet_oro/join_oro_cv.sh
chmod +x join_oro_cv.sh
./join_oro_cv.sh

Running your node

Prepare your system by backing up and removing old configurations:

# Backup old configuration
cp -r $HOME/.kiichain $HOME/.kiichain-bk
# Clean any old configuration
rm -r $HOME/.kiichain

Connect to the testnet with the following commands:

# Variables used during the configuration
PERSISTENT_PEERS="5b6aa55124c0fd28e47d7da091a69973964a9fe1@uno.sentry.testnet.v3.kiivalidator.com:26656,5e6b283c8879e8d1b0866bda20949f9886aff967@dos.sentry.testnet.v3.kiivalidator.com:26656"
CHAIN_ID="oro_1336-1"
NODE_HOME=~/.kiichain
NODE_MONIKER=testnet_oro
GENESIS_URL=https://raw.githubusercontent.com/KiiChain/testnets/refs/heads/main/testnet_oro/genesis.json
MINIMUM_GAS_PRICES="1000000000akii"

# Initialize the chain
kiichaind init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME

# Set the persistent-peers
sed -i -e "/persistent-peers =/ s^= .*^= \"$PERSISTENT_PEERS\"^" $NODE_HOME/config/config.toml
# Set the min gas price
sed -i -e "/minimum-gas-prices =/ s^= .*^= \"$MINIMUM_GAS_PRICES\"^" $NODE_HOME/config/app.toml

# Set the genesis
wget $GENESIS_URL -O genesis.json
mv genesis.json $NODE_HOME/config/genesis.json

# Start the chain
kiichaind start --home $NODE_HOME

(Optional but recommended): Before running the chain you can also check the SHA256:

sha256sum $NODE_HOME/config/genesis.json

The expected SHA256 checksum is: 2805ae1752dc8c3435afd6bdceea929b3bbd2883606f3f3589f4d62c99156d2d

This configuration runs a full node. For validators, update the configuration accordingly!

Cosmosvisor

Cosmosvisor is a process manager for handling chain upgrades. It enables low maintenance and automatic updates for nodes.

  • If an upgrade is scheduled, cosmosvisor has the capability of automatically downloading binaries and restarting any Kiichain processes

  • This gives the node low maintenance and auto updates capabilities

A version of our node bootstrapper can install cosmosvisor for you:

curl -O https://raw.githubusercontent.com/KiiChain/testnets/refs/heads/main/testnet_oro/join_oro_cv.sh
chmod +x join_oro_cv.sh
./join_oro_cv.sh

Preparing cosmosvisor upgrade

First, you need to compile new binaries:

  • A new Kiichaind binary must be compiled with the target OS in mind

  • Ideally, you should compile all binaries on it’s own machines

  • The build must be done on top of the upgrade tag (E.g. v1.0.1, v2.0.0)

Make sure that the binary has the correct version with:

kiichaind version

To add a new upgrade you must run the following command on Cosmovisor:

cosmovisor add-upgrade <upgrade-name> <path-to-binary>

Where:

  • <upgrade-name> is the on-chain upgrade name

  • <path-to-binary> is the full path for the binary

Example:

cosmovisor add-upgrade 1.3.0 /home/ubuntu/kiichain/build/kiichaind

Configure state sync

State sync significantly reduces the time required to synchronize a node by downloading and verifying state data from trusted peers rather than replaying every historical block. This is particularly beneficial for nodes joining the network late or recovering from a significant downtime.

Follow these steps to configure state sync for your Kiichain node:

  1. Set Trust Height Delta and Fetch Block Information

Define a height delta and retrieve the latest block height and block hash from the primary RPC endpoint.

# Configure state-sync
TRUST_HEIGHT_DELTA=500
LATEST_HEIGHT=$(curl -s https://rpc.uno.sentry.testnet.v3.kiivalidator.com/block | jq -r ".block.header.height")
if [[ "$LATEST_HEIGHT" -gt "$TRUST_HEIGHT_DELTA" ]]; then
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - $TRUST_HEIGHT_DELTA))
else
SYNC_BLOCK_HEIGHT=$LATEST_HEIGHT
fi

# Get the sync block hash
SYNC_BLOCK_HASH=$(curl -s "https://rpc.uno.sentry.testnet.v3.kiivalidator.com/block?height=$SYNC_BLOCK_HEIGHT" | jq -r ".block_id.hash")
  1. Enable State Sync in Configuration

Modify the config.toml file to enable state sync and set the required parameters.

sed -i.bak -e "s|^enable *=.*|enable = true|" $NODE_HOME/config/config.toml
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$PRIMARY_ENDPOINT,$SECONDARY_ENDPOINT\"|" $NODE_HOME/config/config.toml
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" $NODE_HOME/config/config.toml
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" $NODE_HOME/config/config.toml

Turning your node into an archival node

Newly created nodes have the pruning option configured as default. If you desire to turn your node into an archival node, the following flag must be changed:

  1. Go to $NODE_HOME/config/app.tomland update the following flag:

pruning = "nothing"

Other options available as default for pruning are:

  • default: Keep the recent 362880 blocks and prune is triggered every 10 blocks

  • nothing: all historic states will be saved, and nothing will be deleted (i.e. archiving node)

  • everything: all saved states will be deleted, storing only the recent 2 blocks; pruning at every block

  • custom: allow pruning options to be manually specified through 'pruning-keep-recent' and 'pruning-interval'

Node Architecture for Validators

Further instructions on how to build a great node architecture can be found on:

References

More information about cosmovision can be found at .

Check the section on how to do it

becoming a validator
the price feeder
Cosmosvisor Quick Start
Playbook For Cosmos Validators: Node Architecture Choices
Running a Validator
Playbook For Cosmos Validators: Node Architecture Choices
Cosmosvisor Quick Start
Join Testnet Oro
Join Testnet Oro CV
Binary Installation