Node9X Service
  • 🍄MAINNET
    • 🟢Kopi Protocol
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade (V11)
      • 🪢Cosmovisor
      • 🛰️Command
  • 🚀Testnet
    • 🧬Explorer
    • 🟢Native
      • ⚙️Installation
    • 🟢XRPL EVM
      • 💾Service & Snapshot
      • ⚙️Installation
      • 🕹️Command
    • 🟢Pipe Network
      • Installation
      • Upgrade
    • 🟢Pell
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade (v1.1.1)
      • 🕹️Command
    • 🟢Structs
      • 💾Service & Snapshot
      • ⚙️Installation
      • 🕹️Command
    • 🟢Prysm
      • 🛰️Service & Snapshot
      • ⚙️Installation
      • 💾Command
    • 🟢Zenrock
      • 💾Service & Snapshot
      • ⚙️Installation
      • ⛓️Upgrade ( v6.3.3)
      • 🕹️Cosmovisor
      • 🛰️Command
      • ⚙️Sidecar (✔️Oracle)
        • 🔗Upgrade
    • 🟢Story Protocol
      • 💾Service & Snapshot
      • ⚙️Installation (Odyssey)
      • ⛓️Upgrade (v0.13.1)
        • 🪢Upgrade (v0.13.0)
      • ⛓️Cosmovisor
      • 🛰️Command
    • 🟢0G Chain
      • Service & Snapshot
      • Installation
        • Cosmovisor
      • Commands
      • ☑️0G Storage Node
        • Upgrade (v0.7.3)
      • ☑️0G Storage KV
      • ☑️0G DA Node
        • Update
      • ☑️0G DA Client
    • 🟢Airchains
      • 💾Service & Snapshot
      • ⚙️Installation
        • 🪢Cosmovisor
        • 🔺EVM ZK Rollup
      • 🕹️Commands
      • ⛓️Upgrade
    • 🟢Allora
      • 🔺Workers
        • Create tool and worker wallet
        • Install Worker 1
        • Install Worker 2
        • Troubleshooting
        • Script for checking worker
      • Another method
      • Service
      • Installation By Dock (Recommend)
      • Installation
      • Snapshot & State sync
      • Useful commands
    • 🟢Hedge Block
      • Service
      • Installation
      • Commands
    • 🟢Dill Chain
      • Usage Commands
    • 🟢Fiamma Chain
      • 🥦Services & Snapshot
      • ⚙️Installation
      • 🛰️Usage Command
    • 🟢Elixir Testnet
      • ⚙️Installation
    • 🟢Chainbase
      • ⛓️Installation
    • 🔘AXONE Protocol
      • 💾Service & Snapshot
      • ⚙️Installation
    • 🔘Symphony
      • 🔌Installation
      • 🥦Fresh Peer
    • 🔘Empeiria
      • Installation
      • Usage Command
Powered by GitBook
On this page
  • Auto upgrade
  • Make the script executable:
  • Run the script:

Was this helpful?

  1. MAINNET
  2. Kopi Protocol

Upgrade (V11)

Don't upgrade before height3943500

sudo systemctl stop kopid
cd $HOME
wget -O kopid https://github.com/kopi-money/kopi/releases/download/v11/kopid-v11-linux-amd64
chmod +x $HOME/kopid
mv $HOME/kopid $HOME/go/bin/
sudo systemctl restart kopid && sudo journalctl -u kopid -f

Auto upgrade

#Create new tmux
tmux new -s kopi_upgrade
nano upgrade_node.sh
#!/bin/bash

# Ki?m tra quy?n root
if [[ $EUID -ne 0 ]]; then
    echo "This script must be run as root!" >&2
    exit 1
fi

# T?i phiên b?n m?i nh?t c?a kopid
cd "$HOME" && wget -O kopid https://github.com/kopi-money/kopi/releases/download/v11/kopid-v11-linux-amd64

# Hi?n th? phiên b?n v?a t?i
echo "Latest Version:"
chmod +x $HOME/kopid && "$HOME/kopid" version || echo "Error: Unable to retrieve latest version"

# Hi?n th? phiên b?n hi?n t?i
echo "Current Version:"
/root/go/bin/kopid version || echo "Error: Unable to retrieve current version"

# Ð?i block height d?t 3943500
echo "Waiting until block 3943500..."
for (( ;; )); do
    # L?y c?ng RPC t? config.toml
    rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.kopid/config/config.toml" | cut -d ':' -f 3)
    
    # L?y block height hi?n t?i
    height=$(curl -s localhost:$rpc_port/status | jq -r .result.sync_info.latest_block_height)
    echo "Current Block Height: $height"
    
    # Ki?m tra n?u height d?t 3943500
    if (( height == 3943500 )); then

        # Di chuy?n kopid vào dúng thu m?c
        mv "$HOME/kopid" /root/go/bin/
        sudo systemctl daemon-reload
        echo "Upgrading kopid to v11..."
        /root/go/bin/kopid version && echo "Your node successfully upgraded to v11!" || echo "Error: Unable to verify version"
        sudo systemctl restart kopid
        break
    fi
    
    # Ch? 5 giây tru?c khi ki?m tra l?i
    sleep 5
done

Make the script executable:

chmod +x upgrade_node.sh

Run the script:

sudo ./upgrade_node.sh
PreviousInstallationNextCosmovisor

Last updated 3 months ago

Was this helpful?

🍄
🟢
⛓️