Validator Node setup

Windows

  1. You need to install โ€œgit bashโ€ and โ€œgoโ€ for windows. If you already have it installed, start git bash as an administrator and proceed to step 3. To download git bash please open your browser and go to gti.scm.com/download/win to download the latest version.

  2. Go to https://go.dev/doc/install and download the latest version of go. When finished, start gitbash as an administrator.

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

(a) Please enter the following command.

$ git config --global user.name "Emma Paris"

$ git config --global user.email "eparis@atlassian.com"

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

(b) Now press start and type in powershell, right click on it 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.

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'))

Enter these commands below.

(c) choco install make

(d) choco install mingw

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

4. Close both powershell and gitbash and then reopen gitbash again by right clicking the icon and select 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โ€. Type โ€œcd go/src/github.com/scripttoken/scriptโ€ and press enter to get there, then run the following command.

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

  1. Now execute the following command. If you are encountering any issues, please close and reopen git bash again as an administrator. make install (It will generate two binaries i.e., script.exe and scriptcli.exe)

  2. 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โ€.

  3. Now for this step you are going to have to start 3 git bash sessions. Do so by pressing ALT + F2 or by pressing the git bash logo in the top left corner and selecting a new window. In each window execute respective commands to start node and cli in background session. If windows defender pops up it is OK to allow the 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

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

  1. Now open your browser and navigate to https://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 1000001 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 deposit stake option. Click on validator stake.

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

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

  1. Now copy your wallet address and search on explorer to check and verify validator transaction history under your wallet history record.

Linux

  1. Pre-requisites

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

Add /usr/local/go/bin to the PATH environment variable.

You can do this 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

*Note: Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just 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 opening a command prompt and typing the following command:

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. Now for this step you are going to have to start 3 terminal or run all three command on single terminal by creating session using 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

*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. *Note - To exit from any tmux session press ctrl+b and d. And to enter in any created tmux session press "tmux a -t SESSION_NAME"

  1. Now open your browser and navigate to https://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 5000001 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 deposit stake option. Click on validator stake.

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

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

  1. Now copy your wallet address and search on explorer to check and verify validator transaction history under your wallet history record.

MAC

  1. Go to https://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 or dependencies:

/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 command which will be printed on terminal while execution of above command.

  1. Pre-requisites

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 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 and navigate to https://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 1000001 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 deposit stake option. Click on validator stake.

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

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

  1. Now copy your wallet address and search on explorer to check and verify validator transaction history under your wallet history record.

Last updated