Difference between revisions of "Bootstrap Downloader"

From Veriblock Wiki
Jump to: navigation, search
 
(9 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
== Overview ==
 
== Overview ==
 
The bootstrap-downloader is a new tool which can be used to download all block files, or missing block files, and an updated nodecore.dat from the VeriBlock mirrors, so that you can sync a full node much quicker than from peers. When doing an incremental update, it checks all existing block files for corruption and will replace them along with downloading any missing (newer) files that you may not have.
 
The bootstrap-downloader is a new tool which can be used to download all block files, or missing block files, and an updated nodecore.dat from the VeriBlock mirrors, so that you can sync a full node much quicker than from peers. When doing an incremental update, it checks all existing block files for corruption and will replace them along with downloading any missing (newer) files that you may not have.
 +
 +
Source code here: https://github.com/VeriBlock/nodecore/tree/master/bootstrap-downloader
  
 
== Usage ==
 
== Usage ==
Line 13: Line 15:
 
If for any reason the '''nodecore/bin''' folder from the distributed package can't be located (e.g: you call the start script from another folder) the data blocks will be downloaded at '''./'''
 
If for any reason the '''nodecore/bin''' folder from the distributed package can't be located (e.g: you call the start script from another folder) the data blocks will be downloaded at '''./'''
  
 +
Please remember, the usage of the bootstrap-downloader '''is optional''' and is not necessary to run a NodeCore instance, also it is not intended to be the main way to maintain your NodeCore installation.
  
=== Program Options ===
+
Note: The bootstrap-downloader will update the files which are on the target data directory (including the nodecore.dat file) so please, '''stop any NodeCore instance using the targeted data directory before its use'''.
The following program options are available:
 
  
{|class="wikitable"
+
===Application.conf file===
|+Program Options
 
|-
 
|Option
 
|Description
 
|Example
 
|-
 
| -n
 
|Specify the target network
 
| -n testnet
 
|-
 
| -d
 
|Specify the target data directory
 
| -d /nodecore_data
 
|-
 
|}
 
  
 +
  downloader {
 +
    nodecoreDataDirectory = ${?DOWNLOADER_NODECORE_DATA_DIRECTORY}
 +
    network = "mainnet"
 +
    network = ${?DOWNLOADER_NETWORK}
 +
    url = "https://mirror.veriblock.org/bootstrap"
 +
    url = ${?DOWNLOADER_URL}
 +
    localUrl = false
 +
    localUrl = ${?DOWNLOADER_LOCAL_URL}
 +
    autoClose = false
 +
    autoClose = ${?DOWNLOADER_AUTO_CLOSE}
 +
  }
  
 
=== Environment Variables ===
 
=== Environment Variables ===
Line 50: Line 48:
 
|-
 
|-
 
|}
 
|}
 
 
Please remember, the usage of the bootstrap-downloader '''is optional''' and is not necessary to run a NodeCore instance, also it is not intended to be the main way to maintain your NodeCore installation.
 
 
Note: The bootstrap-downloader will update the files which are on the target data directory (including the nodecore.dat file) so please, stop any NodeCore instance using the targeted data directory before its use.
 
  
 
== TestNet ==
 
== TestNet ==

Latest revision as of 11:12, 18 March 2022

See: NodeCore_0.4.8_ReleaseNotes

Overview

The bootstrap-downloader is a new tool which can be used to download all block files, or missing block files, and an updated nodecore.dat from the VeriBlock mirrors, so that you can sync a full node much quicker than from peers. When doing an incremental update, it checks all existing block files for corruption and will replace them along with downloading any missing (newer) files that you may not have.

Source code here: https://github.com/VeriBlock/nodecore/tree/master/bootstrap-downloader

Usage

The bootstrap-downloader can be started with the bootstrap-downloader.bat (windows) and bootstrap-downloader (linux/mac).

By default, the bootstrap-downloader will download the mainnet block files inside the nodecore/bin folder from the distributed package.

If for any reason the nodecore/bin folder from the distributed package can't be located (e.g: you call the start script from another folder) the data blocks will be downloaded at ./

Please remember, the usage of the bootstrap-downloader is optional and is not necessary to run a NodeCore instance, also it is not intended to be the main way to maintain your NodeCore installation.

Note: The bootstrap-downloader will update the files which are on the target data directory (including the nodecore.dat file) so please, stop any NodeCore instance using the targeted data directory before its use.

Application.conf file

 downloader {
   nodecoreDataDirectory = ${?DOWNLOADER_NODECORE_DATA_DIRECTORY}
   network = "mainnet"
   network = ${?DOWNLOADER_NETWORK}
   url = "https://mirror.veriblock.org/bootstrap"
   url = ${?DOWNLOADER_URL}
   localUrl = false
   localUrl = ${?DOWNLOADER_LOCAL_URL}
   autoClose = false
   autoClose = ${?DOWNLOADER_AUTO_CLOSE}
 }

Environment Variables

The following environment variables are available:

Environment variables
Name Description Example
DOWNLOADER_LOG_LEVEL Specify log level for the application DOWNLOADER_LOG_LEVEL=DEBUG

TestNet

See: TestNet#Bootstrap

Expected console output

Testnet download example.png

At the start, the downloader will check how many files are available on the trusted host, after that, the local files are checked (this operation may take several minutes if it's ran over an existing data folder, the speed will depend on your disk), as the last step, the tool will download all the necessary files individually.