Difference between revisions of "NodeCore Operations"

From Veriblock Wiki
Jump to: navigation, search
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
See: [[Main_Page]], [[HowTo_run_NodeCore]]
+
See: [[Main_Page]], [[NodeCore_QuickStart]], [[HowTo_run_NodeCore]], [[ReleaseNotes]]
  
 
__TOC__
 
__TOC__
Line 10: Line 10:
 
=== Hardware ===
 
=== Hardware ===
  
* At least 4GB of memory
+
* At least 12GB of memory recommended
 
* 2 CPU Cores
 
* 2 CPU Cores
* SSD drive (much disk activity on nodecore.dat file)
+
* SSD drive (much disk activity on block files)
* 50GB data drive (10GB/month of nodecore)
+
* 75GB free space (As of 8/30/2021, data directory is 41G)
 
* OS = Windows, Linux, Mac
 
* OS = Windows, Linux, Mac
  
Line 22: Line 22:
 
=== Software ===
 
=== Software ===
  
* Oracle Java 8u181 from the above guide
+
Starting with v0.4.6 VeriBlock officially supports OpenJDK 8 - 14 on Ubuntu, CentOS, Windows 10, and Mac OS X with backwards compatibility for Oracle Java
** 64-bit
 
** http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/
 
  
==== What if I have the wrong version of Java? ====
+
Note that Java 15 and 16 are not currently supported.
  
Either run on a machine that has Oracle Java 8, or uninstall and re-install Oracle Java 8.
+
==== CentOS - OpenJDK 8 ====
 +
 
 +
If you experience an error running NodeCore on CentOS:
 +
 
 +
<pre>
 +
VERIBLOCK CANNOT FUNCTION WITHOUT THE SECP256K1 ELLIPTICAL CURVE
 +
</pre>
 +
 
 +
You can resolve the issue by using the Zulu build of OpenJDK 11 per the following instructions:
 +
 
 +
https://www.linuxuprising.com/2019/04/install-latest-openjdk-12-11-or-8-in.html
  
 
== How to Install ==
 
== How to Install ==
Line 35: Line 43:
  
 
<pre>
 
<pre>
#install Java:
+
#install Java on Ubuntu:
sudo apt-get update
+
sudo apt install default-jre
sudo apt-get install software-properties-common
 
sudo add-apt-repository ppa:webupd8team/java
 
sudo apt-get update
 
sudo apt-get install oracle-java8-installer -y
 
sudo apt-get install oracle-java8-set-default -y
 
 
</pre>
 
</pre>
  
Line 51: Line 54:
 
#start nodecore
 
#start nodecore
 
cd <NC_Directory>/nodecore-<version>/bin
 
cd <NC_Directory>/nodecore-<version>/bin
chmod a+x nodecore
 
  
 
#run NC (could run multiple ways, such as in a screen)
 
#run NC (could run multiple ways, such as in a screen)
 
cd <NC_Directory>/nodecore-<version>/bin
 
cd <NC_Directory>/nodecore-<version>/bin
screen -S NodeCore './nodecore'
+
screen -S nodecore './nodecore'
 
</pre>
 
</pre>
  
 
Sample linux script:
 
Sample linux script:
 +
 +
# Check for latest package release at https://explore.veriblock.org/api/stats/download
  
 
<pre>
 
<pre>
wget http://mirror1.veriblock.org/nodecore-0.2.15-rc.2.tar
+
mkdir veriblock-0.4.12
tar xvf nodecore-0.2.15-rc.2.tar
+
cd veriblock-0.4.12
cd nodecore-0.2.15-rc.2/bin
+
wget https://github.com/VeriBlock/nodecore-releases/releases/download/v0.4.12/veriblock-nodecore-all-0.4.12.tar.gz
mkdir testnet
+
tar zxvf veriblock-nodecore-all-0.4.12.tar.gz
cd testnet
+
cd nodecore-0.4.12/bin
wget http://mirror1.veriblock.org/nodecore-108000.zip
 
unzip nodecore-108000.zip
 
cd ..
 
 
./nodecore
 
./nodecore
 
</pre>
 
</pre>
Line 75: Line 76:
  
 
=== Windows ===
 
=== Windows ===
 +
 +
For best usage, Java 14 is recommended because it supports all NodeCore Suite applications. (The GUI Wallet needs Java 14)
 +
 +
Here is a direct link to Java 14 via AdoptOpenJDK:
 +
 +
https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_windows_hotspot_14.0.2_12.msi
 +
 +
After Java is installed:
  
 
<pre>
 
<pre>
Line 86: Line 95:
  
 
=== Start ===
 
=== Start ===
 +
 +
'''NOTE: Starting with version 0.4.6, you can run ./nodecore -d USER to store the data in ~/VeriBlock to make future upgrades easier, or specify your own datadir with ./nodecore -d /path/to/datadir'''
  
 
Run the startup command (either nodecore for linux, or nodecore.bat for windows)
 
Run the startup command (either nodecore for linux, or nodecore.bat for windows)
 +
 +
To run NodeCore in a loop:
 +
 +
Linux
 +
 +
<pre>
 +
while true
 +
do
 +
    ./nodecore
 +
    read -t 30
 +
    echo Restarting NodeCore...
 +
done
 +
</pre>
 +
 +
Windows:
 +
 +
<pre>
 +
:execute
 +
call nodecore.bat
 +
 +
timeout /t 30 > NUL
 +
echo Restarting NodeCore...
 +
goto execute
 +
</pre>
  
 
=== Stop ===
 
=== Stop ===
  
CTRL+C for graceful shutdown
+
Best option is to connect to NodeCore with the NC_CLI run "stopnodecore" (see: [[NodeCore_CommandLine#stopnodecore]]), and wait 10-30 seconds for NodeCore to gracefully shut down.
  
Can kill process
+
One can also use CTRL+C for graceful shutdown.
  
 
=== Options ===
 
=== Options ===
Line 101: Line 136:
 
=== Install NodeCore ===
 
=== Install NodeCore ===
  
 +
See: [[NodeCore_QuickStart]]
 +
 +
===Update NodeCore===
 +
 +
Keep the data directory in a separate folder, such that you do not need to move any files each time you update.
 +
 +
1. Download new NC
 +
 +
2. Stop old NC (either with CTRL+C or stopnodecore from the NC_CLI)
 +
 +
3. Start new NC with -d parameter to specify the data directory. This is the directory that contains your "mainnet" folder.
 +
If mainnet folder is "C:\Users\My User\Desktop\VeriBlock\mainnet", then use "C:\Users\My User\Desktop\VeriBlock" for your data directory.
 +
 +
<pre>
 +
#Windows
 +
nodecore.bat -d "C:\Users\My User\Desktop\VeriBlock"
 +
 +
#Linux
 +
./nodecore -d /home/user/VeriBlock
 +
</pre>
  
 
== Operational stats ==
 
== Operational stats ==
  
* Full resync --> 12+ hours (per month)
+
* Full resync --> varies greatly based on network
 
* Restart --> less than 2 minutes (constant)
 
* Restart --> less than 2 minutes (constant)
 
* nodecore.dat file --> 10GB / month
 
* nodecore.dat file --> 10GB / month
* Memory usage --> less than 4GB (can increase by setting xmx, and Java will take max amount allowed)
+
* Memory usage --> less than 4GB (can increase by setting xmx, and Java will take max amount allowed). Allow higher memory when running an application node, such as for a pool.
  
 
== Random ==
 
== Random ==
Line 114: Line 169:
  
 
* NC uses a large nodecore.dat file --> want to exclude this file from anti-virus monitoring
 
* NC uses a large nodecore.dat file --> want to exclude this file from anti-virus monitoring
* NC has much network activity (ports 10501, 7501, 8501) --> If networking issues then troubleshoot firewall
+
* NC has much network activity (ports 10500, 7500, 8501) --> If networking issues then troubleshoot firewall
  
 
Windows:
 
Windows:
 
* Selecting console window and hitting ENTER could freeze it ("Quick Edit Mode") --> make sure not frozen: https://stackoverflow.com/questions/33883530/why-is-my-command-prompt-freezing-on-windows-10
 
* Selecting console window and hitting ENTER could freeze it ("Quick Edit Mode") --> make sure not frozen: https://stackoverflow.com/questions/33883530/why-is-my-command-prompt-freezing-on-windows-10
 
* Depending on your settings, some flavors of Windows may stop processing programs (including NodeCore) if you lock your machine (!!). The programs then resume upon unlocking. This is a windows setting that affects all processes, including NodeCore.
 
* Depending on your settings, some flavors of Windows may stop processing programs (including NodeCore) if you lock your machine (!!). The programs then resume upon unlocking. This is a windows setting that affects all processes, including NodeCore.

Latest revision as of 13:29, 11 April 2022

See: Main_Page, NodeCore_QuickStart, HowTo_run_NodeCore, ReleaseNotes

Overview

This page explains operations for NodeCore. For more detail, see: HowTo_run_NodeCore

Requirements

Hardware

  • At least 12GB of memory recommended
  • 2 CPU Cores
  • SSD drive (much disk activity on block files)
  • 75GB free space (As of 8/30/2021, data directory is 41G)
  • OS = Windows, Linux, Mac

For best peering performance, ensure that ports 7500-7501 are open to the internet.

If running a pool, ensure that 8500 and 8501 are open to any machines you want to mine with (if running a public pool, ensure 8500 and 8501 are open to the internet).

Software

Starting with v0.4.6 VeriBlock officially supports OpenJDK 8 - 14 on Ubuntu, CentOS, Windows 10, and Mac OS X with backwards compatibility for Oracle Java

Note that Java 15 and 16 are not currently supported.

CentOS - OpenJDK 8

If you experience an error running NodeCore on CentOS:

VERIBLOCK CANNOT FUNCTION WITHOUT THE SECP256K1 ELLIPTICAL CURVE

You can resolve the issue by using the Zulu build of OpenJDK 11 per the following instructions:

https://www.linuxuprising.com/2019/04/install-latest-openjdk-12-11-or-8-in.html

How to Install

Linux

#install Java on Ubuntu:
sudo apt install default-jre

For best peering results, allow incoming connections to port 7500/7501. If running a public pool, allow incoming connections to port 8500/8501. If you want to connect remote CLIs or PoP miners, you will have to allow incoming connections on port 10500/10501 from the machines you plan to connect from

#start nodecore
cd <NC_Directory>/nodecore-<version>/bin

#run NC (could run multiple ways, such as in a screen)
cd <NC_Directory>/nodecore-<version>/bin
screen -S nodecore './nodecore'

Sample linux script:

  1. Check for latest package release at https://explore.veriblock.org/api/stats/download
mkdir veriblock-0.4.12
cd veriblock-0.4.12
wget https://github.com/VeriBlock/nodecore-releases/releases/download/v0.4.12/veriblock-nodecore-all-0.4.12.tar.gz
tar zxvf veriblock-nodecore-all-0.4.12.tar.gz
cd nodecore-0.4.12/bin
./nodecore

NOTE: If you wish to limit the amount of memory that NodeCore uses to a smaller number, change the -Xmx6G option in bin/nodecore to -Xmx4G (for 4G)

Windows

For best usage, Java 14 is recommended because it supports all NodeCore Suite applications. (The GUI Wallet needs Java 14)

Here is a direct link to Java 14 via AdoptOpenJDK:

https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jre_x64_windows_hotspot_14.0.2_12.msi

After Java is installed:

cd /<NC_Directory>/nodecore-<version>/bin
nodecore.bat

NOTE: If you wish to limit the amount of memory that NodeCore uses to a smaller number, change the -Xmx6G option in bin/nodecore.bat to -Xmx4G (for 4G)

How to run

Start

NOTE: Starting with version 0.4.6, you can run ./nodecore -d USER to store the data in ~/VeriBlock to make future upgrades easier, or specify your own datadir with ./nodecore -d /path/to/datadir

Run the startup command (either nodecore for linux, or nodecore.bat for windows)

To run NodeCore in a loop:

Linux

while true
do
    ./nodecore
    read -t 30
    echo Restarting NodeCore...
done

Windows:

:execute
call nodecore.bat

timeout /t 30 > NUL
echo Restarting NodeCore...
goto execute

Stop

Best option is to connect to NodeCore with the NC_CLI run "stopnodecore" (see: NodeCore_CommandLine#stopnodecore), and wait 10-30 seconds for NodeCore to gracefully shut down.

One can also use CTRL+C for graceful shutdown.

Options

Can pass in a data directory: -d ~/data

Install NodeCore

See: NodeCore_QuickStart

Update NodeCore

Keep the data directory in a separate folder, such that you do not need to move any files each time you update.

1. Download new NC

2. Stop old NC (either with CTRL+C or stopnodecore from the NC_CLI)

3. Start new NC with -d parameter to specify the data directory. This is the directory that contains your "mainnet" folder. If mainnet folder is "C:\Users\My User\Desktop\VeriBlock\mainnet", then use "C:\Users\My User\Desktop\VeriBlock" for your data directory.

#Windows
nodecore.bat -d "C:\Users\My User\Desktop\VeriBlock"

#Linux
./nodecore -d /home/user/VeriBlock

Operational stats

  • Full resync --> varies greatly based on network
  • Restart --> less than 2 minutes (constant)
  • nodecore.dat file --> 10GB / month
  • Memory usage --> less than 4GB (can increase by setting xmx, and Java will take max amount allowed). Allow higher memory when running an application node, such as for a pool.

Random

Make sure antivirus and firewall are not blocking NodeCore

  • NC uses a large nodecore.dat file --> want to exclude this file from anti-virus monitoring
  • NC has much network activity (ports 10500, 7500, 8501) --> If networking issues then troubleshoot firewall

Windows: