Difference between revisions of "HowTo run NodeCore"
BullishKeanu (talk | contribs) (Update to remove testnet references and include a link to the latest nodecore version in the doc) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
− | See: [[Main_Page]], [[NodeCore_QuickStart]], [[NodeCore_Operations]], [[Nodecore.properties]] | + | See: [[Main_Page]], [[NodeCore_QuickStart]], [[NodeCore_Operations]], [[Nodecore.properties]], [[TestNet]] |
<!--T:2--> | <!--T:2--> | ||
Line 13: | Line 13: | ||
To see an operations guide for installing NodeCore, see: [[NodeCore_Operations]] | To see an operations guide for installing NodeCore, see: [[NodeCore_Operations]] | ||
+ | <!--T:48--> | ||
To see a quickstart to get NC running fast, see: [[NodeCore_QuickStart]] | To see a quickstart to get NC running fast, see: [[NodeCore_QuickStart]] | ||
+ | <!--T:49--> | ||
To modify the nodecore.properties file, see: [[Nodecore.properties]] | To modify the nodecore.properties file, see: [[Nodecore.properties]] | ||
Line 43: | Line 45: | ||
== FAQ == <!--T:12--> | == FAQ == <!--T:12--> | ||
+ | |||
+ | === What startup flags are available === | ||
+ | <pre> | ||
+ | -d, description: The data directory where NodeCore generated files reside | ||
+ | -c, description: The configuration file location | ||
+ | </pre> | ||
+ | |||
+ | === How to set NodeCore Log Path === | ||
+ | |||
+ | You can specify log path with an environmental variable "NODECORE_LOG_PATH". | ||
+ | |||
+ | Example for linux: | ||
+ | |||
+ | <pre> | ||
+ | export NODECORE_LOG_PATH=/home/user/nodecore_logs/ | ||
+ | </pre> | ||
=== How can block times be negative? === <!--T:13--> | === How can block times be negative? === <!--T:13--> | ||
Line 67: | Line 85: | ||
# Ensure that you unzip your newlyl downloaded NodeCore to a new folder location - do not overwrite your previous version | # Ensure that you unzip your newlyl downloaded NodeCore to a new folder location - do not overwrite your previous version | ||
# In the new version: | # In the new version: | ||
− | ## Create a mainnet folder | + | ## Create a mainnet folder most likely in the "nodecore-0.X.X/bin" directory. |
## Copy in your previous wallet.dat and walletconfig.dat files into the "nodecore-0.X.X/bin/mainnet" directory. | ## Copy in your previous wallet.dat and walletconfig.dat files into the "nodecore-0.X.X/bin/mainnet" directory. | ||
# Run your new version of nodecore and start to sync. | # Run your new version of nodecore and start to sync. | ||
Line 80: | Line 98: | ||
<!--T:25--> | <!--T:25--> | ||
− | NodeCore can take a data directory | + | NodeCore can take a data directory -d as part of the startup. |
<!--T:26--> | <!--T:26--> | ||
Line 87: | Line 105: | ||
<!--T:27--> | <!--T:27--> | ||
<pre> | <pre> | ||
− | cd /<myDir>/nodecore-0. | + | cd /<myDir>/nodecore-0.4.10/bin |
− | ./nodecore -d | + | ./nodecore -d /home/user/data/ |
</pre> | </pre> | ||
<!--T:28--> | <!--T:28--> | ||
− | # nodecore.properties will be in | + | # nodecore.properties will be in /home/user/data/nodecore.properties |
− | # /mainnet folder will be in | + | # /mainnet folder will be in /home/user/data/mainnet |
</pre> | </pre> | ||
Line 101: | Line 119: | ||
<!--T:30--> | <!--T:30--> | ||
<pre> | <pre> | ||
− | cd <myDir>\nodecore-0. | + | cd <myDir>\nodecore-0.4.10\bin |
nodecore.bat -d C:\data | nodecore.bat -d C:\data | ||
Line 115: | Line 133: | ||
</pre> | </pre> | ||
− | ===How to set NodeCore log level=== | + | ===How to set NodeCore log level=== <!--T:50--> |
+ | <!--T:51--> | ||
Currently NodeCore log level can be set through the NODECORE_LOG_LEVEL process environmental variable. Once set, NodeCore needs to be restarted. | Currently NodeCore log level can be set through the NODECORE_LOG_LEVEL process environmental variable. Once set, NodeCore needs to be restarted. | ||
+ | <!--T:52--> | ||
The default is "INFO", which can create very large log files. | The default is "INFO", which can create very large log files. | ||
+ | <!--T:53--> | ||
This impacts the "veriblock.nodecore.*.log" (which is the biggest log file). It does not affect the other, much smaller, log files. | This impacts the "veriblock.nodecore.*.log" (which is the biggest log file). It does not affect the other, much smaller, log files. | ||
+ | <!--T:54--> | ||
WINDOWS | WINDOWS | ||
+ | <!--T:55--> | ||
This is an example of setting it in Windows, and then starting NodeCore: | This is an example of setting it in Windows, and then starting NodeCore: | ||
+ | <!--T:56--> | ||
<pre> | <pre> | ||
set NODECORE_LOG_LEVEL=WARN | set NODECORE_LOG_LEVEL=WARN | ||
Line 133: | Line 157: | ||
</pre> | </pre> | ||
+ | <!--T:57--> | ||
LINUX | LINUX | ||
+ | <!--T:58--> | ||
Run in same session, such as a screen: | Run in same session, such as a screen: | ||
+ | <!--T:59--> | ||
<pre> | <pre> | ||
export NODECORE_LOG_LEVEL=WARN | export NODECORE_LOG_LEVEL=WARN | ||
− | echo | + | echo $NODECORE_LOG_LEVEL |
./nodecore | ./nodecore | ||
</pre> | </pre> | ||
Line 177: | Line 204: | ||
<!--T:47--> | <!--T:47--> | ||
− | On a Mac, you need to install the | + | On a Mac, you need to install OpenJDK, our releases are tested on the LTS versions here -> https://adoptopenjdk.net/ |
</translate> | </translate> |
Latest revision as of 21:20, 5 November 2020
See: Main_Page, NodeCore_QuickStart, NodeCore_Operations, Nodecore.properties, TestNet
Contents
- 1 Overview
- 2 Steps
- 3 FAQ
- 3.1 What startup flags are available
- 3.2 How to set NodeCore Log Path
- 3.3 How can block times be negative?
- 3.4 How to upgrade NodeCore and keep your wallet
- 3.5 How to upgrade NodeCore PoW and keep your Bitcoin wallet
- 3.6 How to specify a data directory for NodeCore
- 3.7 How to send from a specific address?
- 3.8 How to set NodeCore log level
- 4 Troubleshooting
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: |
When you first run NodeCore, it will create several other files in a new mainnet 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://explore.veriblock.org/network-stats. This shows the number of blocks your local instance must load to be in sync with the chain. NodeCore will create a cache file such that when you restart it they will load faster next time.
FAQ
What startup flags are available
-d, description: The data directory where NodeCore generated files reside -c, description: The configuration file location
How to set NodeCore Log Path
You can specify log path with an environmental variable "NODECORE_LOG_PATH".
Example for linux:
export NODECORE_LOG_PATH=/home/user/nodecore_logs/
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
Since mainnet is now live, updating is very fast.
If you do NOT have a previous wallet/address/balance download the latest nodecore found here https://explore.veriblock.org/api/stats/download.
If you do have a wallet/address/balance that you want to carry over make sure you do the following:
- Make sure you have a backup of your wallet! You can copy the mainnet folder which contains your wallet.dat, or use the NodeCore_CommandLine#importwallet command from the NC_CLI.
- Ensure that you unzip your newlyl downloaded NodeCore to a new folder location - do not overwrite your previous version
- In the new version:
- Create a mainnet folder most likely in the "nodecore-0.X.X/bin" directory.
- Copy in your previous wallet.dat and walletconfig.dat files into the "nodecore-0.X.X/bin/mainnet" directory.
- Run your new version of nodecore and start to sync.
- When you run NC_CLI getinfo on the new version of the running nodecore, you should see your previous wallet and balance.
How to upgrade NodeCore PoW and keep your Bitcoin wallet
When upgrading your PoP miner, you can copy the file "bitcoin-pop.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.4.10/bin ./nodecore -d /home/user/data/
- nodecore.properties will be in /home/user/data/nodecore.properties
- /mainnet folder will be in /home/user/data/mainnet
Example for Windows
cd <myDir>\nodecore-0.4.10\bin nodecore.bat -d C:\data # nodecore.properties will be in C:\data\nodecore.properties # /mainnet folder will be in C:\data\mainnet
How to send from a specific address?
https://wiki.veriblock.org/index.php?title=NodeCore_CommandLine#send
send <amount> <destinationAddress> [sourceAddress]
How to set NodeCore log level
Currently NodeCore log level can be set through the NODECORE_LOG_LEVEL process environmental variable. Once set, NodeCore needs to be restarted.
The default is "INFO", which can create very large log files.
This impacts the "veriblock.nodecore.*.log" (which is the biggest log file). It does not affect the other, much smaller, log files.
WINDOWS
This is an example of setting it in Windows, and then starting NodeCore:
set NODECORE_LOG_LEVEL=WARN echo %NODECORE_LOG_LEVEL% nodecore.bat
LINUX
Run in same session, such as a screen:
export NODECORE_LOG_LEVEL=WARN echo $NODECORE_LOG_LEVEL ./nodecore
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 OpenJDK, our releases are tested on the LTS versions here -> https://adoptopenjdk.net/