Website: https://kopi.money
Discord: https://discord.gg/GvnwSwsCcs
Telegram: https://t.me/KopiProtocol
X: https://twitter.com/kopi_money
My SERVICES:
RPC: https://kopi-rpc.nodesync.top/
API: https://kopi-api.nodesync.top/
Explorer: https://explorer.nodesync.top/Kopi-Protocol
1. Minimum hardware requirement
4 Cores, 8G Ram, 160G SSD, Ubuntu 22.04
2. Server preparation
Copy sudo apt update && sudo apt upgrade -y
sudo apt install make curl git wget -y
sudo apt install htop tmux build-essential jq make lz4 gcc unzip -y
3. Install GO
Copy if ! which go ; then
#Install GO
ver="1.22.4"
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" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
fi
4. Download and build binaries
Copy cd $HOME
rm -rf kopi
git clone --quiet --depth 1 --branch v0.6.5.1 https://github.com/kopi-money/kopi.git
cd kopi
make install
kopid version --long | grep -e commit -e version
5. Initialize the node
Copy kopid init NodeName --chain-id luwak-1
kopid config set client chain-id luwak-1
kopid config set client keyring-backend os
Copy curl -O $HOME/.kopid/config/genesis.json https://files.nodesync.top/Kopi/genesis.json
curl -O $HOME/.kopid/config/addrbook.json https://files.nodesync.top/Kopi/addrbook.json
Copy # Set indexing:
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.kopid/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.0001ukopi\"|" $HOME/.kopid/config/app.toml
# Set pruning
sed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.kopid/config/app.toml
sed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.kopid/config/app.toml
sed -i -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' $HOME/.kopid/config/app.toml
sed -i -e 's|^pruning-interval *=.*|pruning-interval = "50"|' $HOME/.kopid/config/app.toml
sed -i -e 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $HOME/.kopid/config/config.toml
sed -i -e 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $HOME/.kopid/config/config.toml
# Add Peers
PEERS=9aff60b8a0580e17e6e01bcfc55e7b827966ba0d@144.76.109.19:17656,7c687ce87652e17da7c57907df11b43519577a09@58.187.175.101:16656,6641dc16eb6b1aa04a892b83e82871b7d30b44bf@168.119.11.176:12656,5b4abd9b20628943a9b2efec7dc0bb062bb4dac7@65.21.234.111:45656,a96649c75f8837d5269077ccf6d34c551fe1a577@88.99.137.138:12656,5407aff45e8c4597dc8b362d1726fcb0e0eff53e@209.126.83.93:16656
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kopid/config/config.toml
Copy # Download latest chain snapshot
curl -L https://files.nodesync.top/Kopi/snapshot-kopi.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.kopid
6. Custom Ports:
Copy echo "export KOPI_PORT="19"" >> $HOME/.bash_profile
source $HOME/.bash_profile
sed -i.bak -e "s%:1317%:${KOPI_PORT}317%g;
s%:8080%:${KOPI_PORT}080%g;
s%:9090%:${KOPI_PORT}090%g;
s%:9091%:${KOPI_PORT}091%g;
s%:8545%:${KOPI_PORT}545%g;
s%:8546%:${KOPI_PORT}546%g;
s%:6065%:${KOPI_PORT}065%g" $HOME/.kopid/config/app.toml
sed -i.bak -e "s%:26658%:${KOPI_PORT}658%g;
s%:26657%:${KOPI_PORT}657%g;
s%:6060%:${KOPI_PORT}060%g;
s%:26656%:${KOPI_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${KOPI_PORT}656\"%;
s%:26660%:${KOPI_PORT}660%g" $HOME/.kopid/config/config.toml
7. Create Service and Start node
Copy sudo tee /etc/systemd/system/kopid.service > /dev/null <<EOF
[Unit]
Description=Kopi Protocol
After=network-online.target
[Service]
User=root
ExecStart=$(which kopid) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Copy sudo systemctl daemon-reload
sudo systemctl enable kopid
sudo systemctl restart kopid
sudo journalctl -u kopid -f --no-hostname -o cat
8. Wallet
Add New Wallet Key - Save seed
Copy kopid keys add wallet
Recover existing key
Copy kopid keys add wallet --recover
List All Keys
8.1 Query Wallet Balance
Copy kopid q bank balances $(kopid keys show wallet -a)
8.2 Check sync status
False is synced
Copy kopid status 2>&1 | jq .sync_info.catching_up
8.3 Create Validator
Obtain your validator public key by running the following command:
Copy kopid tendermint show-validator
The output will be similar to this (with a different key):
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I= "}
Then, create a file named validator.json
with the following content:
Copy nano $HOME/validator.json
Change your info, from "pubkey" to "details" and Save them
Copy {
"pubkey": {
"@type":"/cosmos.crypto.ed25519.PubKey",
"key":"<Paste Key here>"
},
"amount": "1000000ukopi",
"moniker": "Node39 Guide",
"identity": "",
"website": "https://services.node39.top",
"security": "contact@node39.top",
"details": "Node39.TOP Member",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
Finally, we're ready to submit the transaction to create the validator:
Copy kopid tx staking create-validator $HOME/validator.json \
--from=wallet \
--chain-id=luwak-1 \
--fees 100ukopi \
--node=https://kopi-rpc.nodesync.top:443 \
-y
8.4 Delegate Token to your own validator
Copy kopid tx staking delegate $(kopid keys show wallet --bech val -a) 1000000ukopi \
--from=wallet \
--chain-id=luwak-1 \
--fees 100ukopi \
--node=https://kopi-rpc.nodesync.top:443 \
-y
8.6 Withdraw rewards and commission from your validator
Copy kopid tx distribution withdraw-rewards $(kopid keys show wallet --bech val -a) \
--from=wallet \
--chain-id=luwak-1 \
--fees 100ukopi \
--node=https://kopi-rpc.nodesync.top:443 \
-y
8.7 Unjail validator
Copy kopid tx slashing unjail \
--from=wallet \
--chain-id=luwak-1 \
--fees 100ukopi \
--node=https://kopi-rpc.nodesync.top:443 \
-y
8.8 Services Management
Copy # Reload Service
sudo systemctl daemon-reload
# Enable Service
sudo systemctl enable kopid
# Disable Service
sudo systemctl disable kopid
# Start Service
sudo systemctl start kopid
# Stop Service
sudo systemctl stop kopid
# Restart Service
sudo systemctl restart kopid
# Check Service Status
sudo systemctl status kopid
# Check Service Logs
sudo journalctl -u kopid -f --no-hostname -o cat
9. Snapshot
Copy sudo systemctl stop kopid
cp $HOME/.kopid/data/priv_validator_state.json $HOME/.kopid/priv_validator_state.json.backup
kopid tendermint unsafe-reset-all --home $HOME/.kopid --keep-addr-book
# Download latest chain snapshot
curl -L https://files.nodesync.top/Kopi/snapshot-kopi.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.kopid
mv $HOME/.kopid/priv_validator_state.json.backup $HOME/.kopid/data/priv_validator_state.json
sudo systemctl restart kopid && sudo journalctl -u kopid -f --no-hostname -o cat
10. Backup Validator
Important
Copy cat $HOME/.kopid/config/priv_validator_key.json
11. Remove node
Copy cd $HOME
sudo systemctl stop kopid
sudo systemctl disable kopid
sudo rm /etc/systemd/system/kopid.service
sudo systemctl daemon-reload
rm -f $(which kopid)
rm -rf $HOME/.kopid
rm -rf $HOME/kopid