Script.tv crypto network is based on nodes and made only by the aggregation of more and more nodes, we call them lightning nodes because they are responsible for block finalization and blockchain settlement.
The accountability is trusted because the network is resilient against attacks or games executed by evil nodes without single-points-of-failure.
Blockchain implies nascent technology that leverages untrusted nodes that are publicly executing a distributed consensus algorithm in order to amazingly form a trustable, resilient and censorship resistant settlement system.
Benefits of running nodes: * Node runners are the real actors in web3. * Nodes are your tool for participating in consensus rounds, obtaining rewards based on staked amounts. * Nodes can accept delegation requests, for which users that are not running nodes can participate in consensus in a profit-share model. * Control/automate anything. * Use/customize your own wallet backend/frontend, e.g. automating interations with other’s wallets. * Use/customize your own blockchain explorer backend/frontend.
For improved privacy run your node in trusted hardware, e.g. the preferred choice for privacy-exigent users is to run the node in dedicated hardware. A VM in a datacenter or computer at home is a good-enough option for many.
Node Hardware/OS requirements
16 Gb HD, 2 cores, 8 GB Ram
Debian 12 GNU/Linux Operating System.
How To Start Running a Lightning Node
The Easiest way: NaaS
Using a Node-as-a-Service (NaaS) service provider consists in delegating all technical aspects to a service provider.
Nodeops providers who support Script Network nodes:
https://nodeops.xyz
The 1liner Installer
You would allocate a debian Operating system and run the 1-liner installer, converting it into a node in minutes.
The downloads screen provides access to different method for running a node.
Support for node installations has been discontinued for platforms Windows and Mac.
ssh as root to your node. This action is perfomed ideally by muscle memory, but much better providing seamless experience is to set up passwordless authentication
switch to user ‘stv’ and go to home directory /home/stv (stv)
run the program stv
Automatic software updates
Automatic software updates feature is enabled by default. It can be disabled deleting the file /etc/cron.d/script_tv_updates and restating cron: systemctl restart cron
The document can also be found in the node at /var/script_tv/release_notes.md
Node bash shell
About GNU/Linux
Main SYSOP interface: Text Command-line console, also known as shell.
Linux prompts. Line Prefixes is given by the computer to indicate us context: user and path
root:~$
SYSOP role operates under user root, and can control all aspects of the operating system. This prompt indicates that our path in the filesystem is /root (root home directory)
root:/home/stv
This prompt indicate we are SYSOP, although our current path in the filesystem is /home/stv (stv user’s home directory again)
stv:~$
Finally, this prompt indicates our hat is Script-Network user and that our current directory is home (/home/stv)
SYSOP/nodeop Role/hat: user root
Available commands for SYSOPs:
* script_tv__uninstall.sh # uninstalls the node software.
* script_tv__test.sh # subsystem health checks
* script_tv__ctl stop # stops all services for node maintenance
* script_tv__ctl start # resume all services after node maintenance
* cat /var/script_tv/data_sheet # Prints Operational Data sheet detailing daemons, URLs and ports used among other technical data.
SCRIPT P2P Network. Nodeops the linux user stv
Changing to user stv from root
root$ stv # change to user stv
Returning back to root user (SYSOP mode)
stv:~$ exit
root$
stv - the CLI Command-Line-Interface to the script network
the stv command is an alias to the program bin/stvtool. It must always been executed as user stv.
Some of the commands are mentioned here below, but the full documentation for stv with all its functions can be found at
As protection against loss, we encourage you to backup the keys directory.
Backup
Use stv backup to produce a downloadable file with your keys: It provides with scp commands ready to be executed in remote computers to fetch the backup, either from inside the LAN or from internet (WAN).
stv:~$ stv backup
Deleting previous backup files
find: unknown predicate `-maxdepth=1'
Copying gov key from /home/stv/script4/gov/key/
Copying wallet keys from /home/stv/script4/wallet/keys/
Backup file available at /tmp/keys_0x8a95c6C85A4eB294c4dCB764867717C7CDf1f072_testnet_user_20241214153540.tgz.
=============================================================================================
Backup file is ready for download:
Retrieve from remote computer using either command:
from LAN: scp root@555.31.13.144:/tmp/keys_0x8a95c6C85A4eB294c4dCB764867717C7CDf1f072_testnet_user_20241214153540.tgz .
from WAN: scp root@555.134.4.199:/tmp/keys_0x8a95c6C85A4eB294c4dCB764867717C7CDf1f072_testnet_user_20241214153540.tgz .
Restore directory (gov key): /home/stv/script4/gov
Restore directory (wallet keys): /home/stv/script4/wallet
=============================================================================================
testnet Faucet:
Obtain testnet tokens from our faucet at script.tv
Every script node has a faucet service that would -kindly- transfer you funds on request. The objective of testnet is to give users the opportunity to test the system using ‘play money’.
However if we run a mainnet node we would use an exchange and buy tokens instead.
Using stv CLI tool you would invoke faucet this way:
stv:~$ stv faucet
Tx 0x0c91f018443240fc69cc438e793045966ef350da22bf19eca9ba6a1746e3b68c
Explorer link: https://explorer-user-testnet.mm.cto.script.tv/txs/0x0c91f018443240fc69cc438e793045966ef350da22bf19eca9ba6a1746e3b68c
Funds will arrive in seconds, check balance.
The command can be repeated as many times as wished up to a balance limit of 1M. We can easy earn tokens this way.
By feeding with tokens your node address your faucet is automatically enabled using it as source of funds and making the faucet service available to other participants in the script network.
Lightning node. Main setup workflow.
Lightning nodes are nodes that cooperate securing and guaranteeing its resilience and reliability, forming a trustable network of untrusted nodes, following the breakthrough by Satoshi Nakamoto.
In order to become one your just installed node must be upgraded.
stv@:~$ stv --lightning faucet
Faucet for lightning.
Tx 0x14f85252c2175e1290c1924b0d4630df6333fa45d22ea5d505128b34a318cb93
Explorer link: https://explorer-user-testnet.mm.cto.script.tv/txs/0x14f85252c2175e1290c1924b0d4630df6333fa45d22ea5d505128b34a318cb93
Funds will arrive in seconds, check balance.
stv@ip-172-31-13-144:~$ stv --lightning buy_license
=========================================
License Purchase
=========================================
You are about to purchase a lightning license for the node address: 0x8a95c6C85A4eB294c4dCB764867717C7CDf1f072.
The license fee of 20000 SCPT will be paid from the address: 0x8a95c6C85A4eB294c4dCB764867717C7CDf1f072.
The transaction will be sent to the Script Network node address: ad5448ab1687f6473715fcb789a2208d14eb9d5e.
continue? [yes|ctrl-c]
yes
Sending 20000 SCPT to ad5448ab1687f6473715fcb789a2208d14eb9d5e
Waiting for transaction to be included in a block
Payment transaction link: https://explorer-user-testnet.mm.cto.script.tv/txs/0x462ff44d189a639e95f1ee69eb92204b142af62ffd8540bae5492c205380eb4d
Waiting 100 seconds...
(Please be patient. Don't cancel the process there are steps needed to be done)
License purchased successfully
Transfer refund in progress. Transaction id: 0x684fe71463e5a4ba12297d0c2002c05bb9e69f857c835a0c8511e0dec39f2c62
Link to the refund transaction: https://explorer-user-testnet.mm.cto.script.tv/txs/0x684fe71463e5a4ba12297d0c2002c05bb9e69f857c835a0c8511e0dec39f2c62
stv:~$ stv print_license
=========================================
LICENSE FOR 0x8a95c6c85a4eb294c4dcb764867717c7cdf1f072
=========================================
| Licensee Address | 0x8a95c6c85a4eb294c4dcb764867717c7cdf1f072 |
| License Type | LN |
| Issuer Address | 0xad5448ab1687f6473715fcb789a2208d14eb9d5e |
| Valid From | 1734192846 |
| Valid To | 4889866446 |
| License Items | LN |
=========================================
Total Licenses: 1
stv:~$ stv --lightning stake
Upgrading node to lightning
Transaction broadcast was successful.
TxHash: 0xc69494cc3e22d1a97132463e2369c4388a586f3777c91dd64230206cf9c4b433
Link to transaction: https://explorer-user-testnet.mm.cto.script.tv/txs/0xc69494cc3e22d1a97132463e2369c4388a586f3777c91dd64230206cf9c4b433
stv@:~$ stv node_status
Node is lightning with 20000.000000000000000000 SCPT staked.
Node status summary: Node is a lightning.
Lightning node. Alternative setup workflow. Node Sale - FlowHale/easeFlow
For those who have purchased a license via https://nodesale.script.tv
the steps for upgrading the node to lighning are:
stv:~$ stv redeem
stv:~$ stv --lightning stake
The redeem function will give you a personalized URL you would use to prove the ownership of the wallet with which you did the purchase. Once verified you would obtain a lighniung license for the node.
stv:~$ stv redeem
==================================================================================
Script Network - Lightning node licensing
Redeem easeFlow Purchase - https://easeflow.io
(Purchase portal link: https://nodesale.script.tv)
==================================================================================
Script Network - Lightning node licensing
=========================================
Its time to redeem your purchase making this node a licensed lightning node staked with 20K SCPT.
A special URL has been generated for you, which is associated with this node.
Please continue the redeem process on the following URL:
https://redeem-mainnet.script.tv/?ssid=XXeinGjNKa2e1aNRBzbObIIdf0vqZ3fKQQ3Kg1yA7nQflg4K2Ke8nzfMUUNgjwDAoj&msg2=yb2niry46wg6b34j5b9p7v
bring the given URL to the browser holding your wallet (the same wallet you used to purchase) https://redeem-mainnet.script.tv/?ssid=XXeinGjNKa2e1aNRBzbObIIdf0vqZ3fKQQ3Kg1yA7nQflg4K2Ke8nzfMUUNgjwDAoj&msg2=yb2niry46wg6b34j5b9p7v
Follow these 3 steps * connect wallet * sign message to prove ownership * back to stv with further steps explained on screen
stv:~$ stv print_license
=========================================
LICENSE FOR 0x8a95c6c85a4eb294c4dcb764867717c7cdf1f072
=========================================
| Licensee Address | 0x8a95c6c85a4eb294c4dcb764867717c7cdf1f072 |
| License Type | LN |
| Issuer Address | 0xad5448ab1687f6473715fcb789a2208d14eb9d5e |
| Valid From | 1734193852 |
| Valid To | 4889867452 |
| License Items | LN |
=========================================
Total Licenses: 1
stv:~$ stv --lightning stake
Upgrading node to lightning
Transaction broadcast was successful.
TxHash: 0xc69494cc3e22d1a97132463e2369c4388a586f3777c91dd64230206cf9c4b433
Link to transaction: https://explorer-user-testnet.mm.cto.script.tv/txs/0xc69494cc3e22d1a97132463e2369c4388a586f3777c91dd64230206cf9c4b433
stv@:~$ stv node_status
Node is lightning with 20000.000000000000000000 SCPT staked.
Node status summary: Node is a lightning.
[Advanced]: Build from sources
For developers, code enthusiasts and those who might not trust our pre-compiled distribution consider visiting our github repository.
RPC API
The following endpoints are available for testnet nodes:
## Subsystem URLS by function:
## Front end
## 1 web-wallet https://wallet-testnet.script.tv
## 2 blockchain explorer https://explorer-testnet.script.tv
##
## Back end
## 1 L1 ethereum bridge https://eth-node-testnet.script.tv/rpc
## 2 L1 script Ledger daemon https://node-testnet.script.tv/rpc
## 3 L1 wallet backend https://backend-wallet-testnet.script.tv/api
## 4 explorer backend https://backend-explorer-testnet.script.tv/api
Subsystem ethereum bridge
endpoint: https://eth-node-testnet.script.tv/rpc
script.CallSmartContract
Simulates the smart contract execution locally without submitting the smart contract transaction to the blockchain. It is useful to evaluate the execution result, calculate the gas cost, etc.
RPC Method: script.CallSmartContract
Query Parameters
sctx_bytes: the signed transaction bytes
Returns
contract_address: the address of the corresponding smart contract
gas_used: amount of gas used for the smart contract execution
vm_error: error returned by the virtual machine.
Testnet Node. Browser. Fund new wallet accout from your faucet
We learnt how to fund the node account in the previous section. In this section we will learn to fund a new account from our own faucet.
Go to https://wallet-testnet. and create a new wallet. Save the keystore in a controlled directory and login.
As you unlock the wallet you’ll see the address at the top of your screen besides the label “My address”. In this example we’ll assume it is 0xeeF1966D1b39E35A08975255138A020239Ea30d6.
Rehearsing
my console-wallet/node address is 0x8d1F3236d790415d631d554091dE7A25913FB561
my browser-wallet address is 0xeeF1966D1b39E35A08975255138A020239Ea30d6
Balances should show up zero.
Click Receive - Faucet, then confirm and wait 15 seconds to see your balance updated.
We can check the node account has been decreased in the same amounts - off by 0.000001 SPAY fees
We can confirm we received 500 SCPT from the browser wallet.
Testnet Node. Shell. Send Funds from your node wallet (the wallet safeguarding the node key).
In order to make transfers from console you’d need to have available the source and recipient addresses and the sequence number of the source account, the account where source funds sit.
In our case, the source address is our node account (0x8d1F3236d790415d631d554091dE7A25913FB561), and the recipient address is our browser-wallet address (0xeeF1966D1b39E35A08975255138A020239Ea30d6).
We obtain the sequence number using the source address:
At this point your browser wallet should show this balances:
With a balance of 10000 SCPT you can stake your lightning node from the browser wallet.
Testnet Node. Browser. Stake your lightning node.
Click on On-Chain Stakes, then Deposit Stake and then continue with Lightning Node.
In the following screen click on the helper button labeled This node to autofill the node fingerprint with the one corresponding to this node (double check URL to make sure which node you’re operating with and which one you want to stake).
Enter 10000 SCPT.
The node fingetprint can alternatively be obtained on the shell in the field “Summary” of the response.
You will verify after a few seconds that sadly your balance has dropped, as it can be seen on your explorer:
We can pay a visit to the explorer to do some verifications.
You can use either your explore (serviced by your node) or any other node including the one behind script.tv. https://explorer-testnet.<your domain|script.tv>/account/0xeeF1966D1b39E35A08975255138A020239Ea30d6
As a result of your transaction you are queued waiting for inclusion.
If you are like me you would need to access such queue and check my address is reflected there.
We would need first to obtain the current_height of the blockchain:
stv:~$ scriptcli query status
{ ...
"current_height": "3713",
... }
With it, we can print the waiting queue querying lcp (Lightning Candidate Pool):
Your secrets, represented by the keystore file, are never transmitted throught the wire. and shall be backed up and kept secret by the user.
Access the wallet using the main menu of the desired network, e.g. Testnet -> Testnet wallet.
Creating a new wallet
New users would need to go through the process of creating a new keystore file.
Click the link “create a wallet” that you’d find at the bottom of the unlock-wallet screen.
Complete a set of easy steps following on-screen instructions.
This process will end-up in a keystore file containig your secret keys.
It’s your responsibility to safeguard this file, keeping it backed up and secret being aware that leaked secrets may produce loss of tokens.
Unlocking your wallet
3 methods are available to get access to your funds.
keystore
You would normally unlock your wallet using your keystore file. In case this file is lost or not accessible the process can alternativamente be fulfilled using two remaining recovery methods.
mnemonics
During the process of creating the keystore a copyable paragraph is also created as an alternative method to unlock the wallet.
Private key
Raw secret keys (found in the keystore file) can be used as an alternative method to unlock the wallet.
Main wallet screen
Informational fields:
At the top of the window is permanently shown the following information together with copy-to-clipboard buttons.
This Node address: is the address of the node providing the backend service.
My address: is your address unlocked from your private keystore
Balances
This screen shows your SCPT and SPAY balances and the history of transactions.
Receive (faucet). (Only Testnet).
Faucet is a testnet-only feature that allows testing applications and mature monet-handling algorithms using play money, instead of risking real-money in the mainnet. Only if your current balance is under 100000 SCP every time to click on Receive button 1000 SCPT and 100 SPAY are transferred to your balances. # 15 seconds after clicling the receive button you balance screen would reflect your new balances and a new entry in the transaction history list.
On-Chain Stakes
Invest in the network. The network will reward you.