Skip to content

Install

Website

Twitter

Discord

GitHub

Explorer

dApp

Endpoints | Genesis | Addrbook

Chain ID: luwak-1 Latest Version: v7 Custom Port: 159
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
MONIKER="YOUR_MONIKER_NAME"

Update system and install tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu bashtop -y

Install GO

cd $HOME
version="1.23.2"
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

Install Cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Download and install

cd $HOME
git clone https://github.com/kopi-money/kopi.git
cd kopi
git checkout v7
make install
kopid version --long | grep -e commit -e version

Config and Init node

# Set node configuration
kopid config set client chain-id luwak-1
kopid config set client keyring-backend file
kopid config set client node tcp://localhost:15957
# Initialize node
kopid init $MONIKER --chain-id luwak-1
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.org/mainnet/kopi/genesis.json > $HOME/.kopid/config/genesis.json
curl -Ls https://snapshots.moonbridge.org/mainnet/kopi/addrbook.json > $HOME/.kopid/config/addrbook.json
# Set seeds and peers
SEEDS=""
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kopid/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ukopi\"|" $HOME/.kopid/config/app.toml
# Setting 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-interval *=.*|pruning-interval = "19"|' $HOME/.kopid/config/app.toml
# Adjusting config files
sed -i -e 's/timeout_propose = "3s"/timeout_propose = "300ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "50ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_prevote = "1s"/timeout_prevote = "100ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "50ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_precommit = "1s"/timeout_precommit = "100ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "50ms"/g' ${HOME}/.kopid/config/config.toml
sed -i -e 's/timeout_commit = "5s"/timeout_commit = "500ms"/g' ${HOME}/.kopid/config/config.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.kopid/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.kopid/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:15958\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:15957\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:15960\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:15956\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):15956\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":15966\"%" $HOME/.kopid/config/config.toml
sed -i -e "s%:1317%:15917%g; s%:8080%:15980%g; s%:9090%:15990%g; s%:9091%:15991%g; s%:8545%:15945%g; s%:8546%:15946%g; s%:6065%:15965%g" $HOME/.kopid/config/app.toml

Configure Cosmovisor

mkdir -p $HOME/.kopid/cosmovisor/genesis/bin
mkdir -p $HOME/.kopid/cosmovisor/upgrades
cp $HOME/go/bin/kopid $HOME/.kopid/cosmovisor/genesis/bin/

Create service

sudo tee /etc/systemd/system/kopid.service > /dev/null << EOF
[Unit]
Description=Kopi Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_NAME=kopid"
Environment="DAEMON_HOME=$HOME/.kopid"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable kopid

Download latest snapshot

curl -o - -L https://snapshots.moonbridge.org/mainnet/kopi/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.kopid
[[ -f $HOME/.kopid/data/upgrade-info.json ]] && cp $HOME/.kopid/data/upgrade-info.json $HOME/.kopid/cosmovisor/genesis/upgrade-info.json

Start service and check the logs

sudo systemctl start kopid && sudo journalctl -u kopid -f --no-hostname -o cat

Create wallet

kopid keys add wallet

Check wallet balance

kopid q bank balances $(kopid keys show wallet -a)

Create a validator.json

Get pubkey

kopid comet show-validator
cd $HOME/.kopid/config
nano validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000ukopi",
"moniker": "YOUR_MONIKER_NAME",
"identity": "YOUR_KEYBASE_ID",
"details": "YOUR_DETAILS",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_EMAIL_ADDRESS",
"commission-rate": "0.05",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}

Create validator

kopid tx staking create-validator $HOME/.kopid/config/validator.json \
--chain-id luwak-1 \
--from wallet \
-y

Delete node

sudo systemctl stop kopid
sudo systemctl disable kopid
sudo rm -rf /etc/systemd/system/kopid.service
sudo systemctl daemon-reload
sudo rm -f $(which kopid)
sudo rm -rf $HOME/.kopid
sudo rm -rf $HOME/kopi