Skip to content

Conversation

@eynhaender
Copy link

README.md changed from bn to bs. First files added to /docs/.

@coveralls
Copy link

Coverage Status

coverage: 86.59%. remained the same
when pulling b2bb9a9 on eynhaender:master
into 1dcf942 on libbitcoin:master.

~/bitcoin/libbitcoin/build/release_static/share/doc/libbitcoin-system/
~/bitcoin/libbitcoin/libbitcoin-node
```
Now enter the bin directory and [fire up](#running-libbitcoin) your libbitcoin server.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link doesn't work, it's running bs


**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-system](https://github.com/libbitcoin/libbitcoin-system) library. Each library's repository can be cloned and built separately. There are no packages yet in distribution, however each library includes an installation script (described below) which is regularly verified via [github actions](https://github.com/features/actions).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, GitHub is officially with capital G and H.
Could update it here and at other mentions in the docs

To build libbitcoin-server with these extensions use the `--enable-feature` parameters like:

- --enable-shani
- --enable-avx2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, put these in the same order as above


### Linux

Linux users build libbitcoin node with the provided installation script `install.sh` that uses Autotools and pkg-config to first build the needed dependencies (boost, libpsec256) and then fetches the latest libbitcoin projects (libbitcoin-system, libbitcoin-database, libbitcoin-network, libbitcoin-node) from github and builds the stack bottom up to the libbitcoin-server executable - `bs`.
Copy link

@MarnixCroes MarnixCroes Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rewrite the sentence a bit. This makes it look like install.sh is the only build option.

EDIT:
maybe just Linux users build libbitcoin node -> Linux users **can** build libbitcoin node

Copy link
Member

@evoskuil evoskuil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. It's a lot and this is a good starter. Maybe also mention snapshots, and disk space/full issues.

libbitcoin-node distinguishes between two different methods for the initial block download (IBD).

### Milestone Sync
Milestone Sync (the default mode) is optimized for speed. Up to a configured milestone (a specific block in the past considered trustworthy), certain expensive validation steps are skipped.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The important points re: milestone security are (1) If they have previously validated to the hash of the milestone, it's just as secure as validating it all again, and (2) if they have not previously validated, they should validate from genesis and record a valid milestone block so they can skip it next time.


Starting from the milestone (and for all new blocks), full validation is applied. As the chain height progresses, the current milestone is updated upward every 50,000 blocks. The most recent milestone is currently block 900,000.

This approach aligns with the security model of Bitcoin Core's "AssumeValid." It assumes the chain up to that point is correct (based on prior validation or community consensus). This makes the IBD significantly faster while providing practically the same level of security for most users.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't call it AV for this reason - we don't make any assumptions. It's up to the user to validate - not to trust the default milestone, or the community, or us. It's not a different security level, we treat it as the same - it just presumes they have validated it previously. If not, it's not secure.

### Milestone Sync
Milestone Sync (the default mode) is optimized for speed. Up to a configured milestone (a specific block in the past considered trustworthy), certain expensive validation steps are skipped.

Specifically: Blocks at or below the highest checkpoint/milestone are not fully validated. This primarily means that signature verifications (script validation) in old blocks are skipped or performed in a reduced manner.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core skips signatures, we skip everything in the block apart from identity (hash/merkle/witness-commitment). Headers are always fully validated.


Every transaction in every block is fully validated, including complete script and signature verification (ECDSA signatures for all inputs).

There are no trust assumptions for historical blocks—everything is independently verified.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are never trust assumptions.


There are no trust assumptions for historical blocks—everything is independently verified.

This is the mode with the highest security, as no part of the chain is assumed to be "pre-validated." However, it is slower and more CPU-intensive.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one level of security.

</div>

## tl;dr
This is the **server component of libbitcoin v4**. It integrates the basic components and offers a **high performance Bitcoin full node** with a comprehensive set of client-server interfaces like **bitcoind, electrum and stratum** as well as an intergrated **block explorer**. It makes heavy use of the available hardware, internet connection and availabe RAM and CPU so you can sync the Bitcoin blockchain from genesis, today and in the future.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say "full use of the available hardware, including internet..."


**License Overview**

All files in this repository fall under the license specified in [COPYING](COPYING). The project is licensed as [AGPL with a lesser clause](https://wiki.unsystem.net/en/index.php/Libbitcoin/License). It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we dropped the lesser clause.

- [Kernel VM Tuning Parameters](#kernel-vm-tuning-parameters)

## Installation
Depending on what operating system you use, the build process will be different. Detailed instructions are provided below.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be the same basic process on Linux, macOS, and Unix - but quite different on Windows (because of the native VS projects/solutions).


### Linux

Linux users build libbitcoin node with the provided installation script `install.sh` that uses Autotools and pkg-config to first build the needed dependencies (boost, libpsec256) and then fetches the latest libbitcoin projects (libbitcoin-system, libbitcoin-database, libbitcoin-network, libbitcoin-node) from github and builds the stack bottom up to the libbitcoin-server executable - `bs`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fetches libbitcoin-server.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also worth noting that we have both make and cmake builds, at least for developers - users don't care.

This command will create a static release build with all supported CPU extensions (if supported by the system). Building libbitcoin with unsupported CPU extensions might work but will lead to crashes at runtime.

```bash
$ CFLAGS="-O3" CXXFLAGS="-O3" ./install.sh --prefix=/home/user/libbitcoin/build/release_static/ --build-dir=/home/user/libbitcoin/build/temp --build-secp256k1 --build-boost --disable-shared --enable-ndebug --enable-shani --enable-avx2 --enable-sse41 --enable-avx512 --enable-isystem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this in the example is probably not worth the hazard: --enable-avx512

Perf benefit is marginal, and many platforms don't have it (and will crash the run if compiled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants