Skip to content

Service Node Setup

This guide explains step-by-step how to setup a Service Node. Operating a Service Node requires 5000 BLOCK collateral. This BLOCK will need to be locked for the Service Node to be valid and active. This means that the 5000 BLOCK will still be in your wallet and in your control, but it can't be moved or spent.

Operating as a Service Node requires two computers:

  • Collateral Computer - The computer will contain the 5000 BLOCK collateral and does not need to remain on.
  • 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 the redesign wallet

Redesign Wallet

  1. Install the Blocknet wallet.
  2. Fully sync the wallet.
  3. Encrypt the wallet.
  4. Select Tools from the left menu, then the Debug Console tab. The input field at the bottom is where you will type commands.

    Debug Console

  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 snode01
    

    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. Type servicenode genkey into the debug console and press the Enter or Return key.

    servicenode genkey
    

    Create Key

  8. The command will appear in the console window followed by a response with the Service Node key.

    Key

  9. Copy the responses from the 2 commands for use in a later step.

  10. Retrieve your private key for the newly created address. Type dumpprivkey <ADDRESS> using the new address and press the Enter or Return key. Example:

    dumpprivkey BWrNeqmsFCkYkvFHd4Hv8UvuynmtcAiW4g
    

    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.

  11. Select Send Funds from the left menu. We will now be sending the 5000 BLOCK collateral as a single transaction to the address we created.

    Send

    Note

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

  12. Enter the newly created address in this field and select Continue.

    • You can also select Open Address Book and select the address by double-clicking it.

    Send Address

  13. Fill out the form and select Continue.

    1. Set amount to exactly 5000.00 BLOCK.
    2. If you are not using Coin Control leave the ‘Default (Recommended)’ option selected.

    Send Amount

  14. Make sure Recommended fee is selected and then select Continue.

  15. Review the transaction details and confirm the payment.
    1. Ensure the amount is 5000 BLOCK and it lists your Service Node address.
    2. The total at the bottom should be the 5000 BLOCK + Transaction Fee.
  16. Select Transaction History from the left menu. You should see the 5000 BLOCK transaction that was sent. Hover your mouse over the row and proceed to the next step when you see 1 confirmation.

    Confirmations

  17. Go back to the debug console, type servicenode outputs into the debug console, and press the Enter or Return key. This command generates the Service Node transaction information.

    servicenode outputs
    

    Outputs

  18. The command will appear in the console window followed by a response with the Service Node transaction information. Copy this information for later use. Example response:

    {
        "txhash" : "e12d35c18c2498d7ad683ec53ebb5c6accf197b693ccfcbb048c83bd4ad3287e",
        "outputidx" : 0
    }
    

    Outputs

  19. On the SNode Server computer, Google "what's my ip".

    1. If you’re using a VPS for the SNode Server computer, retrieve that public IP address.

    Snode IP

  20. Copy your public IP address for later use.

  21. Moving back to the Collateral wallet, from the program menu select Tools then Open Service Node Configuration File.

    Note: The servicenode.conf file can be found in the Blocknet data directory.
    1. Windows
      C:\Users\[YourUsername]\AppData\Roaming\BlocknetDX\
      
      Or paste %appdata%\Roaming\BlocknetDX\ into the file explorer path field.
    2. MacOS
      ~/Library/Application Support/BlocknetDX/
      
      Open Finder and in the program menu select Go > To Folder and enter the above path.
    3. Linux
      ~/.blocknetdx/
      

    Snode Config

  22. A file will be opened with your default text editor. Enter the following with the placeholders replaced with the information from the earlier steps:

    <ALIAS> <PUBLIC_IP>:41412 <SERVICE_NODE_KEY> <TXHASH> <OUTPUTIDX>
    

    Note

    The <SERVICE_NODE_KEY> is the value returned from the servicenode genkey command. It is NOT the value from the dumpwallet <ADDRESS> command.

  23. After the information is replaced it should look similar to the following:

    snode01 138.28.1.27:41412 6B1XGPVzE7MRszNXjXqcYtr5ApcCBkST5Bds43gSHcJd22kuHZe e12d35c18c2498d7ad683ec53ebb5c6accf197b693ccfcbb048c83bd4ad3287e 0
    

    Note: The entire entry must be on a single line.

    1. If setting up multiple Service Nodes, repeat these steps for each 5000 BLOCK input.
    2. Save and close the servicenode.conf file.
    3. Restart the Blocknet wallet.
    4. Continue on to SNode Server Computer Setup.
Setup using the classic wallet

Classic Wallet

  1. Install the Blocknet wallet.
  2. Fully sync the wallet.
  3. Encrypt the wallet.
  4. In the program menu, select Tools then Debug Console.

    Menu

  5. The debug console will open. The black bar at the bottom is the input field where you will type commands.

    Debug Console

  6. 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 snode01
    

    Create Address

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

    Address

  8. Type servicenode genkey into the debug console and press the Enter or Return key.

    servicenode genkey
    

    Create Key

  9. The command will appear in the console window followed by a response with the Service Node key.

    Key

  10. Copy the responses from the 2 commands for use in a later step.

  11. Retrieve your private key for the newly created address. Type dumpprivkey <ADDRESS> using the new address and press the Enter or Return key. Example:

    dumpprivkey Bgcfsgh2FSHPVLB4VgmLYZdsyDR5pb8jKB
    

    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.

  12. Select the Send tab. We will now be sending the 5000 BLOCK collateral as a single transaction to the address we created.

    Send

  13. Fill out the form.

    1. Enter the newly created address in the Pay To field.
    2. Set Amount to exactly 5000.00000000 BLOCK.

    Note

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

  14. Double check the form is filled out correctly.

    Send Collateral

  15. Select Send to submit the transaction to your new address.

    Send Button

  16. Select the Transactions tab. You should see the 5000 BLOCK transaction that was sent. Hover your mouse over the row and proceed to the next step when you see 1 confirmation.

    Confirmations

  17. Go back to the debug console, type servicenode outputs into the debug console, and press the Enter or Return key. This command generates the Service Node transaction information.

    servicenode outputs
    

    Outputs

  18. The command will appear in the console window followed by a response with the Service Node transaction information. Copy this information for later use. Example response:

    {
        "txhash" : "e12d35c18c2498d7ad683ec53ebb5c6accf197b693ccfcbb048c83bd4ad3287e",
        "outputidx" : 0
    }
    

    Outputs

  19. On the SNode Server computer, Google "what's my ip".

    1. If you’re using a VPS for the SNode Server computer, retrieve that public IP address.

    Snode IP

  20. Copy your public IP address for later use.

  21. Moving back to the Collateral wallet, from the program menu select Tools then Open Service Node Configuration File.

    Note: The servicenode.conf file can be found in the Blocknet data directory.
    1. Windows
      C:\Users\[YourUsername]\AppData\Roaming\BlocknetDX\
      
      Or paste %appdata%\Roaming\BlocknetDX\ into the file explorer path field.
    2. MacOS
      ~/Library/Application Support/BlocknetDX/
      
      Open Finder and in the program menu select Go > To Folder and enter the above path.
    3. Linux
      ~/.blocknetdx/
      

    Snode Config

  22. A file will be opened with your default text editor. Enter the following with the placeholders replaced with the information from the earlier steps:

    <ALIAS> <PUBLIC_IP>:41412 <SERVICE_NODE_KEY> <TXHASH> <OUTPUTIDX>
    

    Note

    The <SERVICE_NODE_KEY> is the value returned from the servicenode genkey command. It is NOT the value from the dumpwallet <ADDRESS> command.

  23. After the information is replaced it should look similar to the following:

    snode01 138.28.1.27:41412 6C4h8c87UGizAk67E97fTKSSgVn2ezsgbKzehcySniEhYyMNuQF e12d35c18c2498d7ad683ec53ebb5c6accf197b693ccfcbb048c83bd4ad3287e 0
    

    Note: The entire entry must be on a single line.

    1. If setting up multiple Service Nodes, repeat these steps for each 5000 BLOCK input.
    2. Save and close the servicenode.conf file.
    3. Restart the Blocknet wallet.
    4. Continue on to SNode Server Computer Setup.

SNode Server Computer Setup

Setup using the redesign wallet

Redesign Wallet

  1. Install the Blocknet wallet.
  2. Fully sync the wallet. Encryption is not needed on this wallet since it will not be holding funds.
  3. In the program menu, select Tools then Open Wallet Configuration File to configure the blocknetdx.conf file.

    Note: The blocknetdx.conf file can be found in the Blocknet data directory.
    1. Windows
      C:\Users\[YourUsername]\AppData\Roaming\BlocknetDX\
      
      Or paste %appdata%\Roaming\BlocknetDX\ into the file explorer path field.
    2. MacOS
      ~/Library/Application Support/BlocknetDX/
      
      Open Finder and in the program menu select Go > To Folder and enter the above path.
    3. Linux
      ~/.blocknetdx/
      

    Wallet Config

  4. A file will be opened with your default text editor. Enter the following information with the placeholders replaced:

    enableexchange=1
    servicenode=1
    servicenodeaddr=<PUBLIC_IP>:41412
    servicenodeprivkey=<SERVICE_NODE_KEY>
    rpcthreads=8
    

  5. After the information is replaced it should look similar to the following:
    enableexchange=1
    servicenode=1
    servicenodeaddr=138.28.1.27:41412
    servicenodeprivkey=6B1XGPVzE7MRszNXjXqcYtr5ApcCBkST5Bds43gSHcJd22kuHZe
    rpcthreads=8
    
  6. For best performance, a maxconnections= setting should not be specified.
  7. Save and close the blocknetdx.conf file.
  8. Shut down the Blocknet wallet.
Setup using the classic wallet

Classic Wallet

  1. Install the Blocknet wallet.
  2. Fully sync the wallet. Encryption is not needed on this wallet since it will not be holding funds.
  3. In the program menu, select Tools then Open Wallet Configuration File to configure the blocknetdx.conf file.

    Note: The blocknetdx.conf file can be found in the Blocknet data directory.
    1. Windows
      C:\Users\[YourUsername]\AppData\Roaming\BlocknetDX\
      
      Or paste %appdata%\Roaming\BlocknetDX\ into the file explorer path field.
    2. MacOS
      ~/Library/Application Support/BlocknetDX/
      
      Open Finder and in the program menu select Go > To Folder and enter the above path.
    3. Linux
      ~/.blocknetdx/
      

    Wallet Config

  4. A file will be opened with your default text editor. Enter the following information with the placeholders replaced:

    enableexchange=1
    servicenode=1
    servicenodeaddr=<PUBLIC_IP>:41412
    servicenodeprivkey=<SERVICE_NODE_KEY>
    rpcthreads=8
    

  5. After the information is replaced it should look similar to the following:
    enableexchange=1
    servicenode=1
    servicenodeaddr=138.28.1.27:41412
    servicenodeprivkey=6C4h8c87UGizAk67E97fTKSSgVn2ezsgbKzehcySniEhYyMNuQF
    rpcthreads=8
    
  6. For best performance, a maxconnections= setting should not be specified.
  7. Save and close the blocknetdx.conf file.
  8. Shut down the Blocknet wallet.

Additional Configuration

With the current configurations the Service Node will only be eligible to earn block rewards. However, you can also setup a 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 distributed to Service Nodes for hosting full blockchain nodes for SPV calls. For setup, see the XRouter Configuration Guide.
  • With XCloud*, a decentralized microservice cloud network build on XRouter, allows you to monetize any microservice, blockchain, 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. If using a VPN with an IP that changes, it will impact your ability to provide XRouter services.


Deploying Service Node

Setup using the redesign wallet

Preparation

  1. On the SNode Server computer:
    1. Start or restart the Blocknet wallet.
      • Make sure this contains the previously configured blocknetdx.conf file with the Service Node credentials.
    2. Fully sync the wallet and additional network data.
    3. This wallet must stay running.
  2. On the Collateral computer:
    1. Select Transaction History from the menu on the left.
    2. Find the 5000 BLOCK transaction and hover over it to see the amount of confirmations it has. Take a note of this value for future reference.
    3. From the side menu, select Tools > Debug Console.
    4. Enter the following command to view the total number of Service Nodes on the network:
      servicenode count
      
    5. The confirmations on your 5000 BLOCK transaction has to be greater than or equal to the value returned for servicenode count. Once this has been achieved head to the next step.

