Setting up the Edge Node

Windows

  1. You need to install GitBash” and β€œgo” for windows. If you do already have it, start GitBash as an administrator and proceed to step 3. To download GitBash navigate to gti.scm.com/download/win to download the latest version.

  1. Head over to go.dev/doc/install and download the latest version of go. Once finished, start GitBash as an administrator.

  1. We need to add a software package manager chocolatey-

(a) Please enter the following commands.

$ git config --global user.name "Linus Torvalds"

$ git config --global user.email "Linus@tux.com"

Replace the username as well as email-id with your own.

(b) Press start and type in PowerShell, right-click, and select run as an administrator.

With PowerShell, you must first ensure that Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.

Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.

(c) Now run the following command:

Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

(d) Once finished proceeding with the commands below.

$ choco install make

$ choco install mingw

If you get prompted to run the Script type in A + enter (needs to be a capital letter).

  1. Close both PowerShell as well as GitBash and then reopen GitBash again by right-clicking the icon and selecting run as an administrator, then execute the below command.

git clone https://github.com/scriptnetwork/Node-Network-guide.git

$GOPATH/src/github.com/scripttoken/script

  1. Navigate to the very same folder in which you cloned the files. The normal path should be β€œ$GOPATH/src/github.com/scripttoken/script”. Run the following command.

cp -r ./integration/scriptnet ../scriptnet

  1. If you are encountering any issues with this next command, please close and reopen GitBash again as an administrator.

make install (It will generate two binaries i.e., script.exe and scriptcli.exe)

  1. Switch to "bin" directory i.e $GOPATH/bin/ where your binary has been generated using the above command. Navigate to the bin folder by typing β€œcd $GOPATH/bin”.

  2. This step requires you to start 3 separate GitBash sessions. Do so by pressing ALT + F2 or by pressing the logo in the top left corner and selecting a new window. In each window execute the respective commands to start node and cli in the background session. If windows defender pops up it is OK to allow traffic from Script.

First window

script.exe start --config=../src/github.com/scripttoken/scriptnet/node --password={ENTER_PWD}

Delete the brackets and ENTER_PWD, select a strong password and press enter to start the node.

Second window

scriptcli.exe daemon start --port=16889

Third window

scriptcli.exe query Lightning

The output in the last window shows the node address and summary address that you are going to use in the following steps.

  1. Now, navigate to wallet.script.tv/ and create a new wallet if you don’t already have one already. To be able to stake you would need to have at least 10001 SCPT in your wallet.

(a) Enter the wallet application by using the Keystore file that is stored on your computer locally and the password you have set.

(b) Once signed in press stake on the left-hand side and then click on the deposit stake option. Select lightning stake.

(c) Now enter the node address which you have got from the previous command in step 8 and enter 10000 SCPT.

(d) Enter the wallet password to confirm the transaction.

Now open another tab in your browser, navigate to token.script.tv/download, and select Windows to download the Edge Node application. Follow the setup guide instructions and open the application once installed. Click activate wallet on the left-hand side and enter the required node address as well as summary details that you have got from step 4, check the T&C box and proceed, toggle the button to on in order to activate the Edge node. The transcoding jobs will start and you will be earning rewards.

Linux

  1. Start by heading over to the terminal and running the respective commands.

sudo apt-get update

sudo apt-get upgrade -y

sudo apt-get install build-essential -y

sudo apt-get install git

sudo apt install tmux

  1. Install Go

wget https://go.dev/dl/go1.19.2.linux-amd64.tar.gz

sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.2.linux-amd64.tar.gz

3. Adding the PATH variable

Add /usr/local/go/bin to the PATH environment variable. You can do so by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation):

sudo vim .profile

export PATH=$PATH:/usr/local/go/bin

Please note: Changes made to a profile file may not apply until the next time you sign in your computer. To apply the changes immediately, run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.

Verify that you've installed Go by typing in the following command in terminal: go version

  1. Build and Install

Next, clone this repo into your $GOPATH. The path should look like this:

$GOPATH/src/github.com/scripttoken/script

sudo git clone https://github.com/scriptnetwork/Node-Network-guide.git

$GOPATH/src/github.com/scripttoken/script

export SCRIPT_HOME=$GOPATH/src/github.com/scripttoken/script

cd $SCRIPT_HOME

Now, execute the following commands to build the Script binaries under $GOPATH/bin. Two binaries script and scriptcli are generated.

sudo cp -r ./integration/scriptnet ../scriptnet

sudo chmod -R 777 /usr/local/go

git config --global --add safe.directory /usr/local/go/src/github.com/scripttoken/script

make install

  1. This step requires you to start 3 separate terminal sessions or run all three commands from the same terminal by creating a session using a background service called tmux.

First terminal or tmux session

tmux new -s node

/usr/local/go/bin/script start --config=../scriptnet/node

Second terminal or tmux session

tmux new -s cli

/usr/local/go/bin/scriptcli daemon start --port=16889

Third terminal or tmux session

tmux new -s detail

/usr/local/go/bin/scriptcli query Lightning

Please note - The output in the last session, shows the node address and summary address which you are going to use in the following steps. To exit any of the tmux session press ctrl+b and d. To enter any created tmux session press "tmux a -t SESSION_NAME"

  1. Now open your browser, navigate to wallet.script.tv/, and create a new wallet if you haven't done so already. To be able to stake you would need to have at least 10001 SCPT in your wallet. Please open a ticket in our discord to receive tokens.

(a) Enter the wallet application by using the Keystore file that is stored on your computer locally and the password you have set.

(b) Once signed in press stake on the left-hand side and then select the deposit stake option. Click on lightning stake.

(c) Now enter the node address which you have got from the previous command in step 4 and enter 10000 SCPT.

(d) Enter the wallet password to confirm the transaction.

Now open another tab in your browser, navigate to token.script.tv/download, and select linux to download the Edge Node application. Follow the setup guide instructions and open the application once installed. Click activate wallet on the left-hand side and enter the required node address as well as summary details that you have got from step 4, check the T&C box and proceed, toggle the button to on in order to activate the Edge node. The transcoding jobs will start and you will be earning rewards.

MacOS

  1. Go to go.dev/doc/install and download the latest version of go.

Open the package file you downloaded and follow the prompts to install Go. The package installs the Go distribution to /usr/local/go. The package should put the /usr/local/go/bin directory in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect.

Verify that you've installed Go by opening a command prompt and typing the following command: go version

  1. Install brew package by typing in the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Note - To continue and finish the installation execute the two echo commands which will be printed on the terminal while executing the above command.

Continue by typing respective commands

brew install make

brew install mingw-w64

  1. Build and Install

Next, clone this repo into your $GOPATH. The path should look like this: $GOPATH/src/github.com/scripttoken/script

git clone https://github.com/scriptnetwork/Node-Network-guide.git $GOPATH/src/github.com/scripttoken/script

export SCRIPT_HOME=$GOPATH/src/github.com/scripttoken/script

cd $SCRIPT_HOME

Now, execute the following commands to build the Script binaries under $GOPATH/bin. Two binaries script and scriptcli are generated.

cp -r ./integration/scriptnet ../scriptnet

chmod -R 777 /usr/local/go

git config --global --add safe.directory /usr/local/go/src/github.com/scripttoken/script

make install

  1. Now for this step, you are going to have to start 3 terminal sessions. In each terminal execute respective commands to start node and cli in the background session.

First Terminal

/usr/local/go/bin/script start --config=../scriptnet/node

Second Terminal

/usr/local/go/bin/scriptcli daemon start --port=16889

Third Terminal

/usr/local/go/bin/scriptcli query Lightning

*Note - The output in the last terminal or session shows the node address and summary address in which you are going to use in the following steps.

  1. Now open your browser, navigate to wallet.script.tv/, and create a new wallet if you haven't done so already. To be able to stake you would need to have at least 10001 SCPT in your wallet.

(a) Enter the wallet application by using the Keystore file that is stored on your computer locally and the password you have set.

(b) Once signed in press stake on the left-hand side and then select the deposit stake option. Click on lightning stake.

(c) Now enter the node address which you have got from the previous command in step 5 and enter 10000 SCPT.

(d) Enter the wallet password to confirm the transaction.

Now open another tab in your browser, navigate to token.script.tv/download, and select Mac to download the Edge Node application. Follow the setup guide instructions and open the application once installed. Click activate wallet on the left-hand side and enter the required node address as well as summary details that you have got from step 4, check the T&C box and proceed, toggle the button to on in order to activate the Edge node. The transcoding jobs will start and you will be earning rewards.

Last updated