# Miner Upgrade Tutorial

TOP mainnet is now fully upgraded to 1.13.1, existing miners need to upgrade TOPIO in order to continue to obtain revenue.

# Upgrade procedure

  1. Open the SSH terminal and connect to your cloud host.

  2. Run the following command in the SSH terminal:

    ps -ef |grep topio|grep -v 'grep'|awk '{print $2}'|xargs kill -9
    wget https://github.com/telosprotocol/TOP-chain/releases/download/v1.13.1/topio-1.13.1-release.tar.gz -O topio-1.13.1-release.tar.gz && tar zxvf topio-1.13.1-release.tar.gz && cd topio-1.13.1-release && sudo bash install.sh && source /etc/profile && bash set_topio.sh && source ~/.bashrc && ulimit -n 65535 && topio -v
    

    The above command contains the following operations:

    • End the old TOPIO process.

    • Download and install the latest version of TOPIO.

    • Verify whether TOPIO is successfully installed. In the returned message, if the following content is included, the installation is successful.

      topio version: 1.13.1
      git commit info: 1f168664d
      git submodule: xbase:4b3b8a4|xdepends/GSL:8e6d4e2|xdepends/boringssl:10fef972e|xdepends/googletest:ec44c6c1|xdepends/gperftools:bf8b714|xdepends/jemalloc:46c0af68|xdepends/libevent:5df3037d|xdepends/xquic:53a8708|
      build date: Jun  5 2023 11:09:25
      build options: release
      MD5:0e571eee1259b581084404c5ef417ae4
      

You should set a mimer key before start the node, otherwise a message "Please set a miner key by command'topio mining setMinerKey'" will be prompted.

Operation details could be found on [Set Miner key]((/en/Tools/TOPIO/CliUsage/mining.md#set-miner-key).

Note:

  1. Public key will be used in the setting process, it could be retrieved from the keystore's "public_key" parameter
  2. You are requested to entered the password, if you didn't set it before, you could enter a space

Don't forget to start the node at last

topio node startnode

In the returned message, if the following content is included, the node process is started successfully.

Start node successfully.

After the upgrade, the CPU usage will reach 100% for a period of time, resulting in a freeze when entering commands in TOPIO. At this time, you can try again after a while.

  1. (Optional) Run the following command to query whether the node has successfully joined the network.

    topio node isJoined
    
    • If it returns topio not ready, TOPIO is temporarily not ready, please retry one minute later.
    • If it returns YES, the node has successfully joined the network. It is now in the node candidate pool, waiting for the election.
    • If it returns No, the node has failed to join the network, possibly due to network failure.

    After 1~2 minutes, you can go to TOP Network Block Explorer TOPScan (opens new window) to check the node election information.

  2. (Optional) You can also run the following command to query the miner registration information.

    Add your TOP account address after this command, separated by space.

    topio mining getMinerInfo
    

    The returned results are as follows:

    • If it returns Not elected to any node role., it means that you have registered as an advanced miner, but have not yet been elected as any node.
    • If it returns Elected as auditor., it means that you have registered as an advanced miner and have been selected as the auditor node.