1. Home
  2. Get Started
  3. Node Installation

Node Installation

Build

We recommend building on Ubuntu 16.04 LTS (64-bit)

Build Dependencies:

sudo apt-get update
sudo apt-get install autoconf cmake make automake libtool git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev doxygen

Build Script:

git clone https://github.com/bitshares/bitshares-core.git
cd bitshares-core
git checkout master # may substitute "master" with current release tag
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Upgrade Script: (prepend to the Build Script above if you built a prior release):

git remote set-url origin https://github.com/bitshares/bitshares-core.git
git checkout master
git remote set-head origin --auto
git pull
git submodule update --init --recursive # this command may fail
git submodule sync --recursive
git submodule update --init --recursive

NOTE:

  • BitShares requires a 64-bit operating system to build, and will not build on a 32-bit OS. Tested operating systems:
    • Linux (heavily tested with Ubuntu 18.04 LTS and Ubuntu 16.04 LTS)
    • macOS (various versions)
    • Windows (various versions, Visual Studio and MinGW)
    • OpenBSD (various versions)
  • BitShares requires Boost libraries to build, supports version 1.58 to 1.69. Newer versions may work, but have not been tested. If your system came pre-installed with a version of Boost libraries that you do not wish to use, you may manually build your preferred version and use it with BitShares by specifying it on the CMake command line.Example: cmake -DBOOST_ROOT=/path/to/boost ..
  • BitShares requires OpenSSL libraries to build, supports version 1.0.2 to 1.1.1. If your system came pre-installed with a version of OpenSSL libraries that you do not wish to use, you may manually build your preferred version and use it with BitShares by specifying it on the CMake command line.Example: cmake -DOPENSSL_ROOT_DIR=/path/to/openssl ..

Run the node software

After Building, the node software witness_node can be launched with:

./programs/witness_node/witness_node

The node will automatically create a witness_node_data_dir directory with some config files. The blockchain data will be stored in the directory too. It may take several hours to fully synchronize the blockchain.

You can exit the node using Ctrl+C. Please be aware that the node may need some time (usually a few minutes) to exit cleanly, please be patient.

IMPORTANT: By default the node will start in reduced memory mode by using some of the commands detailed in Memory reduction for nodes. In order to run a full node with all the account histories (which is usually not necessary) you need to remove partial-operations and max-ops-per-account from your config file. Please note that currently(2018-10-17) a full node will need more than 160GB of RAM to operate and required memory is growing fast. Consider the following table as minimal requirements before running a node:

Default Full Minimal ElasticSearch
150G HDD, 16G RAM 640G SSD, 64G RAM * 120G HDD, 4G RAM 1TB SSD, 32G RAM

* For this setup, allocate at least 500GB of SSD as swap.

To use the command-line wallet or other wallets / clients with the node, the node need to be started with RPC connection enabled, which can be done by starting the node with the --rpc-endpoint parameter, E.G.

./programs/witness_node/witness_node --rpc-endpoint=127.0.0.1:8090

or configure it in the config file by editing witness_node_data_dir/config.ini as follows:

rpc-endpoint = 127.0.0.1:8090

You can run the program with --help parameter to see more info:

./programs/witness_node/witness_node --help

Run the command-line wallet software

To start the command-line wallet, in a separate terminal you can run:

./programs/cli_wallet/cli_wallet

IMPORTANT: The cli_wallet or API interfaces to the witness node wouldn’t be fully functional unless the witness node is fully synchronized with the blockchain. The cli_wallet command info will show result head_block_age which will tell you how far you are from the live current block of the blockchain.

To check your current block:

new >>> info

To query the blockchain, E.G. get info about an account:

new >>> get_account <account_name_or_id>

If you need to transact with your account but not only query, firstly set your initial password and unlock the wallet:

  • For non-Windows operating systems, you can type the commands and press [ENTER], then input the password and press [ENTER], in this case the password won’t show:
    new >>> set_password [ENTER]
    Enter password:
    locked >>> unlock [ENTER]
    Enter password:
    unlocked >>>
    
  • For Windows, or you’d like to show the password, type the commands with the password:
    new >>> set_password <PASSWORD>
    locked >>> unlock <PASSWORD>
    unlocked >>>
    

To be able to transact with your account, import the corresponding private keys:

unlocked >>> import_key <ACCOUNT_NAME> <WIF_KEY>

The private keys will be encrypted and stored in the wallet file, the file name is wallet.json by default. The private keys are accessible when the wallet is unlocked.

unlocked >>> dump_private_keys

Use lock command to make the private keys inaccessible. There is no auto-lock feature so far.

unlocked >>> lock

To import your initial (genesis) balances, import the private keys corresponding to the balances:

unlocked >>> import_balance <ACCOUNT_NAME> [<WIF_KEY> ...] true

Use help to see all available wallet commands.

>>> help

Use gethelp <COMMAND> to see more info about individual commands. E.G.

>>> gethelp get_order_book

The definition of all commands is available in the wallet.hpp souce code file. Corresponding documentation can be found in the Doxygen documentation.

You can run the program with --help parameter to see more info:

./programs/cli_wallet/cli_wallet --help