Deploying an EON node (peer) on a Linux based host

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 Linux Ubuntu OS. If a computer has Windows installed, then follow this how-to.

Contents

This guide covers the process of deploying a node via 5 steps, which are:

  1. Configuring repositories to download required software packages;
  2. Downloading and installing the latest version of Java SDK (Version 8), setting up the Java Path;
  3. Downloading and installing Git, required to clone the necessary files from the EonTechnology Github;
  4. Downloading and extracting the Maven packages;
  5. Installation and running the node:
  • Launching with Docker
  • Launching the embedded Jetty server with public EON network.

Optional steps

  1. Enabling database clearing;
  2. Truncating the history.

The directory structure referenced in this document is:

  • /<path>/ (used to download apache maven)</path>
  • /<path>/apache-maven-3.5.4/ (created when the apache tar.gz file is extracted)</path>
  • /<path>/exscudo-node/ (manually created to store the server node files)</path>
  • /<path>/exscudo-node/server (directory created when the repository is cloned using git)</path>

Initial steps to install the node

1.Configure repositories

This guide follows the process of setting up a node on a Linux based system with Ubuntu OS. It is implied that the operating system has already been installed.

Before setting up the server, make sure that all software packages are up-to-date.

  • Open the Terminal window by pressing CTRL+ALT+T on your keyboard.
  • In the Terminal window run the following commands one by one and wait till every command is completed.

sudo apt-get update && sudo apt-get -y upgrade

In preparation to install Java SDK via PPA, add the PPA repository via the following commands:

sudo apt-get install software-properties-common

sudo apt-add-repository ppa:webupd8team/java

sudo apt-get update

The example of the first command can be seen in the screenshot below.

2. Install Java

Download and install Java executing the following command:

sudo apt install oracle-java8-installer

The process takes a few minutes. The completion percentage will be displayed in the Terminal as shown in the screenshot below.


3. Install Git

To download the Exscudo server files from github, you first need to use Git to clone the entire directory.

To Install Git enter the following command in the Terminal:

sudo apt-get install git-core

Choose or create a directory for the files of your node. For example:

cd /<path>
mkdir exscudo-node
cd exscudo-node

Clone the directory from github with the following command:

4. Install Maven

Apache Maven is a software project management and comprehension tool. Maven can manage the build of the Exscudo node from a central piece of information that is downloaded along with all the required server files.

Install Maven with the following command:

sudo apt install maven

You are now ready to start the node.

5. Installation and running the node

There are 2 ways to run node - Jetty (embedded server) and Docker. Below you will find two separate descriptions for each way. EON_NETWORK environment variable must be specified for select network (test3/main).

Installation and running the node with Docker

This process is executed by the following commands:

docker build -t eon/peer .

docker run -d -v $(pwd)/db:/app/db -p 9443:9443 -e EON_NETWORK=... -e SECRET_SEED=... eon/peer

Run the embedded Jetty server with public EON network

The entire command should look like this:

EON_NETWORK=main mvn jetty:run -DSECRET_SEED=<seed>

EON_NETWORK environment variable must be specified for the selected network (EON public network name is main)

As a DSECRET_SEED, insert your real seed. Take it from deploying EON Mainnet (see the article - Connecting to EON Blockchain Mainnet (Linux))

Click ENTER and the server is now running. The terminal window will display the process as shown in the screenshot below.

Optional

1. Enable database clearing

Clears the database from the side blockchain and unused items in the state tree. This option is disabled by default.

You can launch it with the following commands:

Jetty: mvn jetty:run -Dblockchain.clean=true ...

Docker: docker run ... -e CLEAN_BLOCKCHAIN=true ...

2. Truncate history

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

  • If you shut down your computer for any reason then you may need to add the path again t(this can be stopped by adding the path in .bash_profile). The same applies if you close the Terminal window with the node running.
  • Make sure to use the same directory to run the Jetty server in case the process was stopped before.

Done

An EON node has successfully been deployed.