Difference between revisions of "HowTo run NodeCore"

From Veriblock Wiki
Jump to: navigation, search
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
See: [[Main_Page]]
+
<languages/>
 +
<translate>
 +
<!--T:1-->
 +
See: [[Main_Page]], [[NodeCore_QuickStart]], [[NodeCore_Operations]], [[Nodecore.properties]]
  
 +
<!--T:2-->
 
__TOC__
 
__TOC__
  
== Overview ==
+
== Overview == <!--T:3-->
 
NodeCore is the service that runs the VBK blockchain. It is written in Java, and runs on Windows, Linux, and mac.
 
NodeCore is the service that runs the VBK blockchain. It is written in Java, and runs on Windows, Linux, and mac.
  
== Steps ==
+
<!--T:4-->
 +
To see an operations guide for installing NodeCore, see: [[NodeCore_Operations]]
  
 +
To see a quickstart to get NC running fast, see: [[NodeCore_QuickStart]]
 +
 +
To modify the nodecore.properties file, see: [[Nodecore.properties]]
 +
 +
== Steps == <!--T:5-->
 +
 +
<!--T:6-->
 
Unzip the package:
 
Unzip the package:
  
 +
<!--T:7-->
 
{| class="wikitable"
 
{| class="wikitable"
 
! Windows
 
! Windows
Line 17: Line 30:
 
| Unzip to your preferred directory, then run nodecore.
 
| Unzip to your preferred directory, then run nodecore.
  
 +
<!--T:8-->
 
Note: On Linux & Mac systems, you may need to make the nodecore shell script executable by running the following command:
 
Note: On Linux & Mac systems, you may need to make the nodecore shell script executable by running the following command:
  
 +
<!--T:9-->
 
<pre>chmod a+x nodecore</pre>
 
<pre>chmod a+x nodecore</pre>
 
|}
 
|}
  
 +
<!--T:10-->
 
When you first run NodeCore, it will create several other files in a new testnet folder (nodecore.properties, veriblock.nodecore.log, nodecore.dat, etc...), and load the existing blockchain.
 
When you first run NodeCore, it will create several other files in a new testnet folder (nodecore.properties, veriblock.nodecore.log, nodecore.dat, etc...), and load the existing blockchain.
  
 +
<!--T:11-->
 
NodeCore may take several minutes to load all the blocks in the blockchain. See the highest block at https://TestNet.Explore.Veriblock.org. This shows the number of blocks your local instance must load. NodeCore will create a cache file such that when you restart it they will load faster next time.
 
NodeCore may take several minutes to load all the blocks in the blockchain. See the highest block at https://TestNet.Explore.Veriblock.org. This shows the number of blocks your local instance must load. NodeCore will create a cache file such that when you restart it they will load faster next time.
  
== FAQ ==
+
== FAQ == <!--T:12-->
  
=== How can block times be negative? ===
+
=== How can block times be negative? === <!--T:13-->
  
 +
<!--T:14-->
 
A negative age indicates the miner's clock was ahead.
 
A negative age indicates the miner's clock was ahead.
  
 +
<!--T:15-->
 
For more background, see: https://en.bitcoin.it/wiki/Block_timestamp
 
For more background, see: https://en.bitcoin.it/wiki/Block_timestamp
  
=== How to upgrade NodeCore and keep your wallet ===
+
=== How to upgrade NodeCore and keep your wallet === <!--T:16-->
  
 +
<!--T:17-->
 
As a testnet, new versions of NodeCore will be released. Upgrading is relatively fast.
 
As a testnet, new versions of NodeCore will be released. Upgrading is relatively fast.
  
 +
<!--T:18-->
 
If you do NOT have a previous wallet/address/balance, then this is easy, just download and run the new NodeCore.
 
If you do NOT have a previous wallet/address/balance, then this is easy, just download and run the new NodeCore.
  
 +
<!--T:19-->
 
If you do have a wallet/address/balance that you want to carry over, this is still easy, just make sure you do the following:
 
If you do have a wallet/address/balance that you want to carry over, this is still easy, just make sure you do the following:
  
 +
<!--T:20-->
 
# Make sure you have a backup of your wallet! You could copy the testnet folder, or use the [[NodeCore_CommandLine#importwallet]] command from the NC_CLI.
 
# Make sure you have a backup of your wallet! You could copy the testnet folder, or use the [[NodeCore_CommandLine#importwallet]] command from the NC_CLI.
 
# Unzip NodeCore to a new folder location - do not overwrite your previous version
 
# Unzip NodeCore to a new folder location - do not overwrite your previous version
Line 49: Line 72:
 
