Network Overview
Kopi Money is a decentralized finance (DeFi) protocol combining a Decentralized Exchange (DEX) and a money market.
https://rpc-kopi-t.sychonix.com
https://api-kopi-t.sychonix.com
cfef0546b0621abba2818874a2935507878dbc80@kopi-testnet.sychonix.com:11656
PEERS="$(curl -sS https://rpc-kopi-t.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/ /config/config.toml
curl -Ls https://snapshot.sychonix.com/testnet/kopi/genesis.json > $HOME/.kopid/config/genesis.json
curl -Ls https://snapshot.sychonix.com/testnet/kopi/addrbook.json > $HOME/.kopid/config/addrbook.json
Installation
- Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev aria2 -y
- Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.23.2.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
- Install Binary
cd $HOME && mkdir -p go/bin/
git clone https://github.com/kopi-money/kopi.git
cd kopi
git checkout v0.6.4.1
make install
- Initialize The Node
kopid config set client chain-id kopi-test-5
kopid config set client node tcp://localhost:11657
kopid config set client keyring-backend os
kopid init $MONIKER --chain-id kopi-test-5
- Download Genesis & Addrbook
curl -Ls https://snapshot.sychonix.com/testnet/kopi/genesis.json > $HOME/.kopid/config/genesis.json
curl -Ls https://snapshot.sychonix.com/testnet/kopi/addrbook.json > $HOME/.kopid/config/addrbook.json
- Configure Seeds and Peers
SEEDS="cfef0546b0621abba2818874a2935507878dbc80@kopi-testnet.sychonix.com:11656"
PEERS="$(curl -sS https://rpc-kopi-t.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^seeds *=.*|seeds = '"$SEEDS"'|; s|^persistent_peers *=.*|persistent_peers = '"$PEERS"'|" $HOME/.kopid/config/config.toml
- Update Port Configuration
sed -i -e "s%:1317%:11617%; s%:8080%:11680%; s%:9090%:11690%; s%:9091%:11691%; s%:8545%:11645%; s%:8546%:11646%; s%:6065%:11665%" $HOME/.kopid/config/app.toml
sed -i -e "s%:26658%:11658%; s%:26657%:11657%; s%:6060%:11660%; s%:26656%:11656%; s%:26660%:11661%" $HOME/.kopid/config/config.toml
- Customize Pruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "17"|' \
$HOME/.kopid/config/app.toml
- Set Minimum Gas Price, Enable Prometheus, and Disable the Indexer
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ukopi\"|" $HOME/.kopid/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.kopid/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.kopid/config/config.toml
- Create Service File
sudo tee /etc/systemd/system/kopid.service > /dev/null <<EOF
[Unit]
Description=kopi testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which kopid) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
- Download Current Snapshot
curl "https://snapshot.sychonix.com/testnet/kopi/kopi-snapshot.tar.lz4" | lz4 -dc - | tar -xf - -C "$HOME/.kopid"
- Enable the Service and Start the Node
sudo systemctl daemon-reload
sudo systemctl enable kopid.service
sudo systemctl restart kopid.service && sudo journalctl -u kopid.service -f --no-hostname -o cat
Upgrade
No chain upgrades scheduled yet.
Peers
PEERS="$(curl -sS https://rpc-kopi-t.sychonix.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kopid/config/config.toml
Snapshot
Height: Loading... | Last updated: Loading... | Size: Loading...
- Install dependencies, if needed
sudo apt update && sudo apt install aria2
- Stop Service
sudo systemctl stop kopid
- Back up priv_validator_state.json
cp $HOME/.kopid/data/priv_validator_state.json $HOME/.kopid/priv_validator_state.json.backup
- Reset the data
kopid tendermint unsafe-reset-all --home $HOME/.kopid --keep-addr-book
- Download Snapshot
aria2c -x 16 -s 16 -o kopi-snapshot.tar.lz4 https://snapshot.sychonix.com/testnet/kopi/kopi-snapshot.tar.lz4
lz4 -dc kopi-snapshot.tar.lz4 | tar -xf - -C $HOME/.kopid
rm -v kopi-snapshot.tar.lz4
- Restore Backup and Restart Service
mv $HOME/.kopid/priv_validator_state.json.backup $HOME/.kopid/data/priv_validator_state.json
sudo systemctl restart kopid && sudo journalctl -u kopid -f -o cat
Addrbook
curl -Ls https://snapshot.sychonix.com/testnet/kopi/addrbook.json > $HOME/.kopid/config/addrbook.json
Genesis
curl -Ls https://snapshot.sychonix.com/testnet/kopi/genesis.json > $HOME/.kopid/config/genesis.json
API
api-kopi-t.sychonix.com
RPC
rpc-kopi-t.sychonix.com
CLI Cheatsheet
Wallet Management
kopid keys add
kopid keys add --recover
kopid keys list
kopid keys delete
kopid keys export
kopid keys import .backup
kopid q bank balances $(kopid keys show -a)
Validator Management
Moniker
Identity
Details
Website
Security Contact
Amount
kopid tx staking create-validator \ --amount=1000000ukopi \ --pubkey=$(kopid tendermint show-validator) \ --moniker="" \ --identity="" \ --details="" \ --website="" \ --security-contact= \ --chain-id=kopi-test-5 \ --commission-rate=0.05 \ --commission-max-rate=0.20 \ --commission-max-change-rate=0.01 \ --min-self-delegation=1 \ --gas-prices 0ukopi \ --gas "auto" \ --gas-adjustment "1.5" \ --from wallet \ -y
kopid tx staking edit-validator \
--new-moniker="" \
--identity="" \
--details="" \
--website="" \
--chain-id=kopi-test-5 \
--commission-rate=0.07 \
--from wallet \
--gas=auto \
--gas-prices 0ukopi \
-y
kopid tx slashing unjail --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5
kopid query slashing signing-info $(kopid tendermint show-validator)
kopid q staking validator $(kopid keys show wallet --bech val -a)
kopid q bank denom-metadata -oj | jq
kopid status 2>&1 | jq -r '.SyncInfo.catching_up // .sync_info.catching_up'
kopid status 2>&1 | jq -r '.SyncInfo.latest_block_height // .sync_info.latest_block_height'
Token Management
kopid tx distribution withdraw-all-rewards --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx distribution withdraw-rewards $(kopid keys show wallet --bech val -a) --commission --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx staking delegate $(kopid keys show wallet --bech val -a) 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx staking redelegate $(kopid keys show wallet --bech val -a) 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx staking delegate 1000000ukopi --from --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx staking unbond $(kopid keys show wallet --bech val -a) 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
kopid tx bank send wallet 1000000ukopi --from wallet --chain-id kopi-test-5 --gas auto --gas-adjustment 1.5 --gas-prices 0ukopi -y
Service Management
sudo systemctl daemon-reload
sudo systemctl enable kopid
sudo systemctl disable kopid
sudo systemctl start kopid
sudo systemctl stop kopid
sudo systemctl restart kopid
sudo systemctl status kopid
sudo journalctl -u kopid -f --no-hostname -o cat
CUSTOM_PORT= sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.kopid/config/config.toml sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%" $HOME/.kopid/config/app.toml
cd $HOME && sudo systemctl stop kopid && sudo systemctl disable kopid && sudo rm /etc/systemd/system/kopid.service && sudo systemctl daemon-reload && sudo rm -rf $(which kopid) && sudo rm -rf $HOME/.kopid && sudo rm -rf $(which kopid)