Skip to main content

Become a Master Node

Master Nodes in the Inery network serve as primary nodes responsible for executing verification operations and participating in network consensus. This guide will walk you through the steps to configure, start, and approve as a Master Node, ensuring it is ready to participate in consensus.

Setup Master Node

If you have a DLS database and the corresponding keypair, you can proceed with the steps to start your Master Node.
Otherwise, it is recommended to first set up a Lite Node

must have DLS database created

If you don't have account on Inery Testnet you can obtain on our Inery Testnet dashboard : Inery testnet

tip

You can easily upgrade your Lite Node to a Master Node later once your DLS database is established.

Step 1: Open the config.json

File is located in the inery.setup/tools/ directory, open it using a text editor like nano:

 nano tools/config.json

Step 2: Locate the "MASTER_ACCOUNT" section

Replace the placeholders in the "MASTER_ACCOUNT" object with your Master Node’s details:

Config.json
"MASTER_ACCOUNT": {
"NAME": "YOUR_MASTER_NAME",
"PUBLIC_KEY": "MASTER_PUBLIC_KEY",
"PRIVATE_KEY": "MASTER_PRIVATE_KEY",
"PEER_ADDRESS": "YOUR_DNS_OR_IP:9010",
"HTTP_ADDRESS": "0.0.0.0:8888",
"HOST_ADDRESS": "0.0.0.0:9010"
}

required

  • NAME: Inery Master account name.
  • PUBLIC_KEY: Master account public key.
  • PRIVATE_KEY: Master account private key.
  • PEER_ADDRESS: IP address or DNS of your server with port 9010.

default

  • HTTP_ADDRESS: HTTP address for API calls (default: 0.0.0.0:8888).
  • HOST_ADDRESS: Host address for node communication (default: 0.0.0.0:9010).

Step 3: Save your changes

If you used nano editor like in above example you can commit changes typing :

  • Press Ctrl + S to save.
  • Type Y to confirm.
  • Press Ctrl + X to exit.

Start Master Node

Now start the Inery Testnet protocol as Master Node using the ine.py script with --master option.

./ine.py --master
Example Output
==================================================
Creating MASTER node
==================================================
==================================================
* STARTING MASTER *
==================================================

Verify Protocol Started Successfully

To verify if the protocol started successfully, you can monitor the nodine.log file for synchronization activity. This log file contains detailed information about the node's operations and network connections.

tail -f master.node/blockchain/nodine.log
Example Output
info  2024-10-11T14:23:56.194 net-1     net_plugin.cpp:1491           operator()           ] requesting range 3602 to 3701, from kis.blockchain-servers.world:9010 - a19a16a
info 2024-10-11T14:23:56.403 net-1 net_plugin.cpp:1491 operator() ] requesting range 3702 to 3801, from tas.blockchain-servers.world:9010 - e9168ad
info 2024-10-11T14:23:56.746 net-0 net_plugin.cpp:1491 operator() ] requesting range 3802 to 3901, from sys.blockchain-servers.world:9010 - 9cf529

Wait Ledger replay

After starting the Inery protocol, your node will begin syncing with the Ledger by replaying the block history. This process ensures your node is fully synchronized with the current block height of the network.

info

The output from the log file indicates that the ledger is replaying block history correctly. To start integrating with the network, you must wait until the ledger is fully synchronized with the current block number. Depending on factors such as the last irreversible block, the number of peers, and your internet bandwidth, synchronization may take a few hours to several days for your node to become a fully operational Full Node.

Check Latency

Check latency of blocks you are receiving with tail -f master.node/blockchain/nodine.logcommand if the latency is higher than 500ms its not recommended to start master node, since it will probably miss his chanse to create block.

Approve as Master

Once your Master Node is configured and running, you need to go through a few key steps to stake INR, bind your account, and approve your node for block production.

caution

To become a Master Node on the Inery Testnet, you need to stake 50,000 INR (Inery native currency)

Stake INR

Before you can bind and approve your Master Node, you must have at least 50,000 INR staked to your account. Ensure that your account has sufficient liquid INR.

Stake INR to your account by executing the following command:

cline system stake <ACCOUNT_NAME> "50000.000000 INR"

Bind as Master

You will have to bind your account to master table by providing master account name and master permission (Public Key) and node IP or DNS

cline master bind <MASTER_NAME> <MASTER_PUBLIC_KEY> <MASTER_NODE_IP>

Replace the following placeholders with your Master Node details:

  • MASTER_NAME: Your Master account name.
  • MASTER_PUBLIC_KEY: The public key of your Master account.
  • MASTER_NODE_IP: The IP address or DNS of your Master Node server.

This step officially registers your node as a Master Node, linking it to your account.

Approve Master

Approve command will activate your master to start producing blocks by putting master in some of the free stages and give him a chanse for producing everytime it gets his turn

Execute the following command to approve your Master Node:

cline master approve <ACCOUNT_NAME>