# When you run NC_CLI getinfo on the new version, you should see your previous wallet and balance
 
# When you run NC_CLI getinfo on the new version, you should see your previous wallet and balance
  
 +
<!--T:21-->
 
[[File:Nodecore_import_1.png|400px]]
 
[[File:Nodecore_import_1.png|400px]]
  
=== How to upgrade NodeCore PoW and keep your Bitcoin testnet wallet ===
+
=== How to upgrade NodeCore PoW and keep your Bitcoin testnet wallet === <!--T:22-->
  
 +
<!--T:23-->
 
When upgrading your PoP miner, you can copy the file "bitcoin-pop-testnet.wallet" from the bin folder of your current PoP miner directory to the bin folder of your new PoP miner.
 
When upgrading your PoP miner, you can copy the file "bitcoin-pop-testnet.wallet" from the bin folder of your current PoP miner directory to the bin folder of your new PoP miner.
  
=== How to specify a data directory for NodeCore ===
+
=== How to specify a data directory for NodeCore === <!--T:24-->
  
 +
<!--T:25-->
 
NodeCore can take a data directory ~d as part of the startup.
 
NodeCore can take a data directory ~d as part of the startup.
  
 +
<!--T:26-->
 
Example for Linux:
 
Example for Linux:
  
 +
<!--T:27-->
 
<pre>
 
<pre>
 
cd /<myDir>/nodecore-0.1.7/bin
 
cd /<myDir>/nodecore-0.1.7/bin
Line 66: Line 94:
 
</pre>
 
</pre>
  
 +
<!--T:28-->
 
# nodecore.properties will be in ~/data/nodecore.properties
 
# nodecore.properties will be in ~/data/nodecore.properties
 
# /testnet folder will be in ~/data/testnet
 
# /testnet folder will be in ~/data/testnet
 
</pre>
 
</pre>
  
 +
<!--T:29-->
 
Example for Windows
 
Example for Windows
  
 +
<!--T:30-->
 
<pre>
 
<pre>
 
cd <myDir>\nodecore-0.2.1-r2\bin
 
cd <myDir>\nodecore-0.2.1-r2\bin
 
nodecore.bat -d C:\data
 
nodecore.bat -d C:\data
  
 +
<!--T:31-->
 
# nodecore.properties will be in C:\data\nodecore.properties
 
# nodecore.properties will be in C:\data\nodecore.properties
 
# /testnet folder will be in C:\data\testnet
 
# /testnet folder will be in C:\data\testnet
 
</pre>
 
</pre>
  
== Troubleshooting ==
+
=== How to send from a specific address? === <!--T:32-->
 +
 
 +
<!--T:33-->
 +
As of 7/18/2018, the send command only sends from the default address, there is not a public way to select the address.
 +
 
 +
<!--T:34-->
 +
