Skip to content

Instantly share code, notes, and snippets.

@BrandonOdiwuor
Last active September 27, 2025 06:35
Show Gist options
  • Select an option

  • Save BrandonOdiwuor/6402985be803e161074c25674714166c to your computer and use it in GitHub Desktop.

Select an option

Save BrandonOdiwuor/6402985be803e161074c25674714166c to your computer and use it in GitHub Desktop.
How to Compile and Test Bitcoin Core v30.0rc1 with CMake

How to Compile and Test Bitcoin Core v30.0rc1 with CMake

This gist provides simple steps to compile Bitcoin Core v30.0rc1 from source using CMake and perform basic testing, including following the official RC testing guide. These instructions are for Unix-like systems (e.g., Ubuntu Linux). Always verify with official docs for your OS.

Note: The latest RC is v30.0rc2, but instructions apply similarly to rc1. Use the appropriate tag. For full details, see the Bitcoin Core repository and RC Testing Guide.

Prerequisites

Install required dependencies. On Ubuntu/Debian:

$ sudo apt update
$ sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libevent-dev libboost-dev libsqlite3-dev libcapnp-dev
$ # Optional for GUI: libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
$ # Optional for ZMQ: libzmq3-dev
$ # Optional for UPnP: libminiupnpc-dev libnatpmp-dev

Ensure you have CMake installed (version 3.16+ recommended):

$ sudo apt install cmake

Step 1: Clone the Repository and Checkout v30.0rc1

$ git clone https://github.com/bitcoin/bitcoin.git
$ cd bitcoin
$ git checkout v30.0rc1  # Or v30.0rc2 if testing the latest

Step 2: Compile with CMake

Create a build directory and compile:

$ cmake -B build # Add -DBUILD_GUI=ON for Qt GUI
$ cmake --build build    # Append "-j N" for N parallel jobs
$ cmake --install build  # Optional

Step 3: Basic Verification

Run the compiled binary:

$ ./build/bin/bitcoind --version  # Should show Bitcoin Core version v30.0rc1
$ ./build/bin/bitcoind --signet  # Start signet
$ ./build/bin/bitcoin-cli --signet getblockchaininfo # while running

Step 4: Run Unit Tests

From the build directory:

$ ctest --test-dir build

This runs the built-in unit tests using the test framework.

Step 5: Run Functional Tests

Bitcoin Core includes Python-based functional tests. From the root directory:

$ test/functional/test_runner.py  # Runs all functional tests. Append "-j N" for N parallel jobs

Add --extended for more tests. Specify individual tests, e.g., test/functional/test_runner.py feature_pruning.py.

Step 6: Follow the Official RC Testing Guide

For thorough testing of v30 RC1 (or rc2), follow the Testing Guide: Bitcoin Core 30.0 Release Candidate.

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