diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..3772cc8e
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,879 @@
+###############################################################################
+# Copyright (c) 2014-2025 libbitcoin-server developers (see COPYING).
+#
+# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
+#
+###############################################################################
+
+name: Continuous Integration Build
+
+on: [ pull_request, push, workflow_dispatch ]
+
+jobs:
+ autotools:
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - os: ubuntu-24.04
+ cxx: "clang++-16"
+ link: "dynamic"
+ optimization: "debug"
+ assert: "debug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Og -fPIE"
+ options: "--enable-isystem"
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "clang++-16"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: "--build-icu --with-icu"
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Os -fPIE"
+ options: "--enable-isystem"
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "g++-12"
+ link: "dynamic"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "gcc-12"
+ flags: "-Os -fPIE"
+ options: "--enable-isystem"
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "g++"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "cov"
+ detectcpuflags: "detect"
+ boost: "--build-boost"
+ icu: "--build-icu --with-icu"
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "gcc"
+ flags: "-Os -g --coverage -fPIE"
+ options: "--enable-isystem"
+ packager: "apt"
+ packages: "lcov"
+
+ - os: macos-latest
+ cxx: "clang++"
+ link: "dynamic"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: "llvm@16"
+ secp256k1: "--build-secp256k1"
+ cc: "clang"
+ flags: "-Os -fPIE"
+ options: "--enable-isystem"
+ packager: "brew"
+ packages: "llvm@16 icu4c"
+
+ - os: macos-latest
+ cxx: "clang++"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: "llvm@16"
+ secp256k1: "--build-secp256k1"
+ cc: "clang"
+ flags: "-Os -fvisibility=hidden -fPIE"
+ options: "--enable-isystem"
+ packager: "brew"
+ packages: "llvm@16 icu4c"
+
+
+ runs-on: ${{ matrix.os }}
+
+ env:
+ CC: '${{ matrix.cc }}'
+ CXX: '${{ matrix.cxx }}'
+ CFLAGS: '${{ matrix.flags }}'
+ CXXFLAGS: '${{ matrix.flags }}'
+ CI_REPOSITORY: '${{ github.repository }}'
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Prepare toolchain [generic]
+ run: |
+ git config --global init.defaultBranch master
+
+ - name: Prepare toolchain [apt]
+ if: ${{ matrix.packager == 'apt' }}
+ run: |
+ sudo apt-get update
+ sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
+
+ - name: Prepare toolchain [brew]
+ if: ${{ matrix.packager == 'brew' }}
+ run: |
+ brew install autoconf automake libtool ${{ matrix.packages }}
+ if [[ -n ${{ matrix.llvm }} ]]; then
+ echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:$PATH" >> $GITHUB_ENV
+ fi
+
+ - name: Determine CPU flags
+ shell: bash
+ run: |
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
+ echo "CPU_SUPPORT_SSE41=--enable-sse41" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
+ echo "CPU_SUPPORT_AVX2=--enable-avx2" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
+ echo "CPU_SUPPORT_AVX512=--enable-avx512" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
+ echo "CPU_SUPPORT_SHANI=--enable-shani" >> $GITHUB_ENV
+ fi
+
+ if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
+ echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
+ fi
+
+ - name: Denormalize parameterization
+ shell: bash
+ run: |
+ WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-server}"
+ echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV
+ if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
+ echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV
+ else
+ echo "ASSERT_NDEBUG=--disable-ndebug" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LINKAGE=--disable-static" >> $GITHUB_ENV
+ else
+ echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV
+ fi
+
+ - name: Display Compiler details
+ shell: bash
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Display CPU details
+ if: ${{ (runner.os == 'Linux') }}
+ shell: bash
+ run: |
+ lscpu
+
+ - name: Execute install.sh
+ run: >
+ ./install.sh
+ --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }}
+ --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix
+ ${{ env.LINKAGE }}
+ ${{ env.ASSERT_NDEBUG }}
+ ${{ env.CPU_SUPPORTED_FLAGS }}
+ ${{ matrix.boost }}
+ ${{ matrix.icu }}
+ ${{ matrix.secp256k1 }}
+
+ - name: Coveralls Calculation
+ if: ${{ matrix.coverage == 'cov' }}
+ run: |
+ lcov --ignore-errors version,gcov,mismatch --directory . --capture --output-file coverage.info
+ lcov --ignore-errors unused --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
+ lcov --list coverage.info
+
+ - name: Coveralls.io Upload
+ if: ${{ matrix.coverage == 'cov' }}
+ uses: coverallsapp/github-action@v2.3.0
+ with:
+ format: lcov
+ files: "./coverage.info"
+ github-token: ${{ secrets.github_token }}
+
+ - name: Failure display available binaries
+ if: ${{ failure() }}
+ run: |
+ ls -la /usr/bin
+
+ - name: Failure display selected compiler version
+ if: ${{ failure() }}
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Failure display default compiler version
+ if: ${{ failure() }}
+ run: |
+ clang -v
+ gcc -v
+
+ - name: Failure display env
+ if: ${{ failure() }}
+ run: |
+ env
+
+ - name: Failure list libdir
+ if: ${{ failure() }}
+ run: |
+ ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
+
+ - name: Failure display boost bootstrap.log [--build-boost]
+ if: ${{ failure() && (matrix.boost == '--build-boost') }}
+ run: |
+ cat ${{ github.workspace }}/build/build-*/bootstrap.log
+
+
+ - name: Failure display otool output
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display DYLD_PRINT_LIBRARIES
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display pkgconfig
+ if: ${{ failure() }}
+ run: |
+ ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
+ cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
+
+ cmake:
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - os: ubuntu-24.04
+ cxx: "clang++-16"
+ link: "dynamic"
+ optimization: "debug"
+ assert: "debug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Og -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "clang++-16"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: "--build-icu --with-icu"
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "g++-12"
+ link: "dynamic"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "gcc-12"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ cxx: "g++-12"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: "--build-icu --with-icu"
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "gcc-12"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: macos-latest
+ cxx: "clang++"
+ link: "dynamic"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: "llvm@16"
+ secp256k1: "--build-secp256k1"
+ cc: "clang"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "brew"
+ packages: "llvm@16 icu4c"
+
+ - os: macos-latest
+ cxx: "clang++"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: "llvm@16"
+ secp256k1: "--build-secp256k1"
+ cc: "clang"
+ flags: "-Os -fvisibility=hidden -fPIE"
+ options: ""
+ packager: "brew"
+ packages: "llvm@16 icu4c"
+
+
+ runs-on: ${{ matrix.os }}
+
+ env:
+ CC: '${{ matrix.cc }}'
+ CXX: '${{ matrix.cxx }}'
+ CFLAGS: '${{ matrix.flags }}'
+ CXXFLAGS: '${{ matrix.flags }}'
+ CI_REPOSITORY: '${{ github.repository }}'
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Prepare toolchain [generic]
+ run: |
+ git config --global init.defaultBranch master
+
+ - name: Prepare toolchain [apt]
+ if: ${{ matrix.packager == 'apt' }}
+ run: |
+ sudo apt-get update
+ sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
+
+ - name: Prepare toolchain [brew]
+ if: ${{ matrix.packager == 'brew' }}
+ run: |
+ brew install autoconf automake libtool ${{ matrix.packages }}
+ if [[ -n ${{ matrix.llvm }} ]]; then
+ echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:$PATH" >> $GITHUB_ENV
+ fi
+
+ - name: Determine CPU flags
+ shell: bash
+ run: |
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
+ echo "CPU_SUPPORT_SSE41=-Denable-sse41=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
+ echo "CPU_SUPPORT_AVX2=-Denable-avx2=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
+ echo "CPU_SUPPORT_AVX512=-Denable-avx512=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
+ echo "CPU_SUPPORT_SHANI=-Denable-shani=on" >> $GITHUB_ENV
+ fi
+
+ if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
+ echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
+ fi
+
+ - name: Denormalize parameterization
+ shell: bash
+ run: |
+ WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-server}"
+ echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV
+ if [[ ${{ matrix.packager }} == 'brew' ]]; then
+ echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
+ echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV
+ else
+ echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LINKAGE=--disable-static" >> $GITHUB_ENV
+ else
+ echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV
+ fi
+
+ - name: Display Compiler details
+ shell: bash
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Display CPU details
+ if: ${{ (runner.os == 'Linux') }}
+ shell: bash
+ run: |
+ lscpu
+
+ - name: Execute install-cmake.sh
+ run: >
+ ./install-cmake.sh
+ --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }}
+ --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix
+ ${{ env.LINKAGE }}
+ ${{ env.ASSERT_NDEBUG }}
+ ${{ env.CPU_SUPPORTED_FLAGS }}
+ ${{ matrix.boost }}
+ ${{ matrix.icu }}
+ ${{ matrix.secp256k1 }}
+
+ - name: Coveralls Calculation
+ if: ${{ matrix.coverage == 'cov' }}
+ run: |
+ lcov --ignore-errors version,gcov,mismatch --directory . --capture --output-file coverage.info
+ lcov --ignore-errors unused --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
+ lcov --list coverage.info
+
+ - name: Coveralls.io Upload
+ if: ${{ matrix.coverage == 'cov' }}
+ uses: coverallsapp/github-action@v2.3.0
+ with:
+ format: lcov
+ files: "./coverage.info"
+ github-token: ${{ secrets.github_token }}
+
+ - name: Failure display available binaries
+ if: ${{ failure() }}
+ run: |
+ ls -la /usr/bin
+
+ - name: Failure display selected compiler version
+ if: ${{ failure() }}
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Failure display default compiler version
+ if: ${{ failure() }}
+ run: |
+ clang -v
+ gcc -v
+
+ - name: Failure display env
+ if: ${{ failure() }}
+ run: |
+ env
+
+ - name: Failure list libdir
+ if: ${{ failure() }}
+ run: |
+ ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
+
+ - name: Failure display boost bootstrap.log [--build-boost]
+ if: ${{ failure() && (matrix.boost == '--build-boost') }}
+ run: |
+ cat ${{ github.workspace }}/build/build-*/bootstrap.log
+
+
+ - name: Failure display otool output
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display DYLD_PRINT_LIBRARIES
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display pkgconfig
+ if: ${{ failure() }}
+ run: |
+ ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
+ cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
+
+ - name: Failure display cmake specific libraries
+ if: ${{ failure() }}
+ run: |
+ ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
+
+ - name: Failure display cmake LastTest.log
+ if: ${{ failure() }}
+ run: |
+ cat ${{ github.workspace }}/Testing/Temporary/LastTest.log
+
+ preset:
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - os: ubuntu-24.04
+ preset: "nix-gnu-debug-shared"
+ cxx: "clang++-16"
+ link: "dynamic"
+ optimization: "debug"
+ assert: "debug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Og -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ preset: "nix-gnu-release-static"
+ cxx: "clang++-16"
+ link: "static"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: "--build-icu --with-icu"
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "clang-16"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+ - os: ubuntu-24.04
+ preset: "nix-gnu-release-shared"
+ cxx: "g++-12"
+ link: "dynamic"
+ optimization: "size"
+ assert: "ndebug"
+ coverage: "nocov"
+ detectcpuflags: "ignore"
+ boost: "--build-boost"
+ icu: ""
+ llvm: ""
+ secp256k1: "--build-secp256k1"
+ cc: "gcc-12"
+ flags: "-Os -fPIE"
+ options: ""
+ packager: "apt"
+ packages: ""
+
+
+ runs-on: ${{ matrix.os }}
+
+ env:
+ CC: '${{ matrix.cc }}'
+ CXX: '${{ matrix.cxx }}'
+ CFLAGS: '${{ matrix.flags }}'
+ CXXFLAGS: '${{ matrix.flags }}'
+ CI_REPOSITORY: '${{ github.repository }}'
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Prepare toolchain [generic]
+ run: |
+ git config --global init.defaultBranch master
+
+ - name: Prepare toolchain [apt]
+ if: ${{ matrix.packager == 'apt' }}
+ run: |
+ sudo apt-get update
+ sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.packages }}
+
+ - name: Prepare toolchain [brew]
+ if: ${{ matrix.packager == 'brew' }}
+ run: |
+ brew install autoconf automake libtool ${{ matrix.packages }}
+ if [[ -n ${{ matrix.llvm }} ]]; then
+ echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:$PATH" >> $GITHUB_ENV
+ fi
+
+ - name: Determine CPU flags
+ shell: bash
+ run: |
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sse4_1 ") ]]; then
+ echo "CPU_SUPPORT_SSE41=-Denable-sse41=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx " | grep " avx2 ") ]]; then
+ echo "CPU_SUPPORT_AVX2=-Denable-avx2=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " avx512bw ") ]]; then
+ echo "CPU_SUPPORT_AVX512=-Denable-avx512=on" >> $GITHUB_ENV
+ fi
+
+ if [[ -n $(cat /proc/cpuinfo | grep flags | grep " sha_ni ") ]]; then
+ echo "CPU_SUPPORT_SHANI=-Denable-shani=on" >> $GITHUB_ENV
+ fi
+
+ if [[ ${{ matrix.detectcpuflags }} == 'detect' ]]; then
+ echo "CPU_SUPPORTED_FLAGS='$CPU_SUPPORT_SSE41 $CPU_SUPPORT_AVX2 $CPU_SUPPORT_AVX512 $CPU_SUPPORT_SHANI'" >> $GITHUB_ENV
+ fi
+
+ - name: Denormalize parameterization
+ shell: bash
+ run: |
+ WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-server}"
+ echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV
+ if [[ ${{ matrix.packager }} == 'brew' ]]; then
+ echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.assert }} == 'ndebug' ]]; then
+ echo "ASSERT_NDEBUG=--enable-ndebug -Denable-ndebug=yes" >> $GITHUB_ENV
+ else
+ echo "ASSERT_NDEBUG=--disable-ndebug -Denable-ndebug=no" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LINKAGE=--disable-static" >> $GITHUB_ENV
+ else
+ echo "LINKAGE=--disable-shared" >> $GITHUB_ENV
+ fi
+ if [[ ${{ matrix.link }} == 'dynamic' ]]; then
+ echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV
+ fi
+
+ - name: Display Compiler details
+ shell: bash
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Display CPU details
+ if: ${{ (runner.os == 'Linux') }}
+ shell: bash
+ run: |
+ lscpu
+
+ - name: Execute install-cmakepresets.sh
+ run: >
+ ./install-cmakepresets.sh
+ --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }}
+ --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix/${{ matrix.preset }}
+ --preset=${{ matrix.preset }}
+ ${{ env.LINKAGE }}
+ ${{ env.ASSERT_NDEBUG }}
+ ${{ env.CPU_SUPPORTED_FLAGS }}
+ ${{ matrix.boost }}
+ ${{ matrix.icu }}
+ ${{ matrix.secp256k1 }}
+
+ - name: Coveralls Calculation
+ if: ${{ matrix.coverage == 'cov' }}
+ run: |
+ lcov --ignore-errors version,gcov,mismatch --directory . --capture --output-file coverage.info
+ lcov --ignore-errors unused --remove coverage.info "/usr/*" "${{ env.LIBBITCOIN_SRC_PATH }}prefix/*" "${{ github.workspace }}/examples/*" "${{ github.workspace }}/test/*" --output-file coverage.info
+ lcov --list coverage.info
+
+ - name: Coveralls.io Upload
+ if: ${{ matrix.coverage == 'cov' }}
+ uses: coverallsapp/github-action@v2.3.0
+ with:
+ format: lcov
+ files: "./coverage.info"
+ github-token: ${{ secrets.github_token }}
+
+ - name: Failure display available binaries
+ if: ${{ failure() }}
+ run: |
+ ls -la /usr/bin
+
+ - name: Failure display selected compiler version
+ if: ${{ failure() }}
+ run: |
+ ${CC} -v
+ ${CXX} -v
+
+ - name: Failure display default compiler version
+ if: ${{ failure() }}
+ run: |
+ clang -v
+ gcc -v
+
+ - name: Failure display env
+ if: ${{ failure() }}
+ run: |
+ env
+
+ - name: Failure list libdir
+ if: ${{ failure() }}
+ run: |
+ ls -la ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib
+
+ - name: Failure display boost bootstrap.log [--build-boost]
+ if: ${{ failure() && (matrix.boost == '--build-boost') }}
+ run: |
+ cat ${{ github.workspace }}/build/build-*/bootstrap.log
+
+
+ - name: Failure display otool output
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display DYLD_PRINT_LIBRARIES
+ if: ${{ failure() && startsWith(matrix.os, 'macos') }}
+ run: |
+ DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-server-test
+
+ - name: Failure display pkgconfig
+ if: ${{ failure() }}
+ run: |
+ ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/
+ cat ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/pkgconfig/*.pc
+
+ - name: Failure display cmake specific libraries
+ if: ${{ failure() }}
+ run: |
+ ls ${{ env.LIBBITCOIN_SRC_PATH }}prefix/lib/cmake
+
+ - name: Failure display cmake LastTest.log
+ if: ${{ failure() }}
+ run: |
+ cat ${{ github.workspace }}/Testing/Temporary/LastTest.log
+
+ msbuild:
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - os: windows-latest
+ configuration: "StaticDebug"
+ platform: "x64"
+ version: "vs2022"
+ tests: "*"
+
+ - os: windows-latest
+ configuration: "StaticRelease"
+ platform: "x64"
+ version: "vs2022"
+ tests: "*"
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v2
+ with:
+ msbuild-architecture: x64
+
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Initialize SDK
+ shell: powershell
+ run: |
+ try {
+ Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "sdksetup.exe"
+
+ $FeatureList = "OptionId.WindowsDesktopSoftwareDevelopmentKit OptionId.NetFxSoftwareDevelopmentKit"
+ $Args = "/q /norestart /features $FeatureList"
+ $setup = Start-Process -PassThru -FilePath "sdksetup.exe" -ArgumentList $Args
+
+ $setup.WaitForExit()
+ if ($setup.ExitCode -ne 0) {
+ Write-Host "Test execution failure: " $setup.ExitCode -ForegroundColor Red;
+ exit $setup.ExitCode;
+ }
+ }
+ catch {
+ $ERR = $_;
+ Write-Host "Initialization failure: " $ERR -ForegroundColor Red;
+ exit $ERR;
+ }
+
+ - name: Execute build
+ run: .\build.cmd .. ${{ matrix.platform }} ${{ matrix.configuration }} x64 ${{ matrix.version }}
+
+ - name: Execute tests
+ shell: powershell
+ run: |
+ Write-Host "Locating test executables..." -ForegroundColor Yellow;
+ $BC_TEST_EXES = @(Get-ChildItem -Path "$env:${{ github.workspace }}\bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-server-test.exe" });
+ If ($BC_TEST_EXES.Count -ne 1) {
+ Write-Host "Failure, invalid count of test executables." -ForegroundColor Red;
+ exit 1;
+ }
+ Write-Host "Found single test executable: " $BC_TEST_EXES.FullName -ForegroundColor Green;
+ $BC_TEST_SINGLETON = $BC_TEST_EXES.FullName;
+ Write-Host "Executing $BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS" -ForegroundColor Yellow;
+ try {
+ Invoke-Expression "$BC_TEST_SINGLETON --log_level=warning --run_test=${{ matrix.tests }} $env:BOOST_UNIT_TEST_OPTIONS"
+ }
+ catch {
+ $ERR = $_;
+ Write-Host "Test execution failure: " $ERR -ForegroundColor Red;
+ exit $ERR;
+ }
+ Write-Host "Test execution complete." -ForegroundColor Green;
diff --git a/Makefile.am b/Makefile.am
index 707b105d..fe039e0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,11 +51,6 @@ src_libbitcoin_server_la_SOURCES = \
src/services/heartbeat_service.cpp \
src/services/query_service.cpp \
src/services/transaction_service.cpp \
- src/web/block_socket.cpp \
- src/web/default_page_data.cpp \
- src/web/heartbeat_socket.cpp \
- src/web/query_socket.cpp \
- src/web/transaction_socket.cpp \
src/workers/authenticator.cpp \
src/workers/notification_worker.cpp \
src/workers/query_worker.cpp
@@ -126,14 +121,6 @@ include_bitcoin_server_services_HEADERS = \
include/bitcoin/server/services/query_service.hpp \
include/bitcoin/server/services/transaction_service.hpp
-include_bitcoin_server_webdir = ${includedir}/bitcoin/server/web
-include_bitcoin_server_web_HEADERS = \
- include/bitcoin/server/web/block_socket.hpp \
- include/bitcoin/server/web/default_page_data.hpp \
- include/bitcoin/server/web/heartbeat_socket.hpp \
- include/bitcoin/server/web/query_socket.hpp \
- include/bitcoin/server/web/transaction_socket.hpp
-
include_bitcoin_server_workersdir = ${includedir}/bitcoin/server/workers
include_bitcoin_server_workers_HEADERS = \
include/bitcoin/server/workers/authenticator.hpp \
diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt
index 2daabc8e..6d4983a7 100644
--- a/builds/cmake/CMakeLists.txt
+++ b/builds/cmake/CMakeLists.txt
@@ -148,7 +148,7 @@ endif()
# Find boost
#------------------------------------------------------------------------------
-find_package( Boost 1.76.0 REQUIRED COMPONENTS
+find_package( Boost 1.86.0 REQUIRED COMPONENTS
unit_test_framework )
set( boost_unit_test_framework_LIBS "-lboost_unit_test_framework" )
@@ -263,11 +263,6 @@ add_library( ${CANONICAL_LIB_NAME}
"../../src/services/heartbeat_service.cpp"
"../../src/services/query_service.cpp"
"../../src/services/transaction_service.cpp"
- "../../src/web/block_socket.cpp"
- "../../src/web/default_page_data.cpp"
- "../../src/web/heartbeat_socket.cpp"
- "../../src/web/query_socket.cpp"
- "../../src/web/transaction_socket.cpp"
"../../src/workers/authenticator.cpp"
"../../src/workers/notification_worker.cpp"
"../../src/workers/query_worker.cpp" )
diff --git a/builds/msvc/vs2022/bs/bs.vcxproj b/builds/msvc/vs2022/bs/bs.vcxproj
index dbe73723..0bf3d169 100644
--- a/builds/msvc/vs2022/bs/bs.vcxproj
+++ b/builds/msvc/vs2022/bs/bs.vcxproj
@@ -61,6 +61,54 @@
ReleaseSEXE
x64
+
+ DebugDEXE
+ ARM
+
+
+ ReleaseDEXE
+ ARM
+
+
+ DebugDEXE
+ ARM64
+
+
+ ReleaseDEXE
+ ARM64
+
+
+ DebugLEXE
+ ARM
+
+
+ ReleaseLEXE
+ ARM
+
+
+ DebugLEXE
+ ARM64
+
+
+ ReleaseLEXE
+ ARM64
+
+
+ DebugSEXE
+ ARM
+
+
+ ReleaseSEXE
+ ARM
+
+
+ DebugSEXE
+ ARM64
+
+
+ ReleaseSEXE
+ ARM64
+
@@ -86,34 +134,26 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/builds/msvc/vs2022/bs/packages.config b/builds/msvc/vs2022/bs/packages.config
index ab1228ed..1ba18fd0 100644
--- a/builds/msvc/vs2022/bs/packages.config
+++ b/builds/msvc/vs2022/bs/packages.config
@@ -6,16 +6,12 @@
|
-->
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.props b/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.props
index 77306830..35b507d4 100644
--- a/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.props
+++ b/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.props
@@ -12,7 +12,6 @@
false
- BOOST_TEST_DYN_LINK;%(PreprocessorDefinitions)
"$(TargetPath)" --log_level=warning --run_test=* --show_progress=no --build_info=yes
diff --git a/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.vcxproj b/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.vcxproj
index b4cd25e1..b9d4fb03 100644
--- a/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.vcxproj
+++ b/builds/msvc/vs2022/libbitcoin-server-test/libbitcoin-server-test.vcxproj
@@ -61,6 +61,54 @@
ReleaseSEXE
x64
+
+ DebugDEXE
+ ARM
+
+
+ ReleaseDEXE
+ ARM
+
+
+ DebugDEXE
+ ARM64
+
+
+ ReleaseDEXE
+ ARM64
+
+
+ DebugLEXE
+ ARM
+
+
+ ReleaseLEXE
+ ARM
+
+
+ DebugLEXE
+ ARM64
+
+
+ ReleaseLEXE
+ ARM64
+
+
+ DebugSEXE
+ ARM
+
+
+ ReleaseSEXE
+ ARM
+
+
+ DebugSEXE
+ ARM64
+
+
+ ReleaseSEXE
+ ARM64
+
@@ -79,37 +127,29 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
-
+
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
-
+
diff --git a/builds/msvc/vs2022/libbitcoin-server-test/packages.config b/builds/msvc/vs2022/libbitcoin-server-test/packages.config
index 302b7b5e..cef1f9e0 100644
--- a/builds/msvc/vs2022/libbitcoin-server-test/packages.config
+++ b/builds/msvc/vs2022/libbitcoin-server-test/packages.config
@@ -6,17 +6,13 @@
|
-->
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
-
+
diff --git a/builds/msvc/vs2022/libbitcoin-server.sln b/builds/msvc/vs2022/libbitcoin-server.sln
index ca69e20b..a4cb6791 100644
--- a/builds/msvc/vs2022/libbitcoin-server.sln
+++ b/builds/msvc/vs2022/libbitcoin-server.sln
@@ -15,6 +15,10 @@ Global
StaticDebug|x64 = StaticDebug|x64
StaticRelease|Win32 = StaticRelease|Win32
StaticRelease|x64 = StaticRelease|x64
+ StaticDebug|ARM = StaticDebug|ARM
+ StaticDebug|ARM64 = StaticDebug|ARM64
+ StaticRelease|ARM = StaticRelease|ARM
+ StaticRelease|ARM64 = StaticRelease|ARM64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticDebug|Win32.ActiveCfg = DebugLIB|Win32
@@ -25,6 +29,14 @@ Global
{73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|Win32.Build.0 = ReleaseLIB|Win32
{73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|x64.ActiveCfg = ReleaseLIB|x64
{73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|x64.Build.0 = ReleaseLIB|x64
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticDebug|ARM.ActiveCfg = DebugLIB|ARM
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticDebug|ARM.Build.0 = DebugLIB|ARM
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticDebug|ARM64.ActiveCfg = DebugLIB|ARM64
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticDebug|ARM64.Build.0 = DebugLIB|ARM64
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|ARM.ActiveCfg = ReleaseLIB|ARM
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|ARM.Build.0 = ReleaseLIB|ARM
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|ARM64.ActiveCfg = ReleaseLIB|ARM64
+ {73CE0AC2-ECB2-4E8D-A136-17840C0371A0}.StaticRelease|ARM64.Build.0 = ReleaseLIB|ARM64
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64
@@ -33,6 +45,14 @@ Global
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64
{66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|ARM.ActiveCfg = DebugSEXE|ARM
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|ARM.Build.0 = DebugSEXE|ARM
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|ARM64.ActiveCfg = DebugSEXE|ARM64
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticDebug|ARM64.Build.0 = DebugSEXE|ARM64
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|ARM.ActiveCfg = ReleaseSEXE|ARM
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|ARM.Build.0 = ReleaseSEXE|ARM
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|ARM64.ActiveCfg = ReleaseSEXE|ARM64
+ {66A0E586-2E3A-448F-BCD0-348AFEB0D5EA}.StaticRelease|ARM64.Build.0 = ReleaseSEXE|ARM64
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64
@@ -41,6 +61,14 @@ Global
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64
{F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|ARM.ActiveCfg = DebugSEXE|ARM
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|ARM.Build.0 = DebugSEXE|ARM
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|ARM64.ActiveCfg = DebugSEXE|ARM64
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticDebug|ARM64.Build.0 = DebugSEXE|ARM64
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|ARM.ActiveCfg = ReleaseSEXE|ARM
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|ARM.Build.0 = ReleaseSEXE|ARM
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|ARM64.ActiveCfg = ReleaseSEXE|ARM64
+ {F45B7D90-90BC-41EF-9AD1-9B29256A09FE}.StaticRelease|ARM64.Build.0 = ReleaseSEXE|ARM64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj b/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj
index be13c913..dfc02599 100644
--- a/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj
+++ b/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj
@@ -59,6 +59,54 @@
ReleaseLIB
x64
+
+
+ DebugDLL
+ ARM
+
+
+ ReleaseDLL
+ ARM
+
+
+ DebugDLL
+ ARM64
+
+
+ ReleaseDLL
+ ARM64
+
+
+ DebugLTCG
+ ARM
+
+
+ ReleaseLTCG
+ ARM
+
+
+ DebugLTCG
+ ARM64
+
+
+ ReleaseLTCG
+ ARM64
+
+
+ DebugLIB
+ ARM
+
+
+ ReleaseLIB
+ ARM
+
+
+ DebugLIB
+ ARM64
+
+
+ ReleaseLIB
+ ARM64
@@ -89,11 +137,6 @@
-
-
-
-
-
@@ -118,11 +161,6 @@
-
-
-
-
-
@@ -137,34 +175,26 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj.filters b/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj.filters
index 237977f6..d7270d58 100644
--- a/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj.filters
+++ b/builds/msvc/vs2022/libbitcoin-server/libbitcoin-server.vcxproj.filters
@@ -8,31 +8,28 @@
- {73CE0AC2-ECB2-4E8D-0000-000000000006}
+ {73CE0AC2-ECB2-4E8D-0000-000000000005}
- {73CE0AC2-ECB2-4E8D-0000-000000000007}
+ {73CE0AC2-ECB2-4E8D-0000-000000000006}
- {73CE0AC2-ECB2-4E8D-0000-000000000008}
+ {73CE0AC2-ECB2-4E8D-0000-000000000007}
- {73CE0AC2-ECB2-4E8D-0000-000000000009}
+ {73CE0AC2-ECB2-4E8D-0000-000000000008}
- {73CE0AC2-ECB2-4E8D-0000-00000000000A}
+ {73CE0AC2-ECB2-4E8D-0000-000000000009}
- {73CE0AC2-ECB2-4E8D-0000-00000000000B}
-
-
- {73CE0AC2-ECB2-4E8D-0000-00000000000C}
+ {73CE0AC2-ECB2-4E8D-0000-00000000000A}
- {73CE0AC2-ECB2-4E8D-0000-00000000000D}
+ {73CE0AC2-ECB2-4E8D-0000-00000000000B}
- {73CE0AC2-ECB2-4E8D-0000-00000000000E}
+ {73CE0AC2-ECB2-4E8D-0000-00000000000C}
{73CE0AC2-ECB2-4E8D-0000-000000000000}
@@ -46,11 +43,8 @@
{73CE0AC2-ECB2-4E8D-0000-000000000003}
-
- {73CE0AC2-ECB2-4E8D-0000-000000000004}
-
- {73CE0AC2-ECB2-4E8D-0000-000000000005}
+ {73CE0AC2-ECB2-4E8D-0000-000000000004}
@@ -102,21 +96,6 @@
src
-
- src\web
-
-
- src\web
-
-
- src\web
-
-
- src\web
-
-
- src\web
-
src\workers
@@ -185,21 +164,6 @@
include\bitcoin\server
-
- include\bitcoin\server\web
-
-
- include\bitcoin\server\web
-
-
- include\bitcoin\server\web
-
-
- include\bitcoin\server\web
-
-
- include\bitcoin\server\web
-
include\bitcoin\server\workers
diff --git a/builds/msvc/vs2022/libbitcoin-server/packages.config b/builds/msvc/vs2022/libbitcoin-server/packages.config
index ab1228ed..1ba18fd0 100644
--- a/builds/msvc/vs2022/libbitcoin-server/packages.config
+++ b/builds/msvc/vs2022/libbitcoin-server/packages.config
@@ -6,16 +6,12 @@
|
-->
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/builds/msvc/vs2022/libbitcoin-system.import.props b/builds/msvc/vs2022/libbitcoin-system.import.props
index bb11eeb3..662fa27e 100644
--- a/builds/msvc/vs2022/libbitcoin-system.import.props
+++ b/builds/msvc/vs2022/libbitcoin-system.import.props
@@ -50,6 +50,8 @@
WITH_ICU;WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)
+
+ BOOST_JSON_NO_LIB;BOOST_CONTAINER_NO_LIB;%(PreprocessorDefinitions)
BC_STATIC;%(PreprocessorDefinitions)
_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)
diff --git a/configure.ac b/configure.ac
index dd8de5cc..9d9792bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,17 +236,17 @@ AS_CASE([${CC}], [*],
# Check dependencies.
#==============================================================================
-# Require Boost of at least version 1.76.0 and output ${boost_CPPFLAGS/LDFLAGS}.
+# Require Boost of at least version 1.86.0 and output ${boost_CPPFLAGS/LDFLAGS}.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
- [AX_BOOST_BASE([1.76.0],
+ [AX_BOOST_BASE([1.86.0],
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`])
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
- [AC_MSG_ERROR([Boost 1.76.0 or later is required but was not found.])])])
+ [AC_MSG_ERROR([Boost 1.86.0 or later is required but was not found.])])])
AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
diff --git a/console/executor.cpp b/console/executor.cpp
index 86a37e3e..865ad1a9 100644
--- a/console/executor.cpp
+++ b/console/executor.cpp
@@ -19,9 +19,7 @@
#include "executor.hpp"
#include
-#include
#include
-#include
#include
#include
#include
diff --git a/console/executor.hpp b/console/executor.hpp
index a87ecf59..740c5b46 100644
--- a/console/executor.hpp
+++ b/console/executor.hpp
@@ -20,7 +20,6 @@
#define LIBBITCOIN_SERVER_EXECUTOR_HPP
#include
-#include
#include
#include
@@ -72,16 +71,16 @@ class executor
bool run();
// Termination state.
- static std::promise stopping_;
+ static std::promise stopping_{};
parser& metadata_;
std::ostream& output_;
std::ostream& error_;
network::logger log_{};
std::promise stopped_{};
- server_node::ptr node_;
- server_node::store store_;
- server_node::query query_;
+ server_node::ptr node_{};
+ server_node::store store_{};
+ server_node::query query_{};
};
// Localizable messages.
diff --git a/console/main.cpp b/console/main.cpp
index b5d06249..a47b5a54 100644
--- a/console/main.cpp
+++ b/console/main.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
+ * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
@@ -16,32 +16,99 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-#include
+#include
+#include
#include
#include "executor.hpp"
+////// This is some experimental code to explore emission of win32 stack dump.
+////#ifdef HAVE_MSC
+////#include "stack_trace.hpp"
+
+namespace libbitcoin {
+namespace system {
+ std::istream& cin = cin_stream();
+ std::ostream& cout = cout_stream();
+ std::ostream& cerr = cerr_stream();
+ int main(int argc, char* argv[]);
+} // namespace system
+} // namespace libbitcoin
+
+namespace bc = libbitcoin;
+////std::filesystem::path symbols_path{};
+////
+////int wmain(int argc, wchar_t* argv[])
+////{
+//// __try
+//// {
+//// return bc::system::call_utf8_main(argc, argv, &bc::system::main);
+//// }
+//// __except (dump_stack_trace(GetExceptionCode(), GetExceptionInformation()))
+//// {
+//// return -1;
+//// }
+////}
+////
+////// This is invoked by dump_stack_trace.
+////void handle_stack_trace(const std::string& trace)
+////{
+//// if (trace.empty())
+//// {
+//// bc::system::cout << "<>" << std::endl;
+//// return;
+//// }
+////
+//// bc::system::cout << "<>" << std::endl;
+//// bc::system::cout << trace << std::endl;
+//// bc::system::cout << "<>" << std::endl;
+////}
+////
+////// This is invoked by dump_stack_trace.
+////std::wstring pdb_path()
+////{
+//// return bc::system::to_extended_path(symbols_path);
+////}
+////
+////#else
BC_USE_LIBBITCOIN_MAIN
+////#endif
-/**
- * Invoke this program with the raw arguments provided on the command line.
- * All console input and output streams for the application originate here.
- * @param argc The number of elements in the argv array.
- * @param argv The array of arguments, including the process.
- * @return The numeric result to return via console exit.
- */
+/// Invoke this program with the raw arguments provided on the command line.
+/// All console input and output streams for the application originate here.
int bc::system::main(int argc, char* argv[])
{
using namespace bc;
using namespace bc::server;
using namespace bc::system;
+ // en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio
+ std::ios_base::sync_with_stdio(false);
+
set_utf8_stdio();
- bc::server::parser metadata(config::settings::mainnet);
+ parser metadata(chain::selection::mainnet);
const auto& args = const_cast(argv);
if (!metadata.parse(argc, args, cerr))
- return console_result::failure;
+ return -1;
+
+////#if defined(HAVE_MSC)
+//// symbols_path = metadata.configured.log.symbols;
+////#endif
+
+// requires _WIN32_WINNT set to 0x0602 (defaults 0x0602 in vc++ 2022).
+#if defined(HAVE_MSC) && defined(MEMORY_PRIORITY_INFORMATION)
+
+ // Set low memory priority on the current process.
+ const MEMORY_PRIORITY_INFORMATION priority{ MEMORY_PRIORITY_LOW };
+ SetProcessInformation(
+ GetCurrentProcess(),
+ ProcessMemoryPriority,
+ &priority,
+ sizeof(priority));
+
+#endif
executor host(metadata, cin, cout, cerr);
- return host.menu() ? console_result::okay : console_result::failure;
+ ////return host.dispatch() ? 0 : -1;
+ return host.menu() ? 0 : -1;
}
diff --git a/include/bitcoin/server.hpp b/include/bitcoin/server.hpp
index eff1eef5..59a46f04 100644
--- a/include/bitcoin/server.hpp
+++ b/include/bitcoin/server.hpp
@@ -34,11 +34,6 @@
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/configuration.hpp b/include/bitcoin/server/configuration.hpp
index b91bd38c..1e2434ca 100644
--- a/include/bitcoin/server/configuration.hpp
+++ b/include/bitcoin/server/configuration.hpp
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
+ * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
@@ -21,35 +21,52 @@
#include
#include
-#include
#include
#include
namespace libbitcoin {
namespace server {
-// Not localizable.
-#define BS_HELP_VARIABLE "help"
-#define BS_SETTINGS_VARIABLE "settings"
-#define BS_VERSION_VARIABLE "version"
-
-// This must be lower case but the env var part can be any case.
-#define BS_CONFIG_VARIABLE "config"
-
-// This must match the case of the env var.
-#define BS_ENVIRONMENT_VARIABLE_PREFIX "BS_"
-
-/// Full server node configuration, thread safe.
+/// Server configuration, thread safe.
class BCS_API configuration
- : public node::configuration
{
public:
- configuration(system::settings context);
+ DEFAULT_COPY_MOVE_DESTRUCT(configuration);
+
+ configuration(system::chain::selection context) NOEXCEPT;
+
+ /// Environment.
+ std::filesystem::path file{};
+
+ /// Information.
+ bool help{};
+ bool hardware{};
+ bool settings{};
+ bool version{};
+
+ /// Actions.
+ bool newstore{};
+ bool backup{};
+ bool restore{};
+
+ /// Chain scans.
+ bool flags{};
+ bool information{};
+ bool slabs{};
+ bool buckets{};
+ bool collisions{};
+
+ /// Ad-hoc Testing.
+ bool test{};
+ bool write{};
/// Settings.
- bc::server::settings server;
- bc::protocol::settings protocol;
- bc::blockchain::settings blockchain;
+ log::settings log;
+ server::settings server;
+ node::settings node;
+ network::settings network;
+ database::settings database;
+ system::settings bitcoin;
};
} // namespace server
diff --git a/include/bitcoin/server/define.hpp b/include/bitcoin/server/define.hpp
index 62f73cad..5aba1802 100644
--- a/include/bitcoin/server/define.hpp
+++ b/include/bitcoin/server/define.hpp
@@ -42,12 +42,12 @@
#define LOG_SERVER_HTTP "http"
// Avoid namespace conflict between boost::placeholders and std::placeholders.
-#define BOOST_BIND_NO_PLACEHOLDERS
+////#define BOOST_BIND_NO_PLACEHOLDERS
-#include
-#include
-#include
-#include
-#include
+////#include
+////#include
+////#include
+////#include
+////#include
#endif
diff --git a/include/bitcoin/server/interface/blockchain.hpp b/include/bitcoin/server/interface/blockchain.hpp
index f9e914f7..ea428bc7 100644
--- a/include/bitcoin/server/interface/blockchain.hpp
+++ b/include/bitcoin/server/interface/blockchain.hpp
@@ -19,9 +19,6 @@
#ifndef LIBBITCOIN_SERVER_BLOCKCHAIN_HPP
#define LIBBITCOIN_SERVER_BLOCKCHAIN_HPP
-#include
-#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/messages/message.hpp b/include/bitcoin/server/messages/message.hpp
index e39a7d51..3b80e435 100644
--- a/include/bitcoin/server/messages/message.hpp
+++ b/include/bitcoin/server/messages/message.hpp
@@ -19,8 +19,6 @@
#ifndef LIBBITCOIN_SERVER_MESSAGE
#define LIBBITCOIN_SERVER_MESSAGE
-#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/messages/route.hpp b/include/bitcoin/server/messages/route.hpp
index 70a99021..23041e16 100644
--- a/include/bitcoin/server/messages/route.hpp
+++ b/include/bitcoin/server/messages/route.hpp
@@ -19,8 +19,6 @@
#ifndef LIBBITCOIN_SERVER_ROUTE
#define LIBBITCOIN_SERVER_ROUTE
-#include
-#include
#include
#include
diff --git a/include/bitcoin/server/messages/subscription.hpp b/include/bitcoin/server/messages/subscription.hpp
index b547bad3..ba82ddb2 100644
--- a/include/bitcoin/server/messages/subscription.hpp
+++ b/include/bitcoin/server/messages/subscription.hpp
@@ -21,7 +21,6 @@
#include
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/parser.hpp b/include/bitcoin/server/parser.hpp
index 7ffb5c44..d2702884 100644
--- a/include/bitcoin/server/parser.hpp
+++ b/include/bitcoin/server/parser.hpp
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
+ * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
@@ -19,37 +19,64 @@
#ifndef LIBBITCOIN_SERVER_PARSER_HPP
#define LIBBITCOIN_SERVER_PARSER_HPP
-#include
#include
#include
#include
+// Not localizable.
+#define BS_HELP_VARIABLE "help"
+#define BS_HARDWARE_VARIABLE "hardware"
+#define BS_SETTINGS_VARIABLE "settings"
+#define BS_VERSION_VARIABLE "version"
+#define BS_NEWSTORE_VARIABLE "newstore"
+#define BS_BACKUP_VARIABLE "backup"
+#define BS_RESTORE_VARIABLE "restore"
+
+#define BS_FLAGS_VARIABLE "flags"
+#define BS_SLABS_VARIABLE "slabs"
+#define BS_BUCKETS_VARIABLE "buckets"
+#define BS_COLLISIONS_VARIABLE "collisions"
+#define BS_INFORMATION_VARIABLE "information"
+
+#define BS_READ_VARIABLE "test"
+#define BS_WRITE_VARIABLE "write"
+
+// This must be lower case but the env var part can be any case.
+#define BS_CONFIG_VARIABLE "config"
+
+// This must match the case of the env var.
+#define BS_ENVIRONMENT_VARIABLE_PREFIX "BS_"
+
namespace libbitcoin {
namespace server {
+// TODO: derive from node parser and add new settings.
+// TODO: implement parsers in downlevel libraries.
+
/// Parse configurable values from environment variables, settings file, and
/// command line positional and non-positional options.
class BCS_API parser
: public system::config::parser
{
public:
- parser(system::settings context);
- parser(const configuration& defaults);
-
- /// Parse all configuration into member settings.
- virtual bool parse(int argc, const char* argv[], std::ostream& error);
+ parser(system::chain::selection context) NOEXCEPT;
+ parser(const configuration& defaults) NOEXCEPT;
/// Load command line options (named).
- virtual options_metadata load_options();
+ virtual options_metadata load_options() THROWS;
/// Load command line arguments (positional).
- virtual arguments_metadata load_arguments();
+ virtual arguments_metadata load_arguments() THROWS;
+
+ /// Load environment variable settings.
+ virtual options_metadata load_environment() THROWS;
/// Load configuration file settings.
- virtual options_metadata load_settings();
+ virtual options_metadata load_settings() THROWS;
- /// Load environment variable settings.
- virtual options_metadata load_environment();
+ /// Parse all configuration into member settings.
+ virtual bool parse(int argc, const char* argv[],
+ std::ostream& error) THROWS;
/// The populated configuration settings values.
configuration configured;
diff --git a/include/bitcoin/server/server_node.hpp b/include/bitcoin/server/server_node.hpp
index c0dccdf9..d6a82169 100644
--- a/include/bitcoin/server/server_node.hpp
+++ b/include/bitcoin/server/server_node.hpp
@@ -19,7 +19,6 @@
#ifndef LIBBITCOIN_SERVER_SERVER_NODE_HPP
#define LIBBITCOIN_SERVER_SERVER_NODE_HPP
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/services/block_service.hpp b/include/bitcoin/server/services/block_service.hpp
index 4779cb83..c1f5bda1 100644
--- a/include/bitcoin/server/services/block_service.hpp
+++ b/include/bitcoin/server/services/block_service.hpp
@@ -19,10 +19,7 @@
#ifndef LIBBITCOIN_SERVER_BLOCK_SERVICE_HPP
#define LIBBITCOIN_SERVER_BLOCK_SERVICE_HPP
-#include
-#include
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/services/heartbeat_service.hpp b/include/bitcoin/server/services/heartbeat_service.hpp
index a00d1d79..c1e636c6 100644
--- a/include/bitcoin/server/services/heartbeat_service.hpp
+++ b/include/bitcoin/server/services/heartbeat_service.hpp
@@ -19,9 +19,7 @@
#ifndef LIBBITCOIN_SERVER_HEARTBEAT_SERVICE_HPP
#define LIBBITCOIN_SERVER_HEARTBEAT_SERVICE_HPP
-#include
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/services/query_service.hpp b/include/bitcoin/server/services/query_service.hpp
index 81a5b307..20dd2a51 100644
--- a/include/bitcoin/server/services/query_service.hpp
+++ b/include/bitcoin/server/services/query_service.hpp
@@ -20,7 +20,6 @@
#define LIBBITCOIN_SERVER_QUERY_SERVICE_HPP
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/services/transaction_service.hpp b/include/bitcoin/server/services/transaction_service.hpp
index 0a601952..12f2af9c 100644
--- a/include/bitcoin/server/services/transaction_service.hpp
+++ b/include/bitcoin/server/services/transaction_service.hpp
@@ -19,9 +19,7 @@
#ifndef LIBBITCOIN_SERVER_TRANSACTION_SERVICE_HPP
#define LIBBITCOIN_SERVER_TRANSACTION_SERVICE_HPP
-#include
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/settings.hpp b/include/bitcoin/server/settings.hpp
index ae1ad16b..424a34e4 100644
--- a/include/bitcoin/server/settings.hpp
+++ b/include/bitcoin/server/settings.hpp
@@ -19,9 +19,7 @@
#ifndef LIBBITCOIN_SERVER_SETTINGS_HPP
#define LIBBITCOIN_SERVER_SETTINGS_HPP
-#include
-#include
-#include
+#include
#include
#include
#include
@@ -34,21 +32,18 @@ class BCS_API settings
{
public:
settings();
- settings(system::settings context);
+ settings(system::chain::selection context);
- /// Helpers.
- network::asio::steady_timer heartbeat_interval() const;
- network::asio::steady_timer subscription_expiration() const;
+ /// Times.
+ std::chrono::steady_clock::duration heartbeat_service() const;
+ std::chrono::steady_clock::duration subscription_expiration() const;
+
+ /// Endpoints.
const protocol::endpoint& zeromq_query_endpoint(bool secure) const;
const protocol::endpoint& zeromq_heartbeat_endpoint(bool secure) const;
const protocol::endpoint& zeromq_block_endpoint(bool secure) const;
const protocol::endpoint& zeromq_transaction_endpoint(bool secure) const;
- const protocol::endpoint& websockets_query_endpoint(bool secure) const;
- const protocol::endpoint& websockets_heartbeat_endpoint(bool secure) const;
- const protocol::endpoint& websockets_block_endpoint(bool secure) const;
- const protocol::endpoint& websockets_transaction_endpoint(bool secure) const;
-
/// [server]
bool priority;
bool secure_only;
@@ -58,35 +53,24 @@ class BCS_API settings
uint32_t heartbeat_service_seconds;
bool block_service_enabled;
bool transaction_service_enabled;
- network::config::authorities client_addresses;
- network::config::authorities blacklists;
-
- /// [websockets]
- protocol::endpoint websockets_secure_query_endpoint;
- protocol::endpoint websockets_secure_heartbeat_endpoint;
- protocol::endpoint websockets_secure_block_endpoint;
- protocol::endpoint websockets_secure_transaction_endpoint;
-
- protocol::endpoint websockets_public_query_endpoint;
- protocol::endpoint websockets_public_heartbeat_endpoint;
- protocol::endpoint websockets_public_block_endpoint;
- protocol::endpoint websockets_public_transaction_endpoint;
-
- bool websockets_enabled;
+ protocol::authorities clients{};
+ protocol::authorities blacklists{};
- /// [zeromq]
+ /// [zeromq] secure
protocol::endpoint zeromq_secure_query_endpoint;
protocol::endpoint zeromq_secure_heartbeat_endpoint;
protocol::endpoint zeromq_secure_block_endpoint;
protocol::endpoint zeromq_secure_transaction_endpoint;
+ /// [zeromq] clear
protocol::endpoint zeromq_public_query_endpoint;
protocol::endpoint zeromq_public_heartbeat_endpoint;
protocol::endpoint zeromq_public_block_endpoint;
protocol::endpoint zeromq_public_transaction_endpoint;
- protocol::sodium zeromq_server_private_key;
- protocol::sodium::list zeromq_client_public_keys;
+ /// [zeromq] keys
+ protocol::sodium zeromq_server_private_key{};
+ protocol::sodiums zeromq_client_public_keys{};
};
} // namespace server
diff --git a/include/bitcoin/server/web/block_socket.hpp b/include/bitcoin/server/web/block_socket.hpp
deleted file mode 100644
index a145e248..00000000
--- a/include/bitcoin/server/web/block_socket.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
- *
- * This file is part of libbitcoin.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-#ifndef LIBBITCOIN_SERVER_WEB_BLOCK_SOCKET_HPP
-#define LIBBITCOIN_SERVER_WEB_BLOCK_SOCKET_HPP
-
-#include
-#include
-#include
-
-namespace libbitcoin {
-namespace server {
-
-class server_node;
-
-// This class is thread safe.
-// Subscribe to block acceptances from a dedicated socket endpoint.
-class BCS_API block_socket
- : public bc::protocol::http::socket
-{
-public:
- typedef std::shared_ptr ptr;
-
- /// Construct a block socket service endpoint.
- block_socket(bc::protocol::zmq::context& context, server_node& node,
- bool secure);
-
-protected:
- // Implement the service.
- virtual void work() override;
-
- virtual const bc::protocol::endpoint& zeromq_endpoint() const override;
- virtual const bc::protocol::endpoint& websocket_endpoint() const override;
-
-private:
- bool handle_block(bc::protocol::zmq::socket& subscriber);
-
- const bc::server::settings& settings_;
- const bc::protocol::settings& protocol_settings_;
-};
-
-} // namespace server
-} // namespace libbitcoin
-
-#endif
diff --git a/include/bitcoin/server/web/default_page_data.hpp b/include/bitcoin/server/web/default_page_data.hpp
deleted file mode 100644
index 171fe130..00000000
--- a/include/bitcoin/server/web/default_page_data.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
- *
- * This file is part of libbitcoin.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-#ifndef LIBBITCOIN_SERVER_WEB_DEFAULT_PAGE_DATA_HPP
-#define LIBBITCOIN_SERVER_WEB_DEFAULT_PAGE_DATA_HPP
-
-#include
-#include
-
-namespace libbitcoin {
-namespace server {
-
-/// Given endpoints for each web service based on user configuration,
-/// we can generate default page data.
-std::string get_default_page_data(const bc::system::config::endpoint& query,
- const bc::system::config::endpoint& heartbeat,
- const bc::system::config::endpoint& block,
- const bc::system::config::endpoint& transaction);
-
-} // namespace server
-} // namespace libbitcoin
-
-#endif
diff --git a/include/bitcoin/server/web/heartbeat_socket.hpp b/include/bitcoin/server/web/heartbeat_socket.hpp
deleted file mode 100644
index b016c517..00000000
--- a/include/bitcoin/server/web/heartbeat_socket.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
- *
- * This file is part of libbitcoin.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-#ifndef LIBBITCOIN_SERVER_WEB_HEARTBEAT_SOCKET_HPP
-#define LIBBITCOIN_SERVER_WEB_HEARTBEAT_SOCKET_HPP
-
-#include
-#include
-#include
-
-namespace libbitcoin {
-namespace server {
-
-class server_node;
-
-// This class is thread safe.
-// Subscribe to a pulse from a dedicated socket endpoint.
-class BCS_API heartbeat_socket
- : public bc::protocol::http::socket
-{
-public:
- typedef std::shared_ptr ptr;
-
- /// Construct a heartbeat socket service endpoint.
- heartbeat_socket(bc::protocol::zmq::context& context, server_node& node,
- bool secure);
-
-protected:
-
- // Implement the service.
- virtual void work() override;
-
- virtual const bc::protocol::endpoint& zeromq_endpoint() const override;
- virtual const bc::protocol::endpoint& websocket_endpoint() const override;
-
-private:
- bool handle_heartbeat(bc::protocol::zmq::socket& subscriber);
-
- const bc::server::settings& settings_;
- const bc::protocol::settings& protocol_settings_;
-};
-
-} // namespace server
-} // namespace libbitcoin
-
-#endif
diff --git a/include/bitcoin/server/web/query_socket.hpp b/include/bitcoin/server/web/query_socket.hpp
deleted file mode 100644
index d5796044..00000000
--- a/include/bitcoin/server/web/query_socket.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
- *
- * This file is part of libbitcoin.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-#ifndef LIBBITCOIN_SERVER_WEB_QUERY_SOCKET_HPP
-#define LIBBITCOIN_SERVER_WEB_QUERY_SOCKET_HPP
-
-#include
-#include
-#include
-
-namespace libbitcoin {
-namespace server {
-
-class server_node;
-
-// This class is thread safe.
-// Submit queries and address subscriptions and receive address
-// notifications on a dedicated socket endpoint.
-class BCS_API query_socket
- : public bc::protocol::http::socket
-{
-public:
- typedef std::shared_ptr ptr;
-
- /// Construct a query socket service endpoint.
- query_socket(bc::protocol::zmq::context& context, server_node& node,
- bool secure);
-
-protected:
- // Implement the socket.
- virtual void work() override;
-
- virtual bool start_websocket_handler() override;
-
- // Initialize the query specific zmq socket.
- virtual void handle_websockets() override;
-
- virtual const system::config::endpoint& zeromq_endpoint() const override;
- virtual const system::config::endpoint& websocket_endpoint() const override;
- virtual const std::shared_ptr service()
- const override;
-
- const system::config::endpoint& query_endpoint() const;
-
-private:
- bool handle_query(bc::protocol::zmq::socket& dealer);
-
- const bc::server::settings& settings_;
- const bc::protocol::settings& protocol_settings_;
- std::shared_ptr service_;
-};
-
-} // namespace server
-} // namespace libbitcoin
-
-#endif
diff --git a/include/bitcoin/server/web/transaction_socket.hpp b/include/bitcoin/server/web/transaction_socket.hpp
deleted file mode 100644
index 2e639693..00000000
--- a/include/bitcoin/server/web/transaction_socket.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
- *
- * This file is part of libbitcoin.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-#ifndef LIBBITCOIN_SERVER_WEB_TRANSACTION_SOCKET_HPP
-#define LIBBITCOIN_SERVER_WEB_TRANSACTION_SOCKET_HPP
-
-#include
-#include
-#include
-
-namespace libbitcoin {
-namespace server {
-
-class server_node;
-
-// This class is thread safe.
-// Subscribe to tx acceptances into the pool from a dedicated socket endpoint.
-class BCS_API transaction_socket
- : public bc::protocol::http::socket
-{
-public:
- typedef std::shared_ptr ptr;
-
- /// Construct a transaction socket service endpoint.
- transaction_socket(bc::protocol::zmq::context& context, server_node& node,
- bool secure);
-
-protected:
-
- // Implement the service.
- virtual void work() override;
-
- virtual const bc::protocol::endpoint& zeromq_endpoint() const override;
- virtual const bc::protocol::endpoint& websocket_endpoint() const override;
-
-private:
- bool handle_transaction(bc::protocol::zmq::socket& subscriber);
-
- const bc::server::settings& settings_;
- const bc::protocol::settings& protocol_settings_;
-};
-
-} // namespace server
-} // namespace libbitcoin
-
-#endif
diff --git a/include/bitcoin/server/workers/notification_worker.hpp b/include/bitcoin/server/workers/notification_worker.hpp
index d7b0d003..5fdec84c 100644
--- a/include/bitcoin/server/workers/notification_worker.hpp
+++ b/include/bitcoin/server/workers/notification_worker.hpp
@@ -20,10 +20,7 @@
#define LIBBITCOIN_SERVER_NOTIFICATION_WORKER_HPP
#include
-#include
-#include
#include
-#include
#include
#include
#include
diff --git a/include/bitcoin/server/workers/query_worker.hpp b/include/bitcoin/server/workers/query_worker.hpp
index 3eef9a7f..4ca19052 100644
--- a/include/bitcoin/server/workers/query_worker.hpp
+++ b/include/bitcoin/server/workers/query_worker.hpp
@@ -20,8 +20,6 @@
#define LIBBITCOIN_SERVER_QUERY_WORKER_HPP
#include
-#include
-#include
#include
#include
#include
diff --git a/install-cmake.sh b/install-cmake.sh
index c8e410d0..416e2b0b 100755
--- a/install-cmake.sh
+++ b/install-cmake.sh
@@ -79,8 +79,8 @@ ZMQ_ARCHIVE="zeromq-4.3.5.tar.gz"
# Boost archive.
#------------------------------------------------------------------------------
-BOOST_URL="https://archives.boost.io/release/1.78.0/source/boost_1_78_0.tar.bz2"
-BOOST_ARCHIVE="boost_1_78_0.tar.bz2"
+BOOST_URL="https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2"
+BOOST_ARCHIVE="boost_1_86_0.tar.bz2"
# Define utility functions.
@@ -1053,13 +1053,10 @@ ICU_OPTIONS=(
# Define boost options.
#------------------------------------------------------------------------------
BOOST_OPTIONS=(
-"--with-chrono" \
"--with-iostreams" \
-"--with-json" \
"--with-locale" \
"--with-program_options" \
"--with-regex" \
-"--with-system" \
"--with-thread" \
"--with-test")
diff --git a/install-cmakepresets.sh b/install-cmakepresets.sh
index 2dc60ab4..67751889 100755
--- a/install-cmakepresets.sh
+++ b/install-cmakepresets.sh
@@ -1109,13 +1109,10 @@ ICU_OPTIONS=(
# Define boost options.
#------------------------------------------------------------------------------
BOOST_OPTIONS=(
-"--with-chrono" \
"--with-iostreams" \
-"--with-json" \
"--with-locale" \
"--with-program_options" \
"--with-regex" \
-"--with-system" \
"--with-thread" \
"--with-test")
diff --git a/install.sh b/install.sh
index c5b89e84..b63b40c3 100755
--- a/install.sh
+++ b/install.sh
@@ -79,8 +79,8 @@ ZMQ_ARCHIVE="zeromq-4.3.5.tar.gz"
# Boost archive.
#------------------------------------------------------------------------------
-BOOST_URL="https://archives.boost.io/release/1.78.0/source/boost_1_78_0.tar.bz2"
-BOOST_ARCHIVE="boost_1_78_0.tar.bz2"
+BOOST_URL="https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2"
+BOOST_ARCHIVE="boost_1_86_0.tar.bz2"
# Define utility functions.
@@ -927,13 +927,10 @@ ICU_OPTIONS=(
# Define boost options.
#------------------------------------------------------------------------------
BOOST_OPTIONS=(
-"--with-chrono" \
"--with-iostreams" \
-"--with-json" \
"--with-locale" \
"--with-program_options" \
"--with-regex" \
-"--with-system" \
"--with-thread" \
"--with-test")
diff --git a/src/configuration.cpp b/src/configuration.cpp
index db81b82f..81d9ae53 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -18,18 +18,22 @@
*/
#include
+#include
+#include
+#include
#include
namespace libbitcoin {
namespace server {
-using namespace bc::system;
-
// Construct with defaults derived from given context.
-configuration::configuration(config::settings context)
- : node::configuration(context),
+configuration::configuration(system::chain::selection context) NOEXCEPT
+ : log(context),
server(context),
- blockchain(context)
+ node(context),
+ network(context),
+ database(context),
+ bitcoin(context)
{
}
diff --git a/src/interface/blockchain.cpp b/src/interface/blockchain.cpp
index c0c5f202..58bdf7c6 100644
--- a/src/interface/blockchain.cpp
+++ b/src/interface/blockchain.cpp
@@ -18,11 +18,7 @@
*/
#include
-#include
-#include
-#include
#include
-#include
#include
#include
#include
diff --git a/src/interface/subscribe.cpp b/src/interface/subscribe.cpp
index 8f34e7b5..3d0dee0e 100644
--- a/src/interface/subscribe.cpp
+++ b/src/interface/subscribe.cpp
@@ -18,9 +18,6 @@
*/
#include
-#include
-#include
-#include
#include
#include
#include
diff --git a/src/interface/transaction_pool.cpp b/src/interface/transaction_pool.cpp
index 079f94ae..017098ba 100644
--- a/src/interface/transaction_pool.cpp
+++ b/src/interface/transaction_pool.cpp
@@ -18,9 +18,6 @@
*/
#include
-#include
-#include
-#include
#include
#include
#include
diff --git a/src/interface/unsubscribe.cpp b/src/interface/unsubscribe.cpp
index 213e9c47..6f015784 100644
--- a/src/interface/unsubscribe.cpp
+++ b/src/interface/unsubscribe.cpp
@@ -18,9 +18,6 @@
*/
#include
-#include
-#include
-#include
#include
#include
#include
diff --git a/src/messages/message.cpp b/src/messages/message.cpp
index 17a61a2b..58073686 100644
--- a/src/messages/message.cpp
+++ b/src/messages/message.cpp
@@ -18,8 +18,6 @@
*/
#include
-#include
-#include
#include
#include
#include
diff --git a/src/messages/route.cpp b/src/messages/route.cpp
index e92532cb..82ec4d81 100644
--- a/src/messages/route.cpp
+++ b/src/messages/route.cpp
@@ -18,7 +18,6 @@
*/
#include
-#include
#include
namespace libbitcoin {
diff --git a/src/messages/subscription.cpp b/src/messages/subscription.cpp
index 1e9a41b6..97d7a62b 100644
--- a/src/messages/subscription.cpp
+++ b/src/messages/subscription.cpp
@@ -19,7 +19,6 @@
#include
#include
-#include
#include
#include
diff --git a/src/parser.cpp b/src/parser.cpp
index 10b56025..8677e3bb 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011-2023 libbitcoin developers (see AUTHORS)
+ * Copyright (c) 2011-2025 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
@@ -18,69 +18,148 @@
*/
#include
-#include
-#include
-#include
-#include
+#include
#include
#include
#include
-#include
-#include
-
-BC_DECLARE_CONFIG_DEFAULT_PATH("libbitcoin" / "bs.cfg")
+#include
-// TODO: localize descriptions.
+std::filesystem::path config_default_path() NOEXCEPT
+{
+ return { "libbitcoin/bs.cfg" };
+}
namespace libbitcoin {
namespace server {
-using namespace boost::filesystem;
-using namespace boost::program_options;
-using namespace bc::network;
using namespace bc::system;
using namespace bc::system::config;
+using namespace boost::program_options;
// Initialize configuration by copying the given instance.
-parser::parser(const configuration& defaults)
+parser::parser(const configuration& defaults) NOEXCEPT
: configured(defaults)
{
}
// Initialize configuration using defaults of the given context.
-parser::parser(config::settings context)
+parser::parser(system::chain::selection context) NOEXCEPT
: configured(context)
{
- using serve = message::version::service;
+ // node
- // Logs will slow things if not rotated.
- configured.network.rotation_size = 10000000;
+ configured.node.snapshot_bytes = 0;
+ configured.node.snapshot_valid = 0;
+ configured.node.snapshot_confirm = 0;
- // It is a public network.
- configured.network.inbound_connections = 100;
+ // network
- // Optimal for sync and network penetration.
- configured.network.outbound_connections = 8;
+ using level = network::messages::level;
+ using service = network::messages::service;
- // A node allows 10000 host names by default.
+ configured.network.threads = 16;
+ configured.network.enable_address = true;
+ configured.network.enable_transaction = true;
configured.network.host_pool_capacity = 10000;
+ configured.network.outbound_connections = 100;
+ configured.network.protocol_minimum = level::headers_protocol;
+ configured.network.protocol_maximum = level::bip130;
+
+ // services_minimum must be node_witness to be a witness node.
+ configured.network.services_minimum = service::node_network |
+ service::node_witness;
+ configured.network.services_maximum = service::node_network |
+ service::node_witness;
+
+ // SCALE: LF2.2 @ 850K.
+
+ // database (archive)
+
+ configured.database.header_buckets = 386'364;
+ configured.database.header_size = 21'000'000;
+ configured.database.header_rate = 5;
+
+ configured.database.input_size = 92'500'000'000;
+ configured.database.input_rate = 5;
+
+ configured.database.output_size = 25'300'000'000;
+ configured.database.output_rate = 5;
+
+ configured.database.point_buckets = 1'194'185'278;
+ configured.database.point_size = 25'700'000'000;
+ configured.database.point_rate = 5;
+
+ configured.database.ins_size = 8'550'000'000;
+ configured.database.ins_rate = 5;
+
+ configured.database.outs_size = 3'700'000'000;
+ configured.database.outs_rate = 5;
- // Expose full node (1) and witness (8) network services by default.
- configured.network.services = serve::node_network | serve::node_witness;
+ configured.database.tx_buckets = 469'222'525;
+ configured.database.tx_size = 17'000'000'000;
+ configured.database.tx_rate = 5;
- // TODO: set this independently on each public endpoint.
- configured.protocol.message_size_limit = max_block_size + 100;
+ configured.database.txs_buckets = 850'001;
+ configured.database.txs_size = 1'050'000'000;
+ configured.database.txs_rate = 5;
+
+ // database (indexes)
+
+ configured.database.candidate_size = 2'575'500;
+ configured.database.candidate_rate = 5;
+
+ configured.database.confirmed_size = 2'575'500;
+ configured.database.confirmed_rate = 5;
+
+ configured.database.strong_tx_buckets = 469'222'525;
+ configured.database.strong_tx_size = 2'900'000'000;
+ configured.database.strong_tx_rate = 5;
+
+ // database (caches)
+
+ configured.database.duplicate_buckets = 10;
+ configured.database.duplicate_size = 44;
+ configured.database.duplicate_rate = 5;
+
+ configured.database.prevout_buckets = 850'001;
+ configured.database.prevout_size = 5'250'000'000;
+ configured.database.prevout_rate = 5;
+
+ configured.database.validated_bk_buckets = 850'001;
+ configured.database.validated_bk_size = 1'700'000;
+ configured.database.validated_bk_rate = 5;
+
+ configured.database.validated_tx_buckets = 1;
+ configured.database.validated_tx_size = 1;
+ configured.database.validated_tx_rate = 5;
+
+ // database (optionals)
+
+ configured.database.address_buckets = 1;
+ configured.database.address_size = 1;
+ configured.database.address_rate = 5;
+
+ // also disabled by filter_tx
+ configured.database.filter_bk_buckets = 0;
+ configured.database.filter_bk_size = 1;
+ configured.database.filter_bk_rate = 5;
+
+ // also disabled by filter_bk
+ configured.database.filter_tx_buckets = 0;
+ configured.database.filter_tx_size = 1;
+ configured.database.filter_tx_rate = 5;
}
-options_metadata parser::load_options()
+options_metadata parser::load_options() THROWS
{
options_metadata description("options");
description.add_options()
(
BS_CONFIG_VARIABLE ",c",
- value(&configured.file),
+ value(&configured.file),
"Specify path to a configuration settings file."
)
+ // Information.
(
BS_HELP_VARIABLE ",h",
value(&configured.help)->
@@ -88,10 +167,10 @@ options_metadata parser::load_options()
"Display command line options."
)
(
- "initchain,i",
- value(&configured.initchain)->
+ BS_HARDWARE_VARIABLE ",d",
+ value(&configured.hardware)->
default_value(false)->zero_tokens(),
- "Initialize blockchain in the configured directory."
+ "Display hardware compatibility."
)
(
BS_SETTINGS_VARIABLE ",s",
@@ -104,28 +183,91 @@ options_metadata parser::load_options()
value(&configured.version)->
default_value(false)->zero_tokens(),
"Display version information."
+ )
+ // Actions.
+ (
+ BS_NEWSTORE_VARIABLE ",n",
+ value(&configured.newstore)->
+ default_value(false)->zero_tokens(),
+ "Create new store in configured directory."
+ )
+ (
+ BS_BACKUP_VARIABLE ",b",
+ value(&configured.backup)->
+ default_value(false)->zero_tokens(),
+ "Backup to a snapshot (can also do live)."
+ )
+ (
+ BS_RESTORE_VARIABLE ",r",
+ value(&configured.restore)->
+ default_value(false)->zero_tokens(),
+ "Restore from most recent snapshot."
+ )
+ // Chain scans.
+ (
+ BS_FLAGS_VARIABLE ",f",
+ value(&configured.flags)->
+ default_value(false)->zero_tokens(),
+ "Scan and display all flag transitions."
+ )
+ (
+ BS_SLABS_VARIABLE ",a",
+ value(&configured.slabs)->
+ default_value(false)->zero_tokens(),
+ "Scan and display store slab measures."
+ )
+ (
+ BS_BUCKETS_VARIABLE ",k",
+ value(&configured.buckets)->
+ default_value(false)->zero_tokens(),
+ "Scan and display all bucket densities."
+ )
+ (
+ BS_COLLISIONS_VARIABLE ",l",
+ value(&configured.collisions)->
+ default_value(false)->zero_tokens(),
+ "Scan and display hashmap collision stats (may exceed RAM and result in SIGKILL)."
+ )
+ (
+ BS_INFORMATION_VARIABLE ",i",
+ value(&configured.information)->
+ default_value(false)->zero_tokens(),
+ "Scan and display store information."
+ )
+ // Ad-hoc Testing.
+ (
+ BS_READ_VARIABLE ",t",
+ value(&configured.test)->
+ default_value(false)->zero_tokens(),
+ "Run built-in read test and display."
+ )
+ (
+ BS_WRITE_VARIABLE ",w",
+ value(&configured.write)->
+ default_value(false)->zero_tokens(),
+ "Run built-in write test and display."
);
return description;
}
-arguments_metadata parser::load_arguments()
+arguments_metadata parser::load_arguments() THROWS
{
arguments_metadata description;
return description
.add(BS_CONFIG_VARIABLE, 1);
}
-options_metadata parser::load_environment()
+options_metadata parser::load_environment() THROWS
{
options_metadata description("environment");
description.add_options()
(
// For some reason po requires this to be a lower case name.
// The case must match the other declarations for it to compose.
- // This composes with the cmdline options and inits to system path.
+ // This composes with the cmdline options and inits to default path.
BS_CONFIG_VARIABLE,
- value(&configured.file)->composing()
+ value(&configured.file)->composing()
->default_value(config_default_path()),
"The path to the configuration settings file."
);
@@ -133,59 +275,119 @@ options_metadata parser::load_environment()
return description;
}
-options_metadata parser::load_settings()
+options_metadata parser::load_settings() THROWS
{
options_metadata description("settings");
description.add_options()
- /* [log] */
+ /* [forks] */
(
- "log.debug_file",
- value(&configured.network.debug_file),
- "The debug log file path, defaults to 'debug.log'."
+ "forks.difficult",
+ value(&configured.bitcoin.forks.difficult),
+ "Require difficult blocks, defaults to true (use false for testnet)."
)
(
- "log.error_file",
- value(&configured.network.error_file),
- "The error log file path, defaults to 'error.log'."
+ "forks.retarget",
+ value(&configured.bitcoin.forks.retarget),
+ "Retarget difficulty, defaults to true."
)
(
- "log.archive_directory",
- value(&configured.network.archive_directory),
- "The log archive directory, defaults to 'archive'."
+ "forks.bip16",
+ value(&configured.bitcoin.forks.bip16),
+ "Add pay-to-script-hash processing, defaults to true (soft fork)."
)
(
- "log.rotation_size",
- value(&configured.network.rotation_size),
- "The size at which a log is archived, defaults to 10000000 (0 disables)."
+ "forks.bip30",
+ value(&configured.bitcoin.forks.bip30),
+ "Disallow collision of unspent transaction hashes, defaults to true (soft fork)."
)
(
- "log.minimum_free_space",
- value(&configured.network.minimum_free_space),
- "The minimum free space required in the archive directory, defaults to 0."
+ "forks.bip34",
+ value(&configured.bitcoin.forks.bip34),
+ "Require coinbase input includes block height, defaults to true (soft fork)."
)
(
- "log.maximum_archive_size",
- value(&configured.network.maximum_archive_size),
- "The maximum combined size of archived logs, defaults to 0 (maximum)."
+ "forks.bip42",
+ value(&configured.bitcoin.forks.bip42),
+ "Finite monetary supply, defaults to true (soft fork)."
)
(
- "log.maximum_archive_files",
- value(&configured.network.maximum_archive_files),
- "The maximum number of logs to archive, defaults to 0 (maximum)."
+ "forks.bip66",
+ value(&configured.bitcoin.forks.bip66),
+ "Require strict signature encoding, defaults to true (soft fork)."
)
(
- "log.statistics_server",
- value(&configured.network.statistics_server),
- "The address of the statistics collection server, defaults to none."
+ "forks.bip65",
+ value(&configured.bitcoin.forks.bip65),
+ "Add check-locktime-verify op code, defaults to true (soft fork)."
)
(
- "log.verbose",
- value(&configured.network.verbose),
- "Enable verbose logging, defaults to false."
+ "forks.bip90",
+ value(&configured.bitcoin.forks.bip90),
+ "Assume bip34, bip65, and bip66 activation if enabled, defaults to true (hard fork)."
+ )
+ (
+ "forks.bip68",
+ value(&configured.bitcoin.forks.bip68),
+ "Add relative locktime enforcement, defaults to true (soft fork)."
+ )
+ (
+ "forks.bip112",
+ value(&configured.bitcoin.forks.bip112),
+ "Add check-sequence-verify op code, defaults to true (soft fork)."
+ )
+ (
+ "forks.bip113",
+ value(&configured.bitcoin.forks.bip113),
+ "Use median time past for locktime, defaults to true (soft fork)."
+ )
+ (
+ "forks.bip141",
+ value(&configured.bitcoin.forks.bip141),
+ "Segregated witness consensus layer, defaults to true (soft fork)."
+ )
+ (
+ "forks.bip143",
+ value(&configured.bitcoin.forks.bip143),
+ "Version 0 transaction digest, defaults to true (soft fork)."
+ )
+ (
+ "forks.bip147",
+ value(&configured.bitcoin.forks.bip147),
+ "Prevent dummy value malleability, defaults to true (soft fork)."
+ )
+ (
+ "forks.time_warp_patch",
+ value(&configured.bitcoin.forks.time_warp_patch),
+ "Fix time warp bug, defaults to false (hard fork)."
+ )
+ (
+ "forks.retarget_overflow_patch",
+ value(&configured.bitcoin.forks.retarget_overflow_patch),
+ "Fix target overflow for very low difficulty, defaults to false (hard fork)."
+ )
+ (
+ "forks.scrypt_proof_of_work",
+ value(&configured.bitcoin.forks.scrypt_proof_of_work),
+ "Use scrypt hashing for proof of work, defaults to false (hard fork)."
)
/* [bitcoin] */
+ (
+ "bitcoin.initial_block_subsidy_bitcoin",
+ value(&configured.bitcoin.initial_subsidy_bitcoin),
+ "The initial block subsidy, defaults to 50."
+ )
+ (
+ "bitcoin.subsidy_interval",
+ value(&configured.bitcoin.subsidy_interval_blocks),
+ "The subsidy halving period, defaults to 210000."
+ )
+ (
+ "bitcoin.timestamp_limit_seconds",
+ value