Bitcoin White Node Installation Guide




Try new documentation!

1. Sytem requirement

  • Linux system required
  • Public IP address required
  • Ubuntu 16.04 64bit OS recommended
  • Above dual-core CPU recommended
  • Above 2 GB RAM recommended
  • Above 2MB bandwidth recommended

2. Installation

There are system: official version (mainnet). Both of them are co-existed but unable to communicate with each other.

The installation procedures of these two systems are the same except the installation package and configuration file (including default port setting).

As long as there is no conflict of ports, you can install official version on the same compouter, but please note, the power of the computer is highly required, such as dual-core CPU, 2GB RAM above or at least 4MB bandwidth recommended

2.1 Download and unpack

wget https://bitcoinwhite.org/btw-linux-1.0.4-mainnet.zip
unzip btw-linux-1.0.4-mainnet.zip

2.2 Initialize

In this step, two steps will be done automatically, as follows:

  • Install some dependency modules like nodejs and sqlite3
  • # Install dependency package 
    sudo apt-get install curl sqlite3 ntp wget git libssl-dev openssl make gcc g++ autoconf automake python build-essential -y 
    # libsodium for ubuntu 16.04 
    sudo apt-get install libtool libtool-bin -y 
     
    # Install nvm 
    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash 
    # This loads nvm 
    export NVM_DIR="$HOME/.nvm" 
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion 
     
    # Install node and npm for current user. 
    nvm install node 8 
    # check node version and it should be v8.x.x 
    node --version 
     
    # git clone sourece code 
    git clone https://github.com/BTWhite/BTWChain && cd BTWChain && chmod u+x btwd 
     
    # Install node packages 
    npm install
  • Install and configure the ntp service by which to synchronize your system time can be synchronized with that of other nodes.

This step only need be executed once, but it is OK to be done for several times.

Go to your installation folder
./btwd configure

3. Run

  

Go to the installation folder
To start the service
./btwd start

To stop the service
./btwd stop

To check the running status
./btwd status

To restart the service
./btwd restart

To upgrade the system
./btwd upgrade

To re-synchronize the blockchain
./btwd rebuild

To check the system version
./btwd version

To start producing block
./btwd enable “your sercret”

To check the log
tail -f logs/debug.log

4. Delegate configuration

4.1 Delegate’s password

Use your favorite editor to open config.json and locate find the [secret] field. Fill this field with your delegate’s password. This field is an array of JSON format strings, which means you can set several passwords in one particular computer, but be careful not to duplicate them.

forging secret

NOTICE: DO NOT configure the same password, no matter in a single machine computer or in multiple machinescomputers.

4.2 Public IP

By default, the system will automatically detect the public IP you assigned automatically. But in some Cloud hostshost built on cloud, the public IP may not be able to identifiedidentify. Under such circumstanceIn this situation, the following field needs to be appended in config.json:

"publicIp": "Here is your public IP",

And don’t forget to restarting your system after configuration by:

./btwd restart

5. Upgrade the system

./btwd upgrade
./btwd start

6. Troubleshooting

6.1 I cannot access my online wallet

Solution 1

Check the [port] field in config.json, the default port numbers of mainnet are 8192, respectively.

Solution 2

Check whether the service server is runningstarted by typing commands as follows:

./btwd status
if server is not startedrunning, then following message will be shown
Bitcoin White server is not running
then restart the server
./btwd restart
## 6.2 Unable to generate the block
### Solution 1
Make sure the rank of delegate is in top 101
### Solution 2
Check the error log with following commands:
grep Failed logs/debug.log
If there is an error message like this:
Failed to get public ip, block forging MAY not work!
It means the system cannot get the public IP, and you need you to configure it manually, see [4.2 Public IP]
### Solution 3
Check the error log with following commands:
grep error logs/debug.log
If there is an error message like this:

Failed to load delegates: Account xxxxxxxxx not found

It means that the passphrase of your account has not been registered as a delegate yet, or you started the service before it registered as a delegate. Simply restarting the service will solve the problem.

NOTICE: If your node is synchronizing the blocks, restart the system after the synchronization is finished.

./btwd restart

If the system has been restarted successfully, the following log will be found:

grep Forging logs/debug.log

Forging enabled on account: xxxxxxxxxxxxxx
```

6.3 Unable to synchronize the block (blockchain growth suspend)

This issue can be confirmed by comparing the block height of your wallet and official node

First, try to restart the system:

./btwd restart

If problem is still unsolved, try to rebuild`

./btwd rebuild