The architecture of EON blockchain is node-centric. It is the nodes (or peers) that are the essence of the technology, allowing it to function and survive. Nodes in a network carry out a variety of tasks. One of the tasks is to validate transactions earning rewards. To do so, one needs to deploy an EON node (a masternode). See Requirements for deploying a masternode for hard- and software requirements.
In EON blockchain, there are nodes and masternodes. The difference between them is that masternode must have at least 25,000 EONs deposited to it to be able to generate blocks and be rewarded. Please note, that the deposit used for the purpose of deploying a masternode should not have any transactions (either the deposits or withdrawals of funds) carried out on it within 24 hours. The operations with account's primary balance are not under any kind of restrictions during this time.
This article presents a stepwise guide for deploying an EON masternode on Windows. If a computer has Linux installed with Ubuntu OS, then follow this how-to.
When setting up the server node, the best practice is to build a directory structure first, which in this case involves creating a directory to host the server and Apache Maven files.
Create and name a directory.
In this tutorial, a directory name is MasterNode created in the root of drive D:
The directory structure referenced in this document is:
Download Java SDK version 8 or later.
Make sure to choose the appropriate file for Windows version (32 or 64-bit) and accept License Agreement.
Run the installer and progress through the installation wizard.
Apache Maven is a software project management and comprehension tool. Maven can manage the build of an Exscudo node from a central piece of information that is downloaded along with all the required server files.
Download the Apache Maven binaries and extract the files into the directory created at Step 1.
D:\MasterNode\ - in this tutorial.
Set environment variables
Let Java know where the Maven bin directory is located and let Apache Maven know where the Java SDK is located. Set up environment variables. There are many ways to access the dialog box to enter the variables depending on the version of the operating system in use. Regardless of the method, there are two variables to be added:
Note that paths may be different. Please refer to the Directory structure above.
Add a new environment variable, or edit an existing one progressing through the following steps:
Windows 10 and Windows 8
Once the installation and configuration of Java are done, download and install Git. This will allow to create a repository for the server files that can be upgraded using simple commands from the Git Bash shell.
Download and install Git accepting defaults.
On the last step, check the Launch Git Bash flag to run git bash and wait for the bash shell to open. (alternatively, click the icon on the desktop or search for the app using explorer).
Use the following commands to set up a git repository from the Git bash shell:
This will download the files into the server directory.
D:\MasterNode\ - in this tutorial.
Now the Apache Maven package can be built.
Make sure a directory is correct as the commands need to find the appropriate files in it.
D:\MasterNode\server\ - in this tutorial.
Close bash window, change to the server directory, then run the package by entering the following commands:
Data will fill in the screen as the package is being built. This may take some time depending on build specifications. Once done, the master-node is ready to be launched.
There are two ways to run the node:
EON_NETWORK environment variable must be specified for a selected network (test3/main).
At first, Docker must be installed on Windows. Download Docker Desktop (Windows), then install it.
This process is executed by the following commands:
docker build -t eon/peer .
docker run -d -v D:/MasterNode/server/db:/app/db -p 9443:9443 -e EON_NETWORK=main -e SECRET_S
As a result, there will be a container ID (like - 9215a968a32416a9d3bf34040670eeb98e4e94f5a3b63ff03216f6d6e4013991). It means that the node is running - check it with https://127.0.0.1:9443/metrics.
To stop the node, execute the command:
docker stop <container id=""> </container>
The commands should look like this:
mvn jetty:run -DSECRET_SEED=<seed> </seed>
EON_NETWORK environment variable must be specified for the selected network (EON public network name is main)
As a DSECRET_SEED, insert a real seed. Take it from deploying EON Mainnet (see the article - Connecting to EON Blockchain Mainnet (Linux))
To invoke the server at any time after configuration is complete just browse to the server directory from a command prompt and enter the previous commands again.
Clears the database from the side blockchain and unused items in the state tree. This option is disabled by default.
Launch it with the following commands:
Jetty: mvn jetty:run -Dblockchain.clean=true ...
Docker: docker run ... -e CLEAN_BLOCKCHAIN=true ...
This option is executed by the following command:
Jetty: mvn jetty:run -Dblockchain.full=false ...
Docker: docker run ... -e FULL_BLOCKCHAIN=false ...
This command switches off the synchronization with the full history to proceed with short-term history synchronization. This type of synchronization uses only the short-term history, one-week length.
Database clearing must be enabled for this option
An EON node has successfully been deployed.