A workaround is to call the setdefaultaddress (see: [[NodeCore_CommandLine#setdefaultaddress]] )
 +
 
 +
<!--T:35-->
 +
Then 'send' will use that new address.
 +
 
 +
== Troubleshooting == <!--T:36-->
  
=== NodeCore is stuck on a block ===
+
=== NodeCore is stuck on a block === <!--T:37-->
  
 +
<!--T:38-->
 
Ideally this should not happen, but if it does first try restarting NodeCore.
 
Ideally this should not happen, but if it does first try restarting NodeCore.
  
=== Java out-of-memory ===
+
=== Java out-of-memory === <!--T:39-->
  
 +
<!--T:40-->
 
It is possible that you only have a 32-bit version of Java installed. 64-bit is highly recommended.
 
It is possible that you only have a 32-bit version of Java installed. 64-bit is highly recommended.
  
 +
<!--T:41-->
 
Modify the start file (nodecore.bat for windows, nodecore for linux) to increase the memory limit. Pass in a value, such as "1024 MB" into the DEFAULT_JVM_OPTS variable:
 
Modify the start file (nodecore.bat for windows, nodecore for linux) to increase the memory limit. Pass in a value, such as "1024 MB" into the DEFAULT_JVM_OPTS variable:
  
 +
<!--T:42-->
 
<pre>
 
<pre>
 
DEFAULT_JVM_OPTS=-Xmx1024m
 
DEFAULT_JVM_OPTS=-Xmx1024m
 
</pre>
 
</pre>
  
=== NodeCore keeps turning off with "Application exit"  ===
+
=== NodeCore keeps turning off with "Application exit"  === <!--T:43-->
  
 +
<!--T:44-->
 
If messages like:
 
If messages like:
 
<pre>
 
<pre>
Line 103: Line 151:
 
</pre>
 
</pre>
  
 +
<!--T:45-->
 
Then something external is shutting off NodeCore (such as a server restart, external process kill, or something else).
 
Then something external is shutting off NodeCore (such as a server restart, external process kill, or something else).
  
=== Having trouble on a mac ===
+
=== Having trouble on a mac === <!--T:46-->
  
 +
<!--T:47-->
 
On a Mac, you need to install the JDK (Java Development Kit) instead of just the JRE: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
 
On a Mac, you need to install the JDK (Java Development Kit) instead of just the JRE: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
 +
 +
</translate>

Revision as of 14:41, 11 December 2018

Other languages:

See: Main_Page, NodeCore_QuickStart, NodeCore_Operations, Nodecore.properties

Overview

NodeCore is the service that runs the VBK blockchain. It is written in Java, and runs on Windows, Linux, and mac.

To see an operations guide for installing NodeCore, see: NodeCore_Operations

To see a quickstart to get NC running fast, see: NodeCore_QuickStart

To modify the nodecore.properties file, see: Nodecore.properties

Steps

Unzip the package:

Windows Mac and Linux
Unzip the nodecore-*.zip file In the bin folder, then run nodecore.bat Unzip to your preferred directory, then run nodecore.

Note: On Linux & Mac systems, you may need to make the nodecore shell script executable by running the following command:

chmod a+x nodecore

When you first run NodeCore, it will create several other files in a new testnet folder (nodecore.properties, veriblock.nodecore.log, nodecore.dat, etc...), and load the existing blockchain.

NodeCore may take several minutes to load all the blocks in the blockchain. See the highest block at https://TestNet.Explore.Veriblock.org. This shows the number of blocks your local instance must load. NodeCore will create a cache file such that when you restart it they will load faster next time.

FAQ

How can block times be negative?

A negative age indicates the miner's clock was ahead.

For more background, see: https://en.bitcoin.it/wiki/Block_timestamp

How to upgrade NodeCore and keep your wallet

As a testnet, new versions of NodeCore will be released. Upgrading is relatively fast.

If you do NOT have a previous wallet/address/balance, then this is easy, just download and run the new NodeCore.

If you do have a wallet/address/balance that you want to carry over, this is still easy, just make sure you do the following:

  1. Make sure you have a backup of your wallet! You could copy the testnet folder, or use the NodeCore_CommandLine#importwallet command from the NC_CLI.
  2. Unzip NodeCore to a new folder location - do not overwrite your previous version
  3. In the new version:
    1. Create a testnet folder (probably in "nodecore-0.X.X\bin")
    2. Copy in your previous wallet.dat and walletconfig.dat files into "nodecore-0.X.X\bin\testnet".
  4. When you run NC_CLI getinfo on the new version, you should see your previous wallet and balance

Nodecore import 1.png

How to upgrade NodeCore PoW and keep your Bitcoin testnet wallet

When upgrading your PoP miner, you can copy the file "bitcoin-pop-testnet.wallet" from the bin folder of your current PoP miner directory to the bin folder of your new PoP miner.

How to specify a data directory for NodeCore

NodeCore can take a data directory ~d as part of the startup.

Example for Linux:

cd /<myDir>/nodecore-0.1.7/bin
./nodecore -d ~/data/ > /dev/null 2>&1 &
  1. nodecore.properties will be in ~/data/nodecore.properties
  2. /testnet folder will be in ~/data/testnet

Example for Windows

cd <myDir>\nodecore-0.2.1-r2\bin
nodecore.bat -d C:\data

# nodecore.properties will be in C:\data\nodecore.properties
# /testnet folder will be in C:\data\testnet

How to send from a specific address?

As of 7/18/2018, the send command only sends from the default address, there is not a public way to select the address.

A workaround is to call the setdefaultaddress (see: NodeCore_CommandLine#setdefaultaddress )

Then 'send' will use that new address.

Troubleshooting

NodeCore is stuck on a block

Ideally this should not happen, but if it does first try restarting NodeCore.

Java out-of-memory

It is possible that you only have a 32-bit version of Java installed. 64-bit is highly recommended.

Modify the start file (nodecore.bat for windows, nodecore for linux) to increase the memory limit. Pass in a value, such as "1024 MB" into the DEFAULT_JVM_OPTS variable:

DEFAULT_JVM_OPTS=-Xmx1024m

NodeCore keeps turning off with "Application exit"

If messages like:

INFO [main] n.Program [Program.java:133] Application exit

Then something external is shutting off NodeCore (such as a server restart, external process kill, or something else).

Having trouble on a mac

On a Mac, you need to install the JDK (Java Development Kit) instead of just the JRE: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html