From dd948bd26503e3c7c200f9372a36055c42a7d7fa Mon Sep 17 00:00:00 2001 From: Kilombino Date: Sun, 12 Oct 2025 00:07:19 +0200 Subject: [PATCH 1/2] Update Bitcoin Knots to v29.x: Migrate from Autotools to CMake - Added CMake to required dependencies - Replaced autogen.sh/configure with CMake build process - Added optimized CMake flags matching previous config - Updated UA modification section with exact commands Bitcoin Knots v29.x migrated to CMake. The autogen.sh script no longer exists, breaking previous installation instructions. Tested on Bitcoin Knots v29.2.knots20251010 --- bonus-guides/bitcoin/bitcoin-knots.md | 103 ++++++++++++++------------ 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/bonus-guides/bitcoin/bitcoin-knots.md b/bonus-guides/bitcoin/bitcoin-knots.md index f0c40662..f982cc00 100644 --- a/bonus-guides/bitcoin/bitcoin-knots.md +++ b/bonus-guides/bitcoin/bitcoin-knots.md @@ -174,7 +174,7 @@ sudo rm -r bitcoin-$VERSION bitcoin-$VERSION-x86_64-linux-gnu.tar.gz SHA256SUMS {% code overflow="wrap" %} ```shell -sudo apt install autoconf automake build-essential libboost-filesystem-dev libboost-system-dev libboost-thread-dev libevent-dev libsqlite3-dev libtool pkg-config libzmq3-dev --no-install-recommends +sudo apt install cmake autoconf automake build-essential libboost-filesystem-dev libboost-system-dev libboost-thread-dev libevent-dev libsqlite3-dev libtool pkg-config libzmq3-dev --no-install-recommends ``` {% endcode %} @@ -189,7 +189,7 @@ cd /tmp * Set the next environment variables ```sh -VERSION=28.1.knots20250305 && BRANCH=28.x +VERSION=29.2.knots20251010 && BRANCH=29.x ``` * Get the latest source code, the list of cryptographic checksums, and the signatures attesting to the validity of the checksums @@ -300,74 +300,83 @@ bitcoin-28.0/.github/workflows/ cd bitcoin-$VERSION ``` -* Execute the `autogen.sh` script +#### **User agent consideration** -```sh -./autogen.sh -``` +{% hint style="info" %} +⚠️ **Privacy Note**: Bitcoin Knots identifies itself as "Bitcoin Knots" in its user agent string. This can make your node more identifiable on the network. -Expected output: +If you want your node to appear as "Bitcoin Core" for better privacy/censorship resistance, you would need to manually modify the source code before compilation: +{% endhint %} +{% hint style="info" %} +Skip this step if you want only to build Bitcoin Knots from the source code, but not apply the user agent patch +{% endhint %} + +* Before creating the build directory, edit the CMakeLists.txt file + +```bash +sudo nano CMakeLists.txt ``` -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. -libtoolize: copying file 'build-aux/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. -libtoolize: copying file 'build-aux/m4/libtool.m4' -libtoolize: copying file 'build-aux/m4/ltoptions.m4' -libtoolize: copying file 'build-aux/m4/ltsugar.m4' -libtoolize: copying file 'build-aux/m4/ltversion.m4' -libtoolize: copying file 'build-aux/m4/lt~obsolete.m4' -configure.ac:39: installing 'build-aux/ar-lib' -configure.ac:37: installing 'build-aux/compile' -configure.ac:24: installing 'build-aux/config.guess' -configure.ac:24: installing 'build-aux/config.sub' -configure.ac:27: installing 'build-aux/install-sh' -configure.ac:27: installing 'build-aux/missing' -Makefile.am: installing 'build-aux/depcomp' -parallel-tests: installing 'build-aux/test-driver' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. -libtoolize: copying file 'build-aux/ltmain.sh' -[...] + +* Before creating the build directory, edit the CMakeLists.txt file + +* Find line 29 that contains: + +```bash +set(CLIENT_NAME "Bitcoin Knots") ``` -* Pre-configure the installation, we will discard some features and include others. Enter the complete next command in the terminal and press enter +*Change it to: -```sh -./configure \ - --disable-bench \ - --disable-maintainer-mode \ - --disable-tests \ - --with-gui=no +```bash +set(CLIENT_NAME "Bitcoin Core") ``` -#### **Apply the UA patch (optional)** +* Save the file (Ctrl+O, Enter, Ctrl+X to exit) {% hint style="info" %} -This patch removes the Bitcoin Knots reference from the **user agent** to make it look like Bitcoin Core, improving its censorship resistance +Start here if you don´t want to change Knots name for Core {% endhint %} -{% hint style="info" %} -Skip this step if you want only to build Bitcoin Knots from the source code, but not apply the user agent patch -{% endhint %} +* Create a build directory -* Download the UA patch +> 📝 **Note**: Bitcoin Knots v29.x and later use CMake as the build system. Versions 28.x and earlier used Autotools (autogen.sh/configure). This guide covers v29.x+. -{% code overflow="wrap" %} +* Create a build directory +Copy ```bash -wget https://raw.githubusercontent.com/minibolt-guide/minibolt/refs/heads/main/resources/mod-ua-knots.patch +mkdir build +cd build ``` -{% endcode %} -* **(Optional)** Inspect `mod-ua-knots.patch` file to make sure it does not do bad things. If you see all OK, exit with Ctrl-X and continue with the next command +* Configure the build with CMake using optimized options. +```bash +cmake .. \ + -DBUILD_BENCH=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_GUI=OFF +``` + +Expected output: -```sh -nano mod-ua-knots.patch +``` +-- The C compiler identification is GNU [version] +-- The CXX compiler identification is GNU [version] +[...] +-- Configuring done +-- Generating done +-- Build files have been written to: /tmp/bitcoin-[version]/build +[...] ``` -* Apply the patch +* Pre-configure the installation, we will discard some features and include others. Enter the complete next command in the terminal and press enter ```sh -git apply mod-ua-knots.patch +./configure \ + --disable-bench \ + --disable-maintainer-mode \ + --disable-tests \ + --with-gui=no ``` #### **Build** From aa40505b019627efdb48fcb8de94e13afff840d8 Mon Sep 17 00:00:00 2001 From: Kilombino Date: Sun, 12 Oct 2025 11:59:14 +0200 Subject: [PATCH 2/2] Add explicit ZMQ support flag to CMake configuration - Added -DWITH_ZMQ=ON flag to cmake command - Ensures ZeroMQ support is explicitly enabled - Prevents runtime errors related to missing ZMQ functionality --- bonus-guides/bitcoin/bitcoin-knots.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bonus-guides/bitcoin/bitcoin-knots.md b/bonus-guides/bitcoin/bitcoin-knots.md index f982cc00..b3e68532 100644 --- a/bonus-guides/bitcoin/bitcoin-knots.md +++ b/bonus-guides/bitcoin/bitcoin-knots.md @@ -354,7 +354,8 @@ cd build cmake .. \ -DBUILD_BENCH=OFF \ -DBUILD_TESTS=OFF \ - -DBUILD_GUI=OFF + -DBUILD_GUI=OFF \ + -DWITH_ZMQ=ON ``` Expected output: