Skip to content

libbitcoin/libbitcoin-consensus

Repository files navigation

Build Status

Coverage Status

Libbitcoin Consensus

Bitcoin consensus library

Installation

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

libbitcoin-consensus is now installed in /usr/local/.

Dependencies

This library requires libsecp256k1. The test cases have a boost dependency.

Configure Options

There is a dependency on boost test for make check builds (tests). The --without-tests option disables test builds and eliminates the boost check during configure.

Supported Platforms

Ubuntu (gcc and clang) and OSX (clang) are regularly tested via a travis build matrix. There are also Visual Studio 2017, 2015 and 2013 solutions for Windows builds, however the VS2013 build is not currently supported due to a compiler incompatibility introduced in recent versions.

About

This library includes the following 35 files considered to be bitcoin script consensus-critical (in bitcoin core). These files are identical to those used in version 0.19.0 of bitcoin core.

amount.h
attributes.h
hash.cpp
hash.h
prevector.h
pubkey.cpp
pubkey.h
serialize.h
span.h
tinyformat.h
uint256.cpp
uint256.h
version.h
compat/byteswap.h
compat/endian.h
crypto/common.h
crypto/hmac_sha512.cpp
crypto/hmac_sha512.h
crypto/ripemd160.cpp
crypto/ripemd160.h
crypto/sha1.cpp
crypto/sha1.h
crypto/sha256.cpp
crypto/sha256.h
crypto/sha512.cpp
crypto/sha512.h
primitives/transaction.cpp
primitives/transaction.h
script/interpreter.cpp
script/interpreter.h
script/script.cpp
script/script.h
script/script_error.h
util/strencodings.cpp
util/strencodings.h

Libbitcoin Integration

Libbitcoin natively implements consensus checks that are redundant with libbitcoin-consensus. Libbitcoin includes a full bitcoin client and server SDK. This includes the full node implementation libbitcoin-node, which builds on libbitcoin and libbitcoin-blockchain.

The libbitcoin-blockchain configuration provides the --with-consensus option. This allows the developer to select either libbitcoin native or libbitcoin-consensus checks. The option defaults to yes so that by default all libbitcoin-node and libbitcoin-server builds use the same script consensus checks as a bitcoin core node.