Setting Up a Backup Node


  • administrator

    Setting Up A Backup Node


    Port Reference


    Mainnet
    HTTP: 5555
    HTTPS: 5556
    
    Testnet
    HTTP: 5566
    HTTPS: 5567
    

    Prerequisites


    To complete this tutorial, you will need:

    • To have a working Rise instance
    • To have completed the Maintaining Your Node guide

    Configuration


    First of all, we will need to edit the config.json in the rise-node folder of both nodes. There we will need to always whitelist the other one, so they can communicate, meaning: In your master node (main node) you have to whitelist your slave node (backup), while you have to whitelist the master node on your slave node. Besides that, you will also need to remove your secret from both config.json files.

    nano config.json
    
        "forging": {
            "force": false,
            "secret": [],
            "access": {
                "whiteList": [
                    "127.0.0.1","1.2.3.4",
                ]
            }
        },
    

    Note that “1.2.3.4”, is where you add the other nodes IP.

    Now we will need to edit the consensus settings of rise-checker in your config.php: There we will enable the consensus checker, set the master/slave and the IPs. Here is an example of the config for a master node:

    nano config.php
    
    // Consensus settings
     $consensusEnable= true; // Enable consensus check? Be sure to check $nodes first..
     $master = true; // Is this your master node? True/False
     $masternode = "http://127.0.0.1"; // Master node
     $masterport = 5555; // Master port
     $slavenode = "http://1.2.3.4"; // Slave node IP
     $slaveport = 5555; // Slave port
     $threshold = 50; // Percentage of consensus threshold
     $apiHost = "https://wallet.rise.vision"; // Used to calculate $publicKey by $secret.
     $secret = array("secret secret secret secret secret secret secret secret secret secret secret secret"); 
     // Add your secrets here. If you want to forge multiple, add extra to the array.
    

    In case you have setup SSL with this guide on both nodes, the config of your slave could look like this:

    // Consensus settings 
    $consensusEnable= true; // Enable consensus check? Be sure to check $nodes first.. 
    $master = false; // Is this your master node? True/False 
    $masternode = "https://server.domain.tk"; // Master node 
    $masterport = 5556; // SSL Port 
    $slavenode = "https://127.0.0.1"; // Slave node IP 
    $slaveport = 5556; // Slave port 
    $threshold = 50; // Percentage of consensus threshold 
    $apiHost = "https://wallet.rise.vision"; // Used to calculate $publicKey by $secret. 
    $secret = array("secret secret secret secret secret secret secret secret secret secret secret secret"); 
    // Add your secrets here. If you want to forge multiple, add extra to the array.
    

    By Nytrobound, licensed under CC BY-NC-SA 4.0


Log in to reply
 

Looks like your connection to     Rise Community Forum was lost, please wait while we try to reconnect.