Service Node Setup

This guide explains step-by-step how to setup a Service Node. Operating a Service Node requires 2500 SCA collateral. This 2500 SCA collateral will still be in your wallet and in your control, but must not be moved or spent in order for the Service Node to remain valid and active. However, you may still use this collateral to participate in staking.

Operating as a Service Node requires two computers:

  • Collateral Computer - The computer will contain the 2500 SCA collateral and does NOT need to remain on with the wallet open unless the 2500 SCA is being staked or you are voting on a proposal.
  • SNode Server Computer - This computer will act as the Service Node and must remain on with the wallet open.

To setup your Service Node, complete the following guides in order:

  1. Collateral Computer Setup
  2. SNode Server Computer Setup
  3. Additional Setup
  4. Service Node Deployment

Collateral Computer Setup

Setup using wallet

Redesign Wallet

  1. Install the Scalaris wallet.
  2. Fully sync the wallet.
  3. Encrypt the wallet.

    Note

    If your SCA funds are located on a different wallet, you will need to first send the 2500 SCA to this collateral Scalaris wallet. Make sure to include a little extra (1 SCA) to have enough to cover transaction fees when continuing this step.

  4. Select Tools from the left menu, then the Debug Console tab. The input field at the bottom is where you will type commands.

  5. Create a new public address for the Service Node. A unique name for this address will need to be provided as an alias. To do this, type getnewaddress [ALIAS] into the debug console with [ALIAS] replaced with the alias you will be using for this address. Example:

    getnewaddress snode1
    

    Create Address

  6. Press the Enter or Return key. The command will appear in the console window followed by a response with the created address.

    Address

  7. Retrieve your private key for the newly created address for backup purposes. Type dumpprivkey [ADDRESS] using the new address and press the Enter or Return key. Example:

    dumpprivkey SZ6CHFUomGnuZxm18EQUvTstxxujJZbk1Q
    

    Warning

    DO NOT share your private keys with others or keep them stored somewhere where others can't find them. Sharing your private keys may result in LOSS OF FUNDS.

  8. Create the input(s) needed for the Service Node collateral using the following command structure (Note: If you already have your inputs created for your Service Node(s) you can skip this step and the next step):

    servicenodecreateinputs [NODE_ADDRESS] [NODE_COUNT] [INPUT_SIZE]
    

      • NODE_COUNT = The number of Service Nodes to create.

      NODE_ADDRESS = The address returned in the previous step.

      • Requires a minimum of 2501 SCA per Service Node (1 SCA extra for transaction fee). * If left blank, it defaults to 1. * Example: 10,001 SCA will be needed to create 4 Service Nodes
    • INPUT_SIZE = The amount of SCA for each collateral input.

      • Must be >= 500 and <= 2500. * If left blank, it defaults to 500. * Example: 1250 will create 2 inputs of 1250 SCA each per Service Node
  9. Type the above command replacing the variables with the respective values in place. See examples below:

    • Single Service Node: servicenodecreateinputs SZ6CHFUomGnuZxm18EQUvTstxxujJZbk1Q
      • Single Service Node (2 inputs): servicenodecreateinputs SZ6CHFUomGnuZxm18EQUvTstxxujJZbk1Q 1 1250
      • Multiple Service Nodes (5k SCA): servicenodecreateinputs SZ6CHFUomGnuZxm18EQUvTstxxujJZbk1Q 2 2500

    Create Inputs

  10. Create a servicenode.conf configuration file. Type servicenodesetup [NODE_ADDRESS] [ALIAS]. An entry will be created in the servicenode.conf for the Service Node(s). Example:

    servicenodesetup SZ6CHFUomGnuZxm18EQUvTstxxujJZbk1Q snode01
    

    Config Setup

  11. Export the servicenode.conf configuration file. Type servicenodeexport [ALIAS] [ENCRYPTION_PASSWORD]. The password is used to encrypt the export data. Example:

    servicenodeexport snode01 supersecretpassword
    

    Config Setup

  12. Copy this output hash for later use.

  13. Restart the Scalaris wallet.
  14. Continue on to SNode Server Computer Setup.

SNode Server Computer Setup

Setup using wallet

Redesign Wallet

  1. Install the Scalaris wallet.
  2. Fully sync the wallet. Encryption is not needed on this wallet since it will not be holding funds.

  3. Navigate to your data directory:

    1. Windows
      C:\Users\[YourUsername]\AppData\Roaming\Scalaris\
      
      Or paste %appdata%\Roaming\Scalaris\ into the file explorer path field.
    2. MacOS
      ~/Library/Application Support/Scalaris/
      
      Open Finder and in the program menu select Go > To Folder and enter the above path.
    3. Linux
      ~/.scalaris/
      
  4. Open the scalaris.conf configuration file.

  5. A file will be opened with your default text editor. Add the following information on new lines:
    server=1
    listen=1
    rpcuser=
    rpcpassword=
    rpcallowip=127.0.0.1
    port=42500
    rpcport=42510
    txindex=1
    
    enableexchange=1
    servicenode=1
    rpcthreads=8
    
  6. Enter a username and password for rpcuser= and rpcpassword=. These should be difficult and secure credentials.
  7. Here the SNode Computer wallet is used to connect to the Scalaris blockchain with the rpcallowip=127.0.0.1 setting (localhost). If you would like to setup a different computer to host the Scalaris blockchain, update the rpcallowip= setting to the IP of that computer.
  8. For best performance, a maxconnections= setting should NOT be specified.
  9. Save and close the scalaris.conf file.
  10. Open the xbridge.conf configuration file (also in the Scalaris data directory).
  11. A file will be opened with your default text editor. Add the following information on new lines:
    [Main]
    ExchangeWallets=SCA
    FullLog=true
    LogPath=
    ExchangeTax=300
    
    [SCA]
    Title=Scalaris
    Ip=127.0.0.1
    Username=
    Password=
    Port=42510
    AddressPrefix=63
    ScriptPrefix=23
    SecretPrefix=154
    COIN=100000000
    MinimumAmount=0
    TxVersion=1
    DustAmount=0
    CreateTxMethod=BTC
    GetNewKeySupported=true
    ImportWithNoScanSupported=true
    MinTxFee=10000
    BlockTime=60
    FeePerByte=20
    Confirmations=0
    Address=
    TxWithTimeField=false
    LockCoinsSupported=false
    JSONVersion=
    ContentType=
    
  12. Set Username= to the same value as rpcuser= from your scalaris.conf.
  13. Set Password= to the same value as rpcpassword= from your scalaris.conf.
  14. Set Ip= to the same value as rpcallowip= from your scalaris.conf.
  15. Save and close the xbridge.conf file.
  16. Select Tools from the left menu, then the Debug Console tab. The input field at the bottom is where you will type commands.
  17. Import the servicenode.conf configuration file. Type servicenodeimport [EXPORTED_HASH] [ENCRYPTION_PASSWORD] with [ENCRYPTION_PASSWORD] replaced with the encryption password used to export your servicenode.conf on your collateral computer and [EXPORTED_HASH] replaced with the hash that was returned in that response. Example:

    servicenodeimport 0554a26adbfbb710bc7fde6c66cd9e07cd4ed84d2fb6121ccc3036255912ee7e1bfd7b88e4d586f64a81edd4406403bbaa3179b241a98d9f7ee93e7a4d10db5896311496ee2fee1f3c7aa832e0827bf81e66274f7617c19c3cd6a4846b2ac674da3cf2fa1a63baf75ca6036ad644d2ab532e6a93ec31866d1c06fca0018336f40716fce3f875768da3a9b694e1f0cbf7201c9f150b76204431ea1560f24cf858 supersecretpassword
    

    Config Setup

  18. You should receive a true response, which means a servicenode.conf file was automatically created and saved.

  19. Restart the Scalaris wallet.

Additional Configuration

