STEP 1 Update your server to get the latest version
sudo apt update && sudo apt upgrade -y
Ki-chain is a blockchain built on the Cosmos ecosystem by KI Foundation in which we can find an open development environment and a decentralised marketplace for applications.
sudo apt update && sudo apt upgrade -y
sudo apt install git curl wget tar lz4 unzip jq build-essential pkg-config clang bsdmainutils make ncdu -y
Go is a programming language allowing each node of the Cosmos ecosystem to operate.
Go is a compiled and concurrent programming language inspired by C and Pascal.
This language was developed by Google from an initial concept by Robert Griesemer, Rob Pike and Ken Thompson.
cd $HOME
version="1.19.6"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
Check GO version, it must return : go version go1.19.6 linux/amd64
go version
Top page
Here we will install the node for Ki with this binary version : Mainnet-5.0.2
Please be sure to install the latest version one last minute version can be published ! Please check by yourself here...
cd $HOME
git clone https://github.com/KiFoundation/ki-tools.git
cd ki-tools
git checkout Mainnet-5.0.2
make install
Check if the binary "kid" version Mainnet-5.0.2 has been correctly installed
kid version
Top page
What does moniker mean?
A personal name or nickname. This name (moniker) will appear in the blockchain explorer.
SPACE in your moniker will create errors
KI_MONIKER="Replace_AVIAONE_by_your_name"
Top page
We are now ready to initialze the node
kid init $KI_MONIKER --chain-id kichain-2
Top page
Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0uxki\"|" $HOME/.kid/config/app.toml
Download genesis
wget -O $HOME/.kid/config/genesis.json "https://services.kichain-2.kichain.aviaone.com/genesis.json"
Download addrbook
wget -O $HOME/.kid/config/addrbook.json "https://services.kichain-2.kichain.aviaone.com/addrbook.json"
Add Seeds
SEEDS="258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.kichain-2.kichain.aviaone.com:10267,2088a9e86b4cb5140bf0c2830d4ab6824c85c4aa@seed.blockchain.ki:6969,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:13556"
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.kid/config/config.toml
Change ports
Advanced users ONLY !
Clear Data
kid tendermint unsafe-reset-all $HOME/.kid --keep-addr-book
Top page
This will let you start and stop your node with /etc/systemd/system
sudo tee /etc/systemd/system/kid.service > /dev/null <<EOF
[Unit]
Description=KI\n
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which kid) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable kid
sudo systemctl daemon-reload
This command will start your node
Do not use it now if you are going to use below : Snapshot | State Sync (because your node shouldn't start now... but after the Snapshot | State Sync)
sudo systemctl restart kid && journalctl -u kid -f --no-hostname -o cat
Top page
(updated every 24 hours)
File name : https://services.kichain-2.kichain.aviaone.com/kichain-2_2024-05-02.tar.gz
Download this filesudo systemctl stop kid
cp $HOME/.kid/data/priv_validator_state.json $HOME/.kid/priv_validator_state.json.backup
kid tendermint unsafe-reset-all --home $HOME/.kid --keep-addr-book
wget -c https://services.kichain-2.kichain.aviaone.com/kichain-2_2024-05-02.tar.gz -O - | tar -xz -C $HOME/.kid
mv $HOME/.kid/priv_validator_state.json.backup $HOME/.kid/data/priv_validator_state.json
sudo systemctl start kid && sudo journalctl -u kid -f --no-hostname -o cat
Please be sure to use the latest binary version : Mainnet-5.0.2
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.kid/config/config.toml
sudo systemctl stop kid
SNAP_RPC="https://rpc.kichain-2.kichain.aviaone.com:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= true/;\
/^rpc_servers =/ s|=.*|= \"$SNAP_RPC,$SNAP_RPC\"|;\
/^trust_height =/ s/=.*/= $BLOCK_HEIGHT/;\
/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" $HOME/.kid/config/config.toml
sudo systemctl stop kid && kid tendermint unsafe-reset-all --home $HOME/.kid --keep-addr-book
sudo systemctl start kid && journalctl -u kid -f --no-hostname -o cat
Watch your logs and be patient it can take 5 minutes.... !!
With the command used just above, your node just started, now BE PATIENT your node has started to work and will need time to get synced on the last block.
First check your logs and have a look at what's going on !
You should see some output like this which confirm that your node is indexing blocks
### indexed block exents height=20584280 module=txindex
How to check if your node is already fully synced? ?
kid status 2>&1 | jq .SyncInfo
The current block number is :20584280 and the last block app hash is :CiQQB3WKSPgcNIZ/+3w+NP6MAdcNDWZIuLyi2ze/xsI=
true mean syncing on the way, and true is NOT SYNCED
You will see an output with :
"catching_up": false
If you get true instead of false, please wait... it's not done yet, it's on the way...
true mean syncing on the way, and true is NOT SYNCED
The current block number is :20584280 and the last block app hash is :CiQQB3WKSPgcNIZ/+3w+NP6MAdcNDWZIuLyi2ze/xsI=
Top pageWhy it's better to get synced before to create or recover a wallet ?
Because when your wallet will be created or recovered, if you are not synced, you will not be able to check the balance !
Create Wallet
kid keys add name_wallet
Recover Wallet
kid keys add name_wallet --recover
Top page
Create your validator if you are not synced, you will get some troubles...
kid tx staking create-validator \
--amount=1000000uxki \
--pubkey=$(kid tendermint show-validator) \
--moniker="YOUR_NICKNAME" \
--chain-id=kichain-2 \
--commission-rate=0.05 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.02 \
--min-self-delegation=1 \
--website="https://your-website.com" \
--identity="keyBASE_id" \
--details="This is will be display in the blockchain explorer. Write here something about you"\
--gas-prices=0.1uxki \
--gas-adjustment=1.5 \
--gas=auto \
--from=WRITE_HERE_YOUR_WALLET_ADDRESS
Top page
Congratulations, your made all the steps above necessary to setup the node for KI (chain-id=kichain-2) with success and your node is already online now.
kid q bank balances YOUR_WALLET_NUMBER
Must return false to get synced
kid status 2>&1 | jq .SyncInfo
journalctl -u kid -f --no-hostname -o cat
(In some case that's necessary to add "fees" or --gas=auto)
kid tx gov vote 14 yes --from YOUR_WALLET_NUMBER --chain-id kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx slashing unjail --chain-id=kichain-2 --from YOUR_WALLET_NUMBER -y
sudo systemctl restart kid && journalctl -u kid -f --no-hostname -o cat
kid q bank balances YOUR_WALLET_NUMBER
kid keys add YOUR_WALLER_NAME
kid keys add YOUR_WALLET_NUMBER --recover
kid keys list
kid keys delete YOUR_WALLET_NUMBER
(In some case that's necessary to add "fees" or --gas=auto)
kid tx gov vote 14 yes --from YOUR_WALLET_NUMBER --chain-id kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx gov vote 14 no --from YOUR_WALLET_NUMBER --chain-id kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx gov vote 14 no_with_veto --from YOUR_WALLET_NUMBER --chain-id kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx gov vote 14 abstain --from YOUR_WALLET_NUMBER --chain-id kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid query gov proposals
(In some case that's necessary to add "fees" or --gas=auto)
kid query gov proposal 14
(In some case that's necessary to adjust : "deposit" or "fees" or --gas=auto)
kid tx gov submit-proposal \
--from YOUR_WALLET_NUMBER \
--chain-id kichain-2 \
--deposit=100000000uxki \
--type="Text" \
--title="Write here the title of your proposal for Ki" \
--description="Describe here with details your proposal for Ki" \
--fees=10000uxki \
--gas=auto \
-y
(In some case that's necessary to add "fees" or --gas=auto)
kid tx slashing unjail --chain-id=kichain-2 --from YOUR_WALLET_NUMBER -y
kid keys show YOUR_WALLET_NUMBER --bech val -a
kid query staking validator YOUR_VALIDATOR_VALOPER --output json
kid q staking validator $(kid keys show YOUR_WALLET_NUMBER --bech val -a)
kid query slashing signing-info $(kid tendermint show-validator)
kid status 2>&1 | jq .ValidatorInfo
kid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
kid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
kid tx staking edit-validator \
--new-moniker="Replace AVIAONE by your name" \
--identity=YOUR_KEYBASE_ID \
--details="This is will be display in the blockchain explorer. Write here something about you" \
--chain-id=kichain-2 \
--commission-rate=0.1 \
--from=YOUR_WALLET_NUMBER \
--gas-prices=0.1uxki \
--gas-adjustment=1.5 \
--gas=auto \
-y
(NEVER DO IT if you are not already synced with the latest block)
kid tx staking create-validator \
--amount=1000000uxki \
--pubkey=$(kichain-2 tendermint show-validator) \
--moniker="Replace AVIAONE by your name" \
--identity=YOUR_KEYBASE_ID \
--details="This is will be display in the blockchain explorer. Write here something about you" \
--chain-id=kichain-2 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=YOUR_WALLET_NUMBER \
--gas-prices=0.1uxki \
--gas-adjustment=1.5 \
--gas=auto \
-y
(In some case that's necessary to add "fees" or --gas=auto)
kid tx bank send WALLET_SENDER WALLET_RECEIVER 1000000uxki --chain-id=kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx staking delegate WALLET_NUMBER_WHERE_YOU_WANT_DELEGATE 1000000uxki --from YOUR_WALLET_NUMBER --chain-id=kichain-2
(In some case that's necessary to add "fees" or --gas=auto)
kid tx staking delegate YOUR_VALIDATOR_NUMBER 1000000uxki --from YOUR_WALLET_NUMBER --chain-id=kichain-2
kid tx distribution withdraw-all-rewards --from YOUR_WALLET_NUMBER
kid tx distribution withdraw-rewards YOUR_VALIDATOR_NUMBER --from YOUR_WALLET_NUMBER --commission
Under contruction
Under contruction
Under contruction
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uxki\"/" $HOME/.kid/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.kid/config/config.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.kid/config/config.toml
echo $(kid tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.kid/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
curl -sS https://rpc.kichain-2.kichain.aviaone.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
YOU ARE GOING TO DELETE EVERYTHING WITHOUT ANY POSSIBILITY TO RECOVER, be sure that's really you are looking for...
BEFORE BE SURE TO SAVE $HOME/.kid/config/priv_validator_key.json
This file $HOME/.kid/config/priv_validator_key.json will let you create a new node with the same validator
cd $HOME
sudo systemctl stop kid
sudo systemctl disable kid
sudo rm /etc/systemd/system/kid.service
sudo systemctl daemon-reload
rm -f $(which kid)
rm -rf $HOME/.kid
rm -rf $HOME/ki-tools
curl -sS https://rpc.kichain-2.kichain.aviaone.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
PEERS="9664f921f98c323a8b3d1aae0580b0f4be16f3ef@51.159.194.206:26656,9ced5812f04ab7adb4aec6366e65b67b5c34cf04@167.235.138.94:16656,e329f7d72431792719ae50448c9523049e5898ef@162.55.234.190:36656,a5082098be2a84ad368e38a339871f3f2d0f6eee@141.94.219.133:11056,6ebceb16da1c15c48086eaed1be807939f3e50f0@65.108.199.222:21636,6903ce32ee06697b977e28a37baae1b1364403db@15.235.66.89:11056,633e5f79bf006916518be3cf1c490a81ca749459@65.108.206.131:26656,f2b80411c2b48935b796c91c907565c3bd78aff4@142.132.184.154:26656,9e683b8b369817a41911814d29656a1ab86e18f8@198.244.233.99:26656,11a8ab7b20d09deb25806a96ddee4148eba50a05@43.153.105.215:26656,fd847300ca0a92b2c45f0d72b29c3ef0876896e0@88.198.62.198:2100,b2f316c26918ca23e81fefb38adfa621670c7f1a@65.21.249.135:26656,d0729a600534e2cf30dbfc175d8116c14e442cf1@95.217.220.38:26656,d75047fb6470fe70ace1846dd4d0799ee64c7a51@51.91.25.144:26656,47c540dad0c36299cece4655994656d8e8a62a13@70.36.102.19:36656,22fd50dfca2d72bc4a71d00ddfcee0bdaa7cf855@95.216.102.124:26651,3ccda2acb7b9d2727bbb5d4b60db90f5927f08f2@51.195.4.139:10156,ec732ae3d4318446a8758bbe1abca2a4fb31a78b@149.202.65.148:16666,77fde007984b991c85d7069d43b8b50d15fad064@188.166.77.194:26656,b5ee6d3aa40382f3a11c2f5913107d2b17073482@31.156.88.34:26656,dc4e8719e3b39865f649a91ea5bedf7303fb9989@173.212.230.119:26656,500539d7afdddf2fbb15bd79044996e6235a5cf9@185.246.84.42:3020,a913a98ea8fe8e63a3c9d7cdfebc485df923a2a6@173.249.43.136:26656,55d9cb82f9cb22c11b67e2ee9d9e148f229df2fb@65.108.98.235:22656,3cc4595d28281f89eb6288bf627ac8292f40eb74@91.194.30.202:21656,7c986f9b44023f5969183fab682e6af6f2886573@161.97.114.112:26656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.kid/config/config.toml
SEEDS="258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.kichain-2.kichain.aviaone.com:10267,2088a9e86b4cb5140bf0c2830d4ab6824c85c4aa@seed.blockchain.ki:6969,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:13556"
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.kid/config/config.toml
(updated every 4 hours)
curl -Ls https://services.kichain-2.kichain.aviaone.com/addrbook.json > $HOME/.kid/config/addrbook.json
(updated every 4 hours)
curl -Ls https://services.kichain-2.kichain.aviaone.com/genesis.json > $HOME/.kid/config/genesis.json
(updated every 24 hours)
File name : https://services.kichain-2.kichain.aviaone.com/kichain-2_2024-05-02.tar.gz
Please be sure to use the latest binary version.
One last minute version can be published ! Please check by yourself here... and compare with your node kid version
sudo systemctl stop kid
cp $HOME/.kid/data/priv_validator_state.json $HOME/.kid/priv_validator_state.json.backup
kid tendermint unsafe-reset-all --home $HOME/.kid --keep-addr-book
wget -c https://services.kichain-2.kichain.aviaone.com/kichain-2_2024-05-02.tar.gz -O - | tar -xz -C $HOME/.kid
mv $HOME/.kid/priv_validator_state.json.backup $HOME/.kid/data/priv_validator_state.json
sudo systemctl start kid && sudo journalctl -u kid -f --no-hostname -o cat
Please be sure to use the latest binary version : Mainnet-5.0.2
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.kid/config/config.toml
sudo systemctl stop kid
SNAP_RPC="https://rpc.kichain-2.kichain.aviaone.com:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= true/;\
/^rpc_servers =/ s|=.*|= \"$SNAP_RPC,$SNAP_RPC\"|;\
/^trust_height =/ s/=.*/= $BLOCK_HEIGHT/;\
/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" $HOME/.kid/config/config.toml
sudo systemctl stop kid && kid tendermint unsafe-reset-all --home $HOME/.kid --keep-addr-book
sudo systemctl start kid && journalctl -u kid -f --no-hostname -o cat
Watch your logs and be patient it can take 5 minutes.... !!
That's an easy process, just click and follow the instructions...it will be done in 10 seconds !
Our platform offers a secure link that allows you to effortlessly connect your KEPLR wallet. The process is quick and easy. Adding a new chain to your wallet is a standard procedure that doesn't involve any transaction. It simply requires your approval. To get started, click on the button below to add this chain to your wallet and start interacting with the blockchain.