apt-get update
apt-get install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow 22
ufw allow 26656
ufw enable
# add user
adduser node
# add user to sudoers
usermod -aG sudo node
# login as user
su - node
sudo apt update
sudo apt install pkg-config build-essential libssl-dev curl jq git libleveldb-dev -y
sudo apt-get install manpages-dev -y
# install go
curl https://dl.google.com/go/go1.18.2.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
# Update environment variables to include go
cat <<'EOF' >>$HOME/.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/.profile
# check go version
go version
git clone https://github.com/Team-Kujira/core
cd core
git checkout v0.4.0
make install
cd
#Choose a name for your validator and use it in place of “<moniker-name>” in the following command:
kujirad init <moniker-name> --chain-id harpoon-4
#Example
kujirad init My_Node --chain-id harpoon-4
cd ~/.kujira/config
rm genesis.json
cd
wget https://raw.githubusercontent.com/Team-Kujira/networks/master/testnet/harpoon-4.json -O $HOME/.kujira/config/genesis.json
cd
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.00125ukuji\"/" $HOME/.kujira/config/app.toml
sed -i -e "s/^timeout_commit *=.*/timeout_commit = \"1500ms\"/" $HOME/.kujira/config/config.toml
PEERS="[email protected]:26656,[email protected]:16656,[email protected]:26656,[email protected]:26656,[email protected]:53756,[email protected]:26656,[email protected]:26656,[email protected]:36346,[email protected]:25656,[email protected]:25656,[email protected]:26656,[email protected]:29656,[email protected]:26656,[email protected]:26656,[email protected]:40000,[email protected]:26656,24c582547690a2c529bef10d04ffb1acd5c30556@[2a01:4f9:1a:a718::5]:26656,[email protected]:46656,[email protected]:36346,[email protected]:26612,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,2b03400fd39304b04d8801de1d321d2a05e2cf0d@[2607:5300:205:300::11a6]:26666,[email protected]:26876,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26616,[email protected]:26616,[email protected]:10856,[email protected]:26656,[email protected]:23095,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:26656,[email protected]:26651,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:18656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:23357,[email protected]:26656,[email protected]:26876,c57b8b5ce39260e75e38d048424c9417ac26c1cf@testnet.kujira.synergynodes.com:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kujira/config/config.toml
kujirad start
# Press Ctrl+c to exit
You should see the following output.
Genesis time is in the future. Sleeping until then... genTime=2022-06-13T12:00:00Z
cd /etc/systemd/system
sudo nano kujirad.service
Copy the following content into kujirad.service
and save it.
[Unit]
Description=Kujirad Daemon
#After=network.target
StartLimitInterval=350
StartLimitBurst=10
[Service]
Type=simple
User=node
ExecStart=/home/node/go/bin/kujirad start
Restart=on-abort
RestartSec=30
[Install]
WantedBy=multi-user.target
[Service]
LimitNOFILE=1048576
sudo systemctl daemon-reload
sudo systemctl enable kujirad
# Start the service
sudo systemctl start kujirad
# Stop the service
sudo systemctl stop kujirad
# Restart the service
sudo systemctl restart kujirad
# For Entire log
journalctl -t kujirad
# For Entire log reversed
journalctl -t kujirad -r
# Latest and continuous
journalctl -t kujirad -f
kujirad tendermint show-node-id
Make sure to copy the 24 words Mnemonics Phrase, save it in a file and store it on a safe location.
kujirad keys add <wallet-name>
#Example
kujirad keys add my_wallet
Get some KUJI tokens to the above created wallet.
kujirad tx staking create-validator -y \
--chain-id harpoon-4 \
--moniker <moniker-name> \
--pubkey "$(kujirad tendermint show-validator)" \
--amount 5000000ukuji \
--identity "<Keybase.io ID>" \
--website "<website-address>" \
--details "Some description" \
--from <wallet-name> \
--gas-prices 1ukuji \
--commission-rate=0.0 \
--commission-max-rate=0.05 \
--commission-max-change-rate=0.01 \
--min-self-delegation 1
#Example
kujirad tx staking create-validator -y \
--chain-id harpoon-4 \
--moniker "My Node" \
--pubkey "$(kujirad tendermint show-validator)" \
--amount 5000000ukuji \
--identity "D74433D32938F013" \
--website "http://www.mywebsite.com" \
--details "Some description" \
--from my_wallet \
--gas-prices 1ukuji \
--commission-rate=0.0 \
--commission-max-rate=0.05 \
--commission-max-change-rate=0.01 \
--min-self-delegation 1
Make sure to change <wallet-name>
to correct values.
kujira keys show <wallet-name> --bech val --output json | jq -r .address
#Example
kujirad keys show my_wallet --bech val --output json | jq -r .address
kujirad tx staking delegate <validator-address> 1000000ukuji --from <wallet-name> --fees 30000ukuji --chain-id harpoon-4 -y
#Example
kujirad tx staking delegate kujiravaloper1xesqr8vjvy34jhu027zd70ypl0nnev5esqejlw 1000000ukuji --from my_wallet --fees 30000ukuji --chain-id harpoon-4 -y
Take a backup of the following files after you have created and registered your validator node successfully.
/home/node/.kujira/config/node_key.json
/home/node/.kujira/config/priv_validator_key.json
/home/node/.kujira/data/priv_validator_state.json
Make sure to change <validator-operator-address>
, <wallet-name>
to correct values.
kujirad tx distribution withdraw-rewards <validator-address> --from <wallet-name> --chain-id=harpoon-4 --gas auto --fees 1ukuji --gas-adjustment 1.4 -y
#Example
kujirad tx distribution withdraw-rewards kujiravaloper1xesqr8vjvy34jhu027zd70ypl0nnev5esqejlw --from synergy --chain-id=harpoon-4 --gas auto --fees 1ukuji --gas-adjustment 1.4 -y
kujirad query bank balances <wallet-address>
#Example:
kujirad query bank balances kujira1xesqr8vjvy34jhu027zd70ypl0nnev5eh42prp