From 4ddc2f75eb0580c2b2e110c56d4ac2f0b5517c2b Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 14:40:38 -0400 Subject: [PATCH 1/7] Take volume space as uint64_t. --- src/chasers/chaser_storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chasers/chaser_storage.cpp b/src/chasers/chaser_storage.cpp index 40e2e9d9..35a21c19 100644 --- a/src/chasers/chaser_storage.cpp +++ b/src/chasers/chaser_storage.cpp @@ -175,7 +175,7 @@ void chaser_storage::do_reload() NOEXCEPT bool chaser_storage::have_capacity() const NOEXCEPT { - size_t have{}; + uint64_t have{}; const auto require = archive().get_space(); const auto success = (file::space(have, store_) && have >= require); LOGF("Require [" << require << "] bytes and [" << have << "] are free."); From 6e48f5909c78b6458eb11f9910b8a5aff489b616 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 17:27:02 -0400 Subject: [PATCH 2/7] Anchor install script option sanitization. --- builds/cmake/install-cmake.sh | 38 +++++++++++++++---------------- builds/cmake/install-presets.sh | 30 ++++++++++++------------- builds/gnu/install-gnu.sh | 40 ++++++++++++++++----------------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index 108fcd58..4a5bba54 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -156,25 +156,25 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-boost/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-secp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-obj-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-obj-dir-relative/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-config=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-link=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--prefix=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/-h/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-boost/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-secp256k1/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}" diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index ddc80b12..09bfc245 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -142,21 +142,21 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-boost/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-secp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-preset=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/-h/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-boost/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-secp256k1/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-preset=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}" diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index 67ef8f0a..22b0738d 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -154,26 +154,26 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-boost/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-secp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-obj-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-obj-dir-relative/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-config=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-link=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-valgrind=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--prefix=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/-h/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-boost/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-secp256k1/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-valgrind=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") CONFIGURE_OPTIONS_CMAKE=() CONFIGURE_OPTIONS_GNU=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" From 32196d263eb686c8e8218336dfedff2b1fd3974b Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 17:27:03 -0400 Subject: [PATCH 3/7] Add s390x big-endian gnu CI job. --- .github/workflows/ci-expanded.yml | 59 ++++++++++++++++++++++++++++++- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index 1aee8f92..c26a9725 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -337,6 +337,18 @@ jobs: boost: "--build-boost" options: "--enable-isystem" + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "s390x-linux-gnu-gcc" + cxx: "s390x-linux-gnu-g++" + flags: "" + coverage: "" + package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" + host: "s390x-linux-gnu" + boost: "" + options: "--enable-isystem" + runs-on: ${{ matrix.image }} env: @@ -344,6 +356,7 @@ jobs: CXX: '${{ matrix.cxx }}' CFLAGS: '${{ matrix.flags }}' CXXFLAGS: '${{ matrix.flags }}' + QEMU_LD_PREFIX: "${{ matrix.host && format('/usr/{0}', matrix.host) || '' }}" steps: - name: Get branch name @@ -451,21 +464,65 @@ jobs: echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi + - name: Verify emulation [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: ${{ github.workspace }} + run: | + echo 'int main() { return 0; }' > emulation.c + ${{ matrix.cc }} emulation.c -o emulation + file emulation + ./emulation + + - name: Install boost headers [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: 'libbitcoin-node' + env: + CC: 'gcc' + CXX: 'g++' + run: > + ./builds/gnu/install-gnu.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --prefix="${{ github.workspace }}/prefix" + --build-obj-dir="obj" + --build-obj-dir-relative + --build-config="${{ matrix.config }}" + --build-link="${{ matrix.link }}" + --build-limit=external + --build-boost + - name: Execute installation shell: bash working-directory: 'libbitcoin-node' + env: + MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}" run: > ./builds/gnu/install-gnu.sh --build-use-local-src --build-src-dir="${{ github.workspace }}" --prefix="${{ github.workspace }}/prefix" - --build-post-install-clean + ${{ !matrix.host && '--build-post-install-clean' || '' }} --build-obj-dir="obj" --build-obj-dir-relative --build-config="${{ matrix.config }}" --build-link="${{ matrix.link }}" ${{ matrix.boost }} ${{ matrix.options }} + ${{ matrix.host && format('--host={0} --with-boost={1}/prefix', matrix.host, github.workspace) || '' }} + + - name: Execute tests [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: 'libbitcoin-node/obj/builds/gnu' + run: > + ./test/libbitcoin-node-test + --log_level=test_suite + --report_level=short + --show_progress=no + --detect_memory_leak=0 + --build_info=yes - name: Coverage calculation if: ${{ matrix.coverage == 'lcov' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d1ab8e0..e6e7a385 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,18 @@ jobs: boost: "--build-boost" options: "--enable-isystem" + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "s390x-linux-gnu-gcc" + cxx: "s390x-linux-gnu-g++" + flags: "" + coverage: "" + package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" + host: "s390x-linux-gnu" + boost: "" + options: "--enable-isystem" + runs-on: ${{ matrix.image }} env: @@ -125,6 +137,7 @@ jobs: CXX: '${{ matrix.cxx }}' CFLAGS: '${{ matrix.flags }}' CXXFLAGS: '${{ matrix.flags }}' + QEMU_LD_PREFIX: "${{ matrix.host && format('/usr/{0}', matrix.host) || '' }}" steps: - name: Get branch name @@ -232,21 +245,65 @@ jobs: echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi + - name: Verify emulation [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: ${{ github.workspace }} + run: | + echo 'int main() { return 0; }' > emulation.c + ${{ matrix.cc }} emulation.c -o emulation + file emulation + ./emulation + + - name: Install boost headers [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: 'libbitcoin-node' + env: + CC: 'gcc' + CXX: 'g++' + run: > + ./builds/gnu/install-gnu.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --prefix="${{ github.workspace }}/prefix" + --build-obj-dir="obj" + --build-obj-dir-relative + --build-config="${{ matrix.config }}" + --build-link="${{ matrix.link }}" + --build-limit=external + --build-boost + - name: Execute installation shell: bash working-directory: 'libbitcoin-node' + env: + MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}" run: > ./builds/gnu/install-gnu.sh --build-use-local-src --build-src-dir="${{ github.workspace }}" --prefix="${{ github.workspace }}/prefix" - --build-post-install-clean + ${{ !matrix.host && '--build-post-install-clean' || '' }} --build-obj-dir="obj" --build-obj-dir-relative --build-config="${{ matrix.config }}" --build-link="${{ matrix.link }}" ${{ matrix.boost }} ${{ matrix.options }} + ${{ matrix.host && format('--host={0} --with-boost={1}/prefix', matrix.host, github.workspace) || '' }} + + - name: Execute tests [cross] + if: ${{ matrix.host }} + shell: bash + working-directory: 'libbitcoin-node/obj/builds/gnu' + run: > + ./test/libbitcoin-node-test + --log_level=test_suite + --report_level=short + --show_progress=no + --detect_memory_leak=0 + --build_info=yes - name: Coverage calculation if: ${{ matrix.coverage == 'lcov' }} From c3c5f0ad003719da3c56a7463e8cf13e7b752e5d Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 18:40:41 -0400 Subject: [PATCH 4/7] Delint (32 bit). --- include/bitcoin/node/estimator.hpp | 3 ++- src/chasers/chaser_validate_batch.cpp | 25 +++++++++++++----------- src/chasers/chaser_validate_parallel.cpp | 9 +++++---- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/include/bitcoin/node/estimator.hpp b/include/bitcoin/node/estimator.hpp index 84781a93..f70635ed 100644 --- a/include/bitcoin/node/estimator.hpp +++ b/include/bitcoin/node/estimator.hpp @@ -36,7 +36,8 @@ class BCN_API estimator public: typedef std::unique_ptr ptr; static constexpr size_t maximum_horizon = 1008; - static constexpr size_t estimate_failed = max_uint64; + static constexpr size_t estimate_failed = + system::possible_narrow_cast(max_uint64); DELETE_COPY_MOVE_DESTRUCT(estimator); diff --git a/src/chasers/chaser_validate_batch.cpp b/src/chasers/chaser_validate_batch.cpp index e379f850..0ba040c6 100644 --- a/src/chasers/chaser_validate_batch.cpp +++ b/src/chasers/chaser_validate_batch.cpp @@ -132,13 +132,14 @@ code chaser_validate::do_process_batch(bool bank, bool startup) NOEXCEPT LOGN("Batch verify ecdsa canceled (" << ecdsa << ")."); return network::error::operation_canceled; } - const auto elapsed = network::logger::now() - start; - fire(events::ecdsa_secs, duration_cast(elapsed).count()); + const auto elapsed = network::logger::now() - start; + const auto count = duration_cast(elapsed).count(); + const auto duration = limit(count); + fire(events::ecdsa_secs, duration); if (!startup) { - LOGN(log_rate("Verify ecdsa.....", ecdsa, - duration_cast(elapsed).count(), use_gpu)); + LOGN(log_rate("Verify ecdsa.....", ecdsa, duration, use_gpu)); } if (!mark_invalids(prevalids, fails, startup)) @@ -156,13 +157,14 @@ code chaser_validate::do_process_batch(bool bank, bool startup) NOEXCEPT LOGN("Batch verify schnorr canceled (" << schnorr << ")."); return network::error::operation_canceled; } - const auto elapsed = network::logger::now() - start; - fire(events::schnorr_secs, duration_cast(elapsed).count()); + const auto elapsed = network::logger::now() - start; + const auto count = duration_cast(elapsed).count(); + const auto duration = limit(count); + fire(events::schnorr_secs, duration); if (!startup) { - LOGN(log_rate("Verify schnorr...", schnorr, - duration_cast(elapsed).count(), use_gpu)); + LOGN(log_rate("Verify schnorr...", schnorr, duration, use_gpu)); } if (!mark_invalids(prevalids, fails, startup)) @@ -403,9 +405,10 @@ code chaser_validate::do_process_silent_batch(bool bank) NOEXCEPT if (is_nonzero(rows)) { const auto elapsed = network::logger::now() - start; - fire(events::silent_secs, duration_cast(elapsed).count()); - LOGN(log_rate("Compute silent...", rows, - duration_cast(elapsed).count(), use_gpu)); + const auto count = duration_cast(elapsed).count(); + const auto duration = limit(count); + fire(events::silent_secs, duration); + LOGN(log_rate("Compute silent...", rows, duration, use_gpu)); } // Purge presilents before silents. diff --git a/src/chasers/chaser_validate_parallel.cpp b/src/chasers/chaser_validate_parallel.cpp index 2a6837d5..43e058a4 100644 --- a/src/chasers/chaser_validate_parallel.cpp +++ b/src/chasers/chaser_validate_parallel.cpp @@ -113,12 +113,13 @@ void chaser_validate::validate_block(const header_link& link, if (!ec && current) { const auto elapsed = network::logger::now() - start; - const auto usecs = duration_cast(elapsed).count(); - fire(events::validate_usecs, usecs); + const auto count = duration_cast(elapsed).count(); + const auto duration = limit(count); + fire(events::validate_usecs, duration); if (pooled) { LOGN("Validated pooled block [" << ctx.height << "] of (" - << query.get_tx_count(link) << ") txs in (" << usecs + << query.get_tx_count(link) << ") txs in (" << duration << ") usecs."); } else @@ -126,7 +127,7 @@ void chaser_validate::validate_block(const header_link& link, LOGN("Validated full block [" << ctx.height << "] of (" << query.get_tx_count(link) << ") txs with (" << unpooled_count(query, link, ctx) << ") unpooled in (" - << usecs << ") usecs."); + << duration << ") usecs."); } } From 73cf1556148596b44ec420435a25f72e2e4b53f6 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 18:49:17 -0400 Subject: [PATCH 5/7] Make estimate_failed uint64_t. --- include/bitcoin/node/estimator.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/bitcoin/node/estimator.hpp b/include/bitcoin/node/estimator.hpp index f70635ed..65983d68 100644 --- a/include/bitcoin/node/estimator.hpp +++ b/include/bitcoin/node/estimator.hpp @@ -36,8 +36,7 @@ class BCN_API estimator public: typedef std::unique_ptr ptr; static constexpr size_t maximum_horizon = 1008; - static constexpr size_t estimate_failed = - system::possible_narrow_cast(max_uint64); + static constexpr uint64_t estimate_failed = max_uint64; DELETE_COPY_MOVE_DESTRUCT(estimator); From 0a12f9bd1d43612d969667a144c55b770e71aa50 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Thu, 29 Oct 2026 23:50:30 -0400 Subject: [PATCH 6/7] Regenerate artifacts, drop s390x (BE) build tests. --- .github/workflows/ci-expanded.yml | 18 ++---------------- .github/workflows/ci.yml | 18 ++---------------- builds/cmake/CMakeLists.txt | 11 ++++++++--- builds/cmake/install-cmake.sh | 8 ++++++++ builds/cmake/install-presets.sh | 8 ++++++++ builds/gnu/Makefile.am | 1 + builds/gnu/install-gnu.sh | 8 ++++++++ .../libbitcoin-node/libbitcoin-node.vcxproj | 1 + .../libbitcoin-node.vcxproj.filters | 3 +++ 9 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index c26a9725..48d3d8c3 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -347,7 +347,7 @@ jobs: package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" host: "s390x-linux-gnu" boost: "" - options: "--enable-isystem" + options: "--enable-isystem --build-skip-tests" runs-on: ${{ matrix.image }} @@ -496,14 +496,12 @@ jobs: - name: Execute installation shell: bash working-directory: 'libbitcoin-node' - env: - MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}" run: > ./builds/gnu/install-gnu.sh --build-use-local-src --build-src-dir="${{ github.workspace }}" --prefix="${{ github.workspace }}/prefix" - ${{ !matrix.host && '--build-post-install-clean' || '' }} + --build-post-install-clean --build-obj-dir="obj" --build-obj-dir-relative --build-config="${{ matrix.config }}" @@ -512,18 +510,6 @@ jobs: ${{ matrix.options }} ${{ matrix.host && format('--host={0} --with-boost={1}/prefix', matrix.host, github.workspace) || '' }} - - name: Execute tests [cross] - if: ${{ matrix.host }} - shell: bash - working-directory: 'libbitcoin-node/obj/builds/gnu' - run: > - ./test/libbitcoin-node-test - --log_level=test_suite - --report_level=short - --show_progress=no - --detect_memory_leak=0 - --build_info=yes - - name: Coverage calculation if: ${{ matrix.coverage == 'lcov' }} shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6e7a385..58e59696 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" host: "s390x-linux-gnu" boost: "" - options: "--enable-isystem" + options: "--enable-isystem --build-skip-tests" runs-on: ${{ matrix.image }} @@ -277,14 +277,12 @@ jobs: - name: Execute installation shell: bash working-directory: 'libbitcoin-node' - env: - MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}" run: > ./builds/gnu/install-gnu.sh --build-use-local-src --build-src-dir="${{ github.workspace }}" --prefix="${{ github.workspace }}/prefix" - ${{ !matrix.host && '--build-post-install-clean' || '' }} + --build-post-install-clean --build-obj-dir="obj" --build-obj-dir-relative --build-config="${{ matrix.config }}" @@ -293,18 +291,6 @@ jobs: ${{ matrix.options }} ${{ matrix.host && format('--host={0} --with-boost={1}/prefix', matrix.host, github.workspace) || '' }} - - name: Execute tests [cross] - if: ${{ matrix.host }} - shell: bash - working-directory: 'libbitcoin-node/obj/builds/gnu' - run: > - ./test/libbitcoin-node-test - --log_level=test_suite - --report_level=short - --show_progress=no - --detect_memory_leak=0 - --build_info=yes - - name: Coverage calculation if: ${{ matrix.coverage == 'lcov' }} shell: bash diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 0fb4fa03..63b1fe9b 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -76,6 +76,10 @@ if ( MSVC ) set( CMAKE_SHARED_LIBRARY_PREFIX "lib" ) endif() +include(CheckCCompilerFlag) +include(CheckCXXCompilerFlag) +include(CheckCXXSourceCompiles) + #------------------------------------------------------------------------------ # Project options. #------------------------------------------------------------------------------ @@ -102,12 +106,13 @@ set( libbitcoin_network_VERSION ${libbitcoin-network_VERSION} ) find_package( Boost 1.86.0 REQUIRED ) +#------------------------------------------------------------------------------ +# Architecture options. +#------------------------------------------------------------------------------ + #------------------------------------------------------------------------------ # Compiler options. #------------------------------------------------------------------------------ -include(CheckCCompilerFlag) -include(CheckCXXCompilerFlag) -include(CheckCXXSourceCompiles) check_cxx_compiler_flag( "-Wall" HAS_FLAG_WALL ) if ( !HAS_FLAG_WALL ) diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index 4a5bba54..a9481de0 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -387,6 +387,14 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + if [[ -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then + if [[ ${OS} == Darwin ]]; then + export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) + fi + else + msg_verbose "MACOSX_DEPLOYMENT_TARGET using defined value '${MACOSX_DEPLOYMENT_TARGET}'" + fi + # HARDWARE_OPTIMIZED if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then ARCHTUNE="-march=native -mtune=native" diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index 09bfc245..a5bac9d5 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -403,6 +403,14 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + if [[ -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then + if [[ ${OS} == Darwin ]]; then + export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) + fi + else + msg_verbose "MACOSX_DEPLOYMENT_TARGET using defined value '${MACOSX_DEPLOYMENT_TARGET}'" + fi + # HARDWARE_OPTIMIZED if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then ARCHTUNE="-march=native -mtune=native" diff --git a/builds/gnu/Makefile.am b/builds/gnu/Makefile.am index 553b1d69..9d5fe64e 100644 --- a/builds/gnu/Makefile.am +++ b/builds/gnu/Makefile.am @@ -54,6 +54,7 @@ src_libbitcoin_node_la_SOURCES = \ ${srcdir}/../../src/block_arena.cpp \ ${srcdir}/../../src/block_memory.cpp \ ${srcdir}/../../src/configuration.cpp \ + ${srcdir}/../../src/define.cpp \ ${srcdir}/../../src/error.cpp \ ${srcdir}/../../src/estimator.cpp \ ${srcdir}/../../src/full_node.cpp \ diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index 22b0738d..c56c07b7 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -392,6 +392,14 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + if [[ -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then + if [[ ${OS} == Darwin ]]; then + export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) + fi + else + msg_verbose "MACOSX_DEPLOYMENT_TARGET using defined value '${MACOSX_DEPLOYMENT_TARGET}'" + fi + # HARDWARE_OPTIMIZED if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then ARCHTUNE="-march=native -mtune=native" diff --git a/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj b/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj index df62d449..4b821c02 100644 --- a/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj +++ b/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj @@ -124,6 +124,7 @@ + diff --git a/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj.filters b/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj.filters index 97bbce93..038a8020 100644 --- a/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj.filters +++ b/builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj.filters @@ -102,6 +102,9 @@ src + + src + src From 0bd071b6e5a46a89b2729fba7c3eb4e5563b3901 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Fri, 30 Oct 2026 00:04:22 -0400 Subject: [PATCH 7/7] Add Win32 release msvc CI job. --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58e59696..9c63fbfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -868,6 +868,12 @@ jobs: version: "vs2026" tests: "*" + - image: windows-latest + configuration: "StaticRelease" + platform: "Win32" + version: "vs2026" + tests: "*" + runs-on: ${{ matrix.image }} steps: