Update Skywire discovery address - SkycoinProject/skywire GitHub Wiki

skywire logo

Update Skywire discovery address guide

This guide assumes that you have read and understood the readme.md and installed Skywire using one of the several guides on this wiki. This guide also asumes that you've installed skywire on an armbian image and have the $GOPATH set to /root/go or it is installed on a raspberry image and have the $GOPATH set to /home/pi/go

Table of Contents


Introduction

Recently we had to migrate the discovery node and in consequence there is a new discovery address for testnet that we all need to use in our skywire nodes. This guide outlines the necessary steps to update the descovery address.

Requirements

  • Installed Skywire Software on the board and image of your choice.
  • Stop the current skywire node and manager processes (if they are already running).
  • If you are using a Windows based machine make sure you have putty installed.

Official miners discovery address update

If you are running and official miner that uses the official images you'll just have to update each node to get the new discovery address from the latest commit of the repo and reboot them one by one through the web UI.

This section will be splited in two as there are people who upgraded the os to Debian Stretch and the Skywire software to the new UI and others that are still using the old UI and Debian Jessie.

To determine which UI you are using please visit this page Skywire Manager Web Interface and you'll notice that the old UI is shown as User Interface V1 and the new UI is shown as User Interface V2.

New UI discovery address update

For users that have the new UI to change the discovery address you can simply use the Check Update button from the UI of each node then after it check for the latest update select the Install Update button and after the update is done, most probably you'll receive an error but just disregard it, close the Install Update window and reboot the node using the Reboot button as shown in the picture below.

listroot

Old UI discovery address update

For the old UI or User Interface V1 you need either to change the discovery address manually on each node in the start script, either upgrade the OS to Debian Stretch and afterwards update the Skywire software to the latest commit.

Change the discovery address manually

If you plan on using the old interface for a while you'll need to change the discovery address on all the nodes found in the /etc/rebuild.sh file. Connect on the desired node via putty (on Windows), ssh Terminal ssh root@yournodeIP (on Linux or MAC) and issue the following commands, first one will change the address and the second will reboot the node:

sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /etc/rebuild.sh

reboot

After you've done this connect on the next node and do the same commands until you've done the change on all the nodes.

Upgrade OS and UI

First upgrade the OS from Debian Jessie to Debian Stretch by connecting on each node via putty (on Windows), ssh Terminal ssh root@yournodeIP (on Linux or MAC) and issue the following commands:

sed -i 's/jessie/stretch/g' /etc/apt/sources.list

apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

And afterwards use this cmmand to check the debian version that is indeed v9 stretch:

cat /etc/*-release

After the upgrade of the OS is done is time to update the Skywire to the latest commit as described here One Time Upgrade.

!!! NOTICE: If you encounter any error or strange message during the OS and/or Skywire update or you need support please contact asxtree, K or ask in Skywire on Telegram !!!

DIY miners discovery address update

Stop the processes

First step before changing the discovery address is to stop the manager and node processes and we covered below the actions that need to be taken to stop the processes for most of the Skywire installation guides.

Skywire Github Readme Run Skywire

  • Skywire Readme If you are already running skywire manager and node processes manually as described in the installation steps from Skywire Github page you'll need to stop the node process on the desired nodes following these steps found here node process.

If you are using an autostart scripts from these guides, follow the steps described to stop them.

Skywire Github Wiki Systemd Service Guide

To stop the Skywire systemd manager service do as follows only on the manager board:

systemctl stop skywire-manager.service

To stop the Skywire systemd node service do as follows only on all boards:

systemctl stop skywire-node.service

DIY Miner - A complete guide for Hardware/Software configuration

To stop asxtree's systemd node service do as follows only on all boards:

systemctl stop skynode.service

Raspberry Pi Sky Miner Setup for noobs

To stop adhaelon's systemd manager service do as follows only on the manager board:

sudo systemctl stop manager.service

To stop adhaelon's systemd node service do as follows only on all boards (on the manager board might not be needed):

sudo systemctl stop secondary.service

Build the Ronny’s Cheap Man’s Skyminer

To stop the manager process if you followed Ronny’s Cheap Man’s Skyminer guide follow these steps, manager process and to stop the node process follow the steps decribed here, node process.

Change the discovery address

The new discovery address that we will further use in testnet is discovery.skycoin.net:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 so if you start manually the skywire node service just use the new address in the start command as described in [Start back the process]

Change address if you are using the Skywire Systemd Service

If you are using the Skywire systemd service, for the manager node only, change the address in the skywire file found in /etc/default/ like:

sudo sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /etc/default/skywire

For the rest of the nodes, ecluding the manager node, change the address in the node_start file found in $GOPATH/src/github.com/skycoin/skywire/static/script/ like:

sudo sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' $GOPATH/src/github.com/skycoin/skywire/static/script/node_start

Change address if you are using the systemd service from DIY Miner - A complete guide for Hardware/Software configuration

If you are using the systemd service that you've configured if you followed the DIY Miner - A complete guide for Hardware/Software configuration guide found on skywug.net, for all the nodes, change the address in the skynode.service file found in /etc/systemd/system like:

sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /etc/systemd/system/skynode.service

Reload the services with:

systemctl daemon-reload

Change address if you are using the systemd service from Raspberry Pi Sky Miner Setup for noobs

If you are using the autostart scripts from the Raspberry Pi Sky Miner Setup for noobs guide, for the manager node only change the address in the startmanager.sh file found in /home/pi/ like:

sudo sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /home/pi/startmanager.sh

For the rest of the nodes, ecluding the manager node, change the address in the startsecond.sh file found in /home/pi/ like:

sudo sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /home/pi/startsecond.sh

Change address if you are using the autostart script from Build the Ronny’s Cheap Man’s Skyminer

If you are using the systemd service that you've configured if you followed the Build the Ronny’s Cheap Man’s Skyminer guide found on Medium, for all the nodes, change the address in the MyScript.sh file found in /etc/init.d/ like:

sudo sed -i 's/034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68/028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243/g' /etc/init.d/MyScript.sh

Start the processes

To simply start the node process manually if you are not using any systemd service or autostart scripts, use the following command on the nodes you want to start back the process with the new discovery address:

cd $GOPATH/bin

nohup ./skywire-node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address discovery.skycoin.net:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001 > /dev/null 2>&1 &cd /

Start node process for Skywire Systemd Service

To start the Skywire systemd manager service do as follows only on the manager board:

sudo systemctl start skywire-manager.service

To start the Skywire systemd node service do as follows only on node boards, excluding the manager board:

sudo systemctl start skywire-node.service

Start node process for systemd service from DIY Miner - A complete guide for Hardware/Software configuration guide

To start asxtree's systemd node service do as follows only on all boards:

systemctl start skynode.service

Start node process for systemd service from Raspberry Pi Sky Miner Setup for noobs guide

To start adhaelon's systemd manager service do as follows only on the manager board:

sudo systemctl start manager.service

To start adhaelon's systemd node service do as follows only on node boards, excluding the manager board:

sudo systemctl start secondary.service

Start node process for autostart script from Build the Ronny’s Cheap Man’s Skyminer guide

To start the node process on the board you've installed using the Build the Ronny’s Cheap Man’s Skyminer guide, you just need to reboot the board with the following command:

sudo reboot

!!! NOTICE: If you encounter any error or strange message during this discovery node address update or you need support please contact asxtree, K or ask in Skywire on Telegram !!!