At this point you have completed the basic setup for a Service Node. The Service Node can operate but will not be supporting any service. Now what you need to do is setup the Service Node to support services on the network where 100% of fees are distributed to Service Nodes:

  • With XBridge, the decentralized exchange component of the Blocknet Protocol, 100% of trading fees are distributed to Service Nodes for hosting full blockchain nodes and providing verification checks for trustless exchange between digital assets. For setup, see the XBridge Configuration Guide.
  • With XRouter**, the decentralized inter-chain communication component of the Blocknet Protocol, 100% of fees are paid to Service Nodes for hosting full blockchain nodes that support SPV calls. For setup, see the XRouter Configuration Guide.
  • With XCloud**, a decentralized microservice oracle network built on XRouter, allows you to monetize any microservice, blockchain call, API, or cloud tech on your own hardware, in many cases without having to write any code. For setup, see the XCloud Configuration Guide.

** For XRouter and XCloud services, your Service Node Computer IP address must remain unchanged (static). If using a VPN with an IP that changes, it will impact your ability to provide these services.


Deploying Service Node

Setup using wallet

Preparation

  1. On the SNode Server computer:
    1. Start the Scalaris wallet (or restart if you haven't already or have made changes).
      • Make sure this contains the previously configured scalaris.conf file and the servicenode.conf with the Service Node credentials.
    2. Fully sync the wallet.
    3. This wallet must stay running. If the SNode Server wallet is closed, you will need to re-register the Service Node from the Collateral Computer wallet if you have staked a block in that time period.
  2. On the Collateral computer:
    1. Start the Scalaris wallet (or restart if you haven't already or have made changes).
    2. Fully sync the wallet.

Register the Service Node

  1. Make sure all your inputs have at least 2 confirmations (about 2 minutes since servicenodecreateinputs).
  2. On the Collateral Computer wallet, open the debug console and type servicenoderegister [ALIAS] with [ALIAS] replaced with the alias of the Service Node you want to register. If [ALIAS] isn't specified, all known Service Nodes will be registered. You will see a response similar to this:

    Register

  3. The snodekey will remain unchanged as long as the contents of your servicenode.conf remains unchanged and you haven't used the servicenodesetup command.

Send Service Node Ping to the Network

  1. On the SNode Server wallet, open the debug console and type servicenodesendping. You should see that the Service Node status is now "status": "running" along with a list of the services being hosted.

    Send Ping

Check Service Node Status

  1. On the SNode Server wallet, open the debug console and type servicenodestatus. You should still see a running status and the services being hosted.

    Check Status

Check Service Node Is Available on the Network

  1. On a client other than the SNode Server wallet (such as the Collateral Computer wallet), open the debug console and type servicenodelist. You should see your newly created Service Node in the returned list with the status as "status": "running". Your Service Node is the one with the "snodekey" that matches the ones returned when registering your node.

    Network Status

  2. At this point the Collateral Computer wallet can be closed if you are not voting or staking.


Operation

View the Operations for reference on how to go about common Service Node operations such as staking, voting, updating, restarting, and checking your Service Node configs.


Troubleshooting

  • Ensure you have the latest wallet and that it's fully synced.
  • Ensure the SNode Computer wallet is open and synced before using the servicenoderegister from the Collateral Computer wallet.
  • Ensure that you have at least 2500 SCA per Service Node in your designated [NODE_ADDRESS].
  • Ensure that your 2500 SCA accidentally didn’t send to a change address (if creating inputs manually).
  • Ensure all your inputs have at least 2 confirmations before registering.
  • Ensure you didn't include the [ or ] when typing commands and replacing the variables. Example:
    • Correct: getnewaddress snode1
    • Incorrect: getnewaddress [snode1]
  • If you manually setup your Service Node (this guide shows the automatic procedure):
    • Ensure your servicenode.conf information is correct to your settings.
    • Ensure that the servicenode.conf matches on both the Collateral and SNode Server computers.
    • Ensure your configuration file is servicenode.conf and NOT servicenode.conf.txt.
Troubleshooting

If you encounter issues, please join Scalaris's Discord or join Scalaris's Telegram for assistance.

Warning: Beware of scams

Be cautious of users sending you private messages on Discord to help with troubleshooting, even if they claim to be team members. Scammers will often prey on those having issues and offer help in an attempt to steal funds. This is usually done by impersonating team members.

XRouter Beta Released! Read more...
Required Wallet Update! View downloads...