# Miner Upgrade Tutorial

TOP mainnet is now fully upgraded to 1.6.0, 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.6.0/topio-1.6.0-release.tar.gz -O topio-1.6.0-release.tar.gz && tar zxvf topio-1.6.0-release.tar.gz && cd topio-1.6.0-release && sudo bash install.sh && source /etc/profile && bash set_topio.sh && source ~/.bashrc && ulimit -n 65535 && topio -v
    topio node startnode
    

    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.6.0
      git commit info: d42df60b
      git submodule: xtopcom/xbase:9bd0bf8|xtopcom/xdepends/googletest:ec44c6c1
      build date: Aug 22 2022 13:00:48
      build options: release
      MD5:f5e831f0038a036f5646c5f25c07e482
      
    • Restart the node process. 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.

  3. (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.

  4. (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.