Skip to content

simelo/libbitcoin-server

 
 

Repository files navigation

Build Status

Coverage Status

Libbitcoin Server

Bitcoin full node and query server

Documentation is available on the wiki.

Downloads are available for Linux, Macintosh and Windows.

License Overview

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published on-line. Source code for this library must always remain free for everybody to access.

About Libbitcoin

The libbitcoin toolkit is a set of cross platform C++ libraries for building bitcoin applications. The toolkit consists of several libraries, most of which depend on the foundational libbitcoin library. Each library's repository can be cloned and built using common Automake instructions.

About Libbitcoin Server

A full Bitcoin peer-to-peer node, Libbitcoin Server is also a high performance blockchain query server. It can be built as a single portable executable for Linux, macOS or Windows and is available for download as a signed single executable for each. It is trivial to deploy, just run the single process and allow it about two days to synchronize the Bitcoin blockchain.

Libbitcoin Server exposes a custom query TCP API built based on the ZeroMQ networking stack. It supports server, and optionally client, identity certificates and wire encryption via CurveZMQ and the Sodium cryptographic library.

The API is backward compatible with its predecessor Obelisk and supports simple and advanced scenarios, including stealth payment queries. The libbitcoin-client library provides a calling API for building client applications. The server is complimented by libbitcoin-explorer (BX), the Bitcoin command line tool and successor to SX.

Requirements.

Growing file storage (SSD preferred), with swap enabled and at least 4Gb RAM (8Gb preferred). See storage space for the estimated growth rate.

Installation

Libbitcoin Server can be built from sources or downloaded as a signed portable single file executable.

The master branch is a staging area for the next major release and should be used only by libbitcoin developers. The current release branch is version3. Detailed installation instructions are provided below.

Autotools (advanced users)

On Linux and macOS Libbitcoin Server is built using Autotools as follows.

$ ./autogen.sh
$ ./configure
$ make
$ sudo make install # optional
$ sudo ldconfig     # optional

Debian/Ubuntu

Libbitcoin requires a C++11 compiler, currently minimum GCC 4.8.0 or Clang based on LLVM 3.5.

To see your GCC version:

$ g++ --version
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If necessary, upgrade your compiler as follows:

$ sudo apt-get install g++-4.8
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50

Next install the build system and git:

$ sudo apt-get install build-essential autoconf automake libtool pkg-config git

Next download the install script and enable execution:

$ wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-server/version3/install.sh
$ chmod +x install.sh

Finally install Libbitcoin Server with recommended build options:

$ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared

Libbitcoin Server is now installed in /home/me/myprefix and can be invoked as $ bs.

Macintosh

The macOS installation differs from Linux in the installation of the compiler and packaged dependencies. Libbitcoin Server supports both Homebrew and MacPorts package managers. Both require Apple's Xcode command line tools. Neither requires Xcode as the tools may be installed independently.

Libbitcoin Server compiles with Clang on macOS and requires C++11 support. Installation has been verified using Clang based on LLVM 3.5. This version or newer should be installed as part of the Xcode command line tools.

To see your Clang/LLVM version:

$ clang++ --version

You may encounter a prompt to install the Xcode command line developer tools, in which case accept the prompt.

Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

If required update your version of the command line tools as follows:

$ xcode-select --install

Using Homebrew

First install Homebrew.

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Next install the build system and wget:

$ brew install autoconf automake libtool pkgconfig wget

Next download the install script and enable execution:

$ wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-server/version3/install.sh
$ chmod +x install.sh

Finally install Libbitcoin Server with recommended build options:

$ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared

Libbitcoin Server is now installed in /home/me/myprefix and can be invoked as $ bs.

Installing from Formula

Instead of building, libbitcoin-server can be installed from a formula:

$ brew install libbitcoin-server

or

$ brew install bs

Using MacPorts

First install MacPorts.

Next install the build system and wget:

$ sudo port install autoconf automake libtool pkgconfig wget

Next download the install script and enable execution:

$ wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-server/version3/install.sh
$ chmod +x install.sh

Finally install Libbitcoin Server with recommended build options:

$ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared

Libbitcoin Server is now installed in /home/me/myprefix and can be invoked as $ bs.

Build Notes for Linux / macOS

Any set of ./configure options can be passed via the build script, several examples follow.

Building for minimum size and with debug symbols stripped:

$ ./install.sh CXXFLAGS="-Os -s" --prefix=/home/me/myprefix

The -s option is not supported by the Clang compiler. Instead use the command $ strip bs after the build.

Building without NDEBUG (i.e. with debug assertions) defined:

$ ./install.sh --disable-ndebug --build-boost --disable-shared --prefix=/home/me/myprefix

Building without building tests:

$ ./install.sh --without-tests --build-boost --disable-shared --prefix=/home/me/myprefix

Building from a specified directory, such as /home/me/mybuild:

$ ./install.sh --build-dir=/home/me/mybuild --build-boost --disable-shared --prefix=/home/me/myprefix

Building into a directory other than /usr/local, such as /home/me/myprefix:

$ ./install.sh --prefix=/home/me/myprefix

Building and linking with a private copy of the Boost dependency:

$ ./install.sh --build-boost --prefix=/home/me/myprefix

Building and linking with a private copy of the ZeroMQ dependency:

$ ./install.sh --build-zmq --prefix=/home/me/myprefix

Building a statically-linked executable:

$ ./install.sh --disable-shared --build-boost --build-zmq --prefix=/home/me/myprefix

Building a small statically-linked executable most quickly:

$ ./install.sh CXXFLAGS="-Os -s" --without-tests --disable-shared --build-boost --build-zmq --prefix=/home/me/myprefix

Building with bash-completion support:

If your target system does not have it pre-installed you must first install the bash-completion package. Packages are available for common package managers, including apt-get, homebrew and macports.

$ ./install.sh --with-bash-completion-dir

Windows

Visual Studio solutions are maintained for all libbitcoin libraries and dependencies. See the libbitcoin repository general information about building the Visual Studio solutions. To build Libbitcoin Server you must also download and build its libbitcoin dependencies, as these are not yet packaged.

Build these solutions in order:

  1. libbitcoin/libbitcoin
  2. libbitcoin/libbitcoin-consensus
  3. libbitcoin/libbitcoin-database
  4. libbitcoin/libbitcoin-blockchain
  5. libbitcoin/libbitcoin-network
  6. libbitcoin/libbitcoin-node
  7. libbitcoin/libbitcoin-protocol
  8. libbitcoin/libbitcoin-server

About

Bitcoin Full Node and Query Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 66.7%
  • M4 18.1%
  • Shell 5.9%
  • CMake 4.6%
  • Python 1.6%
  • Batchfile 1.5%
  • Other 1.6%