Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
141 lines (99 sloc) 5.6 KB
description
This section describe all the necessary steps to install and setup the X-Cash's DPoPS system.

Installation Process

System Requirements

{% hint style="info" %} In the first beta version, X-Cash's DPoPS will only run on a Linux/Unix OS. We recommend installing it on a Ubuntu VPS/dedicated server (18.04) for the best compatibility. {% endhint %}

Minimum System Requirements Recommended System Requirements
OS Ubuntu 18.04 (or higher) Ubuntu 18.04 (or higher)
CPU 4 threads 8 threads
RAM 8GB 16GB
Hard Drive 50GB 100GB
Bandwidth Transfer 500GB per month 2TB per month
Bandwidth Speed 30 Mbps 100 Mbps

Dependencies

The following table summarizes the tools and libraries required to run X-Cash's DPoPS program.

Dependencies Min. version Ubuntu package
GCC 4.7.3 build-essential
CMake 3.0.0 cmake
pkg-config any pkg-config
OpenSSL any libssl-dev
Git any git
MongoDB 4.0.3 Install from binaries
MongoDB C Driver (includes BSON libary) 1.13.1 Build from source
XCASH latest version download the latest release or build from source

Installation Process

Installation path

{% hint style="info" %} It is recommended to install the XCASH_DPOPS folder, MongoDB and MongoDB C Driver in the home directory (/home/$USER/) or root directory (/root/) in a Installed-Programs folder. {% endhint %}

Create the Installed-Programsfolder and the xcash_walletsfolder

mkdir /root/Installed-Programs
mkdir /root/Installed-Programs/xcash_wallets

Install dependencies

Install System Packages

Make sure the systems packages list is up to date and install the necessary packages.

sudo apt update
sudo apt install build-essential cmake pkg-config libssl-dev git

{% hint style="info" %} (Optional) Install the packages for XCASH if you plan to build XCASH from source {% endhint %}

Installing MongoDB from Binaries

Visit https://www.mongodb.com/download-center/community

Then choose your OS, and make sure the version is the current version and the package is server. Then click on All version binaries. Now find the current version to download. You do not want the debug symbols or the rc version, just the regular current version.

Once you have downloaded the file move the file to a location where you want to keep the binaries, then run this set of commands

tar -xf mongodb-linux-x86_64-*.tgz
rm mongodb-linux-x86_64-*.tgz
sudo mkdir -p /data/db
sudo chmod 770 /data/db
sudo chown $USER /data/db

Then add MongoDB to your path

echo -e '\nexport PATH=MongoDB_folder:$PATH' >> ~/.profile && source ~/.profile

{% hint style="info" %} If you want to install MongoDB on a different hard drive, make sure to change the path of the /data/db {% endhint %}

Building the MongoDB C Driver From Source

Visit the offical websites installation instructions at http://mongoc.org/libmongoc/current/installing.html Follow the instructions for Building from a release tarball or Building from git since you need the header files, not just the library files.

After you have built the MongoDB C driver from source, you will need to run

sudo ldconfig

Build Instructions

Now that the dependencies are all installed, you can clone the repository in the Installed-Programs folder.

cd ~Installed-Programs 
git clone https://github.com/X-CASH-official/XCASH_DPOPS.git

X-CASH Proof of stake uses a Make file to build. After cloning the repository, navigate to the folder then use the make file to build the binary file.

cd ~/Installed-Programs/XCASH_DPOPS
make clean ; make release -j `nproc`

Test build

{% hint style="info" %} It is recommended to run the X-CASH DPOPS test before you run the main program. The test will ensure that your system is compatible, and that you have setup your system correctly. {% endhint %}

{% hint style="warning" %} To run the X-CASH DPOPS test, make sure to have already started the XCASH Daemon, XCASH Wallet and MongoDB systemd services, and to have stopped the XCASH DPOPS systemd service if it was already running. {% endhint %}

Navigate to the folder that contains the binary, rebuild the binary in debug mode then run the test

make clean ; make debug -j `nproc`
./XCASH_DPOPS --test

The test will return the number of passed and failed test at the bottom of the console. The failed test need to be 0 before you run the node. If the output is not showing 0 for failed test, then you need to scroll through the testing output and find what test failed (It will be red instead of green).

If this is a system compatibility test, then you will need to fix the system. If this is a core test that has failed, then you need to possibly rebuild, or contact us on the DPoPS testing section or go the the Discord channel to get help from testers and the dev-team.

You can’t perform that action at this time.