Starting the Service Node

  1. On the Collateral Blocknet wallet, select ‘Service Nodes’ from the menu on the left. If the setup was done correctly you should see your ‘Alias(s)’ listed.

    Service Nodes

  2. Fully unlock the wallet.

  3. Open the debug console and enter servicenode start-alias <ALIAS>. Example:
    servicenode start-alias snode01
    
  4. You should receive a successful response.
  5. If starting multiple Service Nodes, repeat these steps for each Alias.
  6. The Status of your Service Node(s) should show ENABLED and an Active time. This may take up to 10 minutes to update.

    Service Nodes

  7. You can now close the Collateral Blocknet wallet. The collateral wallet can remain closed as it's not needed to operate the Service Node.

Check Service Node Active Status

  1. On the SNode Server computer, open the debug console and enter servicenode status. If the Service Node is active, you will see a Servicenode successfully started response.

    Snode Status

Setup using the classic wallet

Preparation

  1. On the SNode Server computer:
    1. Start or restart the Blocknet wallet.
      • Make sure this contains the previously configured blocknetdx.conf file with the Service Node credentials.
    2. Fully sync the wallet and additional network data.
    3. This wallet must stay running.
  2. On the Collateral computer:
    1. Select the Transactions tab.
    2. Find the 5000 BLOCK transaction and hover over it to see the amount of confirmations it has. Take a note of this value for future reference.
    3. From the program menu, select Tools > Debug Console.
    4. Enter the following command to view the total number of Service Nodes on the network:
      servicenode count
      
    5. The confirmations on your 5000 BLOCK transaction has to be greater than or equal to the value returned for servicenode count. Once this has been achieved head to the next step.

Starting the Service Node

  1. On the Collateral Blocknet wallet, select the ‘Service Nodes’ tab. If the setup was done correctly you should see your ‘Alias(s)’ listed.

    Service Nodes

  2. Fully unlock the wallet.

  3. Open the debug console and enter servicenode start-alias <ALIAS>. Example:
    servicenode start-alias snode01
    
  4. You should receive a successful response.
  5. If starting multiple Service Nodes, repeat these steps for each Alias.
  6. The Status of your Service Node(s) should show ENABLED and an Active time. This may take up to 10 minutes to update.

    Service Nodes

  7. You can now close the Collateral Blocknet wallet. The collateral wallet can remain closed as it's not needed to operate the Service Node.

Check Service Node Active Status

  1. On the SNode Server computer, open the Debug console and enter servicenode status. If the Service Node is active, you will see a Servicenode successfully started response.

    Snode Status


Troubleshooting

  • Ensure you have the latest wallet and that it's fully synced and unlocked.
  • Ensure the 5000 BLOCK is exactly 5000 BLOCK, no more or no less, and ensure the transaction has at least 1 confirmation.
  • Ensure you don't have < or > in any of the configuration files. Examples:
    • Correct: servicenodeaddr=138.28.1.27:41412
    • Incorrect: servicenodeaddr=<138.28.1.27:41412>
  • Ensure you are using the correct port number (41412). Examples:
    • Correct: servicenodeaddr=138.28.1.27:41412
    • Incorrect: servicenodeaddr=138.28.1.27:41414
    • Incorrect: servicenodeaddr=138.28.1.27
  • Ensure your servicenode.conf information is correct to your settings and the <SERVICE_NODE_KEY> is the value that was returned from the servicenode genkey command.
  • Ensure on the Collateral computer only has the servicenode.conf file. The blocknetdx.conf file is not needed on the Collateral computer.
  • Ensure on the SNode Server computer only has the blocknetdx.conf file. The servicenode.conf file is not needed on the SNode Server computer.
  • Ensure your configuration files are not servicenode.conf.txt.
XRouter Beta Released! Read more...
Required Wallet Update! View downloads...