diff --git a/.cirrus.yml b/.cirrus.yml
deleted file mode 100644
index d31f0afb53..0000000000
--- a/.cirrus.yml
+++ /dev/null
@@ -1,294 +0,0 @@
-env:
- ### cirrus config
- CIRRUS_CLONE_DEPTH: 1
- ### compiler options
- HOST:
- WRAPPER_CMD:
- # Specific warnings can be disabled with -Wno-error=foo.
- # -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
- WERROR_CFLAGS: -Werror -pedantic-errors
- MAKEFLAGS: -j4
- BUILD: check
- ### secp256k1 config
- ECMULTWINDOW: 15
- ECMULTGENKB: 22
- ASM: no
- WIDEMUL: auto
- WITH_VALGRIND: yes
- EXTRAFLAGS:
- ### secp256k1 modules
- EXPERIMENTAL: no
- ECDH: no
- RECOVERY: no
- SCHNORRSIG: no
- ELLSWIFT: no
- ### test options
- SECP256K1_TEST_ITERS:
- BENCH: yes
- SECP256K1_BENCH_ITERS: 2
- CTIMETESTS: yes
- # Compile and run the tests
- EXAMPLES: yes
-
-# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with
-# multiple users to run tasks in parallel. No sudo permission is required.
-#
-# https://cirrus-ci.org/guide/persistent-workers/
-#
-# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
-#
-# The following specific types should exist, with the following requirements:
-# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
-# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
-# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
-#
-# CI jobs for the latter configuration can be run on x86_64 hardware
-# by installing qemu-user-static, which works out of the box with
-# podman or docker. Background: https://stackoverflow.com/a/72890225/313633
-#
-# The above machine types are matched to each task by their label. Refer to the
-# Cirrus CI docs for more details.
-#
-# When a contributor maintains a fork of the repo, any pull request they make
-# to their own fork, or to the main repository, will trigger two CI runs:
-# one for the branch push and one for the pull request.
-# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
-# in Cirrus repository settings, accessible from
-# https://cirrus-ci.com/github/my-organization/my-repository
-#
-# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1
-# ensures that previous containers and artifacts are cleared before each run.
-# This requires installing Podman instead of Docker.
-#
-# Futhermore:
-# - apt-get is required due to PACKAGE_MANAGER_INSTALL
-# - podman-docker-4.1+ is required due to the bugfix in 4.1
-# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
-# - The ./ci/ dependencies (with cirrus-cli) should be installed. One-liner example
-# for a single user setup with sudo permission:
-#
-# ```
-# apt update && apt install git screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
-# ```
-#
-# - There are no strict requirements on the hardware. Having fewer CPU threads
-# than recommended merely causes the CI script to run slower.
-# To avoid rare and intermittent OOM due to short memory usage spikes,
-# it is recommended to add (and persist) swap:
-#
-# ```
-# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab )
-# ```
-#
-# - To register the persistent worker, open a `screen` session and run:
-#
-# ```
-# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
-# ```
-
-# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
-filter_template: &FILTER_TEMPLATE
- # Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed,
- # but still run CI when a PR is created.
- # https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
- skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == ""
- stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
-
-base_template: &BASE_TEMPLATE
- << : *FILTER_TEMPLATE
- merge_base_script:
- # Unconditionally install git (used in fingerprint_script).
- - git --version || bash -c "$PACKAGE_MANAGER_INSTALL git"
- - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
- - git config --global user.email "ci@ci.ci"
- - git config --global user.name "ci"
- - git merge FETCH_HEAD # Merge base to detect silent merge conflicts
-
-env_matrix_snippet: &ENV_MATRIX_VALGRIND
- - env:
- ENABLE_FIELDS: "7,32,58"
- - env:
- BUILD: distcheck
- - env:
- EXEC_CMD: valgrind --error-exitcode=42
- TESTRUNS: 1
- BUILD:
-
-env_matrix_snippet: &ENV_MATRIX_SAN_VALGRIND
- - env:
- ENABLE_FIELDS: "11,64,37"
- - env:
- BUILD: distcheck
- - env:
- EXEC_CMD: valgrind --error-exitcode=42
- TESTRUNS: 1
- BUILD:
- - env:
- CXXFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
- LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
- UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
- BENCH: no
-
-task:
- name: 'lint'
- << : *BASE_TEMPLATE
- container:
- dockerfile: ci/linux-debian.Dockerfile
- memory: 2G
- cpu: 4
- matrix:
- << : *ENV_MATRIX_SAN_VALGRIND
- matrix:
- - env:
- CXX: g++
- - env:
- CXX: clang++ -gdwarf-4
- << : *MERGE_BASE
- test_script:
- - ./ci/cirrus.sh
- << : *CAT_LOGS
-
-task:
- name: 'tidy'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: medium
- env:
- HOST: i686-linux-gnu
- matrix:
- << : *ENV_MATRIX_VALGRIND
- matrix:
- - env:
- CXX: i686-linux-gnu-g++
- - env:
- CXX: clang++ --target=i686-linux-gnu -gdwarf-4
- CXXFLAGS: -g -O2 -isystem /usr/i686-linux-gnu/include -isystem /usr/i686-linux-gnu/include/c++/10/i686-linux-gnu
- test_script:
- - ./ci/cirrus.sh
- << : *CAT_LOGS
-
-task:
- name: "arm64: macOS Monterey"
- macos_instance:
- image: ghcr.io/cirruslabs/macos-monterey-base:latest
- env:
- # Cirrus gives us a fixed number of 4 virtual CPUs.
- MAKEFLAGS: -j5
- matrix:
- - env:
- CXX: g++-11
- # Homebrew's gcc for arm64 has no libubsan.
- matrix:
- - env:
- ENABLE_FIELDS: 28
- - env:
- BUILD: distcheck
- - env:
- CXX: clang++
- matrix:
- - env:
- ENABLE_FIELDS: 28
- - env:
- BUILD: distcheck
- - env:
- CXXFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
- LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
- UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
- BENCH: no
- brew_script:
- - brew update
- - brew install automake libtool gcc@11
- << : *MERGE_BASE
- test_script:
- - ./ci/cirrus.sh
- << : *CAT_LOGS
-
-task:
- name: 'Win64, unit tests, no gui tests, no functional tests'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: small
- env:
- EXEC_CMD: qemu-s390x
- HOST: s390x-linux-gnu
- BUILD:
- << : *MERGE_BASE
- test_script:
- - ./ci/cirrus.sh
- << : *CAT_LOGS
-
-task:
- name: '32-bit CentOS, dash, gui'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: small
- env:
- FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
-
-task:
- name: 'previous releases, depends DEBUG'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: small
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_previous_releases.sh"
-
-task:
- name: 'TSan, depends, gui'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: medium
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
-
-task:
- name: 'MSan, depends'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: small
- timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done.
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
-
-task:
- name: 'fuzzer,address,undefined,integer, no depends'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: medium
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
-
-task:
- name: 'multiprocess, i686, DEBUG'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: medium
- env:
- FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
-
-task:
- name: 'no wallet, libBGLkernel'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: small
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libBGLkernel.sh"
-
-task:
- name: 'macOS-cross, gui, no tests'
- << : *GLOBAL_TASK_TEMPLATE
- persistent_worker:
- labels:
- type: arm64
- env:
- FILE_ENV: "./ci/test/00_setup_env_mac_cross.sh"
diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index ae7e92d1c8..0000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-# This is the top-most EditorConfig file.
-root = true
-
-# For all files.
-[*]
-charset = utf-8
-end_of_line = lf
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-# Source code files
-[*.{h,cpp,py,sh}]
-indent_size = 4
-
-# .cirrus.yml, .fuzzbuzz.yml, etc.
-[*.yml]
-indent_size = 2
-
-# Makefiles
-[{*.am,Makefile.*.include}]
-indent_style = tab
-
-# Autoconf scripts
-[configure.ac]
-indent_size = 2
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 30efb2244f..0000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-src/precomputed_ecmult.c linguist-generated
-src/precomputed_ecmult_gen.c linguist-generated
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
deleted file mode 100644
index 83922b54cb..0000000000
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-name: Bug report
-description: Submit a new bug report.
-labels: [bug]
-body:
- - type: markdown
- attributes:
- value: |
- ## This issue tracker is only for technical issues related to Bitcoin Core.
-
- * General bitcoin questions and/or support requests should use Bitcoin StackExchange at https://bitcoin.stackexchange.com.
- * For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
- * If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running `memtest` and observe CPU temperature with a load-test tool such as `linpack` before creating an issue.
-
- ----
- - type: checkboxes
- attributes:
- label: Is there an existing issue for this?
- description: Please search to see if an issue already exists for the bug you encountered.
- options:
- - label: I have searched the existing issues
- required: true
- - type: textarea
- id: current-behaviour
- attributes:
- label: Current behaviour
- description: Tell us what went wrong
- validations:
- required: true
- - type: textarea
- id: expected-behaviour
- attributes:
- label: Expected behaviour
- description: Tell us what you expected to happen
- validations:
- required: true
- - type: textarea
- id: reproduction-steps
- attributes:
- label: Steps to reproduce
- description: |
- Tell us how to reproduce your bug. Please attach related screenshots if necessary.
- * Run-time or compile-time configuration options
- * Actions taken
- validations:
- required: true
- - type: textarea
- id: logs
- attributes:
- label: Relevant log output
- description: |
- Please copy and paste any relevant log output or attach a debug log file.
-
- You can find the debug.log in your [data dir.](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location)
-
- Please be aware that the debug log might contain personally identifying information.
- validations:
- required: false
- - type: dropdown
- attributes:
- label: How did you obtain Bitcoin Core
- multiple: false
- options:
- - Compiled from source
- - Pre-built binaries
- - Package manager
- - Other
- validations:
- required: true
- - type: input
- id: core-version
- attributes:
- label: What version of Bitcoin Core are you using?
- description: Run `bitcoind --version` or in Bitcoin-QT use `Help > About Bitcoin Core`
- placeholder: e.g. v24.0.1 or master@e1bf547
- validations:
- required: true
- - type: input
- id: os
- attributes:
- label: Operating system and version
- placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
- validations:
- required: true
- - type: textarea
- id: machine-specs
- attributes:
- label: Machine specifications
- description: |
- What are the specifications of the host machine?
- e.g. OS/CPU and disk type, network connectivity
- validations:
- required: false
-
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index 40370284a6..0000000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-blank_issues_enabled: true
-contact_links:
- - name: Bitcoin Core Security Policy
- url: https://github.com/bitcoin/bitcoin/blob/master/SECURITY.md
- about: View security policy
- - name: Bitcoin Core Developers
- url: https://bitcoincore.org
- about: Bitcoin Core homepage
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
deleted file mode 100644
index 4622fd9819..0000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Feature Request
-description: Suggest an idea for this project.
-labels: [Feature]
-body:
- - type: textarea
- id: feature
- attributes:
- label: Please describe the feature you'd like to see added.
- description: Attach screenshots or logs if applicable.
- validations:
- required: true
- - type: textarea
- id: related-problem
- attributes:
- label: Is your feature related to a problem, if so please describe it.
- description: Attach screenshots or logs if applicable.
- validations:
- required: false
- - type: textarea
- id: solution
- attributes:
- label: Describe the solution you'd like
- validations:
- required: false
- - type: textarea
- id: alternatives
- attributes:
- label: Describe any alternatives you've considered
- validations:
- required: false
- - type: textarea
- id: additional-context
- attributes:
- label: Please leave any additional context
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.yml b/.github/ISSUE_TEMPLATE/good_first_issue.yml
deleted file mode 100644
index 133937c011..0000000000
--- a/.github/ISSUE_TEMPLATE/good_first_issue.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Good First Issue
-description: (Regular devs only) Suggest a new good first issue
-labels: [good first issue]
-body:
- - type: markdown
- attributes:
- value: |
- Please add the label "good first issue" manually before or after opening
-
- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution
-
- Motivate the issue and explain the solution briefly
- - type: textarea
- id: motivation
- attributes:
- label: Motivation
- description: Motivate the issue
- validations:
- required: true
- - type: textarea
- id: solution
- attributes:
- label: Possible solution
- description: Describe a possible solution
- validations:
- required: false
- - type: textarea
- id: useful-skills
- attributes:
- label: Useful Skills
- description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
- value: |
- * Compiling Bitcoin Core from source
- * Running the C++ unit tests and the Python functional tests
- * ...
- - type: textarea
- attributes:
- label: Guidance for new contributors
- description: Please leave this to automatically add the footer for new contributors
- value: |
- Want to work on this issue?
-
- For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
-
diff --git a/.github/ISSUE_TEMPLATE/gui_issue.yml b/.github/ISSUE_TEMPLATE/gui_issue.yml
deleted file mode 100644
index 4fe578e9b5..0000000000
--- a/.github/ISSUE_TEMPLATE/gui_issue.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Issue or feature request related to the GUI
-description: Any report, issue or feature request related to the GUI
-labels: [GUI]
-body:
-- type: checkboxes
- id: acknowledgement
- attributes:
- label: Issues, reports or feature requests related to the GUI should be opened directly on the GUI repo
- description: https://github.com/bitcoin-core/gui/issues/
- options:
- - label: I still think this issue should be opened here
- required: true
-- type: textarea
- id: gui-request
- attributes:
- label: Report
- validations:
- required: true
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 95bdf8981f..0000000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,11 +0,0 @@
-### Description
-what is the goal of the pull request
-
-Pull requests without a rationale and clear improvement may be closed
-immediately.
-
-### Notes
-implementation details, hints for reviewers
-
-### BTC/BGL PR reward address
-if applicable, please type your reward wallet address here
diff --git a/.github/actions/install-homebrew-valgrind/action.yml b/.github/actions/install-homebrew-valgrind/action.yml
deleted file mode 100644
index ce10eb2686..0000000000
--- a/.github/actions/install-homebrew-valgrind/action.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: "Install Valgrind"
-description: "Install Homebrew's Valgrind package and cache it."
-runs:
- using: "composite"
- steps:
- - run: |
- brew tap LouisBrunner/valgrind
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
- echo "CI_HOMEBREW_CELLAR_VALGRIND=$(brew --cellar valgrind)" >> "$GITHUB_ENV"
- shell: bash
-
- - run: |
- sw_vers > valgrind_fingerprint
- brew --version >> valgrind_fingerprint
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD >> valgrind_fingerprint
- cat valgrind_fingerprint
- shell: bash
-
- - uses: actions/cache@v4
- id: cache
- with:
- path: ${{ env.CI_HOMEBREW_CELLAR_VALGRIND }}
- key: ${{ github.job }}-valgrind-${{ hashFiles('valgrind_fingerprint') }}
-
- - if: steps.cache.outputs.cache-hit != 'true'
- run: |
- brew install --HEAD LouisBrunner/valgrind/valgrind
- shell: bash
-
- - if: steps.cache.outputs.cache-hit == 'true'
- run: |
- brew link valgrind
- shell: bash
diff --git a/.github/actions/run-in-docker-action/action.yml b/.github/actions/run-in-docker-action/action.yml
deleted file mode 100644
index 74933686a0..0000000000
--- a/.github/actions/run-in-docker-action/action.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-name: 'Run in Docker with environment'
-description: 'Run a command in a Docker container, while passing explicitly set environment variables into the container.'
-inputs:
- dockerfile:
- description: 'A Dockerfile that defines an image'
- required: true
- tag:
- description: 'A tag of an image'
- required: true
- command:
- description: 'A command to run in a container'
- required: false
- default: ./ci/ci.sh
-runs:
- using: "composite"
- steps:
- - uses: docker/setup-buildx-action@v3
-
- - uses: docker/build-push-action@v5
- id: main_builder
- continue-on-error: true
- with:
- context: .
- file: ${{ inputs.dockerfile }}
- tags: ${{ inputs.tag }}
- load: true
- cache-from: type=gha
-
- - uses: docker/build-push-action@v5
- id: retry_builder
- if: steps.main_builder.outcome == 'failure'
- with:
- context: .
- file: ${{ inputs.dockerfile }}
- tags: ${{ inputs.tag }}
- load: true
- cache-from: type=gha
-
- - # Workaround for https://github.com/google/sanitizers/issues/1614 .
- # The underlying issue has been fixed in clang 18.1.3.
- run: sudo sysctl -w vm.mmap_rnd_bits=28
- shell: bash
-
- - # Tell Docker to pass environment variables in `env` into the container.
- run: >
- docker run \
- $(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
- --volume ${{ github.workspace }}:${{ github.workspace }} \
- --workdir ${{ github.workspace }} \
- ${{ inputs.tag }} bash -c "
- git config --global --add safe.directory ${{ github.workspace }}
- ${{ inputs.command }}
- "
- shell: bash
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 7d608c9f6a..0000000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,925 +0,0 @@
-name: CI
-on:
- pull_request:
- push:
- branches:
- - '**'
- tags-ignore:
- - '**'
-
-concurrency:
- group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
- cancel-in-progress: true
-
-env:
- ### compiler options
- HOST:
- WRAPPER_CMD:
- # Specific warnings can be disabled with -Wno-error=foo.
- # -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
- WERROR_CFLAGS: '-Werror -pedantic-errors'
- MAKEFLAGS: '-j4'
- BUILD: 'check'
- ### secp256k1 config
- ECMULTWINDOW: 15
- ECMULTGENKB: 22
- ASM: 'no'
- WIDEMUL: 'auto'
- WITH_VALGRIND: 'yes'
- EXTRAFLAGS:
- ### secp256k1 modules
- EXPERIMENTAL: 'no'
- ECDH: 'no'
- RECOVERY: 'no'
- SCHNORRSIG: 'no'
- ELLSWIFT: 'no'
- ### test options
- SECP256K1_TEST_ITERS:
- BENCH: 'yes'
- SECP256K1_BENCH_ITERS: 2
- CTIMETESTS: 'yes'
- # Compile and run the examples.
- EXAMPLES: 'yes'
-
-jobs:
- test-each-commit:
- name: 'test each commit'
- runs-on: ubuntu-24.04
- if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
- timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below.
- env:
- MAX_COUNT: 6
- steps:
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
- with:
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: ${{ env.FETCH_DEPTH }}
- - name: Determine commit range
- run: |
- # Checkout HEAD~ and find the test base commit
- # Checkout HEAD~ because it would be wasteful to rerun tests on the PR
- # head commit that are already run by other jobs.
- git checkout HEAD~
- # Figure out test base commit by listing ancestors of HEAD, excluding
- # ancestors of the most recent merge commit, limiting the list to the
- # newest MAX_COUNT ancestors, ordering it from oldest to newest, and
- # taking the first one.
- #
- # If the branch contains up to MAX_COUNT ancestor commits after the
- # most recent merge commit, all of those commits will be tested. If it
- # contains more, only the most recent MAX_COUNT commits will be
- # tested.
- #
- # In the command below, the ^@ suffix is used to refer to all parents
- # of the merge commit as described in:
- # https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand_notations
- # and the ^ prefix is used to exclude these parents and all their
- # ancestors from the rev-list output as described in:
- # https://git-scm.com/docs/git-rev-list
- MERGE_BASE=$(git rev-list -n1 --merges HEAD)
- EXCLUDE_MERGE_BASE_ANCESTORS=
- # MERGE_BASE can be empty due to limited fetch-depth
- if test -n "$MERGE_BASE"; then
- EXCLUDE_MERGE_BASE_ANCESTORS=^${MERGE_BASE}^@
- fi
- echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV"
- - run: |
- sudo apt-get update
- sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
- - name: Compile and run tests
- run: |
- # Run tests on commits after the last merge commit and before the PR head commit
- # Use clang++, because it is a bit faster and uses less memory than g++
- git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
-
- macos-native-x86_64:
- name: 'macOS 13 native, x86_64, no depends, sqlite only, gui'
- # Use latest image, but hardcode version to avoid silent upgrades (and breaks).
- # See: https://github.com/actions/runner-images#available-images.
- runs-on: macos-13
-
- - name: Build container
- uses: docker/build-push-action@v5
- with:
- file: ./ci/linux-debian.Dockerfile
- tags: linux-debian-image
- cache-from: type=gha
- cache-to: type=gha,mode=min
-
- linux_debian:
- name: "x86_64: Linux (Debian stable)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars: { WIDEMUL: 'int64', RECOVERY: 'yes' }
- - env_vars: { WIDEMUL: 'int64', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - env_vars: { WIDEMUL: 'int128' }
- - env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
- - env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - env_vars: { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes' }
- - env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
- - env_vars: { RECOVERY: 'yes', SCHNORRSIG: 'yes' }
- - env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', CPPFLAGS: '-DVERIFY' }
- - env_vars: { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
- - env_vars: { CPPFLAGS: '-DDETERMINISTIC' }
- - env_vars: { CFLAGS: '-O0', CTIMETESTS: 'no' }
- - env_vars: { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - env_vars: { ECMULTGENKB: 2, ECMULTWINDOW: 2 }
- - env_vars: { ECMULTGENKB: 86, ECMULTWINDOW: 4 }
- cc:
- - 'gcc'
- - 'clang'
- - 'gcc-snapshot'
- - 'clang-snapshot'
-
- env:
- DANGER_RUN_CI_ON_HOST: 1
- FILE_ENV: './ci/test/00_setup_env_mac_native.sh'
- BASE_ROOT_DIR: ${{ github.workspace }}
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Clang version
- run: |
- sudo xcode-select --switch /Applications/Xcode_15.0.app
- clang --version
-
- - name: Install Homebrew packages
- env:
- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
- run: |
- # A workaround for "The `brew link` step did not complete successfully" error.
- brew install python@3 || brew link --overwrite python@3
- brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Restore Ccache cache
- id: ccache-cache
- uses: actions/cache/restore@v4
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- s390x_debian:
- name: "s390x (big-endian): Linux (Debian stable, QEMU)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- env:
- WRAPPER_CMD: 'qemu-s390x'
- SECP256K1_TEST_ITERS: 16
- HOST: 's390x-linux-gnu'
- WITH_VALGRIND: 'no'
- ECDH: 'yes'
- RECOVERY: 'yes'
- SCHNORRSIG: 'yes'
- ELLSWIFT: 'yes'
- CTIMETESTS: 'no'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: CI script
- uses: ./.github/actions/run-in-docker-action
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- arm32_debian:
- name: "ARM32: Linux (Debian stable, QEMU)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars: {}
- - env_vars: { EXPERIMENTAL: 'yes', ASM: 'arm32' }
-
- - name: Save Ccache cache
- uses: actions/cache/save@v4
- if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- arm64_debian:
- name: "ARM64: Linux (Debian stable, QEMU)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- env:
- WRAPPER_CMD: 'qemu-aarch64'
- SECP256K1_TEST_ITERS: 16
- HOST: 'aarch64-linux-gnu'
- WITH_VALGRIND: 'no'
- ECDH: 'yes'
- RECOVERY: 'yes'
- SCHNORRSIG: 'yes'
- ELLSWIFT: 'yes'
- CTIMETESTS: 'no'
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars: { } # gcc
- - env_vars: # clang
- CC: 'clang --target=aarch64-linux-gnu'
- - env_vars: # clang-snapshot
- CC: 'clang-snapshot --target=aarch64-linux-gnu'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: CI script
- env: ${{ matrix.configuration.env_vars }}
- uses: ./.github/actions/run-in-docker-action
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- ppc64le_debian:
- name: "ppc64le: Linux (Debian stable, QEMU)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- env:
- CCACHE_MAXSIZE: '200M'
- CI_CCACHE_VERSION: '4.7.5'
- CI_QT_CONF: '-release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
- CI_QT_DIR: 'qt-everywhere-src-5.15.11'
- CI_QT_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip'
- PYTHONUTF8: 1
- TEST_RUNNER_TIMEOUT_FACTOR: 40
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Configure Developer Command Prompt for Microsoft Visual C++
- # Using microsoft/setup-msbuild is not enough.
- uses: ilammy/msvc-dev-cmd@v1
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- valgrind_debian:
- name: "Valgrind (memcheck)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars: { CC: 'clang', ASM: 'auto' }
- - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
- - env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
- - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
-
- - name: Get tool information
- run: |
- msbuild -version | Tee-Object -FilePath "msbuild_version"
- $env:VCToolsVersion | Tee-Object -FilePath "toolset_version"
- $env:CI_QT_URL | Out-File -FilePath "qt_url"
- $env:CI_QT_CONF | Out-File -FilePath "qt_conf"
- py -3 --version
- Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
-
- - name: Restore static Qt cache
- id: static-qt-cache
- uses: actions/cache/restore@v4
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- sanitizers_debian:
- name: "UBSan, ASan, LSan"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars: { CC: 'clang', ASM: 'auto' }
- - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
- - env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
- - env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
-
- env:
- ECDH: 'yes'
- RECOVERY: 'yes'
- SCHNORRSIG: 'yes'
- ELLSWIFT: 'yes'
- CTIMETESTS: 'no'
- CFLAGS: '-fsanitize=undefined,address -g'
- UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
- ASAN_OPTIONS: 'strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1'
- LSAN_OPTIONS: 'use_unaligned=1'
- SECP256K1_TEST_ITERS: 32
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Build static Qt. Create build directory
- if: steps.static-qt-cache.outputs.cache-hit != 'true'
- run: |
- Rename-Item -Path "C:\$env:CI_QT_DIR" -NewName "C:\qt-src"
- New-Item -ItemType Directory -Path "C:\qt-src\build"
-
- - name: Build static Qt. Configure
- if: steps.static-qt-cache.outputs.cache-hit != 'true'
- working-directory: C:\qt-src\build
- shell: cmd
- run: ..\configure %CI_QT_CONF% -prefix C:\Qt_static
-
- - name: Build static Qt. Build
- if: steps.static-qt-cache.outputs.cache-hit != 'true'
- working-directory: C:\qt-src\build
- shell: cmd
- run: jom
-
- - name: Build static Qt. Install
- if: steps.static-qt-cache.outputs.cache-hit != 'true'
- working-directory: C:\qt-src\build
- shell: cmd
- run: jom install
-
- - name: Save static Qt cache
- if: steps.static-qt-cache.outputs.cache-hit != 'true'
- uses: actions/cache/save@v4
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- msan_debian:
- name: "MSan"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - env_vars:
- CTIMETESTS: 'yes'
- CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -g'
- - env_vars:
- ECMULTGENKB: 2
- ECMULTWINDOW: 2
- CTIMETESTS: 'yes'
- CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -g -O3'
- - env_vars:
- # -fsanitize-memory-param-retval is clang's default, but our build system disables it
- # when ctime_tests when enabled.
- CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -fsanitize-memory-param-retval -g'
- CTIMETESTS: 'no'
-
- env:
- ECDH: 'yes'
- RECOVERY: 'yes'
- SCHNORRSIG: 'yes'
- ELLSWIFT: 'yes'
- CC: 'clang'
- SECP256K1_TEST_ITERS: 32
- ASM: 'no'
- WITH_VALGRIND: 'no'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: CI script
- env: ${{ matrix.configuration.env_vars }}
- uses: ./.github/actions/run-in-docker-action
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- mingw_debian:
- name: ${{ matrix.configuration.job_name }}
- runs-on: ubuntu-latest
- needs: docker_cache
-
- - name: Restore Ccache cache
- id: ccache-cache
- uses: actions/cache/restore@v4
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- x86_64-macos-native:
- name: "x86_64: macOS Monterey, Valgrind"
- # See: https://github.com/actions/runner-images#available-images.
- runs-on: macos-12
-
- env:
- CC: 'clang'
- HOMEBREW_NO_AUTO_UPDATE: 1
- HOMEBREW_NO_INSTALL_CLEANUP: 1
-
- strategy:
- fail-fast: false
- matrix:
- env_vars:
- - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128_struct', ECMULTGENKB: 2, ECMULTWINDOW: 4 }
- - { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
- - BUILD: 'distcheck'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Install Homebrew packages
- run: |
- Set-Location "$env:VCPKG_INSTALLATION_ROOT"
- Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
- .\vcpkg.exe --vcpkg-root "$env:VCPKG_INSTALLATION_ROOT" integrate install
- git rev-parse HEAD | Tee-Object -FilePath "$env:GITHUB_WORKSPACE\vcpkg_commit"
-
- - name: vcpkg tools cache
- uses: actions/cache@v4
- with:
- path: C:/vcpkg/downloads/tools
- key: ${{ github.job }}-vcpkg-tools
-
- - name: vcpkg binary cache
- uses: actions/cache@v4
- with:
- path: ~/AppData/Local/vcpkg/archives
- key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }}
-
- - name: CI script
- env: ${{ matrix.env_vars }}
- run: ./ci/ci.sh
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- arm64-macos-native:
- name: "ARM64: macOS Sonoma"
- # See: https://github.com/actions/runner-images#available-images.
- runs-on: macos-14
-
- env:
- CC: 'clang'
- HOMEBREW_NO_AUTO_UPDATE: 1
- HOMEBREW_NO_INSTALL_CLEANUP: 1
- WITH_VALGRIND: 'no'
- CTIMETESTS: 'no'
-
- strategy:
- fail-fast: false
- matrix:
- env_vars:
- - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128_struct', ECMULTGENPRECISION: 2, ECMULTWINDOW: 4 }
- - { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' }
- - BUILD: 'distcheck'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Install Homebrew packages
- run: |
- brew install automake libtool gcc
- ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
-
- - name: CI script
- env: ${{ matrix.env_vars }}
- run: ./ci/ci.sh
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- win64-native:
- name: ${{ matrix.configuration.job_name }}
- # See: https://github.com/actions/runner-images#available-images.
- runs-on: windows-2022
-
- strategy:
- fail-fast: false
- matrix:
- configuration:
- - job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
- cmake_options: '-A x64 -DBUILD_SHARED_LIBS=ON'
- - job_name: 'x64 (MSVC): Windows (VS 2022, static)'
- cmake_options: '-A x64 -DBUILD_SHARED_LIBS=OFF'
- - job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct)'
- cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
- - job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct with __(u)mulh)'
- cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
- cpp_flags: '/DSECP256K1_MSVC_MULH_TEST_OVERRIDE'
- - job_name: 'x86 (MSVC): Windows (VS 2022)'
- cmake_options: '-A Win32'
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Generate buildsystem
- run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}
-
- - name: Build
- run: cmake --build build --config RelWithDebInfo -- /p:UseMultiToolTask=true /maxCpuCount
-
- - name: Binaries info
- # Use the bash shell included with Git for Windows.
- shell: bash
- run: |
- cd build/src/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
-
- - name: Check
- run: |
- ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
- build\src\RelWithDebInfo\bench_ecmult.exe
- build\src\RelWithDebInfo\bench_internal.exe
- build\src\RelWithDebInfo\bench.exe
-
- win64-native-headers:
- name: "x64 (MSVC): C++ (public headers)"
- # See: https://github.com/actions/runner-images#available-images.
- runs-on: windows-2022
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Add cl.exe to PATH
- uses: ilammy/msvc-dev-cmd@v1
-
- - name: C++ (public headers)
- run: |
- cl.exe -c -WX -TP include/*.h
-
- cxx_fpermissive_debian:
- name: "C++ -fpermissive (entire project)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- env:
- CC: 'g++'
- CFLAGS: '-fpermissive -g'
- CPPFLAGS: '-DSECP256K1_CPLUSPLUS_TEST_OVERRIDE'
- WERROR_CFLAGS:
- ECDH: 'yes'
- RECOVERY: 'yes'
- SCHNORRSIG: 'yes'
- ELLSWIFT: 'yes'
-
- - name: Save Ccache cache
- uses: actions/cache/save@v4
- if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
-
- - run: cat tests.log || true
- if: ${{ always() }}
- - run: cat noverify_tests.log || true
- if: ${{ always() }}
- - run: cat exhaustive_tests.log || true
- if: ${{ always() }}
- - run: cat ctime_tests.log || true
- if: ${{ always() }}
- - run: cat bench.log || true
- if: ${{ always() }}
- - run: cat config.log || true
- if: ${{ always() }}
- - run: cat test_env.log || true
- if: ${{ always() }}
- - name: CI env
- run: env
- if: ${{ always() }}
-
- cxx_headers_debian:
- name: "C++ (public headers)"
- runs-on: ubuntu-latest
- needs: docker_cache
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: CI script
- uses: ./.github/actions/run-in-docker-action
- with:
- dockerfile: ./ci/linux-debian.Dockerfile
- tag: linux-debian-image
- command: |
- g++ -Werror include/*.h
- clang -Werror -x c++-header include/*.h
-
- sage:
- name: "SageMath prover"
- runs-on: ubuntu-latest
- container:
- image: sagemath/sagemath:latest
- options: --user root
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: CI script
- run: |
- cd sage
- sage prove_group_implementations.sage
-
- release:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - run: ./autogen.sh && ./configure --enable-dev-mode && make distcheck
-
- - name: Check installation with Autotools
- env:
- CI_INSTALL: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/install
- run: |
- ./autogen.sh && ./configure --prefix=${{ env.CI_INSTALL }} && make clean && make install && ls -RlAh ${{ env.CI_INSTALL }}
- gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=${{ env.CI_INSTALL }}/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"${{ env.CI_INSTALL }}/lib" && ./ecdsa
-
- - name: Run functional tests
- env:
- TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
- shell: cmd
- run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
-
- - name: Clone fuzz corpus
- run: |
- git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
- Set-Location "$env:RUNNER_TEMP\qa-assets"
- Write-Host "Using qa-assets repo from commit ..."
- git log -1
-
- - name: Run fuzz binaries
- env:
- BITCOINFUZZ: "${{ github.workspace}}\\src\\fuzz.exe"
- shell: cmd
- run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_seed_corpus
-
- asan-lsan-ubsan-integer-no-depends-usdt:
- name: 'ASan + LSan + UBSan + integer, no depends, USDT'
- runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
- # No need to run on the read-only mirror, unless it is a PR.
- if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
- timeout-minutes: 120
- env:
- FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
- DANGER_CI_ON_HOST_CACHE_FOLDERS: 1
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Set Ccache directory
- run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
-
- - name: Set base root directory
- run: echo "BASE_ROOT_DIR=${RUNNER_TEMP}" >> "$GITHUB_ENV"
-
- - name: Restore Ccache cache
- id: ccache-cache
- uses: actions/cache/restore@v4
- with:
- path: ${{ env.CCACHE_DIR }}
- key: ${{ github.job }}-ccache-${{ github.run_id }}
- restore-keys: ${{ github.job }}-ccache-
-
- - name: Enable bpfcc script
- # In the image build step, no external environment variables are available,
- # so any settings will need to be written to the settings env file:
- run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh
-
- - name: CI script
- run: ./ci/test_run_all.sh
-
- - name: Save Ccache cache
- uses: actions/cache/save@v4
- if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
- with:
- path: ${{ env.CCACHE_DIR }}
- # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- key: ${{ github.job }}-ccache-${{ github.run_id }}
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index aa51668b10..0000000000
--- a/.gitignore
+++ /dev/null
@@ -1,178 +0,0 @@
-bench_ecmult
-bench_internal
-noverify_tests
-tests
-exhaustive_tests
-precompute_ecmult_gen
-precompute_ecmult
-ctime_tests
-ecdh_example
-ecdsa_example
-schnorr_example
-*.exe
-*.so
-*.a
-*.csv
-!.gitignore
-*.log
-*.trs
-
-# autoreconf
-Makefile.in
-aclocal.m4
-autom4te.cache/
-config.log
-config.status
-conftest*
-*.tar.gz
-*.la
-libtool
-.deps/
-.dirstamp
-*.lo
-*.o
-*~
-*.log
-*.trs
-
-coverage/
-coverage.html
-coverage.*.html
-*.gcda
-*.gcno
-*.gcov
-
-build-aux/ar-lib
-build-aux/config.guess
-build-aux/config.sub
-build-aux/depcomp
-build-aux/install-sh
-build-aux/ltmain.sh
-build-aux/m4/libtool.m4
-build-aux/m4/lt~obsolete.m4
-build-aux/m4/ltoptions.m4
-build-aux/m4/ltsugar.m4
-build-aux/m4/ltversion.m4
-build-aux/missing
-build-aux/compile
-build-aux/test-driver
-config.cache
-config.log
-config.status
-configure
-libtool
-src/config/BGL-config.h
-src/config/BGL-config.h.in
-src/config/stamp-h1
-src/obj
-share/setup.nsi
-share/qt/Info.plist
-
-src/qt/*.moc
-src/qt/moc_*.cpp
-src/qt/forms/ui_*.h
-
-src/qt/test/moc*.cpp
-
-src/qt/BGL-qt.config
-src/qt/BGL-qt.creator
-src/qt/BGL-qt.creator.user
-src/qt/BGL-qt.files
-src/qt/BGL-qt.includes
-
-.deps
-.dirstamp
-.libs
-.*.swp
-*~
-*.bak
-*.rej
-*.orig
-*.pyc
-*.o
-*.o-*
-*.a
-*.pb.cc
-*.pb.h
-*.dat
-
-*.log
-*.trs
-*.zip
-
-*.json.h
-*.raw.h
-
-# Only ignore unexpected patches
-*.patch
-!contrib/guix/patches/*.patch
-!depends/patches/**/*.patch
-
-#libtool object files
-*.lo
-*.la
-
-# Compilation and Qt preprocessor part
-*.qm
-Makefile
-!depends/Makefile
-src/qt/bitcoin-qt
-Bitcoin-Qt.app
-
-# Qt Creator
-Makefile.am.user
-
-# Unit-tests
-Makefile.test
-bitcoin-qt_test
-
-# Resources cpp
-qrc_*.cpp
-
-# Mac specific
-.DS_Store
-build
-
-# Previous releases
-releases
-
-#lcov
-*.gcno
-*.gcda
-/*.info
-test_bitcoin.coverage/
-total.coverage/
-fuzz.coverage/
-coverage_percent.txt
-/cov_tool_wrapper.sh
-qa-assets/
-
-#build tests
-linux-coverage-build
-linux-build
-win32-build
-test/config.ini
-test/cache/*
-test/.mypy_cache/
-test/lint/test_runner/target/
-
-!src/leveldb*/Makefile
-
-/doc/doxygen/
-
-contrib/devtools/split-debug.sh
-
-# Output from running db4 installation
-db4/
-
-# clang-check
-*.plist
-
-dist/
-
-/guix-build-*
-
-### CMake
-/CMakeUserPresets.json
-# Default CMake build directory.
-/build
diff --git a/.python-version b/.python-version
deleted file mode 100644
index 43077b2460..0000000000
--- a/.python-version
+++ /dev/null
@@ -1 +0,0 @@
-3.9.18
diff --git a/.style.yapf b/.style.yapf
deleted file mode 100644
index 350ac63855..0000000000
--- a/.style.yapf
+++ /dev/null
@@ -1,261 +0,0 @@
-[style]
-# Align closing bracket with visual indentation.
-align_closing_bracket_with_visual_indent=True
-
-# Allow dictionary keys to exist on multiple lines. For example:
-#
-# x = {
-# ('this is the first element of a tuple',
-# 'this is the second element of a tuple'):
-# value,
-# }
-allow_multiline_dictionary_keys=False
-
-# Allow lambdas to be formatted on more than one line.
-allow_multiline_lambdas=False
-
-# Allow splits before the dictionary value.
-allow_split_before_dict_value=True
-
-# Number of blank lines surrounding top-level function and class
-# definitions.
-blank_lines_around_top_level_definition=2
-
-# Insert a blank line before a class-level docstring.
-blank_line_before_class_docstring=False
-
-# Insert a blank line before a module docstring.
-blank_line_before_module_docstring=False
-
-# Insert a blank line before a 'def' or 'class' immediately nested
-# within another 'def' or 'class'. For example:
-#
-# class Foo:
-# # <------ this blank line
-# def method():
-# ...
-blank_line_before_nested_class_or_def=False
-
-# Do not split consecutive brackets. Only relevant when
-# dedent_closing_brackets is set. For example:
-#
-# call_func_that_takes_a_dict(
-# {
-# 'key1': 'value1',
-# 'key2': 'value2',
-# }
-# )
-#
-# would reformat to:
-#
-# call_func_that_takes_a_dict({
-# 'key1': 'value1',
-# 'key2': 'value2',
-# })
-coalesce_brackets=False
-
-# The column limit.
-column_limit=160
-
-# The style for continuation alignment. Possible values are:
-#
-# - SPACE: Use spaces for continuation alignment. This is default behavior.
-# - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns
-# (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs) for continuation
-# alignment.
-# - LESS: Slightly left if cannot vertically align continuation lines with
-# indent characters.
-# - VALIGN-RIGHT: Vertically align continuation lines with indent
-# characters. Slightly right (one more indent character) if cannot
-# vertically align continuation lines with indent characters.
-#
-# For options FIXED, and VALIGN-RIGHT are only available when USE_TABS is
-# enabled.
-continuation_align_style=SPACE
-
-# Indent width used for line continuations.
-continuation_indent_width=4
-
-# Put closing brackets on a separate line, dedented, if the bracketed
-# expression can't fit in a single line. Applies to all kinds of brackets,
-# including function definitions and calls. For example:
-#
-# config = {
-# 'key1': 'value1',
-# 'key2': 'value2',
-# } # <--- this bracket is dedented and on a separate line
-#
-# time_series = self.remote_client.query_entity_counters(
-# entity='dev3246.region1',
-# key='dns.query_latency_tcp',
-# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
-# start_ts=now()-timedelta(days=3),
-# end_ts=now(),
-# ) # <--- this bracket is dedented and on a separate line
-dedent_closing_brackets=False
-
-# Disable the heuristic which places each list element on a separate line
-# if the list is comma-terminated.
-disable_ending_comma_heuristic=False
-
-# Place each dictionary entry onto its own line.
-each_dict_entry_on_separate_line=True
-
-# The regex for an i18n comment. The presence of this comment stops
-# reformatting of that line, because the comments are required to be
-# next to the string they translate.
-i18n_comment=
-
-# The i18n function call names. The presence of this function stops
-# reformatting on that line, because the string it has cannot be moved
-# away from the i18n comment.
-i18n_function_call=
-
-# Indent the dictionary value if it cannot fit on the same line as the
-# dictionary key. For example:
-#
-# config = {
-# 'key1':
-# 'value1',
-# 'key2': value1 +
-# value2,
-# }
-indent_dictionary_value=False
-
-# The number of columns to use for indentation.
-indent_width=4
-
-# Join short lines into one line. E.g., single line 'if' statements.
-join_multiple_lines=True
-
-# Do not include spaces around selected binary operators. For example:
-#
-# 1 + 2 * 3 - 4 / 5
-#
-# will be formatted as follows when configured with "*,/":
-#
-# 1 + 2*3 - 4/5
-#
-no_spaces_around_selected_binary_operators=
-
-# Use spaces around default or named assigns.
-spaces_around_default_or_named_assign=False
-
-# Use spaces around the power operator.
-spaces_around_power_operator=False
-
-# The number of spaces required before a trailing comment.
-spaces_before_comment=2
-
-# Insert a space between the ending comma and closing bracket of a list,
-# etc.
-space_between_ending_comma_and_closing_bracket=True
-
-# Split before arguments
-split_all_comma_separated_values=False
-
-# Split before arguments if the argument list is terminated by a
-# comma.
-split_arguments_when_comma_terminated=False
-
-# Set to True to prefer splitting before '&', '|' or '^' rather than
-# after.
-split_before_bitwise_operator=True
-
-# Split before the closing bracket if a list or dict literal doesn't fit on
-# a single line.
-split_before_closing_bracket=True
-
-# Split before a dictionary or set generator (comp_for). For example, note
-# the split before the 'for':
-#
-# foo = {
-# variable: 'Hello world, have a nice day!'
-# for variable in bar if variable != 42
-# }
-split_before_dict_set_generator=True
-
-# Split before the '.' if we need to split a longer expression:
-#
-# foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d))
-#
-# would reformat to something like:
-#
-# foo = ('This is a really long string: {}, {}, {}, {}'
-# .format(a, b, c, d))
-split_before_dot=False
-
-# Split after the opening paren which surrounds an expression if it doesn't
-# fit on a single line.
-split_before_expression_after_opening_paren=False
-
-# If an argument / parameter list is going to be split, then split before
-# the first argument.
-split_before_first_argument=False
-
-# Set to True to prefer splitting before 'and' or 'or' rather than
-# after.
-split_before_logical_operator=True
-
-# Split named assignments onto individual lines.
-split_before_named_assigns=True
-
-# Set to True to split list comprehensions and generators that have
-# non-trivial expressions and multiple clauses before each of these
-# clauses. For example:
-#
-# result = [
-# a_long_var + 100 for a_long_var in xrange(1000)
-# if a_long_var % 10]
-#
-# would reformat to something like:
-#
-# result = [
-# a_long_var + 100
-# for a_long_var in xrange(1000)
-# if a_long_var % 10]
-split_complex_comprehension=False
-
-# The penalty for splitting right after the opening bracket.
-split_penalty_after_opening_bracket=30
-
-# The penalty for splitting the line after a unary operator.
-split_penalty_after_unary_operator=10000
-
-# The penalty for splitting right before an if expression.
-split_penalty_before_if_expr=0
-
-# The penalty of splitting the line around the '&', '|', and '^'
-# operators.
-split_penalty_bitwise_operator=300
-
-# The penalty for splitting a list comprehension or generator
-# expression.
-split_penalty_comprehension=80
-
-# The penalty for characters over the column limit.
-split_penalty_excess_character=7000
-
-# The penalty incurred by adding a line split to the unwrapped line. The
-# more line splits added the higher the penalty.
-split_penalty_for_added_line_split=30
-
-# The penalty of splitting a list of "import as" names. For example:
-#
-# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
-# long_argument_2,
-# long_argument_3)
-#
-# would reformat to something like:
-#
-# from a_very_long_or_indented_module_name_yada_yad import (
-# long_argument_1, long_argument_2, long_argument_3)
-split_penalty_import_names=0
-
-# The penalty of splitting the line around the 'and' and 'or'
-# operators.
-split_penalty_logical_operator=300
-
-# Use the Tab character for indentation.
-use_tabs=False
-
diff --git a/.tx/config b/.tx/config
deleted file mode 100644
index 644cd77566..0000000000
--- a/.tx/config
+++ /dev/null
@@ -1,7 +0,0 @@
-[main]
-host = https://www.transifex.com
-
-[o:BGL:p:BGL:r:qt-translation-027x]
-file_filter = src/qt/locale/BGL_.xlf
-source_file = src/qt/locale/BGL_en.xlf
-source_lang = en
diff --git a/.venv/lib/python3.8/site-packages/pip/__pip-runner__.py b/.venv/lib/python3.8/site-packages/pip/__pip-runner__.py
deleted file mode 100644
index 49a148a097..0000000000
--- a/.venv/lib/python3.8/site-packages/pip/__pip-runner__.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""Execute exactly this copy of pip, within a different environment.
-
-This file is named as it is, to ensure that this module can't be imported via
-an import statement.
-"""
-
-# /!\ This version compatibility check section must be Python 2 compatible. /!\
-
-import sys
-
-# Copied from setup.py
-PYTHON_REQUIRES = (3, 7)
-
-
-def version_str(version): # type: ignore
- return ".".join(str(v) for v in version)
-
-
-if sys.version_info[:2] < PYTHON_REQUIRES:
- raise SystemExit(
- "This version of pip does not support python {} (requires >={}).".format(
- version_str(sys.version_info[:2]), version_str(PYTHON_REQUIRES)
- )
- )
-
-# From here on, we can use Python 3 features, but the syntax must remain
-# Python 2 compatible.
-
-import runpy # noqa: E402
-from importlib.machinery import PathFinder # noqa: E402
-from os.path import dirname # noqa: E402
-
-PIP_SOURCES_ROOT = dirname(dirname(__file__))
-
-
-class PipImportRedirectingFinder:
- @classmethod
- def find_spec(self, fullname, path=None, target=None): # type: ignore
- if fullname != "pip":
- return None
-
- spec = PathFinder.find_spec(fullname, [PIP_SOURCES_ROOT], target)
- assert spec, (PIP_SOURCES_ROOT, fullname)
- return spec
-
-
-sys.meta_path.insert(0, PipImportRedirectingFinder())
-
-assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module"
-runpy.run_module("pip", run_name="__main__", alter_sys=True)
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index a2855912fd..0000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## [Unreleased]
-
-## [0.5.0] - 2024-05-06
-
-#### Added
- - New function `secp256k1_ec_pubkey_sort` that sorts public keys using lexicographic (of compressed serialization) order.
-
-#### Changed
- - The implementation of the point multiplication algorithm used for signing and public key generation was changed, resulting in improved performance for those operations.
- - The related configure option `--ecmult-gen-precision` was replaced with `--ecmult-gen-kb` (`ECMULT_GEN_KB` for CMake).
- - This changes the supported precomputed table sizes for these operations. The new supported sizes are 2 KiB, 22 KiB, or 86 KiB (while the old supported sizes were 32 KiB, 64 KiB, or 512 KiB).
-
-#### ABI Compatibility
-The ABI is backward compatible with versions 0.4.x and 0.3.x.
-
-## [0.4.1] - 2023-12-21
-
-#### Changed
- - The point multiplication algorithm used for ECDH operations (module `ecdh`) was replaced with a slightly faster one.
- - Optional handwritten x86_64 assembly for field operations was removed because modern C compilers are able to output more efficient assembly. This change results in a significant speedup of some library functions when handwritten x86_64 assembly is enabled (`--with-asm=x86_64` in GNU Autotools, `-DSECP256K1_ASM=x86_64` in CMake), which is the default on x86_64. Benchmarks with GCC 10.5.0 show a 10% speedup for `secp256k1_ecdsa_verify` and `secp256k1_schnorrsig_verify`.
-
-#### ABI Compatibility
-The ABI is backward compatible with versions 0.4.0 and 0.3.x.
-
-## [0.4.0] - 2023-09-04
-
-#### Added
- - New module `ellswift` implements ElligatorSwift encoding for public keys and x-only Diffie-Hellman key exchange for them.
- ElligatorSwift permits representing secp256k1 public keys as 64-byte arrays which cannot be distinguished from uniformly random. See:
- - Header file `include/secp256k1_ellswift.h` which defines the new API.
- - Document `doc/ellswift.md` which explains the mathematical background of the scheme.
- - The [paper](https://eprint.iacr.org/2022/759) on which the scheme is based.
- - We now test the library with unreleased development snapshots of GCC and Clang. This gives us an early chance to catch miscompilations and constant-time issues introduced by the compiler (such as those that led to the previous two releases).
-
-#### Fixed
- - Fixed symbol visibility in Windows DLL builds, where three internal library symbols were wrongly exported.
-
-#### Changed
- - When consuming libsecp256k1 as a static library on Windows, the user must now define the `SECP256K1_STATIC` macro before including `secp256k1.h`.
-
-#### ABI Compatibility
-This release is backward compatible with the ABI of 0.3.0, 0.3.1, and 0.3.2. Symbol visibility is now believed to be handled properly on supported platforms and is now considered to be part of the ABI. Please report any improperly exported symbols as a bug.
-
-## [0.3.2] - 2023-05-13
-We strongly recommend updating to 0.3.2 if you use or plan to use GCC >=13 to compile libsecp256k1. When in doubt, check the GCC version using `gcc -v`.
-
-#### Security
- - Module `ecdh`: Fix "constant-timeness" issue with GCC 13.1 (and potentially future versions of GCC) that could leave applications using libsecp256k1's ECDH module vulnerable to a timing side-channel attack. The fix avoids secret-dependent control flow during ECDH computations when libsecp256k1 is compiled with GCC 13.1.
-
-#### Fixed
- - Fixed an old bug that permitted compilers to potentially output bad assembly code on x86_64. In theory, it could lead to a crash or a read of unrelated memory, but this has never been observed on any compilers so far.
-
-#### Changed
- - Various improvements and changes to CMake builds. CMake builds remain experimental.
- - Made API versioning consistent with GNU Autotools builds.
- - Switched to `BUILD_SHARED_LIBS` variable for controlling whether to build a static or a shared library.
- - Added `SECP256K1_INSTALL` variable for the controlling whether to install the build artefacts.
- - Renamed asm build option `arm` to `arm32`. Use `--with-asm=arm32` instead of `--with-asm=arm` (GNU Autotools), and `-DSECP256K1_ASM=arm32` instead of `-DSECP256K1_ASM=arm` (CMake).
-
-#### ABI Compatibility
-The ABI is compatible with versions 0.3.0 and 0.3.1.
-
-## [0.3.1] - 2023-04-10
-We strongly recommend updating to 0.3.1 if you use or plan to use Clang >=14 to compile libsecp256k1, e.g., Xcode >=14 on macOS has Clang >=14. When in doubt, check the Clang version using `clang -v`.
-
-#### Security
- - Fix "constant-timeness" issue with Clang >=14 that could leave applications using libsecp256k1 vulnerable to a timing side-channel attack. The fix avoids secret-dependent control flow and secret-dependent memory accesses in conditional moves of memory objects when libsecp256k1 is compiled with Clang >=14.
-
-#### Added
- - Added tests against [Project Wycheproof's](https://github.com/google/wycheproof/) set of ECDSA test vectors (Bitcoin "low-S" variant), a fixed set of test cases designed to trigger various edge cases.
-
-#### Changed
- - Increased minimum required CMake version to 3.13. CMake builds remain experimental.
-
-#### ABI Compatibility
-The ABI is compatible with version 0.3.0.
-
-## [0.3.0] - 2023-03-08
-
-#### Added
- - Added experimental support for CMake builds. Traditional GNU Autotools builds (`./configure` and `make`) remain fully supported.
- - Usage examples: Added a recommended method for securely clearing sensitive data, e.g., secret keys, from memory.
- - Tests: Added a new test binary `noverify_tests`. This binary runs the tests without some additional checks present in the ordinary `tests` binary and is thereby closer to production binaries. The `noverify_tests` binary is automatically run as part of the `make check` target.
-
-#### Fixed
- - Fixed declarations of API variables for MSVC (`__declspec(dllimport)`). This fixes MSVC builds of programs which link against a libsecp256k1 DLL dynamically and use API variables (and not only API functions). Unfortunately, the MSVC linker now will emit warning `LNK4217` when trying to link against libsecp256k1 statically. Pass `/ignore:4217` to the linker to suppress this warning.
-
-#### Changed
- - Forbade cloning or destroying `secp256k1_context_static`. Create a new context instead of cloning the static context. (If this change breaks your code, your code is probably wrong.)
- - Forbade randomizing (copies of) `secp256k1_context_static`. Randomizing a copy of `secp256k1_context_static` did not have any effect and did not provide defense-in-depth protection against side-channel attacks. Create a new context if you want to benefit from randomization.
-
-#### Removed
- - Removed the configuration header `src/libsecp256k1-config.h`. We recommend passing flags to `./configure` or `cmake` to set configuration options (see `./configure --help` or `cmake -LH`). If you cannot or do not want to use one of the supported build systems, pass configuration flags such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG` manually to the compiler (see the file `configure.ac` for supported flags).
-
-#### ABI Compatibility
-Due to changes in the API regarding `secp256k1_context_static` described above, the ABI is *not* compatible with previous versions.
-
-## [0.2.0] - 2022-12-12
-
-#### Added
- - Added usage examples for common use cases in a new `examples/` directory.
- - Added `secp256k1_selftest`, to be used in conjunction with `secp256k1_context_static`.
- - Added support for 128-bit wide multiplication on MSVC for x86_64 and arm64, giving roughly a 20% speedup on those platforms.
-
-#### Changed
- - Enabled modules `schnorrsig`, `extrakeys` and `ecdh` by default in `./configure`.
- - The `secp256k1_nonce_function_rfc6979` nonce function, used by default by `secp256k1_ecdsa_sign`, now reduces the message hash modulo the group order to match the specification. This only affects improper use of ECDSA signing API.
-
-#### Deprecated
- - Deprecated context flags `SECP256K1_CONTEXT_VERIFY` and `SECP256K1_CONTEXT_SIGN`. Use `SECP256K1_CONTEXT_NONE` instead.
- - Renamed `secp256k1_context_no_precomp` to `secp256k1_context_static`.
- - Module `schnorrsig`: renamed `secp256k1_schnorrsig_sign` to `secp256k1_schnorrsig_sign32`.
-
-#### ABI Compatibility
-Since this is the first release, we do not compare application binary interfaces.
-However, there are earlier unreleased versions of libsecp256k1 that are *not* ABI compatible with this version.
-
-## [0.1.0] - 2013-03-05 to 2021-12-25
-
-This version was in fact never released.
-The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6).
-Therefore, this version number does not uniquely identify a set of source files.
-
-[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.5.0...HEAD
-[0.5.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.1...v0.5.0
-[0.4.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.4.0...v0.4.1
-[0.4.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.2...v0.4.0
-[0.3.2]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.1...v0.3.2
-[0.3.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.0...v0.3.1
-[0.3.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.2.0...v0.3.0
-[0.2.0]: https://github.com/bitcoin-core/secp256k1/compare/423b6d19d373f1224fd671a982584d7e7900bc93..v0.2.0
-[0.1.0]: https://github.com/bitcoin-core/secp256k1/commit/423b6d19d373f1224fd671a982584d7e7900bc93
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 2e0b906ff2..0000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,410 +0,0 @@
-# Contributing to libsecp256k1
-
-## Scope
-
-libsecp256k1 is a library for elliptic curve cryptography on the curve secp256k1, not a general-purpose cryptography library.
-The library primarily serves the needs of the Bitcoin Core project but provides additional functionality for the benefit of the wider Bitcoin ecosystem.
-
-## Adding new functionality or modules
-
-The libsecp256k1 project welcomes contributions in the form of new functionality or modules, provided they are within the project's scope.
-
-It is the responsibility of the contributors to convince the maintainers that the proposed functionality is within the project's scope, high-quality and maintainable.
-Contributors are recommended to provide the following in addition to the new code:
-
-* **Specification:**
- A specification can help significantly in reviewing the new code as it provides documentation and context.
- It may justify various design decisions, give a motivation and outline security goals.
- If the specification contains pseudocode, a reference implementation or test vectors, these can be used to compare with the proposed libsecp256k1 code.
-* **Security Arguments:**
- In addition to a defining the security goals, it should be argued that the new functionality meets these goals.
- Depending on the nature of the new functionality, a wide range of security arguments are acceptable, ranging from being "obviously secure" to rigorous proofs of security.
-* **Relevance Arguments:**
- The relevance of the new functionality for the Bitcoin ecosystem should be argued by outlining clear use cases.
-
-These are not the only factors taken into account when considering to add new functionality.
-The proposed new libsecp256k1 code must be of high quality, including API documentation and tests, as well as featuring a misuse-resistant API design.
-
-We recommend reaching out to other contributors (see [Communication Channels](#communication-channels)) and get feedback before implementing new functionality.
-
-## Communication channels
-
-Most communication about libsecp256k1 occurs on the GitHub repository: in issues, pull request or on the discussion board.
-
-Additionally, there is an IRC channel dedicated to libsecp256k1, with biweekly meetings (see channel topic).
-The channel is `#secp256k1` on Libera Chat.
-The easiest way to participate on IRC is with the web client, [web.libera.chat](https://web.libera.chat/#secp256k1).
-Chat history logs can be found at https://gnusha.org/secp256k1/.
-
-## Contributor workflow & peer review
-
-The Contributor Workflow & Peer Review in libsecp256k1 are similar to Bitcoin Core's workflow and review processes described in its [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md).
-
-### Coding conventions
-
-In addition, libsecp256k1 tries to maintain the following coding conventions:
-
-* No runtime heap allocation (e.g., no `malloc`) unless explicitly requested by the caller (via `secp256k1_context_create` or `secp256k1_scratch_space_create`, for example). Moreover, it should be possible to use the library without any heap allocations.
-* The tests should cover all lines and branches of the library (see [Test coverage](#coverage)).
-* Operations involving secret data should be tested for being constant time with respect to the secrets (see [src/ctime_tests.c](src/ctime_tests.c)).
-* Local variables containing secret data should be cleared explicitly to try to delete secrets from memory.
-* Use `secp256k1_memcmp_var` instead of `memcmp` (see [#823](https://github.com/bitcoin-core/secp256k1/issues/823)).
-
-#### Style conventions
-
-* Commits should be atomic and diffs should be easy to read. For this reason, do not mix any formatting fixes or code moves with actual code changes. Make sure each individual commit is hygienic: that it builds successfully on its own without warnings, errors, regressions, or test failures.
-* New code should adhere to the style of existing, in particular surrounding, code. Other than that, we do not enforce strict rules for code formatting.
-* The code conforms to C89. Most notably, that means that only `/* ... */` comments are allowed (no `//` line comments). Moreover, any declarations in a `{ ... }` block (e.g., a function) must appear at the beginning of the block before any statements. When you would like to declare a variable in the middle of a block, you can open a new block:
- ```C
- void secp256k_foo(void) {
- unsigned int x; /* declaration */
- int y = 2*x; /* declaration */
- x = 17; /* statement */
- {
- int a, b; /* declaration */
- a = x + y; /* statement */
- secp256k_bar(x, &b); /* statement */
- }
- }
- ```
-* Use `unsigned int` instead of just `unsigned`.
-* Use `void *ptr` instead of `void* ptr`.
-* Arguments of the publicly-facing API must have a specific order defined in [include/secp256k1.h](include/secp256k1.h).
-* User-facing comment lines in headers should be limited to 80 chars if possible.
-* All identifiers in file scope should start with `secp256k1_`.
-* Avoid trailing whitespace.
-
-### Tests
-
-#### Coverage
-
-This library aims to have full coverage of reachable lines and branches.
-
-To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary):
-
- $ ./configure --enable-coverage
-
-Run the tests:
-
- $ make check
-
-To create a report, `gcovr` is recommended, as it includes branch coverage reporting:
-
- $ gcovr --exclude 'src/bench*' --print-summary
-
-To create a HTML report with coloured and annotated source code:
-
- $ mkdir -p coverage
- $ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
-
-#### Exhaustive tests
-
-There are tests of several functions in which a small group replaces secp256k1.
-These tests are *exhaustive* since they provide all elements and scalars of the small group as input arguments (see [src/tests_exhaustive.c](src/tests_exhaustive.c)).
-
-### Benchmarks
-
-The title of the pull request should be prefixed by the component or area that
-the pull request affects. Valid areas as:
-
- - `consensus` for changes to consensus critical code
- - `doc` for changes to the documentation
- - `qt` or `gui` for changes to bitcoin-qt
- - `log` for changes to log messages
- - `mining` for changes to the mining code
- - `net` or `p2p` for changes to the peer-to-peer network code
- - `refactor` for structural changes that do not change behavior
- - `rpc`, `rest` or `zmq` for changes to the RPC, REST or ZMQ APIs
- - `contrib` or `cli` for changes to the scripts and tools
- - `test`, `qa` or `ci` for changes to the unit tests, QA tests or CI code
- - `util` or `lib` for changes to the utils or libraries
- - `wallet` for changes to the wallet code
- - `build` for changes to the GNU Autotools or MSVC builds
- - `guix` for changes to the GUIX reproducible builds
-
-Examples:
-
- consensus: Add new opcode for BIP-XXXX OP_CHECKAWESOMESIG
- net: Automatically create onion service, listen on Tor
- qt: Add feed bump button
- log: Fix typo in log message
-
-The body of the pull request should contain sufficient description of *what* the
-patch does, and even more importantly, *why*, with justification and reasoning.
-You should include references to any discussions (for example, other issues or
-mailing list discussions).
-
-The description for a new pull request should not contain any `@` mentions. The
-PR description will be included in the commit message when the PR is merged and
-any users mentioned in the description will be annoyingly notified each time a
-fork of Bitcoin Core copies the merge. Instead, make any username mentions in a
-subsequent comment to the PR.
-
-### Translation changes
-
-Note that translations should not be submitted as pull requests. Please see
-[Translation Process](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md)
-for more information on helping with translations.
-
-### Work in Progress Changes and Requests for Comments
-
-If a pull request is not to be considered for merging (yet), please
-prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
-in the body of the pull request to indicate tasks are pending.
-
-### Address Feedback
-
-At this stage, one should expect comments and review from other contributors. You
-can add more commits to your pull request by committing them locally and pushing
-to your fork.
-
-You are expected to reply to any review comments before your pull request is
-merged. You may update the code or reject the feedback if you do not agree with
-it, but you should express so in a reply. If there is outstanding feedback and
-you are not actively working on it, your pull request may be closed.
-
-Please refer to the [peer review](#peer-review) section below for more details.
-
-### Squashing Commits
-
-If your pull request contains fixup commits (commits that change the same line of code repeatedly) or too fine-grained
-commits, you may be asked to [squash](https://git-scm.com/docs/git-rebase#_interactive_mode) your commits
-before it will be reviewed. The basic squashing workflow is shown below.
-
- git checkout your_branch_name
- git rebase -i HEAD~n
- # n is normally the number of commits in the pull request.
- # Set commits (except the one in the first line) from 'pick' to 'squash', save and quit.
- # On the next screen, edit/refine commit messages.
- # Save and quit.
- git push -f # (force push to GitHub)
-
-Please update the resulting commit message, if needed. It should read as a
-coherent message. In most cases, this means not just listing the interim
-commits.
-
-If your change contains a merge commit, the above workflow may not work and you
-will need to remove the merge commit first. See the next section for details on
-how to rebase.
-
-Please refrain from creating several pull requests for the same change.
-Use the pull request that is already open (or was created earlier) to amend
-changes. This preserves the discussion and review that happened earlier for
-the respective change set.
-
-The length of time required for peer review is unpredictable and will vary from
-pull request to pull request.
-
-### Rebasing Changes
-
-When a pull request conflicts with the target branch, you may be asked to rebase it on top of the current target branch.
-
- git fetch https://github.com/bitcoin/bitcoin # Fetch the latest upstream commit
- git rebase FETCH_HEAD # Rebuild commits on top of the new base
-
-This project aims to have a clean git history, where code changes are only made in non-merge commits. This simplifies
-auditability because merge commits can be assumed to not contain arbitrary code changes. Merge commits should be signed,
-and the resulting git tree hash must be deterministic and reproducible. The script in
-[/contrib/verify-commits](/contrib/verify-commits) checks that.
-
-After a rebase, reviewers are encouraged to sign off on the force push. This should be relatively straightforward with
-the `git range-diff` tool explained in the [productivity
-notes](/doc/productivity.md#diff-the-diffs-with-git-range-diff). To avoid needless review churn, maintainers will
-generally merge pull requests that received the most review attention first.
-
-Pull Request Philosophy
------------------------
-
-Patchsets should always be focused. For example, a pull request could add a
-feature, fix a bug, or refactor code; but not a mixture. Please also avoid super
-pull requests which attempt to do too much, are overly large, or overly complex
-as this makes review difficult.
-
-
-### Features
-
-When adding a new feature, thought must be given to the long term technical debt
-and maintenance that feature may require after inclusion. Before proposing a new
-feature that will require maintenance, please consider if you are willing to
-maintain it (including bug fixing). If features get orphaned with no maintainer
-in the future, they may be removed by the Repository Maintainer.
-
-
-### Refactoring
-
-Refactoring is a necessary part of any software project's evolution. The
-following guidelines cover refactoring pull requests for the project.
-
-There are three categories of refactoring: code-only moves, code style fixes, and
-code refactoring. In general, refactoring pull requests should not mix these
-three kinds of activities in order to make refactoring pull requests easy to
-review and uncontroversial. In all cases, refactoring PRs must not change the
-behaviour of code within the pull request (bugs must be preserved as is).
-
-Project maintainers aim for a quick turnaround on refactoring pull requests, so
-where possible keep them short, uncomplex and easy to verify.
-
-Pull requests that refactor the code should not be made by new contributors. It
-requires a certain level of experience to know where the code belongs to and to
-understand the full ramification (including rebase effort of open pull requests).
-
-Trivial pull requests or pull requests that refactor the code with no clear
-benefits may be immediately closed by the maintainers to reduce unnecessary
-workload on reviewing.
-
-
-"Decision Making" Process
--------------------------
-
-The following applies to code changes to the Bitcoin Core project (and related
-projects such as libsecp256k1), and is not to be confused with overall Bitcoin
-Network Protocol consensus changes.
-
-Whether a pull request is merged into Bitcoin Core rests with the project merge
-maintainers.
-
-Maintainers will take into consideration if a patch is in line with the general
-principles of the project; meets the minimum standards for inclusion; and will
-judge the general consensus of contributors.
-
-In general, all pull requests must:
-
- - Have a clear use case, fix a demonstrable bug or serve the greater good of
- the project (for example refactoring for modularisation);
- - Be well peer-reviewed;
- - Have unit tests, functional tests, and fuzz tests, where appropriate;
- - Follow code style guidelines ([C++](doc/developer-notes.md), [functional tests](test/functional/README.md));
- - Not break the existing test suite;
- - Where bugs are fixed, where possible, there should be unit tests
- demonstrating the bug and also proving the fix. This helps prevent regression.
- - Change relevant comments and documentation when behaviour of code changes.
-
-Patches that change Bitcoin consensus rules are considerably more involved than
-normal because they affect the entire ecosystem and so must be preceded by
-extensive mailing list discussions and have a numbered BIP. While each case will
-be different, one should be prepared to expend more time and effort than for
-other kinds of patches because of increased peer review and consensus building
-requirements.
-
-
-### Peer Review
-
-Anyone may participate in peer review which is expressed by comments in the pull
-request. Typically reviewers will review the code for obvious errors, as well as
-test out the patch set and opine on the technical merits of the patch. Project
-maintainers take into account the peer review when determining if there is
-consensus to merge a pull request (remember that discussions may have been
-spread out over GitHub, mailing list and IRC discussions).
-
-Code review is a burdensome but important part of the development process, and
-as such, certain types of pull requests are rejected. In general, if the
-**improvements** do not warrant the **review effort** required, the PR has a
-high chance of being rejected. It is up to the PR author to convince the
-reviewers that the changes warrant the review effort, and if reviewers are
-"Concept NACK'ing" the PR, the author may need to present arguments and/or do
-research backing their suggested changes.
-
-#### Conceptual Review
-
-A review can be a conceptual review, where the reviewer leaves a comment
- * `Concept (N)ACK`, meaning "I do (not) agree with the general goal of this pull
- request",
- * `Approach (N)ACK`, meaning `Concept ACK`, but "I do (not) agree with the
- approach of this change".
-
-A `NACK` needs to include a rationale why the change is not worthwhile.
-NACKs without accompanying reasoning may be disregarded.
-
-#### Code Review
-
-After conceptual agreement on the change, code review can be provided. A review
-begins with `ACK BRANCH_COMMIT`, where `BRANCH_COMMIT` is the top of the PR
-branch, followed by a description of how the reviewer did the review. The
-following language is used within pull request comments:
-
- - "I have tested the code", involving change-specific manual testing in
- addition to running the unit, functional, or fuzz tests, and in case it is
- not obvious how the manual testing was done, it should be described;
- - "I have not tested the code, but I have reviewed it and it looks
- OK, I agree it can be merged";
- - A "nit" refers to a trivial, often non-blocking issue.
-
-Project maintainers reserve the right to weigh the opinions of peer reviewers
-using common sense judgement and may also weigh based on merit. Reviewers that
-have demonstrated a deeper commitment and understanding of the project over time
-or who have clear domain expertise may naturally have more weight, as one would
-expect in all walks of life.
-
-Where a patch set affects consensus-critical code, the bar will be much
-higher in terms of discussion and peer review requirements, keeping in mind that
-mistakes could be very costly to the wider community. This includes refactoring
-of consensus-critical code.
-
-Where a patch set proposes to change the Bitcoin consensus, it must have been
-discussed extensively on the mailing list and IRC, be accompanied by a widely
-discussed BIP and have a generally widely perceived technical consensus of being
-a worthwhile change based on the judgement of the maintainers.
-
-### Finding Reviewers
-
-As most reviewers are themselves developers with their own projects, the review
-process can be quite lengthy, and some amount of patience is required. If you find
-that you've been waiting for a pull request to be given attention for several
-months, there may be a number of reasons for this, some of which you can do something
-about:
-
- - It may be because of a feature freeze due to an upcoming release. During this time,
- only bug fixes are taken into consideration. If your pull request is a new feature,
- it will not be prioritized until after the release. Wait for the release.
- - It may be because the changes you are suggesting do not appeal to people. Rather than
- nits and critique, which require effort and means they care enough to spend time on your
- contribution, thundering silence is a good sign of widespread (mild) dislike of a given change
- (because people don't assume *others* won't actually like the proposal). Don't take
- that personally, though! Instead, take another critical look at what you are suggesting
- and see if it: changes too much, is too broad, doesn't adhere to the
- [developer notes](doc/developer-notes.md), is dangerous or insecure, is messily written, etc.
- Identify and address any of the issues you find. Then ask e.g. on IRC if someone could give
- their opinion on the concept itself.
- - It may be because your code is too complex for all but a few people, and those people
- may not have realized your pull request even exists. A great way to find people who
- are qualified and care about the code you are touching is the
- [Git Blame feature](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file). Simply
- look up who last modified the code you are changing and see if you can find
- them and give them a nudge. Don't be incessant about the nudging, though.
- - Finally, if all else fails, ask on IRC or elsewhere for someone to give your pull request
- a look. If you think you've been waiting for an unreasonably long time (say,
- more than a month) for no particular reason (a few lines changed, etc.),
- this is totally fine. Try to return the favor when someone else is asking
- for feedback on their code, and the universe balances out.
- - Remember that the best thing you can do while waiting is give review to others!
-
-
-Backporting
------------
-
-Security and bug fixes can be backported from `master` to release
-branches.
-Maintainers will do backports in batches and
-use the proper `Needs backport (...)` labels
-when needed (the original author does not need to worry about it).
-
-A backport should contain the following metadata in the commit body:
-
-```
-Github-Pull: #
-Rebased-From:
-```
-
-Have a look at [an example backport PR](
-https://github.com/bitcoin/bitcoin/pull/16189).
-
-Also see the [backport.py script](
-https://github.com/bitcoin-core/bitcoin-maintainer-tools#backport).
-
-Copyright
----------
-
-By contributing to this repository, you agree to license your work under the
-MIT license unless specified otherwise in `contrib/debian/copyright` or at
-the top of the file itself. Any work contributed where you are not the original
-author must contain its license header with the original author(s) and source.
diff --git a/COPYING b/COPYING
deleted file mode 100644
index e6d6e9fe57..0000000000
--- a/COPYING
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2009-2024 The Bitcoin Core developers
-Copyright (c) 2009-2024 Bitcoin Developers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/INSTALL.md b/INSTALL.md
deleted file mode 100644
index b591b8a666..0000000000
--- a/INSTALL.md
+++ /dev/null
@@ -1,2 +0,0 @@
-
-See [doc/build-\*.md](/doc)
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 5af4dd3bc5..0000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,347 +0,0 @@
-# Copyright (c) 2013-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-# Pattern rule to print variables, e.g. make print-top_srcdir
-print-%: FORCE
- @echo '$*'='$($*)'
-
-ACLOCAL_AMFLAGS = -I build-aux/m4
-SUBDIRS = src
-if ENABLE_MAN
-SUBDIRS += doc/man
-endif
-.PHONY: deploy FORCE
-.INTERMEDIATE: $(COVERAGE_INFO)
-
-BGLD_BIN=$(top_builddir)/src/$(BGL_DAEMON_NAME)$(EXEEXT)
-BGL_QT_BIN=$(top_builddir)/src/qt/$(BGL_GUI_NAME)$(EXEEXT)
-BGL_TEST_BIN=$(top_builddir)/src/test/$(BGL_TEST_NAME)$(EXEEXT)
-BGL_CLI_BIN=$(top_builddir)/src/$(BGL_CLI_NAME)$(EXEEXT)
-BGL_TX_BIN=$(top_builddir)/src/$(BGL_TX_NAME)$(EXEEXT)
-BGL_UTIL_BIN=$(top_builddir)/src/$(BGL_UTIL_NAME)$(EXEEXT)
-BGL_WALLET_BIN=$(top_builddir)/src/$(BGL_WALLET_TOOL_NAME)$(EXEEXT)
-BGL_NODE_BIN=$(top_builddir)/src/$(BGL_MP_NODE_NAME)$(EXEEXT)
-BGL_GUI_BIN=$(top_builddir)/src/$(BGL_MP_GUI_NAME)$(EXEEXT)
-BGL_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win64-setup$(EXEEXT)
-
-empty :=
-space := $(empty) $(empty)
-
-OSX_APP=BGL-Qt.app
-OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
-OSX_ZIP = $(OSX_VOLNAME).zip
-OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
-OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/BGL.icns
-OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
-
-DIST_CONTRIB = \
- $(top_srcdir)/test/sanitizer_suppressions/lsan \
- $(top_srcdir)/test/sanitizer_suppressions/tsan \
- $(top_srcdir)/test/sanitizer_suppressions/ubsan \
- $(top_srcdir)/contrib/linearize/linearize-data.py \
- $(top_srcdir)/contrib/linearize/linearize-hashes.py \
- $(top_srcdir)/contrib/signet/miner
-
-DIST_SHARE = \
- $(top_srcdir)/share/genbuild.sh \
- $(top_srcdir)/share/rpcauth
-
-BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
- $(top_srcdir)/contrib/devtools/security-check.py \
- $(top_srcdir)/contrib/devtools/utils.py
-
-WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/BGL.ico \
- $(top_srcdir)/share/pixmaps/nsis-header.bmp \
- $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
- $(top_srcdir)/doc/README_windows.txt
-
-OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \
- $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
-
-COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \
- test_BGL_filtered.info total_coverage.info \
- baseline_filtered.info functional_test.info functional_test_filtered.info \
- test_BGL_coverage.info test_BGL.info fuzz.info fuzz_filtered.info fuzz_coverage.info
-
-dist-hook:
- -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
-
-if TARGET_WINDOWS
-$(BGL_WIN_INSTALLER): all-recursive
- $(MKDIR_P) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGLD_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_QT_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_TEST_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_CLI_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_TX_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_WALLET_BIN) $(top_builddir)/release
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_UTIL_BIN) $(top_builddir)/release
- @test -f $(MAKENSIS) && echo 'OutFile "$@"' | cat $(top_builddir)/share/setup.nsi - | $(MAKENSIS) -V2 - || \
- echo error: could not build $@
- @echo built $@
-
-deploy: $(BGL_WIN_INSTALLER)
-endif
-
-if TARGET_DARWIN
-$(OSX_APP)/Contents/PkgInfo:
- $(MKDIR_P) $(@D)
- @echo "APPL????" > $@
-
-$(OSX_APP)/Contents/Resources/empty.lproj:
- $(MKDIR_P) $(@D)
- @touch $@
-
-$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
- $(MKDIR_P) $(@D)
- $(INSTALL_DATA) $< $@
-
-$(OSX_APP)/Contents/Resources/BGL.icns: $(OSX_INSTALLER_ICONS)
- $(MKDIR_P) $(@D)
- $(INSTALL_DATA) $< $@
-
-$(OSX_APP)/Contents/MacOS/BGL-Qt: all-recursive
- $(MKDIR_P) $(@D)
- STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_QT_BIN) $@
-
-$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
- $(MKDIR_P) $(@D)
- echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@
-
-OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
- $(OSX_APP)/Contents/Resources/BGL.icns $(OSX_APP)/Contents/Info.plist \
- $(OSX_APP)/Contents/MacOS/BGL-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
-
-if BUILD_DARWIN
-$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING)
- $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip
-
-deploydir: $(OSX_ZIP)
-else !BUILD_DARWIN
-APP_DIST_DIR=$(top_builddir)/dist
-
-$(OSX_ZIP): deploydir
- if [ -n "$(SOURCE_DATE_EPOCH)" ]; then find $(APP_DIST_DIR) -exec touch -d @$(SOURCE_DATE_EPOCH) {} +; fi
- cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@
-
-$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/BGL-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
- OBJDUMP=$(OBJDUMP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
-
-deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/BGL-Qt
-endif !BUILD_DARWIN
-
-deploy: $(OSX_ZIP)
-endif
-
-$(BGL_QT_BIN): FORCE
- $(MAKE) -C src qt/$(@F)
-
-$(BGLD_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_CLI_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_TX_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_UTIL_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_WALLET_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_NODE_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-$(BGL_GUI_BIN): FORCE
- $(MAKE) -C src $(@F)
-
-if USE_LCOV
-LCOV_FILTER_PATTERN = \
- -p "/usr/local/" \
- -p "/usr/include/" \
- -p "/usr/lib/" \
- -p "/usr/lib64/" \
- -p "src/leveldb/" \
- -p "src/crc32c/" \
- -p "src/bench/" \
- -p "src/crypto/ctaes" \
- -p "src/minisketch" \
- -p "src/secp256k1" \
- -p "depends"
-
-DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus
-
-$(COV_TOOL_WRAPPER):
- @echo 'exec $(COV_TOOL) "$$@"' > $(COV_TOOL_WRAPPER)
- @chmod +x $(COV_TOOL_WRAPPER)
-
-baseline.info: $(COV_TOOL_WRAPPER)
- $(LCOV) $(LCOV_OPTS) -c -i -d $(abs_builddir)/src -o $@
-
-baseline_filtered.info: baseline.info
- $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
- $(LCOV) -a $@ $(LCOV_OPTS) -o $@
-
-fuzz.info: baseline_filtered.info
- @test/fuzz/test_runner.py $(DIR_FUZZ_SEED_CORPUS) -l DEBUG
- $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t fuzz-tests -o $@
- $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src
-
-fuzz_filtered.info: fuzz.info
- $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
- $(LCOV) -a $@ $(LCOV_OPTS) -o $@
-
-test_BGL.info: baseline_filtered.info
- $(MAKE) -C src/ check
- $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_BGL -o $@
- $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src
-
-test_BGL_filtered.info: test_BGL.info
- $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
- $(LCOV) -a $@ $(LCOV_OPTS) -o $@
-
-functional_test.info: test_BGL_filtered.info
- @test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS)
- $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t functional-tests -o $@
- $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src
-
-functional_test_filtered.info: functional_test.info
- $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
- $(LCOV) -a $@ $(LCOV_OPTS) -o $@
-
-fuzz_coverage.info: fuzz_filtered.info
- $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
-
-test_BGL_coverage.info: baseline_filtered.info test_BGL_filtered.info
- $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_BGL_filtered.info -o $@
-
-total_coverage.info: test_BGL_filtered.info functional_test_filtered.info
- $(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_BGL_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
-
-fuzz.coverage/.dirstamp: fuzz_coverage.info
- $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
- @touch $@
-
-test_BGL.coverage/.dirstamp: test_BGL_coverage.info
- $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
- @touch $@
-
-total.coverage/.dirstamp: total_coverage.info
- $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
- @touch $@
-
-cov_fuzz: fuzz.coverage/.dirstamp
-
-cov: test_BGL.coverage/.dirstamp total.coverage/.dirstamp
-
-endif
-
-dist_noinst_SCRIPTS = autogen.sh
-
-EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
-
-EXTRA_DIST += \
- test/functional \
- test/fuzz
-
-EXTRA_DIST += \
- test/util/test_runner.py \
- test/util/data/BGL-util-test.json \
- test/util/data/blanktxv1.hex \
- test/util/data/blanktxv1.json \
- test/util/data/blanktxv2.hex \
- test/util/data/blanktxv2.json \
- test/util/data/tt-delin1-out.hex \
- test/util/data/tt-delin1-out.json \
- test/util/data/tt-delout1-out.hex \
- test/util/data/tt-delout1-out.json \
- test/util/data/tt-locktime317000-out.hex \
- test/util/data/tt-locktime317000-out.json \
- test/util/data/tx394b54bb.hex \
- test/util/data/txcreate1.hex \
- test/util/data/txcreate1.json \
- test/util/data/txcreate2.hex \
- test/util/data/txcreate2.json \
- test/util/data/txcreatedata1.hex \
- test/util/data/txcreatedata1.json \
- test/util/data/txcreatedata2.hex \
- test/util/data/txcreatedata2.json \
- test/util/data/txcreatedata_seq0.hex \
- test/util/data/txcreatedata_seq0.json \
- test/util/data/txcreatedata_seq1.hex \
- test/util/data/txcreatedata_seq1.json \
- test/util/data/txcreatemultisig1.hex \
- test/util/data/txcreatemultisig1.json \
- test/util/data/txcreatemultisig2.hex \
- test/util/data/txcreatemultisig2.json \
- test/util/data/txcreatemultisig3.hex \
- test/util/data/txcreatemultisig3.json \
- test/util/data/txcreatemultisig4.hex \
- test/util/data/txcreatemultisig4.json \
- test/util/data/txcreatemultisig5.json \
- test/util/data/txcreateoutpubkey1.hex \
- test/util/data/txcreateoutpubkey1.json \
- test/util/data/txcreateoutpubkey2.hex \
- test/util/data/txcreateoutpubkey2.json \
- test/util/data/txcreateoutpubkey3.hex \
- test/util/data/txcreateoutpubkey3.json \
- test/util/data/txcreatescript1.hex \
- test/util/data/txcreatescript1.json \
- test/util/data/txcreatescript2.hex \
- test/util/data/txcreatescript2.json \
- test/util/data/txcreatescript3.hex \
- test/util/data/txcreatescript3.json \
- test/util/data/txcreatescript4.hex \
- test/util/data/txcreatescript4.json \
- test/util/data/txcreatescript5.hex \
- test/util/data/txcreatescript6.hex \
- test/util/data/txcreatesignsegwit1.hex \
- test/util/data/txcreatesignv1.hex \
- test/util/data/txcreatesignv1.json \
- test/util/data/txcreatesignv2.hex \
- test/util/data/txreplace1.hex \
- test/util/data/txreplacenoinputs.hex \
- test/util/data/txreplaceomittedn.hex \
- test/util/data/txreplacesingleinput.hex \
- test/util/rpcauth-test.py
-
-CLEANFILES = $(OSX_ZIP) $(BGL_WIN_INSTALLER)
-
-DISTCHECK_CONFIGURE_FLAGS = --enable-man
-
-doc/doxygen/.stamp: doc/Doxyfile FORCE
- $(MKDIR_P) $(@D)
- $(DOXYGEN) $^
- $(AM_V_at) touch $@
-
-if HAVE_DOXYGEN
-docs: doc/doxygen/.stamp
-else
-docs:
- @echo "error: doxygen not found"
-endif
-
-clean-docs:
- rm -rf doc/doxygen
-
-clean-local: clean-docs
- rm -rf coverage_percent.txt test_BGL.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP)
- rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
- rm -rf dist/ test/lint/test_runner/target/ test/lint/__pycache__
-
-test-security-check:
-if TARGET_DARWIN
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_MACHO
-endif
-if TARGET_WINDOWS
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_PE
-endif
-if TARGET_LINUX
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF
- $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_ELF
-endif
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 1e3d003ae1..0000000000
--- a/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-## About The Project
-
-
-
-
-
-
-Features:
-* secp256k1 ECDSA signing/verification and key generation.
-* Additive and multiplicative tweaking of secret/public keys.
-* Serialization/parsing of secret keys, public keys, signatures.
-* Constant time, constant memory access signing and public key generation.
-* Derandomized ECDSA (via RFC6979 or with a caller provided function.)
-* Very efficient implementation.
-* Suitable for embedded systems.
-* Optional module for public key recovery.
-* Optional module for ECDH key exchange.
-* Optional module for Schnorr signatures according to [BIP-340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki).
-
-Bitgesell is a fork of Bitcoin with the following changes:
-* Block Reward [Burn rate is 90% of tx fees]
- ```sh
- nFees*0.1 + GetBlockSubsidy()
- ```
-* Block Weight [10 times smaller than Bitcoin]
- ```sh
- <= 400,000
- ```
-* 100% Segwit
- ```sh
- Eliminates problems with legacy type of transactions
- ```
-* Halving Interval [Halving cycle of Bitgesell is 1 year while that of Bitcoin is 4 years]
- ```sh
- 210000 blocks/4
- ```
-* Block Subsidy [Max coins = 21,000,000]
- `210000 blocks/4`
- `Hashing algorithm for blocks is Keccak (sha-3).`
- `The master branch is regularly built (see` [doc/build-*.md](https://github.com/BitgesellOfficial/bitgesell/tree/master/doc) `for instructions) and tested, but is not guaranteed to be completely stable.`
- [tags](https://github.com/BitgesellOfficial/bitgesell/tags) `are created regularly to indicate new official, stable release versions of BGL Core.`
-
-
-### Built With
-
-* General
- * No runtime heap allocation.
- * Extensive testing infrastructure.
- * Structured to facilitate review and analysis.
- * Intended to be portable to any system with a C89 compiler and uint64_t support.
- * No use of floating types.
- * Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.")
-* Field operations
- * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
- * Using 5 52-bit limbs
- * Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan).
- * This is an experimental feature that has not received enough scrutiny to satisfy the standard of quality of this library but is made available for testing and review by the community.
-* Scalar operations
- * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order.
- * Using 4 64-bit limbs (relying on __int128 support in the compiler).
- * Using 8 32-bit limbs.
-* Modular inverses (both field elements and scalars) based on [safegcd](https://gcd.cr.yp.to/index.html) with some modifications, and a variable-time variant (by Peter Dettman).
-* Group operations
- * Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7).
- * Use addition between points in Jacobian and affine coordinates where possible.
- * Use a unified addition/doubling formula where necessary to avoid data-dependent branches.
- * Point/x comparison without a field inversion by comparison in the Jacobian coordinate space.
-* Point multiplication for verification (a*P + b*G).
- * Use wNAF notation for point multiplicands.
- * Use a much larger window for multiples of G, using precomputed multiples.
- * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously.
- * Use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones.
-* Point multiplication for signing
- * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions.
- * Intended to be completely free of timing sidechannels for secret-key operations (on reasonable hardware/toolchains)
- * Access the table with branch-free conditional moves so memory access is uniform.
- * No data-dependent branches
- * Optional runtime blinding which attempts to frustrate differential power analysis.
- * The precomputed tables add and eventually subtract points for which no known scalar (secret key) is known, preventing even an attacker with control over the secret key used to control the data internally.
-
-Building with Autotools
------------------------
-
- $ ./autogen.sh
- $ ./configure
- $ make
- $ make check # run the test suite
- $ sudo make install # optional
-
-To compile optional modules (such as Schnorr signatures), you need to run `./configure` with additional flags (such as `--enable-module-schnorrsig`). Run `./configure --help` to see the full list of available flags.
-
-Building with CMake (experimental)
-----------------------------------
-
-To maintain a pristine source tree, CMake encourages to perform an out-of-source build by using a separate dedicated build tree.
-
-### Building on POSIX systems
-
- $ mkdir build && cd build
- $ cmake ..
- $ make
- $ make check # run the test suite
- $ sudo make install # optional
-
-To compile optional modules (such as Schnorr signatures), you need to run `cmake` with additional flags (such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=ON`). Run `cmake .. -LH` to see the full list of available flags.
-
-### Cross compiling
-
-To alleviate issues with cross compiling, preconfigured toolchain files are available in the `cmake` directory.
-For example, to cross compile for Windows:
-
- $ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-w64-mingw32.toolchain.cmake
-
-To cross compile for Android with [NDK](https://developer.android.com/ndk/guides/cmake) (using NDK's toolchain file, and assuming the `ANDROID_NDK_ROOT` environment variable has been set):
-
- $ cmake .. -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=28
-
-### Building on Windows
-
-To build on Windows with Visual Studio, a proper [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generators) must be specified for a new build tree.
-
-The following example assumes using of Visual Studio 2022 and CMake v3.21+.
-
-In "Developer Command Prompt for VS 2022":
-
- >cmake -G "Visual Studio 17 2022" -A x64 -S . -B build
- >cmake --build build --config RelWithDebInfo
-
-Usage examples
------------
-Usage examples can be found in the [examples](examples) directory. To compile them you need to configure with `--enable-examples`.
- * [ECDSA example](examples/ecdsa.c)
- * [Schnorr signatures example](examples/schnorr.c)
- * [Deriving a shared secret (ECDH) example](examples/ecdh.c)
-
-To compile the Schnorr signature and ECDH examples, you also need to configure with `--enable-module-schnorrsig` and `--enable-module-ecdh`.
-
-Benchmark
-------------
-If configured with `--enable-benchmark` (which is the default), binaries for benchmarking the libsecp256k1 functions will be present in the root directory after the build.
-
-Facebook: [Bitgesell](https://www.facebook.com/Bitgesell)
-
-
-
-## Translations
-
-Changes to translations as well as new translations can be submitted to
-[BGL Core's Transifex page](https://www.transifex.com/bitcoin/bitcoin/).
-
-Translations are periodically pulled from Transifex and merged into the git repository. See the
-[translation process](doc/translation_process.md) for details on how this works.
-
-See [SECURITY.md](SECURITY.md)
-
-Contributing to libsecp256k1
-------------
-
-See [CONTRIBUTING.md](CONTRIBUTING.md)
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index c625761805..0000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Security Policy
-
-## Supported Versions
-
-See our website for versions of BGL Core that are currently supported with
-security updates: https://bitgesell.ca
-
-## Reporting a Vulnerability
-
-To report security issues send an email to security@bitcoincore.org (not for support).
-
-The following keys may be used to communicate sensitive information to developers:
-
-| Name | Fingerprint |
-|------|-------------|
-| Pieter Wuille | 133E AC17 9436 F14A 5CF1 B794 860F EB80 4E66 9320 |
-| Michael Ford | E777 299F C265 DD04 7930 70EB 944D 35F9 AC3D B76A |
-| Ava Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 |
-
-You can import a key by running the following command with that individual’s fingerprint: `gpg --keyserver hkps://keys.openpgp.org --recv-keys ""` Ensure that you put quotes around fingerprints containing spaces.
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 69c892ffa0..0000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013-2019 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C
-set -e
-srcdir="$(dirname "$0")"
-cd "$srcdir"
-if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then
- LIBTOOLIZE="${GLIBTOOLIZE}"
- export LIBTOOLIZE
-fi
-command -v autoreconf >/dev/null || \
- (echo "configuration failed, please install autoconf first" && exit 1)
-autoreconf --install --force --warnings=all
-
-if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then
- chmod ug+w build-aux/config.guess
- chmod ug+w src/secp256k1/build-aux/config.guess
- cp depends/config.guess build-aux
- cp depends/config.guess src/secp256k1/build-aux
-fi
-if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then
- chmod ug+w build-aux/config.sub
- chmod ug+w src/secp256k1/build-aux/config.sub
- cp depends/config.sub build-aux
- cp depends/config.sub src/secp256k1/build-aux
-fi
diff --git a/build-aux/m4/BGL_find_bdb48.m4 b/build-aux/m4/BGL_find_bdb48.m4
deleted file mode 100644
index 1390f71bef..0000000000
--- a/build-aux/m4/BGL_find_bdb48.m4
+++ /dev/null
@@ -1,97 +0,0 @@
-dnl Copyright (c) 2013-2015 The Bitcoin Core developers
-dnl Distributed under the MIT software license, see the accompanying
-dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-AC_DEFUN([BGL_FIND_BDB48],[
- AC_ARG_VAR(BDB_CFLAGS, [C compiler flags for BerkeleyDB, bypasses autodetection])
- AC_ARG_VAR(BDB_LIBS, [Linker flags for BerkeleyDB, bypasses autodetection])
-
- if test "x$use_bdb" = "xno"; then
- use_bdb=no
- elif test "x$BDB_CFLAGS" = "x"; then
- AC_MSG_CHECKING([for Berkeley DB C++ headers])
- BDB_CPPFLAGS=
- bdbpath=X
- bdb48path=X
- bdbdirlist=
- for _vn in 4.8 48 4 5 5.3 ''; do
- for _pfx in b lib ''; do
- bdbdirlist="$bdbdirlist ${_pfx}db${_vn}"
- done
- done
- for searchpath in $bdbdirlist ''; do
- test -n "${searchpath}" && searchpath="${searchpath}/"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <${searchpath}db_cxx.h>
- ]],[[
- #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4)
- #error "failed to find bdb 4.8+"
- #endif
- ]])],[
- if test "x$bdbpath" = "xX"; then
- bdbpath="${searchpath}"
- fi
- ],[
- continue
- ])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <${searchpath}db_cxx.h>
- ]],[[
- #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)
- #error "failed to find bdb 4.8"
- #endif
- ]])],[
- bdb48path="${searchpath}"
- break
- ],[])
- done
- if test "x$bdbpath" = "xX"; then
- use_bdb=no
- AC_MSG_RESULT([no])
- AC_MSG_WARN([libdb_cxx headers missing])
- AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support])
- AC_MSG_WARN([Passing --without-bdb will suppress this warning])
- elif test "x$bdb48path" = "xX"; then
- BGL_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
- AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
- AC_MSG_WARN([Found Berkeley DB other than 4.8])
- AC_MSG_WARN([BDB (legacy) wallets opened by this build will not be portable!])
- use_bdb=yes
- ],[
- AC_MSG_WARN([Found Berkeley DB other than 4.8])
- AC_MSG_WARN([BDB (legacy) wallets opened by this build would not be portable!])
- AC_MSG_WARN([If this is intended, pass --with-incompatible-bdb])
- AC_MSG_WARN([Passing --without-bdb will suppress this warning])
- use_bdb=no
- ])
- else
- BGL_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
- bdbpath="${bdb48path}"
- use_bdb=yes
- fi
- else
- BDB_CPPFLAGS=${BDB_CFLAGS}
- fi
- AC_SUBST(BDB_CPPFLAGS)
-
- if test "x$use_bdb" = "xno"; then
- use_bdb=no
- elif test "x$BDB_LIBS" = "x"; then
- # TODO: Ideally this could find the library version and make sure it matches the headers being used
- for searchlib in db_cxx-4.8 db_cxx db4_cxx; do
- AC_CHECK_LIB([$searchlib],[main],[
- BDB_LIBS="-l${searchlib}"
- break
- ])
- done
- if test "x$BDB_LIBS" = "x"; then
- AC_MSG_WARN([libdb_cxx headers missing])
- AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support])
- AC_MSG_WARN([Passing --without-bdb will suppress this warning])
- fi
- fi
- if test "$use_bdb" != "no"; then
- AC_DEFINE([USE_BDB], [1], [Define if BDB support should be compiled in])
- use_bdb=yes
- fi
-])
diff --git a/build-aux/m4/BGL_qt.m4 b/build-aux/m4/BGL_qt.m4
deleted file mode 100644
index d967235e4b..0000000000
--- a/build-aux/m4/BGL_qt.m4
+++ /dev/null
@@ -1,371 +0,0 @@
-dnl Copyright (c) 2013-2016 The Bitcoin Core developers
-dnl Distributed under the MIT software license, see the accompanying
-dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-dnl Helper for cases where a qt dependency is not met.
-dnl Output: If qt version is auto, set BGL_enable_qt to false. Else, exit.
-AC_DEFUN([BGL_QT_FAIL],[
- if test "x$BGL_qt_want_version" = xauto && test "x$BGL_qt_force" != xyes; then
- if test "x$BGL_enable_qt" != xno; then
- AC_MSG_WARN([$1; BGL-qt frontend will not be built])
- fi
- BGL_enable_qt=no
- BGL_enable_qt_test=no
- else
- AC_MSG_ERROR([$1])
- fi
-])
-
-AC_DEFUN([BGL_QT_CHECK],[
- if test "x$BGL_enable_qt" != xno && test "x$BGL_qt_want_version" != xno; then
- true
- $1
- else
- true
- $2
- fi
-])
-
-dnl BGL_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing])
-dnl Helper for finding the path of programs needed for Qt.
-dnl Inputs: $1: Variable to be set
-dnl Inputs: $2: List of programs to search for
-dnl Inputs: $3: Look for $2 here before $PATH
-dnl Inputs: $4: If "yes", don't fail if $2 is not found.
-dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
-AC_DEFUN([BGL_QT_PATH_PROGS],[
- BGL_QT_CHECK([
- if test "x$3" != x; then
- AC_PATH_PROGS($1,$2,,$3)
- else
- AC_PATH_PROGS($1,$2)
- fi
- if test "x$$1" = x && test "x$4" != xyes; then
- BGL_QT_FAIL([$1 not found])
- fi
- ])
-])
-
-dnl Initialize qt input.
-dnl This must be called before any other BGL_QT* macros to ensure that
-dnl input variables are set correctly.
-dnl CAUTION: Do not use this inside of a conditional.
-AC_DEFUN([BGL_QT_INIT],[
- dnl enable qt support
- AC_ARG_WITH([gui],
- [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@],
- [build BGL-qt GUI (default=auto)])],
- [
- BGL_qt_want_version=$withval
- if test "x$BGL_qt_want_version" = xyes; then
- BGL_qt_force=yes
- BGL_qt_want_version=auto
- fi
- ],
- [BGL_qt_want_version=auto])
-
- AS_IF([test "x$with_gui" = xqt5_debug],
- [AS_CASE([$host],
- [*darwin*], [qt_lib_suffix=_debug],
- [*mingw*], [qt_lib_suffix=d],
- [qt_lib_suffix= ]); BGL_qt_want_version=qt5],
- [qt_lib_suffix= ])
-
- AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
- AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
- AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
- AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], [])
- AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
-
- AC_ARG_WITH([qtdbus],
- [AS_HELP_STRING([--with-qtdbus],
- [enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
- [use_dbus=$withval],
- [use_dbus=auto])
-
- AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
-])
-
-dnl Find Qt libraries and includes.
-dnl
-dnl BGL_QT_CONFIGURE([MINIMUM-VERSION])
-dnl
-dnl Outputs: See _BGL_QT_FIND_LIBS
-dnl Outputs: Sets variables for all qt-related tools.
-dnl Outputs: BGL_enable_qt, BGL_enable_qt_dbus, BGL_enable_qt_test
-AC_DEFUN([BGL_QT_CONFIGURE],[
- qt_version=">= $1"
- qt_lib_prefix="Qt5"
- BGL_QT_CHECK([_BGL_QT_FIND_LIBS])
-
- dnl This is ugly and complicated. Yuck. Works as follows:
- dnl We check a header to find out whether Qt is built statically.
- dnl When Qt is built statically, some plugins must be linked into
- dnl the final binary as well. _BGL_QT_CHECK_STATIC_PLUGIN does
- dnl a quick link-check and appends the results to QT_LIBS.
- BGL_QT_CHECK([
- TEMP_CPPFLAGS=$CPPFLAGS
- TEMP_CXXFLAGS=$CXXFLAGS
- CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
- CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
- _BGL_QT_IS_STATIC
- if test "$BGL_cv_static_qt" = "yes"; then
- _BGL_QT_CHECK_STATIC_LIBS
-
- if test "x$qt_plugin_path" != x; then
- if test -d "$qt_plugin_path/platforms"; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
- fi
- if test -d "$qt_plugin_path/styles"; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/styles"
- fi
- if test -d "$qt_plugin_path/accessible"; then
- QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
- fi
- fi
-
- AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static])
- _BGL_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
- AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])
- if test "$TARGET_OS" = "windows"; then
- dnl Linking against wtsapi32 is required. See #17749 and
- dnl https://bugreports.qt.io/browse/QTBUG-27097.
- AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])])
- _BGL_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows])
- _BGL_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle])
- AC_DEFINE([QT_QPA_PLATFORM_WINDOWS], [1], [Define this symbol if the qt platform is windows])
- elif test "$TARGET_OS" = "linux"; then
- _BGL_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb])
- AC_DEFINE([QT_QPA_PLATFORM_XCB], [1], [Define this symbol if the qt platform is xcb])
- elif test "$TARGET_OS" = "darwin"; then
- AX_CHECK_LINK_FLAG([-framework Carbon], [QT_LIBS="$QT_LIBS -framework Carbon"], [AC_MSG_ERROR(could not link against Carbon framework)])
- AX_CHECK_LINK_FLAG([-framework IOSurface], [QT_LIBS="$QT_LIBS -framework IOSurface"], [AC_MSG_ERROR(could not link against IOSurface framework)])
- AX_CHECK_LINK_FLAG([-framework Metal], [QT_LIBS="$QT_LIBS -framework Metal"], [AC_MSG_ERROR(could not link against Metal framework)])
- AX_CHECK_LINK_FLAG([-framework QuartzCore], [QT_LIBS="$QT_LIBS -framework QuartzCore"], [AC_MSG_ERROR(could not link against QuartzCore framework)])
- _BGL_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa])
- _BGL_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle])
- AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa])
- fi
- fi
- CPPFLAGS=$TEMP_CPPFLAGS
- CXXFLAGS=$TEMP_CXXFLAGS
- ])
-
- if test "x$qt_bin_path" = x; then
- qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`"
- fi
-
- if test "x$use_hardening" != xno; then
- BGL_QT_CHECK([
- AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
- TEMP_CPPFLAGS=$CPPFLAGS
- TEMP_CXXFLAGS=$CXXFLAGS
- CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
- CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #ifndef QT_VERSION
- # include
- #endif
- ]],
- [[
- #if defined(QT_REDUCE_RELOCATIONS)
- choke
- #endif
- ]])],
- [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ],
- [ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS]
- )
- CPPFLAGS=$TEMP_CPPFLAGS
- CXXFLAGS=$TEMP_CXXFLAGS
- ])
- else
- BGL_QT_CHECK([
- AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
- TEMP_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #ifndef QT_VERSION
- # include
- #endif
- ]],
- [[
- #if defined(QT_REDUCE_RELOCATIONS)
- choke
- #endif
- ]])],
- [ AC_MSG_RESULT(no)],
- [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS]
- )
- CPPFLAGS=$TEMP_CPPFLAGS
- ])
- fi
-
- BGL_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path)
- BGL_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path)
- BGL_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path)
- BGL_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
- BGL_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
- BGL_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes)
-
- MOC_DEFS='-I$(srcdir)'
- case $host in
- *darwin*)
- BGL_QT_CHECK([
- MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"
- base_frameworks="-framework Foundation -framework AppKit"
- AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
- ])
- ;;
- *mingw*)
- BGL_QT_CHECK([
- AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
- ])
- esac
-
-
- dnl enable qt support
- AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI])
- BGL_QT_CHECK([
- BGL_enable_qt=yes
- BGL_enable_qt_test=yes
- if test "x$have_qt_test" = xno; then
- BGL_enable_qt_test=no
- fi
- BGL_enable_qt_dbus=no
- if test "x$use_dbus" != xno && test "x$have_qt_dbus" = xyes; then
- BGL_enable_qt_dbus=yes
- fi
- if test "x$use_dbus" = xyes && test "x$have_qt_dbus" = xno; then
- AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.])
- fi
- if test "x$LUPDATE" = x; then
- AC_MSG_WARN([lupdate tool is required to update Qt translations.])
- fi
- if test "x$LCONVERT" = x; then
- AC_MSG_WARN([lconvert tool is required to update Qt translations.])
- fi
- ],[
- BGL_enable_qt=no
- ])
- if test x$BGL_enable_qt = xyes; then
- AC_MSG_RESULT([$BGL_enable_qt ($qt_lib_prefix)])
- else
- AC_MSG_RESULT([$BGL_enable_qt])
- fi
-
- AC_SUBST(QT_PIE_FLAGS)
- AC_SUBST(QT_INCLUDES)
- AC_SUBST(QT_LIBS)
- AC_SUBST(QT_LDFLAGS)
- AC_SUBST(QT_DBUS_INCLUDES)
- AC_SUBST(QT_TEST_INCLUDES)
- AC_SUBST(QT_SELECT, qt5)
- AC_SUBST(MOC_DEFS)
-])
-
-dnl All macros below are internal and should _not_ be used from configure.ac.
-
-dnl Internal. Check if the linked version of Qt was built statically.
-dnl
-dnl _BGL_QT_IS_STATIC
-dnl ---------------------
-dnl
-dnl Requires: INCLUDES and LIBS must be populated as necessary.
-dnl Output: BGL_cv_static_qt=yes|no
-AC_DEFUN([_BGL_QT_IS_STATIC],[
- AC_CACHE_CHECK(for static Qt, BGL_cv_static_qt,[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #ifndef QT_VERSION
- # include
- #endif
- ]],
- [[
- #if !defined(QT_STATIC)
- choke
- #endif
- ]])],
- [BGL_cv_static_qt=yes],
- [BGL_cv_static_qt=no])
- ])
-])
-
-dnl Internal. Check if the link-requirements for static plugins are met.
-dnl Requires: INCLUDES and LIBS must be populated as necessary.
-dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
-dnl Inputs: $2: The libraries that resolve $1.
-dnl Output: QT_LIBS is prepended or configure exits.
-AC_DEFUN([_BGL_QT_CHECK_STATIC_PLUGIN],[
- AC_MSG_CHECKING(for static Qt plugins: $2)
- CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
- LIBS="$2${qt_lib_suffix} $QT_LIBS $LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #include
- Q_IMPORT_PLUGIN($1)
- ]])],
- [AC_MSG_RESULT([yes]); QT_LIBS="$2${qt_lib_suffix} $QT_LIBS"],
- [AC_MSG_RESULT([no]); BGL_QT_FAIL([$1 not found.])])
- LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
-])
-
-dnl Internal. Check Qt static libs with PKG_CHECK_MODULES.
-dnl
-dnl _BGL_QT_CHECK_STATIC_LIBS
-dnl -----------------------------
-dnl
-dnl Outputs: QT_LIBS is prepended.
-AC_DEFUN([_BGL_QT_CHECK_STATIC_LIBS], [
- PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"])
- if test "x$TARGET_OS" = xlinux; then
- PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"])
- elif test "x$TARGET_OS" = xdarwin; then
- PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"])
- PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
- elif test "x$TARGET_OS" = xwindows; then
- PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"])
- fi
-])
-
-dnl Internal. Find Qt libraries using pkg-config.
-dnl
-dnl _BGL_QT_FIND_LIBS
-dnl ---------------------
-dnl
-dnl Outputs: All necessary QT_* variables are set.
-dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
-AC_DEFUN([_BGL_QT_FIND_LIBS],[
- BGL_QT_CHECK([
- PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_CORE_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_CORE_LIBS $QT_LIBS"],
- [BGL_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])])
- ])
- BGL_QT_CHECK([
- PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_GUI_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_GUI_LIBS $QT_LIBS"],
- [BGL_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])])
- ])
- BGL_QT_CHECK([
- PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_WIDGETS_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_WIDGETS_LIBS $QT_LIBS"],
- [BGL_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])])
- ])
- BGL_QT_CHECK([
- PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_NETWORK_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_NETWORK_LIBS $QT_LIBS"],
- [BGL_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])])
- ])
-
- BGL_QT_CHECK([
- PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test${qt_lib_suffix} $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no])
- if test "x$use_dbus" != xno; then
- PKG_CHECK_MODULES([QT_DBUS], [${qt_lib_prefix}DBus $qt_version], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no])
- fi
- ])
-])
diff --git a/build-aux/m4/BGL_subdir_to_include.m4 b/build-aux/m4/BGL_subdir_to_include.m4
deleted file mode 100644
index c6b1d44f1e..0000000000
--- a/build-aux/m4/BGL_subdir_to_include.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl Copyright (c) 2013-2014 The Bitcoin Core developers
-dnl Distributed under the MIT software license, see the accompanying
-dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-dnl BGL_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE])
-dnl SUBDIRECTORY-NAME must end with a path separator
-AC_DEFUN([BGL_SUBDIR_TO_INCLUDE],[
- if test "x$2" = "x"; then
- AC_MSG_RESULT([default])
- else
- echo "#include <$2$3.h>" >conftest.cpp
- newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
- AC_MSG_RESULT([${newinclpath}])
- if test "x${newinclpath}" != "x"; then
- eval "$1=\"\$$1\"' -I${newinclpath}'"
- fi
- fi
-])
diff --git a/build-aux/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4
deleted file mode 100644
index f6620882a2..0000000000
--- a/build-aux/m4/ax_boost_base.m4
+++ /dev/null
@@ -1,256 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# DESCRIPTION
-#
-# Test for the Boost C++ headers of a particular version (or newer)
-#
-# If no path to the installed boost library is given the macro searchs
-# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates
-# the $BOOST_ROOT environment variable. Further documentation is available
-# at .
-#
-# This macro calls:
-#
-# AC_SUBST(BOOST_CPPFLAGS)
-#
-# And sets:
-#
-# HAVE_BOOST
-#
-# Note that this macro has been modified compared to upstream.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Thomas Porschberg
-# Copyright (c) 2009 Peter Adolphs
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 51
-
-# example boost program (need to pass version)
-m4_define([_AX_BOOST_BASE_PROGRAM],
- [AC_LANG_PROGRAM([[
-#include
-]],[[
-(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
-]])])
-
-AC_DEFUN([AX_BOOST_BASE],
-[
-AC_ARG_WITH([boost],
- [AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
- [use Boost library from a standard location (ARG=yes),
- from the specified location (ARG=),
- or disable it (ARG=no)
- @<:@ARG=yes@:>@ ])],
- [
- AS_CASE([$withval],
- [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
- [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
- [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
- ],
- [want_boost="yes"])
-
-BOOST_CPPFLAGS=""
-AS_IF([test "x$want_boost" = "xyes"],
- [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
-AC_SUBST(BOOST_CPPFLAGS)
-])
-
-
-# convert a version string in $2 to numeric and affect to polymorphic var $1
-AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
- AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
- _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
- _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
- AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
- [AC_MSG_ERROR([You should at least specify libboost major version])])
- _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
- AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
- [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
- _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
- [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
- _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
- AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
-])
-
-dnl Run the detection of boost should be run only if $want_boost
-AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
- _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
- succeeded=no
-
-
- AC_REQUIRE([AC_CANONICAL_HOST])
- dnl On 64-bit systems check for system libraries in both lib64 and lib.
- dnl The former is specified by FHS, but e.g. Debian does not adhere to
- dnl this (as it rises problems for generic multi-arch support).
- dnl The last entry in the list is chosen by default when no libraries
- dnl are found, e.g. when only header-only libraries are installed!
- AS_CASE([${host_cpu}],
- [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
- [mips*64*],[libsubdirs="lib64 lib32 lib lib64"],
- [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64|e2k],[libsubdirs="lib64 lib lib64"],
- [libsubdirs="lib"]
- )
-
- dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
- dnl them priority over the other paths since, if libs are found there, they
- dnl are almost assuredly the ones desired.
- AS_CASE([${host_cpu}],
- [i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
- [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"],
- [multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
- )
-
- dnl first we check the system location for boost libraries
- dnl this location is chosen if boost libraries are installed with the --layout=system option
- dnl or if you install boost with RPM
- AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
- AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
- AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
- AC_MSG_RESULT([yes])
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
- for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
- AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
- AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
- AC_MSG_RESULT([yes])
- break;
- ],
- [AC_MSG_RESULT([no])])
- done],[
- AC_MSG_RESULT([no])])
- ],[
- if test X"$cross_compiling" = Xyes; then
- search_libsubdirs=$multiarch_libsubdir
- else
- search_libsubdirs="$multiarch_libsubdir $libsubdirs"
- fi
- for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local /opt/homebrew ; do
- if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
- for libsubdir in $search_libsubdirs ; do
- if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
- break;
- fi
- done
- ])
-
- AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)])
- CPPFLAGS_SAVED="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- AC_REQUIRE([AC_PROG_CXX])
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
- AC_MSG_RESULT(yes)
- succeeded=yes
- found_system=yes
- ],[
- ])
- AC_LANG_POP([C++])
-
-
-
- dnl if we found no boost with system layout we search for boost libraries
- dnl built and installed without the --layout=system option or for a staged(not installed) version
- if test "x$succeeded" != "xyes" ; then
- CPPFLAGS="$CPPFLAGS_SAVED"
- BOOST_CPPFLAGS=
-
- _version=0
- if test -n "$_AX_BOOST_BASE_boost_path" ; then
- if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
- for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
- _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
- V_CHECK=`expr $_version_tmp \> $_version`
- if test "x$V_CHECK" = "x1" ; then
- _version=$_version_tmp
- fi
- VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
- done
- dnl if nothing found search for layout used in Windows distributions
- if test -z "$BOOST_CPPFLAGS"; then
- if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
- BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
- fi
- fi
- fi
- else
- if test "x$cross_compiling" != "xyes" ; then
- for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local /opt/homebrew ; do
- if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
- for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
- _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
- V_CHECK=`expr $_version_tmp \> $_version`
- if test "x$V_CHECK" = "x1" ; then
- _version=$_version_tmp
- best_path=$_AX_BOOST_BASE_boost_path
- fi
- done
- fi
- done
-
- VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
- BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
- fi
-
- if test -n "$BOOST_ROOT" ; then
- for libsubdir in $libsubdirs ; do
- if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
- done
- if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
- version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
- stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
- stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
- V_CHECK=`expr $stage_version_shorten \>\= $_version`
- if test "x$V_CHECK" = "x1" ; then
- AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
- BOOST_CPPFLAGS="-I$BOOST_ROOT"
- fi
- fi
- fi
- fi
-
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
- export CPPFLAGS
-
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
- AC_MSG_RESULT(yes)
- succeeded=yes
- found_system=yes
- ],[
- ])
- AC_LANG_POP([C++])
- fi
-
- if test "x$succeeded" != "xyes" ; then
- if test "x$_version" = "x0" ; then
- AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]])
- else
- AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
- fi
- # execute ACTION-IF-NOT-FOUND (if present):
- ifelse([$3], , :, [$3])
- else
- AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
- # execute ACTION-IF-FOUND (if present):
- ifelse([$2], , :, [$2])
- fi
-
- CPPFLAGS="$CPPFLAGS_SAVED"
-])
diff --git a/build-aux/m4/ax_check_compile_flag.m4 b/build-aux/m4/ax_check_compile_flag.m4
deleted file mode 100644
index bd753b34d7..0000000000
--- a/build-aux/m4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the current language's compiler
-# or gives an error. (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the current language's default
-# flags (e.g. CFLAGS) when the check is done. The check is thus made with
-# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
-# force the compiler to issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
- ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
- AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/build-aux/m4/ax_check_link_flag.m4 b/build-aux/m4/ax_check_link_flag.m4
deleted file mode 100644
index 03a30ce4c7..0000000000
--- a/build-aux/m4/ax_check_link_flag.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the linker or gives an error.
-# (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the linker's default flags
-# when the check is done. The check is thus made with the flags: "LDFLAGS
-# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
-# issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_LINK_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AC_DEFUN([AX_CHECK_LINK_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
-AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
- ax_check_save_flags=$LDFLAGS
- LDFLAGS="$LDFLAGS $4 $1"
- AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- LDFLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_LINK_FLAGS
diff --git a/build-aux/m4/ax_check_preproc_flag.m4 b/build-aux/m4/ax_check_preproc_flag.m4
deleted file mode 100644
index e43560fbd3..0000000000
--- a/build-aux/m4/ax_check_preproc_flag.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-# Check whether the given FLAG works with the current language's
-# preprocessor or gives an error. (Warnings, however, are ignored)
-#
-# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-# success/failure.
-#
-# If EXTRA-FLAGS is defined, it is added to the preprocessor's default
-# flags when the check is done. The check is thus made with the flags:
-# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the
-# preprocessor to issue an error when a bad flag is given.
-#
-# INPUT gives an alternative input source to AC_PREPROC_IFELSE.
-#
-# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Guido U. Draheim
-# Copyright (c) 2011 Maarten Bosmans
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AC_DEFUN([AX_CHECK_PREPROC_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
- ax_check_save_flags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $4 $1"
- AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
- [AS_VAR_SET(CACHEVAR,[yes])],
- [AS_VAR_SET(CACHEVAR,[no])])
- CPPFLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
- [m4_default([$2], :)],
- [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_PREPROC_FLAGS
diff --git a/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/build-aux/m4/ax_cxx_compile_stdcxx.m4
deleted file mode 100644
index 51a35054d0..0000000000
--- a/build-aux/m4/ax_cxx_compile_stdcxx.m4
+++ /dev/null
@@ -1,1005 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
-#
-# DESCRIPTION
-#
-# Check for baseline language coverage in the compiler for the specified
-# version of the C++ standard. If necessary, add switches to CXX and
-# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
-# the respective C++ standard version.
-#
-# The second argument, if specified, indicates whether you insist on an
-# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
-# -std=c++11). If neither is specified, you get whatever works, with
-# preference for no added switch, and then for an extended mode.
-#
-# The third argument, if specified 'mandatory' or if left unspecified,
-# indicates that baseline support for the specified C++ standard is
-# required and that the macro should error out if no mode with that
-# support is found. If specified 'optional', then configuration proceeds
-# regardless, after defining HAVE_CXX${VERSION} if and only if a
-# supporting mode is found.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Benjamin Kosnik
-# Copyright (c) 2012 Zack Weinberg
-# Copyright (c) 2013 Roy Stogner
-# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov
-# Copyright (c) 2015 Paul Norman
-# Copyright (c) 2015 Moritz Klammler
-# Copyright (c) 2016, 2018 Krzesimir Nowak
-# Copyright (c) 2019 Enji Cooper
-# Copyright (c) 2020 Jason Merrill
-# Copyright (c) 2021 Jörn Heusipp
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 14
-
-dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
-dnl (serial version number 13).
-
-AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
- m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
- [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
- [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
- [$1], [20], [ax_cxx_compile_alternatives="20"],
- [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
- m4_if([$2], [], [],
- [$2], [ext], [],
- [$2], [noext], [],
- [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
- m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
- [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
- [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
- [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
- AC_LANG_PUSH([C++])dnl
- ac_success=no
-
- m4_if([$2], [], [dnl
- AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
- ax_cv_cxx_compile_cxx$1,
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [ax_cv_cxx_compile_cxx$1=yes],
- [ax_cv_cxx_compile_cxx$1=no])])
- if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
- ac_success=yes
- fi])
-
- m4_if([$2], [noext], [], [dnl
- if test x$ac_success = xno; then
- for alternative in ${ax_cxx_compile_alternatives}; do
- switch="-std=gnu++${alternative}"
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
- AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
- $cachevar,
- [ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXX="$ac_save_CXX"])
- if eval test x\$$cachevar = xyes; then
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
- done
- fi])
-
- m4_if([$2], [ext], [], [dnl
- if test x$ac_success = xno; then
- dnl HP's aCC needs +std=c++11 according to:
- dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
- dnl Cray's crayCC needs "-h std=c++11"
- for alternative in ${ax_cxx_compile_alternatives}; do
- for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
- AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
- $cachevar,
- [ac_save_CXX="$CXX"
- CXX="$CXX $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXX="$ac_save_CXX"])
- if eval test x\$$cachevar = xyes; then
- CXX="$CXX $switch"
- if test -n "$CXXCPP" ; then
- CXXCPP="$CXXCPP $switch"
- fi
- ac_success=yes
- break
- fi
- done
- if test x$ac_success = xyes; then
- break
- fi
- done
- fi])
- AC_LANG_POP([C++])
- if test x$ax_cxx_compile_cxx$1_required = xtrue; then
- if test x$ac_success = xno; then
- AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
- fi
- fi
- if test x$ac_success = xno; then
- HAVE_CXX$1=0
- AC_MSG_NOTICE([No compiler with C++$1 support was found])
- else
- HAVE_CXX$1=1
- AC_DEFINE(HAVE_CXX$1,1,
- [define if the compiler supports basic C++$1 syntax])
- fi
- AC_SUBST(HAVE_CXX$1)
-])
-
-
-dnl Test body for checking C++11 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
-)
-
-dnl Test body for checking C++14 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
-)
-
-dnl Test body for checking C++17 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
-)
-
-dnl Test body for checking C++20 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
- _AX_CXX_COMPILE_STDCXX_testbody_new_in_20
-)
-
-
-dnl Tests for new features in C++11
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
-
-// If the compiler admits that it is not ready for C++11, why torture it?
-// Hopefully, this will speed up the test.
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 201103L
-
-#error "This is not a C++11 compiler"
-
-#else
-
-namespace cxx11
-{
-
- namespace test_static_assert
- {
-
- template
- struct check
- {
- static_assert(sizeof(int) <= sizeof(T), "not big enough");
- };
-
- }
-
- namespace test_final_override
- {
-
- struct Base
- {
- virtual ~Base() {}
- virtual void f() {}
- };
-
- struct Derived : public Base
- {
- virtual ~Derived() override {}
- virtual void f() override {}
- };
-
- }
-
- namespace test_double_right_angle_brackets
- {
-
- template < typename T >
- struct check {};
-
- typedef check single_type;
- typedef check> double_type;
- typedef check>> triple_type;
- typedef check>>> quadruple_type;
-
- }
-
- namespace test_decltype
- {
-
- int
- f()
- {
- int a = 1;
- decltype(a) b = 2;
- return a + b;
- }
-
- }
-
- namespace test_type_deduction
- {
-
- template < typename T1, typename T2 >
- struct is_same
- {
- static const bool value = false;
- };
-
- template < typename T >
- struct is_same
- {
- static const bool value = true;
- };
-
- template < typename T1, typename T2 >
- auto
- add(T1 a1, T2 a2) -> decltype(a1 + a2)
- {
- return a1 + a2;
- }
-
- int
- test(const int c, volatile int v)
- {
- static_assert(is_same::value == true, "");
- static_assert(is_same::value == false, "");
- static_assert(is_same::value == false, "");
- auto ac = c;
- auto av = v;
- auto sumi = ac + av + 'x';
- auto sumf = ac + av + 1.0;
- static_assert(is_same::value == true, "");
- static_assert(is_same::value == true, "");
- static_assert(is_same::value == true, "");
- static_assert(is_same::value == false, "");
- static_assert(is_same::value == true, "");
- return (sumf > 0.0) ? sumi : add(c, v);
- }
-
- }
-
- namespace test_noexcept
- {
-
- int f() { return 0; }
- int g() noexcept { return 0; }
-
- static_assert(noexcept(f()) == false, "");
- static_assert(noexcept(g()) == true, "");
-
- }
-
- namespace test_constexpr
- {
-
- template < typename CharT >
- unsigned long constexpr
- strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
- {
- return *s ? strlen_c_r(s + 1, acc + 1) : acc;
- }
-
- template < typename CharT >
- unsigned long constexpr
- strlen_c(const CharT *const s) noexcept
- {
- return strlen_c_r(s, 0UL);
- }
-
- static_assert(strlen_c("") == 0UL, "");
- static_assert(strlen_c("1") == 1UL, "");
- static_assert(strlen_c("example") == 7UL, "");
- static_assert(strlen_c("another\0example") == 7UL, "");
-
- }
-
- namespace test_rvalue_references
- {
-
- template < int N >
- struct answer
- {
- static constexpr int value = N;
- };
-
- answer<1> f(int&) { return answer<1>(); }
- answer<2> f(const int&) { return answer<2>(); }
- answer<3> f(int&&) { return answer<3>(); }
-
- void
- test()
- {
- int i = 0;
- const int c = 0;
- static_assert(decltype(f(i))::value == 1, "");
- static_assert(decltype(f(c))::value == 2, "");
- static_assert(decltype(f(0))::value == 3, "");
- }
-
- }
-
- namespace test_uniform_initialization
- {
-
- struct test
- {
- static const int zero {};
- static const int one {1};
- };
-
- static_assert(test::zero == 0, "");
- static_assert(test::one == 1, "");
-
- }
-
- namespace test_lambdas
- {
-
- void
- test1()
- {
- auto lambda1 = [](){};
- auto lambda2 = lambda1;
- lambda1();
- lambda2();
- }
-
- int
- test2()
- {
- auto a = [](int i, int j){ return i + j; }(1, 2);
- auto b = []() -> int { return '0'; }();
- auto c = [=](){ return a + b; }();
- auto d = [&](){ return c; }();
- auto e = [a, &b](int x) mutable {
- const auto identity = [](int y){ return y; };
- for (auto i = 0; i < a; ++i)
- a += b--;
- return x + identity(a + b);
- }(0);
- return a + b + c + d + e;
- }
-
- int
- test3()
- {
- const auto nullary = [](){ return 0; };
- const auto unary = [](int x){ return x; };
- using nullary_t = decltype(nullary);
- using unary_t = decltype(unary);
- const auto higher1st = [](nullary_t f){ return f(); };
- const auto higher2nd = [unary](nullary_t f1){
- return [unary, f1](unary_t f2){ return f2(unary(f1())); };
- };
- return higher1st(nullary) + higher2nd(nullary)(unary);
- }
-
- }
-
- namespace test_variadic_templates
- {
-
- template
- struct sum;
-
- template
- struct sum
- {
- static constexpr auto value = N0 + sum::value;
- };
-
- template <>
- struct sum<>
- {
- static constexpr auto value = 0;
- };
-
- static_assert(sum<>::value == 0, "");
- static_assert(sum<1>::value == 1, "");
- static_assert(sum<23>::value == 23, "");
- static_assert(sum<1, 2>::value == 3, "");
- static_assert(sum<5, 5, 11>::value == 21, "");
- static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
-
- }
-
- // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
- // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
- // because of this.
- namespace test_template_alias_sfinae
- {
-
- struct foo {};
-
- template
- using member = typename T::member_type;
-
- template
- void func(...) {}
-
- template
- void func(member*) {}
-
- void test();
-
- void test() { func(0); }
-
- }
-
-} // namespace cxx11
-
-#endif // __cplusplus >= 201103L
-
-]])
-
-
-dnl Tests for new features in C++14
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
-
-// If the compiler admits that it is not ready for C++14, why torture it?
-// Hopefully, this will speed up the test.
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 201402L
-
-#error "This is not a C++14 compiler"
-
-#else
-
-namespace cxx14
-{
-
- namespace test_polymorphic_lambdas
- {
-
- int
- test()
- {
- const auto lambda = [](auto&&... args){
- const auto istiny = [](auto x){
- return (sizeof(x) == 1UL) ? 1 : 0;
- };
- const int aretiny[] = { istiny(args)... };
- return aretiny[0];
- };
- return lambda(1, 1L, 1.0f, '1');
- }
-
- }
-
- namespace test_binary_literals
- {
-
- constexpr auto ivii = 0b0000000000101010;
- static_assert(ivii == 42, "wrong value");
-
- }
-
- namespace test_generalized_constexpr
- {
-
- template < typename CharT >
- constexpr unsigned long
- strlen_c(const CharT *const s) noexcept
- {
- auto length = 0UL;
- for (auto p = s; *p; ++p)
- ++length;
- return length;
- }
-
- static_assert(strlen_c("") == 0UL, "");
- static_assert(strlen_c("x") == 1UL, "");
- static_assert(strlen_c("test") == 4UL, "");
- static_assert(strlen_c("another\0test") == 7UL, "");
-
- }
-
- namespace test_lambda_init_capture
- {
-
- int
- test()
- {
- auto x = 0;
- const auto lambda1 = [a = x](int b){ return a + b; };
- const auto lambda2 = [a = lambda1(x)](){ return a; };
- return lambda2();
- }
-
- }
-
- namespace test_digit_separators
- {
-
- constexpr auto ten_million = 100'000'000;
- static_assert(ten_million == 100000000, "");
-
- }
-
- namespace test_return_type_deduction
- {
-
- auto f(int& x) { return x; }
- decltype(auto) g(int& x) { return x; }
-
- template < typename T1, typename T2 >
- struct is_same
- {
- static constexpr auto value = false;
- };
-
- template < typename T >
- struct is_same
- {
- static constexpr auto value = true;
- };
-
- int
- test()
- {
- auto x = 0;
- static_assert(is_same::value, "");
- static_assert(is_same::value, "");
- return x;
- }
-
- }
-
-} // namespace cxx14
-
-#endif // __cplusplus >= 201402L
-
-]])
-
-
-dnl Tests for new features in C++17
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
-
-// If the compiler admits that it is not ready for C++17, why torture it?
-// Hopefully, this will speed up the test.
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 201703L
-
-#error "This is not a C++17 compiler"
-
-#else
-
-#include
-#include
-#include
-
-namespace cxx17
-{
-
- namespace test_constexpr_lambdas
- {
-
- constexpr int foo = [](){return 42;}();
-
- }
-
- namespace test::nested_namespace::definitions
- {
-
- }
-
- namespace test_fold_expression
- {
-
- template
- int multiply(Args... args)
- {
- return (args * ... * 1);
- }
-
- template
- bool all(Args... args)
- {
- return (args && ...);
- }
-
- }
-
- namespace test_extended_static_assert
- {
-
- static_assert (true);
-
- }
-
- namespace test_auto_brace_init_list
- {
-
- auto foo = {5};
- auto bar {5};
-
- static_assert(std::is_same, decltype(foo)>::value);
- static_assert(std::is_same::value);
- }
-
- namespace test_typename_in_template_template_parameter
- {
-
- template typename X> struct D;
-
- }
-
- namespace test_fallthrough_nodiscard_maybe_unused_attributes
- {
-
- int f1()
- {
- return 42;
- }
-
- [[nodiscard]] int f2()
- {
- [[maybe_unused]] auto unused = f1();
-
- switch (f1())
- {
- case 17:
- f1();
- [[fallthrough]];
- case 42:
- f1();
- }
- return f1();
- }
-
- }
-
- namespace test_extended_aggregate_initialization
- {
-
- struct base1
- {
- int b1, b2 = 42;
- };
-
- struct base2
- {
- base2() {
- b3 = 42;
- }
- int b3;
- };
-
- struct derived : base1, base2
- {
- int d;
- };
-
- derived d1 {{1, 2}, {}, 4}; // full initialization
- derived d2 {{}, {}, 4}; // value-initialized bases
-
- }
-
- namespace test_general_range_based_for_loop
- {
-
- struct iter
- {
- int i;
-
- int& operator* ()
- {
- return i;
- }
-
- const int& operator* () const
- {
- return i;
- }
-
- iter& operator++()
- {
- ++i;
- return *this;
- }
- };
-
- struct sentinel
- {
- int i;
- };
-
- bool operator== (const iter& i, const sentinel& s)
- {
- return i.i == s.i;
- }
-
- bool operator!= (const iter& i, const sentinel& s)
- {
- return !(i == s);
- }
-
- struct range
- {
- iter begin() const
- {
- return {0};
- }
-
- sentinel end() const
- {
- return {5};
- }
- };
-
- void f()
- {
- range r {};
-
- for (auto i : r)
- {
- [[maybe_unused]] auto v = i;
- }
- }
-
- }
-
- namespace test_lambda_capture_asterisk_this_by_value
- {
-
- struct t
- {
- int i;
- int foo()
- {
- return [*this]()
- {
- return i;
- }();
- }
- };
-
- }
-
- namespace test_enum_class_construction
- {
-
- enum class byte : unsigned char
- {};
-
- byte foo {42};
-
- }
-
- namespace test_constexpr_if
- {
-
- template
- int f ()
- {
- if constexpr(cond)
- {
- return 13;
- }
- else
- {
- return 42;
- }
- }
-
- }
-
- namespace test_selection_statement_with_initializer
- {
-
- int f()
- {
- return 13;
- }
-
- int f2()
- {
- if (auto i = f(); i > 0)
- {
- return 3;
- }
-
- switch (auto i = f(); i + 4)
- {
- case 17:
- return 2;
-
- default:
- return 1;
- }
- }
-
- }
-
- namespace test_template_argument_deduction_for_class_templates
- {
-
- template
- struct pair
- {
- pair (T1 p1, T2 p2)
- : m1 {p1},
- m2 {p2}
- {}
-
- T1 m1;
- T2 m2;
- };
-
- void f()
- {
- [[maybe_unused]] auto p = pair{13, 42u};
- }
-
- }
-
- namespace test_non_type_auto_template_parameters
- {
-
- template
- struct B
- {};
-
- B<5> b1;
- B<'a'> b2;
-
- }
-
- namespace test_structured_bindings
- {
-
- int arr[2] = { 1, 2 };
- std::pair pr = { 1, 2 };
-
- auto f1() -> int(&)[2]
- {
- return arr;
- }
-
- auto f2() -> std::pair&
- {
- return pr;
- }
-
- struct S
- {
- int x1 : 2;
- volatile double y1;
- };
-
- S f3()
- {
- return {};
- }
-
- auto [ x1, y1 ] = f1();
- auto& [ xr1, yr1 ] = f1();
- auto [ x2, y2 ] = f2();
- auto& [ xr2, yr2 ] = f2();
- const auto [ x3, y3 ] = f3();
-
- }
-
- namespace test_exception_spec_type_system
- {
-
- struct Good {};
- struct Bad {};
-
- void g1() noexcept;
- void g2();
-
- template
- Bad
- f(T*, T*);
-
- template
- Good
- f(T1*, T2*);
-
- static_assert (std::is_same_v);
-
- }
-
- namespace test_inline_variables
- {
-
- template void f(T)
- {}
-
- template inline T g(T)
- {
- return T{};
- }
-
- template<> inline void f<>(int)
- {}
-
- template<> int g<>(int)
- {
- return 5;
- }
-
- }
-
-} // namespace cxx17
-
-#endif // __cplusplus < 201703L
-
-]])
-
-
-dnl Tests for new features in C++20
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 202002L
-
-#error "This is not a C++20 compiler"
-
-#else
-
-#include
-
-namespace cxx20
-{
-
-// As C++20 supports feature test macros in the standard, there is no
-// immediate need to actually test for feature availability on the
-// Autoconf side.
-
-} // namespace cxx20
-
-#endif // __cplusplus < 202002L
-
-]])
diff --git a/build-aux/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4
deleted file mode 100644
index 9f35d13914..0000000000
--- a/build-aux/m4/ax_pthread.m4
+++ /dev/null
@@ -1,522 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads. It
-# sets the PTHREAD_LIBS output variable to the threads library and linker
-# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-# flags that are needed. (The user can also force certain compiler
-# flags/libs to be tested by setting these environment variables.)
-#
-# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
-# needed for multi-threaded programs (defaults to the value of CC
-# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
-# special cc_r/CC_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also to link with them as well. For example, you might link with
-# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-# If you are only building threaded programs, you may wish to use these
-# variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-# CXX="$PTHREAD_CXX"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
-# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-# PTHREAD_CFLAGS.
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads library
-# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-# is not found. If ACTION-IF-FOUND is not specified, the default action
-# will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or if
-# you have any other suggestions or comments. This macro was based on work
-# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-# Alejandro Forero Cuervo to the autoconf macro repository. We are also
-# grateful for the helpful feedback of numerous users.
-#
-# Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson
-# Copyright (c) 2011 Daniel Richard G.
-# Copyright (c) 2019 Marc Stevens
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU 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 General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see .
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 31
-
-AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-AC_DEFUN([AX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_SED])
-AC_LANG_PUSH([C])
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on Tru64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
- ax_pthread_save_CC="$CC"
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
- AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
- AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
- AC_MSG_RESULT([$ax_pthread_ok])
- if test "x$ax_pthread_ok" = "xno"; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- CC="$ax_pthread_save_CC"
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items with a "," contain both
-# C compiler flags (before ",") and linker flags (after ","). Other items
-# starting with a "-" are C compiler flags, and remaining items are
-# library names, except for "none" which indicates that we try without
-# any flags at all, and "pthread-config" which is a program returning
-# the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
-# (Note: HP C rejects this with "bad form for `-t' option")
-# -pthreads: Solaris/gcc (Note: HP C also rejects)
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads and
-# -D_REENTRANT too), HP C (must be checked before -lpthread, which
-# is present but should not be used directly; and before -mthreads,
-# because the compiler interprets this as "-mt" + "-hreads")
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case $host_os in
-
- freebsd*)
-
- # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
- # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-
- ax_pthread_flags="-kthread lthread $ax_pthread_flags"
- ;;
-
- hpux*)
-
- # From the cc(1) man page: "[-mt] Sets various -D flags to enable
- # multi-threading and also sets -lpthread."
-
- ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
- ;;
-
- openedition*)
-
- # IBM z/OS requires a feature-test macro to be defined in order to
- # enable POSIX threads at all, so give the user a hint if this is
- # not set. (We don't define these ourselves, as they can affect
- # other portions of the system API in unpredictable ways.)
-
- AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
- [
-# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
- AX_PTHREAD_ZOS_MISSING
-# endif
- ],
- [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
- ;;
-
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (N.B.: The stubs are missing
- # pthread_cleanup_push, or rather a function called by this macro,
- # so we could check for that, but who knows whether they'll stub
- # that too in a future libc.) So we'll check first for the
- # standard Solaris way of linking pthreads (-mt -lpthread).
-
- ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
- ;;
-esac
-
-# Are we compiling with Clang?
-
-AC_CACHE_CHECK([whether $CC is Clang],
- [ax_cv_PTHREAD_CLANG],
- [ax_cv_PTHREAD_CLANG=no
- # Note that Autoconf sets GCC=yes for Clang as well as GCC
- if test "x$GCC" = "xyes"; then
- AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
- [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
-# if defined(__clang__) && defined(__llvm__)
- AX_PTHREAD_CC_IS_CLANG
-# endif
- ],
- [ax_cv_PTHREAD_CLANG=yes])
- fi
- ])
-ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
-
-
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-# Note that for GCC and Clang -pthread generally implies -lpthread,
-# except when -nostdlib is passed.
-# This is problematic using libtool to build C++ shared libraries with pthread:
-# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
-# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
-# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
-# To solve this, first try -pthread together with -lpthread for GCC
-
-AS_IF([test "x$GCC" = "xyes"],
- [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
-
-# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
-
-AS_IF([test "x$ax_pthread_clang" = "xyes"],
- [ax_pthread_flags="-pthread,-lpthread -pthread"])
-
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
- darwin* | hpux* | linux* | osf* | solaris*)
- ax_pthread_check_macro="_REENTRANT"
- ;;
-
- aix*)
- ax_pthread_check_macro="_THREAD_SAFE"
- ;;
-
- *)
- ax_pthread_check_macro="--"
- ;;
-esac
-AS_IF([test "x$ax_pthread_check_macro" = "x--"],
- [ax_pthread_check_cond=0],
- [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
-
-
-if test "x$ax_pthread_ok" = "xno"; then
-for ax_pthread_try_flag in $ax_pthread_flags; do
-
- case $ax_pthread_try_flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- *,*)
- PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
- PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
- AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
- PTHREAD_CFLAGS="$ax_pthread_try_flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
- AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
- PTHREAD_LIBS="-l$ax_pthread_try_flag"
- ;;
- esac
-
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include
-# if $ax_pthread_check_cond
-# error "$ax_pthread_check_macro must be defined"
-# endif
- static void *some_global = NULL;
- static void routine(void *a)
- {
- /* To avoid any unused-parameter or
- unused-but-set-parameter warning. */
- some_global = a;
- }
- static void *start_routine(void *a) { return a; }],
- [pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */])],
- [ax_pthread_ok=yes],
- [])
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- AC_MSG_RESULT([$ax_pthread_ok])
- AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
-
-if test "x$ax_pthread_clang" = "xyes"; then
-
- # Clang takes -pthread; it has never supported any other flag
-
- # (Note 1: This will need to be revisited if a system that Clang
- # supports has POSIX threads in a separate library. This tends not
- # to be the way of modern systems, but it's conceivable.)
-
- # (Note 2: On some systems, notably Darwin, -pthread is not needed
- # to get POSIX threads support; the API is always present and
- # active. We could reasonably leave PTHREAD_CFLAGS empty. But
- # -pthread does define _REENTRANT, and while the Darwin headers
- # ignore this macro, third-party headers might not.)
-
- # However, older versions of Clang make a point of warning the user
- # that, in an invocation where only linking and no compilation is
- # taking place, the -pthread option has no effect ("argument unused
- # during compilation"). They expect -pthread to be passed in only
- # when source code is being compiled.
- #
- # Problem is, this is at odds with the way Automake and most other
- # C build frameworks function, which is that the same flags used in
- # compilation (CFLAGS) are also used in linking. Many systems
- # supported by AX_PTHREAD require exactly this for POSIX threads
- # support, and in fact it is often not straightforward to specify a
- # flag that is used only in the compilation phase and not in
- # linking. Such a scenario is extremely rare in practice.
- #
- # Even though use of the -pthread flag in linking would only print
- # a warning, this can be a nuisance for well-run software projects
- # that build with -Werror. So if the active version of Clang has
- # this misfeature, we search for an option to squash it.
-
- AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
- [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
- [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
- # Create an alternate version of $ac_link that compiles and
- # links in two steps (.c -> .o, .o -> exe) instead of one
- # (.c -> exe), because the warning occurs only in the second
- # step
- ax_pthread_save_ac_link="$ac_link"
- ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
- ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
- ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
- ax_pthread_save_CFLAGS="$CFLAGS"
- for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
- AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
- CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
- ac_link="$ax_pthread_save_ac_link"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
- [ac_link="$ax_pthread_2step_ac_link"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
- [break])
- ])
- done
- ac_link="$ax_pthread_save_ac_link"
- CFLAGS="$ax_pthread_save_CFLAGS"
- AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
- ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
- ])
-
- case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
- no | unknown) ;;
- *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
- esac
-
-fi # $ax_pthread_clang = yes
-
-
-
-# Various other checks:
-if test "x$ax_pthread_ok" = "xyes"; then
- ax_pthread_save_CFLAGS="$CFLAGS"
- ax_pthread_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_CACHE_CHECK([for joinable pthread attribute],
- [ax_cv_PTHREAD_JOINABLE_ATTR],
- [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
- for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],
- [int attr = $ax_pthread_attr; return attr /* ; */])],
- [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
- [])
- done
- ])
- AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
- test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
- test "x$ax_pthread_joinable_attr_defined" != "xyes"],
- [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
- [$ax_cv_PTHREAD_JOINABLE_ATTR],
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- ax_pthread_joinable_attr_defined=yes
- ])
-
- AC_CACHE_CHECK([whether more special flags are required for pthreads],
- [ax_cv_PTHREAD_SPECIAL_FLAGS],
- [ax_cv_PTHREAD_SPECIAL_FLAGS=no
- case $host_os in
- solaris*)
- ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
- ;;
- esac
- ])
- AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
- test "x$ax_pthread_special_flags_added" != "xyes"],
- [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
- ax_pthread_special_flags_added=yes])
-
- AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
- [ax_cv_PTHREAD_PRIO_INHERIT],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[int i = PTHREAD_PRIO_INHERIT;
- return i;]])],
- [ax_cv_PTHREAD_PRIO_INHERIT=yes],
- [ax_cv_PTHREAD_PRIO_INHERIT=no])
- ])
- AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
- test "x$ax_pthread_prio_inherit_defined" != "xyes"],
- [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
- ax_pthread_prio_inherit_defined=yes
- ])
-
- CFLAGS="$ax_pthread_save_CFLAGS"
- LIBS="$ax_pthread_save_LIBS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != "xyes"; then
- case $host_os in
- aix*)
- AS_CASE(["x/$CC"],
- [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
- [#handle absolute path differently from PATH based program lookup
- AS_CASE(["x$CC"],
- [x/*],
- [
- AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
- AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
- ],
- [
- AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
- AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
- ]
- )
- ])
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
-
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
-AC_SUBST([PTHREAD_CC])
-AC_SUBST([PTHREAD_CXX])
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test "x$ax_pthread_ok" = "xyes"; then
- ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
- :
-else
- ax_pthread_ok=no
- $2
-fi
-AC_LANG_POP
-])dnl AX_PTHREAD
diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4
deleted file mode 100644
index 859ddaabbb..0000000000
--- a/build-aux/m4/l_atomic.m4
+++ /dev/null
@@ -1,65 +0,0 @@
-dnl Copyright (c) 2015 Tim Kosse
-dnl Copying and distribution of this file, with or without modification, are
-dnl permitted in any medium without royalty provided the copyright notice
-dnl and this notice are preserved. This file is offered as-is, without any
-dnl warranty.
-
-# Clang, when building for 32-bit,
-# and linking against libstdc++, requires linking with
-# -latomic if using the C++ atomic library.
-# Can be tested with: clang++ -std=c++20 test.cpp -m32
-#
-# Sourced from http://bugs.debian.org/797228
-
-m4_define([_CHECK_ATOMIC_testbody], [[
- #include
- #include
- #include
-
- using namespace std::chrono_literals;
-
- int main() {
- std::atomic lock{true};
- lock.exchange(false);
-
- std::atomic t{0s};
- t.store(2s);
- auto t1 = t.load();
- t.compare_exchange_strong(t1, 3s);
-
- std::atomic d{};
- d.store(3.14);
- auto d1 = d.load();
-
- std::atomic a{};
- int64_t v = 5;
- int64_t r = a.fetch_add(v);
- return static_cast(r);
- }
-]])
-
-AC_DEFUN([CHECK_ATOMIC], [
-
- AC_LANG_PUSH(C++)
- TEMP_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
-
- AC_MSG_CHECKING([whether std::atomic can be used without link library])
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- LIBS="$LIBS -latomic"
- AC_MSG_CHECKING([whether std::atomic needs -latomic])
- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_FAILURE([cannot figure out how to use std::atomic])
- ])
- ])
-
- CXXFLAGS="$TEMP_CXXFLAGS"
- AC_LANG_POP
-])
diff --git a/build-aux/m4/l_socket.m4 b/build-aux/m4/l_socket.m4
deleted file mode 100644
index 38923a98fc..0000000000
--- a/build-aux/m4/l_socket.m4
+++ /dev/null
@@ -1,36 +0,0 @@
-# Illumos/SmartOS requires linking with -lsocket if
-# using getifaddrs & freeifaddrs
-
-m4_define([_CHECK_SOCKET_testbody], [[
- #include
- #include
-
- int main() {
- struct ifaddrs *ifaddr;
- getifaddrs(&ifaddr);
- freeifaddrs(ifaddr);
- }
-]])
-
-AC_DEFUN([CHECK_SOCKET], [
-
- AC_LANG_PUSH(C++)
-
- AC_MSG_CHECKING([whether ifaddrs funcs can be used without link library])
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- LIBS="$LIBS -lsocket"
- AC_MSG_CHECKING([whether getifaddrs needs -lsocket])
- AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_FAILURE([cannot figure out how to use getifaddrs])
- ])
- ])
-
- AC_LANG_POP
-])
diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore
deleted file mode 100644
index 0bd3235228..0000000000
--- a/build_msvc/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# Build directories
-Debug/*
-Release/*
-.vs
-packages/*
-*/Obj
-*/Debug
-*/Release
-*/x64
-*.vcxproj.user
-
-# .vcxproj files that are auto-generated by the msvc-autogen.py script.
-libBGL_cli/libBGL_cli.vcxproj
-libBGL_common/libBGL_common.vcxproj
-libBGL_crypto/libBGL_crypto.vcxproj
-libBGL_node/libBGL_node.vcxproj
-libBGL_util/libBGL_util.vcxproj
-libBGL_wallet_tool/libBGL_wallet_tool.vcxproj
-libBGL_wallet/libBGL_wallet.vcxproj
-libBGL_zmq/libBGL_zmq.vcxproj
-bench_BGL/bench_BGL.vcxproj
-libtest_util/libtest_util.vcxproj
-
-/BGL_config.h
-/common.init.vcxproj
-
-*/Win32
-libBGL_qt/QtGeneratedFiles/*
-test_BGL-qt/QtGeneratedFiles/*
-vcpkg_installed
diff --git a/build_msvc/BGL-cli/BGL-cli.vcxproj b/build_msvc/BGL-cli/BGL-cli.vcxproj
deleted file mode 100644
index 24e6a610d9..0000000000
--- a/build_msvc/BGL-cli/BGL-cli.vcxproj
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- {0B2D7431-F876-4A58-87BF-F748338CD3BF}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
-
-
-
-
diff --git a/build_msvc/BGL-qt/BGL-qt.vcxproj b/build_msvc/BGL-qt/BGL-qt.vcxproj
deleted file mode 100644
index c30aaa11a6..0000000000
--- a/build_msvc/BGL-qt/BGL-qt.vcxproj
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
- {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {2b4abff8-d1fd-4845-88c9-1f3c0a6512bf}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
-
-
- $(QtIncludes);%(AdditionalIncludeDirectories)
-
-
- Windows
- $(QtReleaseLibraries);%(AdditionalDependencies)
- /LTCG:OFF
-
-
- ..\..\src;
- _UNICODE;UNICODE;%(PreprocessorDefinitions)
-
-
-
-
- $(QtIncludes);%(AdditionalIncludeDirectories)
-
-
- $(QtDebugLibraries);%(AdditionalDependencies)
-
-
- ..\..\src;
- _UNICODE;UNICODE;%(PreprocessorDefinitions)
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/BGL-tx/BGL-tx.vcxproj b/build_msvc/BGL-tx/BGL-tx.vcxproj
deleted file mode 100644
index fb3de47d2e..0000000000
--- a/build_msvc/BGL-tx/BGL-tx.vcxproj
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/BGL-util/BGL-util.vcxproj b/build_msvc/BGL-util/BGL-util.vcxproj
deleted file mode 100644
index 9f503aaa65..0000000000
--- a/build_msvc/BGL-util/BGL-util.vcxproj
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- {57A04EC9-542A-4E40-83D0-AC3BE1F36805}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/BGL-wallet/BGL-wallet.vcxproj b/build_msvc/BGL-wallet/BGL-wallet.vcxproj
deleted file mode 100644
index fa46698319..0000000000
--- a/build_msvc/BGL-wallet/BGL-wallet.vcxproj
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
- {84DE8790-EDE3-4483-81AC-C32F15E861F4}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
- $(IntDir)init_BGL-wallet.obj
-
-
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {f91ac55e-6f5e-4c58-9ac5-b40db7deef93}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/BGL.sln b/build_msvc/BGL.sln
deleted file mode 100644
index ec1384639c..0000000000
--- a/build_msvc/BGL.sln
+++ /dev/null
@@ -1,162 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34616.47
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_consensus", "libBGL_consensus\libBGL_consensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGLd", "BGLd\BGLd.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_util", "libBGL_util\libBGL_util.vcxproj", "{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_common", "libBGL_common\libBGL_common.vcxproj", "{7C87E378-DF58-482E-AA2F-1BC129BC19CE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_crypto", "libBGL_crypto\libBGL_crypto.vcxproj", "{6190199C-6CF4-4DAD-BFBD-93FA72A760C1}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_node", "libBGL_node\libBGL_node.vcxproj", "{460FEE33-1FE1-483F-B3BF-931FF8E969A5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunivalue", "libunivalue\libunivalue.vcxproj", "{5724BA7D-A09A-4BA8-800B-C4C1561B3D69}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_wallet", "libBGL_wallet\libBGL_wallet.vcxproj", "{93B86837-B543-48A5-A89B-7C87ABB77DF2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_zmq", "libBGL_zmq\libBGL_zmq.vcxproj", "{792D487F-F14C-49FC-A9DE-3FC150F31C3F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_BGL", "test_BGL\test_BGL.vcxproj", "{A56B73DB-D46D-4882-8374-1FE3FFA08F07}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_cli", "libBGL_cli\libBGL_cli.vcxproj", "{0667528C-D734-4009-ADF9-C0D6C4A5A5A6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGL-cli", "BGL-cli\BGL-cli.vcxproj", "{0B2D7431-F876-4A58-87BF-F748338CD3BF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_BGL", "bench_BGL\bench_BGL.vcxproj", "{1125654E-E1B2-4431-8B5C-62EA9A2FEECB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGL-tx", "BGL-tx\BGL-tx.vcxproj", "{D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGL-util", "BGL-util\BGL-util.vcxproj", "{57A04EC9-542A-4E40-83D0-AC3BE1F36805}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGL-wallet", "BGL-wallet\BGL-wallet.vcxproj", "{84DE8790-EDE3-4483-81AC-C32F15E861F4}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_wallet_tool", "libBGL_wallet_tool\libBGL_wallet_tool.vcxproj", "{F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsecp256k1", "libsecp256k1\libsecp256k1.vcxproj", "{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libleveldb", "libleveldb\libleveldb.vcxproj", "{18430FEF-6B61-4C53-B396-718E02850F1B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBGL_qt", "libBGL_qt\libBGL_qt.vcxproj", "{2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BGL-qt", "BGL-qt\BGL-qt.vcxproj", "{7E99172D-7FF2-4CB6-B736-AC9B76ED412A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtest_util", "libtest_util\libtest_util.vcxproj", "{868474FD-35F6-4400-8EED-30A33E7521D4}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_BGL-qt", "test_BGL-qt\test_BGL-qt.vcxproj", "{51201D5E-D939-4854-AE9D-008F03FF518E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libminisketch", "libminisketch\libminisketch.vcxproj", "{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.ActiveCfg = Debug|x64
- {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.Build.0 = Debug|x64
- {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.ActiveCfg = Release|x64
- {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.Build.0 = Release|x64
- {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.ActiveCfg = Debug|x64
- {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.Build.0 = Debug|x64
- {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.ActiveCfg = Release|x64
- {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.Build.0 = Release|x64
- {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.ActiveCfg = Debug|x64
- {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.Build.0 = Debug|x64
- {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.ActiveCfg = Release|x64
- {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.Build.0 = Release|x64
- {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.ActiveCfg = Debug|x64
- {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.Build.0 = Debug|x64
- {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.ActiveCfg = Release|x64
- {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.Build.0 = Release|x64
- {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.ActiveCfg = Debug|x64
- {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.Build.0 = Debug|x64
- {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.ActiveCfg = Release|x64
- {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.Build.0 = Release|x64
- {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.ActiveCfg = Debug|x64
- {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.Build.0 = Debug|x64
- {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.ActiveCfg = Release|x64
- {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.Build.0 = Release|x64
- {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.ActiveCfg = Debug|x64
- {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.Build.0 = Debug|x64
- {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.ActiveCfg = Release|x64
- {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.Build.0 = Release|x64
- {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.ActiveCfg = Debug|x64
- {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.Build.0 = Debug|x64
- {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.ActiveCfg = Release|x64
- {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.Build.0 = Release|x64
- {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.ActiveCfg = Debug|x64
- {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.Build.0 = Debug|x64
- {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.ActiveCfg = Release|x64
- {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.Build.0 = Release|x64
- {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.ActiveCfg = Debug|x64
- {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.Build.0 = Debug|x64
- {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.ActiveCfg = Release|x64
- {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.Build.0 = Release|x64
- {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.ActiveCfg = Debug|x64
- {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.Build.0 = Debug|x64
- {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.ActiveCfg = Release|x64
- {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.Build.0 = Release|x64
- {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.ActiveCfg = Debug|x64
- {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.Build.0 = Debug|x64
- {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.ActiveCfg = Release|x64
- {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.Build.0 = Release|x64
- {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.ActiveCfg = Debug|x64
- {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.Build.0 = Debug|x64
- {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.ActiveCfg = Release|x64
- {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.Build.0 = Release|x64
- {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.ActiveCfg = Debug|x64
- {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.Build.0 = Debug|x64
- {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.ActiveCfg = Release|x64
- {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.Build.0 = Release|x64
- {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Debug|x64.ActiveCfg = Debug|x64
- {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Debug|x64.Build.0 = Debug|x64
- {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Release|x64.ActiveCfg = Release|x64
- {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Release|x64.Build.0 = Release|x64
- {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.ActiveCfg = Debug|x64
- {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.Build.0 = Debug|x64
- {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.ActiveCfg = Release|x64
- {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.Build.0 = Release|x64
- {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.ActiveCfg = Debug|x64
- {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.Build.0 = Debug|x64
- {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.ActiveCfg = Release|x64
- {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.Build.0 = Release|x64
- {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.ActiveCfg = Debug|x64
- {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.Build.0 = Debug|x64
- {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.ActiveCfg = Release|x64
- {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.Build.0 = Release|x64
- {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.ActiveCfg = Debug|x64
- {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.Build.0 = Debug|x64
- {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.ActiveCfg = Release|x64
- {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.Build.0 = Release|x64
- {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Debug|x64.ActiveCfg = Debug|x64
- {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Debug|x64.Build.0 = Debug|x64
- {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Release|x64.ActiveCfg = Release|x64
- {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Release|x64.Build.0 = Release|x64
- {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Debug|x64.ActiveCfg = Debug|x64
- {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Debug|x64.Build.0 = Debug|x64
- {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Release|x64.ActiveCfg = Release|x64
- {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Release|x64.Build.0 = Release|x64
- {868474FD-35F6-4400-8EED-30A33E7521D4}.Debug|x64.ActiveCfg = Debug|x64
- {868474FD-35F6-4400-8EED-30A33E7521D4}.Debug|x64.Build.0 = Debug|x64
- {868474FD-35F6-4400-8EED-30A33E7521D4}.Release|x64.ActiveCfg = Release|x64
- {868474FD-35F6-4400-8EED-30A33E7521D4}.Release|x64.Build.0 = Release|x64
- {51201D5E-D939-4854-AE9D-008F03FF518E}.Debug|x64.ActiveCfg = Debug|x64
- {51201D5E-D939-4854-AE9D-008F03FF518E}.Debug|x64.Build.0 = Debug|x64
- {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.ActiveCfg = Release|x64
- {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.Build.0 = Release|x64
- {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.ActiveCfg = Debug|x64
- {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.Build.0 = Debug|x64
- {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.ActiveCfg = Release|x64
- {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {58AAB032-7274-49BD-845E-5EF4DBB69B70}
- EndGlobalSection
-EndGlobal
diff --git a/build_msvc/BGL_config.h b/build_msvc/BGL_config.h
deleted file mode 100644
index 7d99fa6af4..0000000000
--- a/build_msvc/BGL_config.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2018-2020 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#ifndef BGL_BGL_CONFIG_H
-#define BGL_BGL_CONFIG_H
-
-/* Version Build */
-#define CLIENT_VERSION_BUILD 13
-
-/* Version is release */
-#define CLIENT_VERSION_IS_RELEASE true
-
-/* Major version */
-#define CLIENT_VERSION_MAJOR 0
-
-/* Minor version */
-#define CLIENT_VERSION_MINOR 1
-
-/* Copyright holder(s) before %s replacement */
-#define COPYRIGHT_HOLDERS "The %s developers"
-
-/* Copyright holder(s) */
-#define COPYRIGHT_HOLDERS_FINAL "The Bitgesell Core developers"
-
-/* Replacement for %s in copyright holders string */
-#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitgesell Core"
-
-/* Copyright year */
-#define COPYRIGHT_YEAR 2024
-
-/* Define to 1 to enable wallet functions */
-#define ENABLE_WALLET 1
-
-/* Define to 1 to enable BDB wallet */
-#define USE_BDB 1
-
-/* Define to 1 to enable SQLite wallet */
-#define USE_SQLITE 1
-
-/* Define this symbol to enable ZMQ functions */
-#define ENABLE_ZMQ 1
-
-/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
- */
-#define HAVE_DECL_FORK 0
-
-/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't.
- */
-#define HAVE_DECL_SETSID 0
-
-/* Define if the dllexport attribute is supported. */
-#define HAVE_DLLEXPORT_ATTRIBUTE 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "https://github.com/bitgesellofficial/bitgesell/issues"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "Bitgesell Core"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "BGL Core 0.1.13"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "https://github.com/BitgesellOfficial/bitgesell/releases/"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.1.13"
-
-/* Define this symbol if the minimal qt platform exists */
-#define QT_QPA_PLATFORM_MINIMAL 1
-
-/* Define this symbol if the qt platform is windows */
-#define QT_QPA_PLATFORM_WINDOWS 1
-
-/* Define this symbol if qt plugins are static */
-#define QT_STATICPLUGIN 1
-
-/* Windows Universal Platform constraints */
-#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
-/* Either a desktop application without API restrictions, or and older system
- before these macros were defined. */
-
-/* ::wsystem is available */
-#define HAVE_SYSTEM 1
-
-#endif // !WINAPI_FAMILY || WINAPI_FAMILY_DESKTOP_APP
-
-#endif //BGL_BGL_CONFIG_H
diff --git a/build_msvc/BGL_config.h.in b/build_msvc/BGL_config.h.in
deleted file mode 100644
index 512deb7ba3..0000000000
--- a/build_msvc/BGL_config.h.in
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2018-2020 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#ifndef BGL_BGL_CONFIG_H
-#define BGL_BGL_CONFIG_H
-
-/* Version Build */
-#define CLIENT_VERSION_BUILD $
-
-/* Version is release */
-#define CLIENT_VERSION_IS_RELEASE $
-
-/* Major version */
-#define CLIENT_VERSION_MAJOR $
-
-/* Minor version */
-#define CLIENT_VERSION_MINOR $
-
-/* Copyright holder(s) before %s replacement */
-#define COPYRIGHT_HOLDERS "The %s developers"
-
-/* Copyright holder(s) */
-#define COPYRIGHT_HOLDERS_FINAL "The Bitgesell Core developers"
-
-/* Replacement for %s in copyright holders string */
-#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitgesell Core"
-
-/* Copyright year */
-#define COPYRIGHT_YEAR $
-
-/* Define to 1 to enable wallet functions */
-#define ENABLE_WALLET 1
-
-/* Define to 1 to enable BDB wallet */
-#define USE_BDB 1
-
-/* Define to 1 to enable SQLite wallet */
-#define USE_SQLITE 1
-
-/* Define this symbol to enable ZMQ functions */
-#define ENABLE_ZMQ 1
-
-/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
- */
-#define HAVE_DECL_FORK 0
-
-/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't.
- */
-#define HAVE_DECL_SETSID 0
-
-/* Define if the dllexport attribute is supported. */
-#define HAVE_DLLEXPORT_ATTRIBUTE 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "https://github.com/bitgesellofficial/bitgesell/issues"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "Bitgesell Core"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING $
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "https://github.com/BitgesellOfficial/bitgesell/releases/"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION $
-
-/* Define this symbol if the minimal qt platform exists */
-#define QT_QPA_PLATFORM_MINIMAL 1
-
-/* Define this symbol if the qt platform is windows */
-#define QT_QPA_PLATFORM_WINDOWS 1
-
-/* Define this symbol if qt plugins are static */
-#define QT_STATICPLUGIN 1
-
-/* Windows Universal Platform constraints */
-#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
-/* Either a desktop application without API restrictions, or and older system
- before these macros were defined. */
-
-/* ::wsystem is available */
-#define HAVE_SYSTEM 1
-
-#endif // !WINAPI_FAMILY || WINAPI_FAMILY_DESKTOP_APP
-
-#endif //BGL_BGL_CONFIG_H
diff --git a/build_msvc/BGLd/BGLd.vcxproj b/build_msvc/BGLd/BGLd.vcxproj
deleted file mode 100644
index 2fb0cef9fe..0000000000
--- a/build_msvc/BGLd/BGLd.vcxproj
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
- $(IntDir)init_BGLd.obj
-
-
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
-
-
-
-
- ..\..\test\config.ini.in
- ..\..\test\config.ini
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/README.md b/build_msvc/README.md
deleted file mode 100644
index 5e8e2be44e..0000000000
--- a/build_msvc/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-Building BGL Core with Visual Studio
-========================================
-
-Introduction
----------------------
-Visual Studio 2022 is minimum required to build BGL Core.
-
-Solution and project files to build with `msbuild` or Visual Studio can be found in the `build_msvc` directory.
-
-To build BGL Core from the command-line, it is sufficient to only install the [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) component.
-
-The "Desktop development with C++" workload must be installed as well.
-
-Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows.md).
-
-
-Prerequisites
----------------------
-To build [dependencies](../doc/dependencies.md) (except for [Qt](#qt)),
-the default approach is to use the [vcpkg](https://vcpkg.io) package manager from Microsoft:
-
-1. [Install](https://vcpkg.io/en/getting-started.html) vcpkg.
-
-2. By default, vcpkg makes both `release` and `debug` builds for each package.
-To save build time and disk space, one could skip `debug` builds (example uses PowerShell):
-```powershell
-
-Add-Content -Path "vcpkg\triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
-```
-
-Qt
----------------------
-To build Bitgesell Core with the GUI, a static build of Qt is required.
-
-1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.11.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
-
-> 💡 **Tip:** If you use the default path with "Extract All" for the Qt source code zip file, and end up with something like `C:\dev\qt-everywhere-opensource-src-5.15.11\qt-everywhere-src-5.15.11`, you are likely to encounter a "path too long" error when building. To fix the problem move the source files to a shorter path such as the recommended `C:\dev\qt-source`.
-
-2. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands:
-```cmd
-cd C:\dev\qt-source
-mkdir build
-cd build
-..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix C:\Qt_static
-nmake
-nmake install
-```
-
-One could speed up building with [`jom`](https://wiki.qt.io/Jom), a replacement for `nmake` which makes use of all CPU cores.
-
-To build Bitgesell Core without Qt, unload or disable the `BGL-qt`, `libBGL_qt` and `test_BGL-qt` projects.
-
-
-Building
----------------------
-1. Use Python to generate `*.vcxproj` for the Visual Studio 2022 toolchain from Makefile:
-
-```cmd
-python build_msvc\msvc-autogen.py
-```
-
-2. An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. To specify a non-default path to a static Qt package directory, use the `QTBASEDIR` environment variable.
-
-3. To build from the command-line with the Visual Studio toolchain use:
-
-```cmd
-msbuild build_msvc\BGL.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal
-```
-
-Alternatively, open the `build_msvc/BGL.sln` file in Visual Studio.
-
-Security
----------------------
-[Base address randomization](https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
-
-To check if `BGLd` has `RandomizedBaseAddress` enabled or disabled run
-
-```
-.\dumpbin.exe /headers src/BGLd.exe
-```
-
-If is it enabled then in the output `Dynamic base` will be listed in the `DLL characteristics` under `OPTIONAL HEADER VALUES` as shown below
-
-```
- 8160 DLL characteristics
- High Entropy Virtual Addresses
- Dynamic base
- NX compatible
- Terminal Server Aware
-```
-
-This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.
diff --git a/build_msvc/bench_BGL/bench_BGL.vcxproj.in b/build_msvc/bench_BGL/bench_BGL.vcxproj.in
deleted file mode 100644
index f395cf5556..0000000000
--- a/build_msvc/bench_BGL/bench_BGL.vcxproj.in
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
- {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-@SOURCE_FILES@
-
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
- {1e065f03-3566-47d0-8fa9-daa72b084e7d}
-
-
-
-
- There was an error executing the raw bench header generation task.
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/common.init.vcxproj.in b/build_msvc/common.init.vcxproj.in
deleted file mode 100644
index ff3f32b6ea..0000000000
--- a/build_msvc/common.init.vcxproj.in
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
- 16.0
- true
-
-
-
- true
- true
- true
- true
- true
- $(Configuration)
- x64-windows-static
-
-
-
- $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
- $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
-
- $(WindowsTargetPlatformVersion_10).0
- $(WindowsTargetPlatformVersion_10)
-
-
-
-
- Release
- x64
-
-
- Debug
- x64
-
-
-
-
- false
- false
- @TOOLSET@
- Unicode
- No
- $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\
- $(Platform)\$(Configuration)\$(ProjectName)\
-
-
-
- true
- true
- @TOOLSET@
- Unicode
- $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\
- $(Platform)\$(Configuration)\$(ProjectName)\
-
-
-
-
- MaxSpeed
- false
- true
- true
- true
- MultiThreaded
- None
-
-
- false
- false
- /LTCG:OFF
-
-
-
-
-
- Disabled
- false
- _DEBUG;%(PreprocessorDefinitions)
- true
- MultiThreadedDebug
- /bigobj %(AdditionalOptions)
-
-
-
-
-
- Level3
- NotUsing
- /utf-8 /Zc:preprocessor /Zc:__cplusplus /std:c++20 %(AdditionalOptions)
- 4018;4244;4267;4715;4805
- true
- _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;PROVIDE_FUZZ_MAIN_FUNCTION;%(PreprocessorDefinitions)
- ..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)
-
-
- Console
- Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
-
-
-
-
diff --git a/build_msvc/common.qt.init.vcxproj b/build_msvc/common.qt.init.vcxproj
deleted file mode 100644
index dabbec707f..0000000000
--- a/build_msvc/common.qt.init.vcxproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- C:\Qt_static
- $(QtBaseDir)\plugins
- $(QtBaseDir)\lib
- $(QtBaseDir)\include
- $(QtIncludeDir);$(QtIncludeDir)\QtNetwork;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui;
- .\QtGeneratedFiles\qt
- $(QtBaseDir)\bin
- $(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyle.lib;$(QtLibraryDir)\Qt5WindowsUIAutomationSupport.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;Wtsapi32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib
- $(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyled.lib;$(QtLibraryDir)\*d.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib
-
-
-
-
- QT_NO_KEYWORDS;QT_USE_QSTRINGBUILDER;%(PreprocessorDefinitions)
-
-
-
-
diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj
deleted file mode 100644
index 4bbcc3767f..0000000000
--- a/build_msvc/common.vcxproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-$(BuildDependsOn);CopyBuildArtifacts
-
-
-
-
-
-
-
-
-
diff --git a/build_msvc/fuzz/fuzz.vcxproj b/build_msvc/fuzz/fuzz.vcxproj
deleted file mode 100644
index 7c72703c93..0000000000
--- a/build_msvc/fuzz/fuzz.vcxproj
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
- {AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
- $(IntDir)test_fuzz_util_descriptor.obj
-
-
- $(IntDir)test_fuzz_util_mempool.obj
-
-
- $(IntDir)test_fuzz_util_net.obj
-
-
- $(IntDir)wallet_test_fuzz_coincontrol.obj
-
-
- $(IntDir)wallet_test_fuzz_coinselection.obj
-
-
- $(IntDir)wallet_test_fuzz_fees.obj
-
-
- $(IntDir)wallet_test_fuzz_notifications.obj
-
-
- $(IntDir)wallet_test_fuzz_parse_iso8601.obj
-
-
- $(IntDir)wallet_test_fuzz_scriptpubkeyman.obj
-
-
-
-
- {542007e3-be0d-4b0d-a6b0-aa8813e2558d}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {1e065f03-3566-47d0-8fa9-daa72b084e7d}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
-
-
-
-
diff --git a/build_msvc/libBGL_cli/libBGL_cli.vcxproj.in b/build_msvc/libBGL_cli/libBGL_cli.vcxproj.in
deleted file mode 100644
index 620df72a2f..0000000000
--- a/build_msvc/libBGL_cli/libBGL_cli.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_common/libBGL_common.vcxproj.in b/build_msvc/libBGL_common/libBGL_common.vcxproj.in
deleted file mode 100644
index b47d62b295..0000000000
--- a/build_msvc/libBGL_common/libBGL_common.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {7C87E378-DF58-482E-AA2F-1BC129BC19CE}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_consensus/libBGL_consensus.vcxproj b/build_msvc/libBGL_consensus/libBGL_consensus.vcxproj
deleted file mode 100644
index 57b4d3e328..0000000000
--- a/build_msvc/libBGL_consensus/libBGL_consensus.vcxproj
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}
-
-
- StaticLibrary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build_msvc/libBGL_crypto/libBGL_crypto.vcxproj.in b/build_msvc/libBGL_crypto/libBGL_crypto.vcxproj.in
deleted file mode 100644
index 32cb75bf87..0000000000
--- a/build_msvc/libBGL_crypto/libBGL_crypto.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_node/libBGL_node.vcxproj.in b/build_msvc/libBGL_node/libBGL_node.vcxproj.in
deleted file mode 100644
index 58e90dbaeb..0000000000
--- a/build_msvc/libBGL_node/libBGL_node.vcxproj.in
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- {460FEE33-1FE1-483F-B3BF-931FF8E969A5}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
- $(IntDir)wallet_init.obj
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/libBGL_qt/libBGL_qt.vcxproj b/build_msvc/libBGL_qt/libBGL_qt.vcxproj
deleted file mode 100644
index cd0871ca8f..0000000000
--- a/build_msvc/libBGL_qt/libBGL_qt.vcxproj
+++ /dev/null
@@ -1,221 +0,0 @@
-
-
-
-
-
- {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}
- StaticLibrary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- _AMD64_;%(PreprocessorDefinitions)
- $(QtIncludes);$(GeneratedFilesOutDir)\..;%(AdditionalIncludeDirectories)
- MaxSpeed
-
-
-
-
-
-
-
-
-
-
-
-
- _AMD64_;%(PreprocessorDefinitions)
- $(QtIncludes);$(GeneratedFilesOutDir)\..;%(AdditionalIncludeDirectories)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- There was an error executing the libBGL_qt moc code include generation task.
-
-
-
-
-
-
-
-
- There was an error executing the libBGL_qt moc header generation task.
-
-
-
-
-
-
-
-
- There was an error executing the libBGL_qt forms header generation task.
-
-
-
-
-
-
-
- There was an error executing the libBGL_qt translation file generation task.
-
-
-
-
-
-
- There was an error executing the libBGL_qt resource code generation task.
-
-
-
-
-
-
-
-
-
-
-
-
- moccode;
- mocheader;
- forms;
- translation;
- resource;
- $(BuildDependsOn);
-
-
-
-
- qtclean;
- $(CleanDependsOn);
-
-
-
\ No newline at end of file
diff --git a/build_msvc/libBGL_util/libBGL_util.vcxproj.in b/build_msvc/libBGL_util/libBGL_util.vcxproj.in
deleted file mode 100644
index adf4fa0354..0000000000
--- a/build_msvc/libBGL_util/libBGL_util.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in b/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in
deleted file mode 100644
index 613d5c7199..0000000000
--- a/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- {93B86837-B543-48A5-A89B-7C87ABB77DF2}
-
-
- StaticLibrary
-
-
-
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_wallet_tool/libBGL_wallet_tool.vcxproj.in b/build_msvc/libBGL_wallet_tool/libBGL_wallet_tool.vcxproj.in
deleted file mode 100644
index 1a6b7b6b92..0000000000
--- a/build_msvc/libBGL_wallet_tool/libBGL_wallet_tool.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libBGL_zmq/libBGL_zmq.vcxproj.in b/build_msvc/libBGL_zmq/libBGL_zmq.vcxproj.in
deleted file mode 100644
index e86eea81e6..0000000000
--- a/build_msvc/libBGL_zmq/libBGL_zmq.vcxproj.in
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- {792D487F-F14C-49FC-A9DE-3FC150F31C3F}
-
-
- StaticLibrary
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libleveldb/libleveldb.vcxproj b/build_msvc/libleveldb/libleveldb.vcxproj
deleted file mode 100644
index eacfbb2641..0000000000
--- a/build_msvc/libleveldb/libleveldb.vcxproj
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- {18430FEF-6B61-4C53-B396-718E02850F1B}
-
-
- StaticLibrary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HAVE_CRC32C=0;HAVE_SNAPPY=0;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions)
- 4244;4267;4722
- ..\..\src\leveldb;..\..\src\leveldb\include;%(AdditionalIncludeDirectories)
-
-
-
-
-
-
diff --git a/build_msvc/libminisketch/libminisketch.vcxproj b/build_msvc/libminisketch/libminisketch.vcxproj
deleted file mode 100644
index 60e57caa57..0000000000
--- a/build_msvc/libminisketch/libminisketch.vcxproj
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}
-
-
- StaticLibrary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4060;4065;4146;4244;4267
- HAVE_CLMUL;DISABLE_DEFAULT_FIELDS;ENABLE_FIELD_32;%(PreprocessorDefinitions)
-
-
-
-
-
-
diff --git a/build_msvc/libsecp256k1/libsecp256k1.vcxproj b/build_msvc/libsecp256k1/libsecp256k1.vcxproj
deleted file mode 100644
index 7ea4b96534..0000000000
--- a/build_msvc/libsecp256k1/libsecp256k1.vcxproj
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}
-
-
- StaticLibrary
-
-
-
-
-
-
-
-
- ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;ENABLE_MODULE_ELLSWIFT;%(PreprocessorDefinitions)
- USE_ASM_X86_64;%(UndefinePreprocessorDefinitions)
- ..\..\src\secp256k1;%(AdditionalIncludeDirectories)
- 4146;4244;4267
-
-
-
-
-
-
diff --git a/build_msvc/libtest_util/libtest_util.vcxproj.in b/build_msvc/libtest_util/libtest_util.vcxproj.in
deleted file mode 100644
index 64cfa82dcc..0000000000
--- a/build_msvc/libtest_util/libtest_util.vcxproj.in
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- {868474FD-35F6-4400-8EED-30A33E7521D4}
-
-
- StaticLibrary
-
-
-
-@SOURCE_FILES@
-
-
-
-
-
diff --git a/build_msvc/libunivalue/libunivalue.vcxproj b/build_msvc/libunivalue/libunivalue.vcxproj
deleted file mode 100644
index 0f13a57241..0000000000
--- a/build_msvc/libunivalue/libunivalue.vcxproj
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}
-
-
- StaticLibrary
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build_msvc/msbuild/tasks/hexdump.targets b/build_msvc/msbuild/tasks/hexdump.targets
deleted file mode 100644
index 12868a9874..0000000000
--- a/build_msvc/msbuild/tasks/hexdump.targets
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- outFileInfo.LastWriteTime)
- {
- using (Stream inStm = File.OpenRead(RawFilePath))
- {
- using (StreamWriter sw = new StreamWriter(HeaderFilePath))
- {
- sw.WriteLine(SourceHeader);
- int count = 0;
- int rawChar = inStm.ReadByte();
- while(rawChar != -1)
- {
- sw.Write("0x{0:x2}, ", rawChar);
- count++;
- if(count % 8 == 0)
- {
- sw.WriteLine();
- }
- rawChar = inStm.ReadByte();
- }
- sw.WriteLine(SourceFooter);
- }
- }
- }
-}
-]]>
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/msbuild/tasks/replaceinfile.targets b/build_msvc/msbuild/tasks/replaceinfile.targets
deleted file mode 100644
index 2ccb8b30e0..0000000000
--- a/build_msvc/msbuild/tasks/replaceinfile.targets
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py
deleted file mode 100644
index bb103cb6d3..0000000000
--- a/build_msvc/msvc-autogen.py
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2016-2024 The Bitcoin Core developers
-# Copyright (c) 2019-2024 The Bitgesell Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-import os
-import re
-import argparse
-from shutil import copyfile
-
-SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
-DEFAULT_PLATFORM_TOOLSET = R'v143'
-
-libs = [
- 'libBGL_cli',
- 'libBGL_common',
- 'libBGL_crypto',
- 'libBGL_node',
- 'libBGL_util',
- 'libBGL_wallet_tool',
- 'libBGL_wallet',
- 'libBGL_zmq',
- 'bench_BGL',
- 'libtest_util',
-]
-
-ignore_list = [
-]
-
-lib_sources = {}
-
-
-def parse_makefile(makefile):
- with open(makefile, 'r', encoding='utf-8') as file:
- current_lib = ''
- for line in file.read().splitlines():
- if current_lib:
- source = line.split()[0]
- if (source.endswith('.cpp') or source.endswith('.c')) and not source.startswith('$') and source not in ignore_list:
- source_filename = source.replace('/', '\\')
- object_filename = source.replace('/', '_')[:-4] + ".obj"
- lib_sources[current_lib].append((source_filename, object_filename))
- if not line.endswith('\\'):
- current_lib = ''
- continue
- for lib in libs:
- _lib = lib.replace('-', '_')
- if re.search(_lib + '.*_SOURCES \\= \\\\', line):
- current_lib = lib
- if not current_lib in lib_sources:
- lib_sources[current_lib] = []
- break
-
-def parse_config_into_BGL_config():
- def find_between( s, first, last ):
- try:
- start = s.index( first ) + len( first )
- end = s.index( last, start )
- return s[start:end]
- except ValueError:
- return ""
-
- config_info = []
- with open(os.path.join(SOURCE_DIR,'../configure.ac'), encoding="utf8") as f:
- for line in f:
- if line.startswith("define"):
- config_info.append(find_between(line, "(_", ")"))
-
- config_info = [c for c in config_info if not c.startswith("COPYRIGHT_HOLDERS")]
-
- config_dict = dict(item.split(", ") for item in config_info)
- config_dict["PACKAGE_VERSION"] = f"\"{config_dict['CLIENT_VERSION_MAJOR']}.{config_dict['CLIENT_VERSION_MINOR']}.{config_dict['CLIENT_VERSION_BUILD']}\""
- version = config_dict["PACKAGE_VERSION"].strip('"')
- config_dict["PACKAGE_STRING"] = f"\"BGL Core {version}\""
-
- with open(os.path.join(SOURCE_DIR,'../build_msvc/BGL_config.h.in'), "r", encoding="utf8") as template_file:
- template = template_file.readlines()
-
- for index, line in enumerate(template):
- header = ""
- if line.startswith("#define"):
- header = line.split(" ")[1]
- if header in config_dict:
- template[index] = line.replace("$", f"{config_dict[header]}")
-
- with open(os.path.join(SOURCE_DIR,'../build_msvc/BGL_config.h'), "w", encoding="utf8") as BGL_config:
- BGL_config.writelines(template)
-
-def set_properties(vcxproj_filename, placeholder, content):
- with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file:
- with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file:
- vcxproj_file.write(vcxproj_in_file.read().replace(placeholder, content))
-
-def main():
- parser = argparse.ArgumentParser(description='BGL-core msbuild configuration initialiser.')
- parser.add_argument('-toolset', nargs='?', default=DEFAULT_PLATFORM_TOOLSET,
- help='Optionally sets the msbuild platform toolset, e.g. v143 for Visual Studio 2022.'
- ' default is %s.'%DEFAULT_PLATFORM_TOOLSET)
- args = parser.parse_args()
- set_properties(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), '@TOOLSET@', args.toolset)
-
- for makefile_name in os.listdir(SOURCE_DIR):
- if 'Makefile' in makefile_name:
- parse_makefile(os.path.join(SOURCE_DIR, makefile_name))
- for key, value in lib_sources.items():
- vcxproj_filename = os.path.abspath(os.path.join(os.path.dirname(__file__), key, key + '.vcxproj'))
- content = ''
- for source_filename, object_filename in value:
- content += ' \n'
- content += ' $(IntDir)' + object_filename + '\n'
- content += ' \n'
- set_properties(vcxproj_filename, '@SOURCE_FILES@\n', content)
- parse_config_into_BGL_config()
- copyfile(os.path.join(SOURCE_DIR,'../build_msvc/BGL_config.h'), os.path.join(SOURCE_DIR, 'config/BGL-config.h'))
-
-if __name__ == '__main__':
- main()
diff --git a/build_msvc/test_BGL-qt/test_BGL-qt.vcxproj b/build_msvc/test_BGL-qt/test_BGL-qt.vcxproj
deleted file mode 100644
index aa49e1ccd6..0000000000
--- a/build_msvc/test_BGL-qt/test_BGL-qt.vcxproj
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
- {51201D5E-D939-4854-AE9D-008F03FF518E}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {2b4abff8-d1fd-4845-88c9-1f3c0a6512bf}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {1e065f03-3566-47d0-8fa9-daa72b084e7d}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
-
-
-
- ..\libBGL_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories)
-
-
- $(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies)
- /LTCG:OFF
-
-
-
-
-
- ..\libBGL_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories)
-
-
- $(QtDebugLibraries);%(AdditionalDependencies)
-
-
-
-
-
-
-
-
-
-
-
-
-
- There was an error executing the test_BGL-qt moc code generation task.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- moccode;
- $(BuildDependsOn);
-
-
-
-
- QtTestCleanGeneratedFiles;
- $(CleanDependsOn);
-
-
-
diff --git a/build_msvc/test_BGL/script_tests.json.gen b/build_msvc/test_BGL/script_tests.json.gen
deleted file mode 100644
index 4715b70beb..0000000000
--- a/build_msvc/test_BGL/script_tests.json.gen
+++ /dev/null
@@ -1,1213 +0,0 @@
-[
- "0x47 0x304402202f763ef88e392432743b924ae8e4b1c2d0d50c82f6daa3951f5381bda59e607b022064bdd1f2a1264d3eb7d81d6b640d99c7a895f6a4ab210396c026b63e98f642d501",
- "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "",
- "OK",
- "P2PK"
-],
-[
- "0x47 0x304402202f763ef88e392532743b924ae8e4b1c2d0d50c82f6daa3951f5381bda59e607b022064bdd1f2a1264d3eb7d81d6b640d99c7a895f6a4ab210396c026b63e98f642d501",
- "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "",
- "EVAL_FALSE",
- "P2PK, bad sig"
-],
-[
- "0x47 0x3044022027224977e7e5745cdd37b3bf09ec747c204d90f275bd116c51b351dac36c8b8102201dcc5e35101a889d2bac617e390751f324e2089dd7fd042e96d9ac78f32cf31f01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
- "DUP HASH160 0x14 0x1018853670f9f3b0582c5b9ee8ce93764ac32b93 EQUALVERIFY CHECKSIG",
- "",
- "OK",
- "P2PKH"
-],
-[
- "0x47 0x304402206fc4f0b1fa68a22ff0d25cfb40e3249b18c339c8d26a706f1e245699b4ecb1d60220552a7383dd3fdf726d04c2e80105a09dff2bfeb2fa3ed9499b0fef8951f68a3101 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
- "DUP HASH160 0x14 0xc0834c0c158f53be706d234c38fd52de7eece656 EQUALVERIFY CHECKSIG",
- "",
- "EQUALVERIFY",
- "P2PKH, bad pubkey"
-],
-[
- "0x47 0x304402204c3d1a627134a349d9f82a4ee6f52155522a9ea67ae4f1f488602600d750f3a902203036f487fef12e7a0d95d051e23bef80bd95fd140245c9006fb3b5c293b0aebf81",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
- "",
- "OK",
- "P2PK anyonecanpay"
-],
-[
- "0x47 0x304402204c3d1a627134a349d9f82a4ee6f52155522a9ea67ae4f1f488602600d750f3a902203036f487fef12e7a0d95d051e23bef80bd95fd140245c9006fb3b5c293b0aebf01",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
- "",
- "EVAL_FALSE",
- "P2PK anyonecanpay marked with normal hashtype"
-],
-[
- "0x47 0x304402203d9c2d90707437fa92ed333ab431b6c9f257843b235a6c791fbd086c0a390be6022020315ba8bb7e0a06c07ea9a4362feaa066fe01324a3d445688bf757843a6b65b01 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
- "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
- "P2SH",
- "OK",
- "P2SH(P2PK)"
-],
-[
- "0x47 0x304402203d9c2d90707437fa92ed333ab431b6c9f257843b235a6c791fbd086c0a390be6022020315ba8bb7e0a06c07ea9a4362feaa066fe01324a3d445688bf757843a6b65b01 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
- "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
- "P2SH",
- "EVAL_FALSE",
- "P2SH(P2PK), bad redeemscript"
-],
-[
- "0x47 0x3044022047a393ca3f3570cc1a5a6596d76f3ccdfee6d6ba1b892bfae6461b326a5a103502206bc10cdb27e34377b233d29a3906ba6b5036909e09413c1cf471e1940216c7ba01 0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x19 0x76a91491b24bf9f5288532960ac687abb035127b1d28a588ac",
- "HASH160 0x14 0x7f67f0521934a57d3039f77f9f32cf313f3ac74b EQUAL",
- "P2SH",
- "OK",
- "P2SH(P2PKH)"
-],
-[
- "0x47 0x304402200ae21021ae37a1993e49102af849b3a17a513ae3dee0381956745fb991e6d36a022019c3b053fa70b82860379e3981cbad42de338ff4258a7b546c41cffd5793d21401 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
- "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
- "",
- "OK",
- "P2SH(P2PKH), bad sig but no VERIFY_P2SH"
-],
-[
- "0x47 0x304402200ae21021ae37a1993e49102af849b3a17a513ae3dee0381956745fb991e6d36a022019c3b053fa70b82860379e3981cbad42de338ff4258a7b546c41cffd5793d21401 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
- "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
- "P2SH",
- "EQUALVERIFY",
- "P2SH(P2PKH), bad sig"
-],
-[
- "0 0x47 0x304402203e24a07d8f567bf7155dba218ae289b9a703ed3ce099c28bee8061b6d288599602203b8582b39d1a80771ef24542001e0a5685b9d861fb06de901570a28f4e84473401 0x47 0x304402205274eab62617650fea6dadee4c74296730d86770a706e453e9244701cb3cdb6c0220678c10a1b573066f996f48df3be1485f39dead6b7a77ea3c9da2302aabc4f1e001 0x47 0x3044022057c0ab36ad3717ff41b629bc425ff6919738a0c5608f37fb093091411435682b022072fd0b78a2fd360bfec6ad760510390dfbcf2c37c3b528f3fdcbffdb37273d9201",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
- "",
- "OK",
- "3-of-3"
-],
-[
- "0 0x47 0x304402203e24a07d8f567bf7155dba218ae289b9a703ed3ce099c28bee8061b6d288599602203b8582b39d1a80771ef24542001e0a5685b9d861fb06de901570a28f4e84473401 0x47 0x304402205274eab62617650fea6dadee4c74296730d86770a706e453e9244701cb3cdb6c0220678c10a1b573066f996f48df3be1485f39dead6b7a77ea3c9da2302aabc4f1e001 0",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
- "",
- "EVAL_FALSE",
- "3-of-3, 2 sigs"
-],
-[
- "0 0x47 0x3044022073fd5e9b77c017ccc6d3dec43b312773e0a24a653fde9e56fbff2c623352164a0220246e0bb4e146a3cc2feaf370e07f6ebabcabdd3e234dda48f111fbcad4fdb8ee01 0x47 0x30440220015b3e45cd1937f40aafd3851a56977c8b08afe218b2ce541ebcc7c6e74efd59022043ada940a1cad600ea3bd145729e7884bdba486e9715c1ce0bd9b3b6bb18893a01 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
- "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
- "P2SH",
- "OK",
- "P2SH(2-of-3)"
-],
-[
- "0 0x47 0x3044022073fd5e9b77c017ccc6d3dec43b312773e0a24a653fde9e56fbff2c623352164a0220246e0bb4e146a3cc2feaf370e07f6ebabcabdd3e234dda48f111fbcad4fdb8ee01 0 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
- "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
- "P2SH",
- "EVAL_FALSE",
- "P2SH(2-of-3), 1 sig"
-],
-[
- "0x47 0x3044022000222a93e4a99ed27f25a40894c548108c47dacc92ff7faf498012712af67bec022056af509a180ec1cc900a6e31d86536015b7451245270d1a9715ca460d5b30f9501",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "OK",
- "P2PK with too much R padding but no DERSIG"
-],
-[
- "0x47 0x3044022000222a93e4a99ed27f25a40894c548108c47dacc92ff7faf498012712af67bec022056af509a180ec1cc900a6e31d86536015b7451245270d1a9715ca460d5b30f9501",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "P2PK with too much R padding"
-],
-[
- "0x48 0x304502204faa6ee94c89550aa1be8ae6951bdceee018803e2b309e21091f5830b47056de02210033decc3b97a43bd1af08d23f62b4c8464002a8485ad5359626f415db9b8db14e01",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "OK",
- "P2PK with too much S padding but no DERSIG"
-],
-[
- "0x48 0x304502204faa6ee94c89550aa1be8ae6951bdceee018803e2b309e21091f5830b47056de02210033decc3b97a43bd1af08d23f62b4c8464002a8485ad5359626f415db9b8db14e01",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "P2PK with too much S padding"
-],
-[
- "0x47 0x30440220b0ff27d082f4f0ad7f74cb47c79c20510aa0d3ff0d142245984bd1592d8b3fea022043c8f45a85357afd4dfedeffb6ff25780549cd5a6b4e4de31b2a0b2bba2c55e601",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "OK",
- "P2PK with too little R padding but no DERSIG"
-],
-[
- "0x47 0x30440220b0ff27d082f4f0ad7f74cb47c79c20510aa0d3ff0d142245984bd1592d8b3fea022043c8f45a85357afd4dfedeffb6ff25780549cd5a6b4e4de31b2a0b2bba2c55e601",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "P2PK with too little R padding"
-],
-[
- "0x47 0x304402200026502aabf35664553416f619eeebbc7fb282702ce08f54d8d89d32a7407a54022027d8a81feabacb90c8b16cd4bff90a9b125652999534c8f52568c5e495bae2fe01",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
- "",
- "OK",
- "P2PK NOT with bad sig with too much R padding but no DERSIG"
-],
-[
- "0x47 0x304402200026502aabf35664553416f619eeebbc7fb282702ce08f54d8d89d32a7407a54022027d8a81feabacb90c8b16cd4bff90a9b125652999534c8f52568c5e495bae2fe01",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
- "DERSIG",
- "SIG_DER",
- "P2PK NOT with bad sig with too much R padding"
-],
-[
- "0x47 0x304402200026502aabf35764553416f619eeebbc7fb282702ce08f54d8d89d32a7407a54022027d8a81feabacb90c8b16cd4bff90a9b125652999534c8f52568c5e495bae2fe01",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
- "",
- "EVAL_FALSE",
- "P2PK NOT with too much R padding but no DERSIG"
-],
-[
- "0x47 0x304402200026502aabf35764553416f619eeebbc7fb282702ce08f54d8d89d32a7407a54022027d8a81feabacb90c8b16cd4bff90a9b125652999534c8f52568c5e495bae2fe01",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
- "DERSIG",
- "SIG_DER",
- "P2PK NOT with too much R padding"
-],
-[
- "0x47 0x30440220b0ff27d082f4f0ad7f74cb47c79c20510aa0d3ff0d142245984bd1592d8b3fea022043c8f45a85357afd4dfedeffb6ff25780549cd5a6b4e4de31b2a0b2bba2c55e601",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "OK",
- "BIP66 example 1, without DERSIG"
-],
-[
- "0x47 0x30440220b0ff27d082f4f0ad7f74cb47c79c20510aa0d3ff0d142245984bd1592d8b3fea022043c8f45a85357afd4dfedeffb6ff25780549cd5a6b4e4de31b2a0b2bba2c55e601",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 1, with DERSIG"
-],
-[
- "0x47 0x304402209159084ae48850881e3bf5848797e1d5441e8c82574193435c1424a65eb70de9022025926fb55795bc207dd3490c11fab0ff34814a41d6ed341a8e76abdf2ffba49f01",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "",
- "EVAL_FALSE",
- "BIP66 example 2, without DERSIG"
-],
-[
- "0x47 0x304402209159084ae48850881e3bf5848797e1d5441e8c82574193435c1424a65eb70de9022025926fb55795bc207dd3490c11fab0ff34814a41d6ed341a8e76abdf2ffba49f01",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 2, with DERSIG"
-],
-[
- "0",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "EVAL_FALSE",
- "BIP66 example 3, without DERSIG"
-],
-[
- "0",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "EVAL_FALSE",
- "BIP66 example 3, with DERSIG"
-],
-[
- "0",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "",
- "OK",
- "BIP66 example 4, without DERSIG"
-],
-[
- "0",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "DERSIG",
- "OK",
- "BIP66 example 4, with DERSIG"
-],
-[
- "1",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "",
- "EVAL_FALSE",
- "BIP66 example 5, without DERSIG"
-],
-[
- "1",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 5, with DERSIG"
-],
-[
- "1",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "",
- "OK",
- "BIP66 example 6, without DERSIG"
-],
-[
- "1",
- "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 6, with DERSIG"
-],
-[
- "0 0x47 0x304402208444cb9968d1554b3571a66a84987035dc088b8429d2e022c5f62a6fb6bf50ad022062ac1d278811b929b78f184658ccab04441ca59cab04dc2802ce9b6b95bcb41c01 0x47 0x30440220050e97f4e52d3eff0c311d5eb2ee951a8a1304ad5b2f3c93fb9c86048ab4d92002202efaafe9cf1c929ec0368c181425943bcefdcf27b2aca16b3177804e626520dc01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "",
- "OK",
- "BIP66 example 7, without DERSIG"
-],
-[
- "0 0x47 0x304402208444cb9968d1554b3571a66a84987035dc088b8429d2e022c5f62a6fb6bf50ad022062ac1d278811b929b78f184658ccab04441ca59cab04dc2802ce9b6b95bcb41c01 0x47 0x30440220050e97f4e52d3eff0c311d5eb2ee951a8a1304ad5b2f3c93fb9c86048ab4d92002202efaafe9cf1c929ec0368c181425943bcefdcf27b2aca16b3177804e626520dc01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 7, with DERSIG"
-],
-[
- "0 0x47 0x304402209e16f5d70a140a64c6188c316751486ce0b0119f8d754f885347c874a8184567022060affd6c89334882dd8561478f5223707637acd552f1302410418fe4082cc2db01 0x47 0x304402206467f4d178ed25e4be74fe930162f5c41a028250a0820dffe36443d86f403336022009f107641622ae98ebd40efea2fbafef9c264bc0bf19d949baaafb9ed68b1c1201",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "",
- "EVAL_FALSE",
- "BIP66 example 8, without DERSIG"
-],
-[
- "0 0x47 0x304402209e16f5d70a140a64c6188c316751486ce0b0119f8d754f885347c874a8184567022060affd6c89334882dd8561478f5223707637acd552f1302410418fe4082cc2db01 0x47 0x304402206467f4d178ed25e4be74fe930162f5c41a028250a0820dffe36443d86f403336022009f107641622ae98ebd40efea2fbafef9c264bc0bf19d949baaafb9ed68b1c1201",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 8, with DERSIG"
-],
-[
- "0 0 0x47 0x30440220d3b448d17d0a9d410ef9f34d72d3dfe1a32d576ca40fabf0ca5b2d53a7a600cf0220461274b58b82cb40e0b4cef91624c65065a895395f3033bd77686717bd9b28ac01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "",
- "EVAL_FALSE",
- "BIP66 example 9, without DERSIG"
-],
-[
- "0 0 0x47 0x30440220d3b448d17d0a9d410ef9f34d72d3dfe1a32d576ca40fabf0ca5b2d53a7a600cf0220461274b58b82cb40e0b4cef91624c65065a895395f3033bd77686717bd9b28ac01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 9, with DERSIG"
-],
-[
- "0 0 0x47 0x30440220f0419b58619ff6c6960001464bb743539a0e5bc28a452adccc63041e7338b58f02204371508fafd1661c8ecd378f2bdc646f2c1d2a25ae805cbbf25978a3594b07ae01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "",
- "OK",
- "BIP66 example 10, without DERSIG"
-],
-[
- "0 0 0x47 0x30440220f0419b58619ff6c6960001464bb743539a0e5bc28a452adccc63041e7338b58f02204371508fafd1661c8ecd378f2bdc646f2c1d2a25ae805cbbf25978a3594b07ae01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "DERSIG",
- "SIG_DER",
- "BIP66 example 10, with DERSIG"
-],
-[
- "0 0x47 0x304402208444cb9968d1554b3571a66a84987035dc088b8429d2e022c5f62a6fb6bf50ad022062ac1d278811b929b78f184658ccab04441ca59cab04dc2802ce9b6b95bcb41c01 0",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "",
- "EVAL_FALSE",
- "BIP66 example 11, without DERSIG"
-],
-[
- "0 0x47 0x304402208444cb9968d1554b3571a66a84987035dc088b8429d2e022c5f62a6fb6bf50ad022062ac1d278811b929b78f184658ccab04441ca59cab04dc2802ce9b6b95bcb41c01 0",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
- "DERSIG",
- "EVAL_FALSE",
- "BIP66 example 11, with DERSIG"
-],
-[
- "0 0x47 0x304402209e16f5d70a140a64c6188c316751486ce0b0119f8d754f885347c874a8184567022060affd6c89334882dd8561478f5223707637acd552f1302410418fe4082cc2db01 0",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "",
- "OK",
- "BIP66 example 12, without DERSIG"
-],
-[
- "0 0x47 0x304402209e16f5d70a140a64c6188c316751486ce0b0119f8d754f885347c874a8184567022060affd6c89334882dd8561478f5223707637acd552f1302410418fe4082cc2db01 0",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
- "DERSIG",
- "OK",
- "BIP66 example 12, with DERSIG"
-],
-[
- "0x48 0x304402206a2728a6798ad93944222b613eea2e9e8dfc39868db220f90f06d1c9b9f07b740220283b5b96d6f06933289dc30977e0524cd7018c01f1c8559d2d3b1c80b5cad67a0101",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
- "",
- "OK",
- "P2PK with multi-byte hashtype, without DERSIG"
-],
-[
- "0x48 0x304402206a2728a6798ad93944222b613eea2e9e8dfc39868db220f90f06d1c9b9f07b740220283b5b96d6f06933289dc30977e0524cd7018c01f1c8559d2d3b1c80b5cad67a0101",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
- "DERSIG",
- "SIG_DER",
- "P2PK with multi-byte hashtype, with DERSIG"
-],
-[
- "0x48 0x304502206a2728a6798ad93944222b613eea2e9e8dfc39868db220f90f06d1c9b9f07b74022100d7c4a469290f96ccd7623cf6881fadb1e3ad50e4bd804a9e9297420c1a6b6ac701",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
- "",
- "OK",
- "P2PK with high S but no LOW_S"
-],
-[
- "0x48 0x304502206a2728a6798ad93944222b613eea2e9e8dfc39868db220f90f06d1c9b9f07b74022100d7c4a469290f96ccd7623cf6881fadb1e3ad50e4bd804a9e9297420c1a6b6ac701",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
- "LOW_S",
- "SIG_HIGH_S",
- "P2PK with high S"
-],
-[
- "0x47 0x3044022071d3ef65cf3e012353a4e1ffaa56240f071caf097053ff28c8d5d11335709ad9022066d7db6104fd18f59104f2b148b30d320d115c7fae8a7733ec0c35e93537082b01",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "",
- "OK",
- "P2PK with hybrid pubkey but no STRICTENC"
-],
-[
- "0x47 0x3044022071d3ef65cf3e012353a4e1ffaa56240f071caf097053ff28c8d5d11335709ad9022066d7db6104fd18f59104f2b148b30d320d115c7fae8a7733ec0c35e93537082b01",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "STRICTENC",
- "PUBKEYTYPE",
- "P2PK with hybrid pubkey"
-],
-[
- "0x47 0x3044022037981565c1f0af558cd1f04c2c93bed46ef998f37e6a8cfabf1bf640157a0f1002202de6f60321899e7e89ae03f4cfe24a7eca4ebeb4c5deba0e11f365e4ffa2e82001",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
- "",
- "EVAL_FALSE",
- "P2PK NOT with hybrid pubkey but no STRICTENC"
-],
-[
- "0x47 0x3044022037981565c1f0af558cd1f04c2c93bed46ef998f37e6a8cfabf1bf640157a0f1002202de6f60321899e7e89ae03f4cfe24a7eca4ebeb4c5deba0e11f365e4ffa2e82001",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
- "STRICTENC",
- "PUBKEYTYPE",
- "P2PK NOT with hybrid pubkey"
-],
-[
- "0x47 0x3044022037981565c1f0ae558cd1f04c2c93bed46ef998f37e6a8cfabf1bf640157a0f1002202de6f60321899e7e89ae03f4cfe24a7eca4ebeb4c5deba0e11f365e4ffa2e82001",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
- "",
- "OK",
- "P2PK NOT with invalid hybrid pubkey but no STRICTENC"
-],
-[
- "0x47 0x3044022037981565c1f0ae558cd1f04c2c93bed46ef998f37e6a8cfabf1bf640157a0f1002202de6f60321899e7e89ae03f4cfe24a7eca4ebeb4c5deba0e11f365e4ffa2e82001",
- "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
- "STRICTENC",
- "PUBKEYTYPE",
- "P2PK NOT with invalid hybrid pubkey"
-],
-[
- "0 0x47 0x304402201f7a091a0de31f9c62a42dd521e6099b1e0050175a71f65479fae5f323b3f96f022037a595d1a1c3e32a47d7b57edb4e3ca140c4b8060fa7d39dfab2b3a555ae4c1501",
- "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
- "",
- "OK",
- "1-of-2 with the second 1 hybrid pubkey and no STRICTENC"
-],
-[
- "0 0x47 0x304402201f7a091a0de31f9c62a42dd521e6099b1e0050175a71f65479fae5f323b3f96f022037a595d1a1c3e32a47d7b57edb4e3ca140c4b8060fa7d39dfab2b3a555ae4c1501",
- "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
- "STRICTENC",
- "OK",
- "1-of-2 with the second 1 hybrid pubkey"
-],
-[
- "0 0x47 0x304402204934e0d2ed505fed6109948a68b225fc727623e4fbc494ec29dce0b46aaa18c6022027c7e1a16c5f7d65d31338d40416516d871fa811c15bf476675ded4f8ec41ba801",
- "1 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 2 CHECKMULTISIG",
- "STRICTENC",
- "PUBKEYTYPE",
- "1-of-2 with the first 1 hybrid pubkey"
-],
-[
- "0x47 0x3044022049703259b59bf68deaeddf553bd59d2c936c9dee452f7960383550bc7020bf990220690e6599bda6d703f4fce1fa928f907e09e045a1063d073b1c63116756039bb605",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
- "",
- "OK",
- "P2PK with undefined hashtype but no STRICTENC"
-],
-[
- "0x47 0x3044022049703259b59bf68deaeddf553bd59d2c936c9dee452f7960383550bc7020bf990220690e6599bda6d703f4fce1fa928f907e09e045a1063d073b1c63116756039bb605",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
- "STRICTENC",
- "SIG_HASHTYPE",
- "P2PK with undefined hashtype"
-],
-[
- "0x47 0x304402200dcee0a3e9637deb2e055705b84e89463b2d90e9f56eafe904735e1751ad19a302202c0b89c6a5269fe29c33a9913c1769b706d63aeadad4ed3c9d09409d13d00f5d05",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
- "",
- "OK",
- "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC"
-],
-[
- "0x47 0x304402200dcee0a3e9637deb2e055705b84e89463b2d90e9f56eafe904735e1751ad19a302202c0b89c6a5269fe29c33a9913c1769b706d63aeadad4ed3c9d09409d13d00f5d05",
- "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
- "STRICTENC",
- "SIG_HASHTYPE",
- "P2PK NOT with invalid sig and undefined hashtype"
-],
-[
- "1 0x47 0x304402203e24a07d8f567bf7155dba218ae289b9a703ed3ce099c28bee8061b6d288599602203b8582b39d1a80771ef24542001e0a5685b9d861fb06de901570a28f4e84473401 0x47 0x304402205274eab62617650fea6dadee4c74296730d86770a706e453e9244701cb3cdb6c0220678c10a1b573066f996f48df3be1485f39dead6b7a77ea3c9da2302aabc4f1e001 0x47 0x3044022057c0ab36ad3717ff41b629bc425ff6919738a0c5608f37fb093091411435682b022072fd0b78a2fd360bfec6ad760510390dfbcf2c37c3b528f3fdcbffdb37273d9201",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
- "",
- "OK",
- "3-of-3 with nonzero dummy but no NULLDUMMY"
-],
-[
- "1 0x47 0x304402203e24a07d8f567bf7155dba218ae289b9a703ed3ce099c28bee8061b6d288599602203b8582b39d1a80771ef24542001e0a5685b9d861fb06de901570a28f4e84473401 0x47 0x304402205274eab62617650fea6dadee4c74296730d86770a706e453e9244701cb3cdb6c0220678c10a1b573066f996f48df3be1485f39dead6b7a77ea3c9da2302aabc4f1e001 0x47 0x3044022057c0ab36ad3717ff41b629bc425ff6919738a0c5608f37fb093091411435682b022072fd0b78a2fd360bfec6ad760510390dfbcf2c37c3b528f3fdcbffdb37273d9201",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
- "NULLDUMMY",
- "SIG_NULLDUMMY",
- "3-of-3 with nonzero dummy"
-],
-[
- "1 0x47 0x304402201342b5f5b76d5df0d5a9bd1347ab151802c2b0d9b73d1f5ff319b9233c0b45dc02200e57936b0224558928675d4a4de39f5f4a06e63a0e583cce51e4868468f026f801 0x47 0x304402204d9d0484262a62e1a186be28421be84ccf8c36f8c6cf0cee249553712b9c72fd02205095ae7bb131ae84ac5aa50c2f6a4f720a55141924975544d73495a2571f4d1501 0x47 0x304402201169c76a279796902f8b3ffb396034c5c49a06e4482666149ce5fc6cb647671602204ae473ac10d898d9da7c46d93d6f941ba4f0991818823713b1382e9930acbeea01",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
- "",
- "OK",
- "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY"
-],
-[
- "1 0x47 0x304402201342b5f5b76d5df0d5a9bd1347ab151802c2b0d9b73d1f5ff319b9233c0b45dc02200e57936b0224558928675d4a4de39f5f4a06e63a0e583cce51e4868468f026f801 0x47 0x304402204d9d0484262a62e1a186be28421be84ccf8c36f8c6cf0cee249553712b9c72fd02205095ae7bb131ae84ac5aa50c2f6a4f720a55141924975544d73495a2571f4d1501 0x47 0x304402201169c76a279796902f8b3ffb396034c5c49a06e4482666149ce5fc6cb647671602204ae473ac10d898d9da7c46d93d6f941ba4f0991818823713b1382e9930acbeea01",
- "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
- "NULLDUMMY",
- "SIG_NULLDUMMY",
- "3-of-3 NOT with invalid sig with nonzero dummy"
-],
-[
- "0 0x47 0x304402201bd5e3ac832002ed5c2fe24e99c2a789ee4df65e5a6f71971173bb1c9083b9c5022029cb9caa5e735bb47f6497a23b762454444b17492d51ae5e9f66ecc6b2c7abbd01 DUP",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
- "",
- "OK",
- "2-of-2 with two identical keys and sigs pushed using OP_DUP but no SIGPUSHONLY"
-],
-[
- "0 0x47 0x304402201bd5e3ac832002ed5c2fe24e99c2a789ee4df65e5a6f71971173bb1c9083b9c5022029cb9caa5e735bb47f6497a23b762454444b17492d51ae5e9f66ecc6b2c7abbd01 DUP",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
- "SIGPUSHONLY",
- "SIG_PUSHONLY",
- "2-of-2 with two identical keys and sigs pushed using OP_DUP"
-],
-[
- "0x47 0x30440220285b69cc93cd00d0025875cbc78bd4802bb3eea703233274243dd6f695d87af5022071c3a797a9221400ae1efbd9d061c53257e1779ae2b5bc78d569e46d7503d72e01 NOP8 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
- "HASH160 0x14 0x215640c2f72f0d16b4eced26762035a42ffed39a EQUAL",
- "",
- "OK",
- "P2SH(P2PK) with non-push scriptSig but no P2SH or SIGPUSHONLY"
-],
-[
- "0x47 0x304402206a2728a6798ad93944222b613eea2e9e8dfc39868db220f90f06d1c9b9f07b740220283b5b96d6f06933289dc30977e0524cd7018c01f1c8559d2d3b1c80b5cad67a01 NOP8",
- "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
- "",
- "OK",
- "P2PK with non-push scriptSig but with P2SH validation"
-],
-[
- "0x47 0x30440220285b69cc93cd00d0025875cbc78bd4802bb3eea703233274243dd6f695d87af5022071c3a797a9221400ae1efbd9d061c53257e1779ae2b5bc78d569e46d7503d72e01 NOP8 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
- "HASH160 0x14 0x215640c2f72f0d16b4eced26762035a42ffed39a EQUAL",
- "P2SH",
- "SIG_PUSHONLY",
- "P2SH(P2PK) with non-push scriptSig but no SIGPUSHONLY"
-],
-[
- "0x47 0x30440220285b69cc93cd00d0025875cbc78bd4802bb3eea703233274243dd6f695d87af5022071c3a797a9221400ae1efbd9d061c53257e1779ae2b5bc78d569e46d7503d72e01 NOP8 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
- "HASH160 0x14 0x215640c2f72f0d16b4eced26762035a42ffed39a EQUAL",
- "SIGPUSHONLY",
- "SIG_PUSHONLY",
- "P2SH(P2PK) with non-push scriptSig but not P2SH"
-],
-[
- "0 0x47 0x304402201bd5e3ac832002ed5c2fe24e99c2a789ee4df65e5a6f71971173bb1c9083b9c5022029cb9caa5e735bb47f6497a23b762454444b17492d51ae5e9f66ecc6b2c7abbd01 0x47 0x304402201bd5e3ac832002ed5c2fe24e99c2a789ee4df65e5a6f71971173bb1c9083b9c5022029cb9caa5e735bb47f6497a23b762454444b17492d51ae5e9f66ecc6b2c7abbd01",
- "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
- "SIGPUSHONLY",
- "OK",
- "2-of-2 with two identical keys and sigs pushed"
-],
-[
- "11 0x47 0x304402202f763ef88e392432743b924ae8e4b1c2d0d50c82f6daa3951f5381bda59e607b022064bdd1f2a1264d3eb7d81d6b640d99c7a895f6a4ab210396c026b63e98f642d501",
- "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "P2SH",
- "OK",
- "P2PK with unnecessary input but no CLEANSTACK"
-],
-[
- "11 0x47 0x304402202f763ef88e392432743b924ae8e4b1c2d0d50c82f6daa3951f5381bda59e607b022064bdd1f2a1264d3eb7d81d6b640d99c7a895f6a4ab210396c026b63e98f642d501",
- "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "CLEANSTACK,P2SH",
- "CLEANSTACK",
- "P2PK with unnecessary input"
-],
-[
- "11 0x47 0x304402200a0db51699a4546f888907ede3a35123d78eae08c1a8e691db40b222839835ad022066c146b6cc02c036ae79dafe3dc7f7eb85a169649857ee7279fcae151fa9a75d01 0x43 0x410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- "HASH160 0x14 0x31edc23bdafda4639e669f89ad6b2318dd79d032 EQUAL",
- "P2SH",
- "OK",
- "P2SH with unnecessary input but no CLEANSTACK"
-],
-[
- "11 0x47 0x304402200a0db51699a4546f888907ede3a35123d78eae08c1a8e691db40b222839835ad022066c146b6cc02c036ae79dafe3dc7f7eb85a169649857ee7279fcae151fa9a75d01 0x43 0x410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- "HASH160 0x14 0x31edc23bdafda4639e669f89ad6b2318dd79d032 EQUAL",
- "CLEANSTACK,P2SH",
- "CLEANSTACK",
- "P2SH with unnecessary input"
-],
-[
- "0x47 0x304402200a0db51699a4546f888907ede3a35123d78eae08c1a8e691db40b222839835ad022066c146b6cc02c036ae79dafe3dc7f7eb85a169649857ee7279fcae151fa9a75d01 0x43 0x410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- "HASH160 0x14 0x31edc23bdafda4639e669f89ad6b2318dd79d032 EQUAL",
- "CLEANSTACK,P2SH",
- "OK",
- "P2SH with CLEANSTACK"
-],
-[
- [
- "3044022016352dc8c84b9b890fb6fd1ae9114aa3d8a845e69daf69f6071ec17479a0aa1e0220045ce064147e898b5f0b2bea963079906d5adb6231b44f134949d180e7f87cd801",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000001
- ],
- "",
- "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "P2SH,WITNESS",
- "OK",
- "Basic P2WSH"
-],
-[
- [
- "3044022037eb6edecc0cb2c2e2e6f234ba0dfbdac659d0035ea281478f46645f93cb2a710220162a33f108462c4216d346801f10b81ccf88498fe7d5af13a5c07fbb659398d201",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000001
- ],
- "",
- "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "P2SH,WITNESS",
- "OK",
- "Basic P2WPKH"
-],
-[
- [
- "3044022048300b4f6df240fd6d99b3f4a05de1853f1ae119cc0a592ad42436b146a2554a022005bfcfafd70126204f27ad3b889f82c21c6182f9e51ff0609541eecc52e96f9701",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000001
- ],
- "0x22 0x0020b95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "HASH160 0x14 0xf386c2ba255cc56d20cfa6ea8b062f8b59945518 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "Basic P2SH(P2WSH)"
-],
-[
- [
- "3044022031232887440f3e8b8b737cd2d2752dd90dcd8a7dd367cbfdc83368e2849e2cea022061a3f1b809ea4b31af0543b36645ddd9247f357abcc20da9e502f82ea7a5abfa01",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000001
- ],
- "0x16 0x001491b24bf9f5288532960ac687abb035127b1d28a5",
- "HASH160 0x14 0x17743beb429c55c942d2ec703b98c4d57c2df5c6 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "Basic P2SH(P2WPKH)"
-],
-[
- [
- "304402203cf006faf2c63553330d5cf0d6e754629f36db171dcc5ac213e4a0259c533eec02203e0ab4b8637e0f4f386a565d12fbe1e261e910ee60be1cac05cfe423233c961b01",
- "41048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26cafac",
- 0.00000000
- ],
- "",
- "0 0x20 0xac8ebd9e52c17619a381fa4f71aebb696087c6ef17c960fd0587addad99c0610",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2WSH with the wrong key"
-],
-[
- [
- "3044022072a8d9e01b0fa3cf6d2e7d9970507499c5b3f59fc9ab8307e2e76af86adf40ef02203ae0ea2ef2a81d62d9e6703081308cea5efcbb0ae1bae3c91241310b94712ab501",
- "048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf",
- 0.00000000
- ],
- "",
- "0 0x14 0x7cf9c846cd4882efec4bf07e44ebdad495c94f4b",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2WPKH with the wrong key"
-],
-[
- [
- "304402203204e3898f15bf02602d6c130adf9b11ee9c44e2ac4752ccee115ab8ce0c17e30220719bdc69363e2fc60fc758ae71ea30a53aa9babad7ce27f0a0331099e362725001",
- "41048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26cafac",
- 0.00000000
- ],
- "0x22 0x0020ac8ebd9e52c17619a381fa4f71aebb696087c6ef17c960fd0587addad99c0610",
- "HASH160 0x14 0x61039a003883787c0d6ebc66d97fdabe8e31449d EQUAL",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2SH(P2WSH) with the wrong key"
-],
-[
- [
- "304402205afa9c6cfe060e637533e86fe93218328764dba3a68b613104a04613c08a592402204d30c8707ccd6ce38d72c9d4e900a413e58ffa5225e8855cefececbb86b822fb01",
- "048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf",
- 0.00000000
- ],
- "0x16 0x00147cf9c846cd4882efec4bf07e44ebdad495c94f4b",
- "HASH160 0x14 0x4e0c2aed91315303fc6a1dc4c7bc21c88f75402e EQUAL",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2SH(P2WPKH) with the wrong key"
-],
-[
- [
- "304402203cf006faf2c63553330d5cf0d6e754629f36db171dcc5ac213e4a0259c533eec02203e0ab4b8637e0f4f386a565d12fbe1e261e910ee60be1cac05cfe423233c961b01",
- "41048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26cafac",
- 0.00000000
- ],
- "",
- "0 0x20 0xac8ebd9e52c17619a381fa4f71aebb696087c6ef17c960fd0587addad99c0610",
- "P2SH",
- "OK",
- "Basic P2WSH with the wrong key but no WITNESS"
-],
-[
- [
- "3044022072a8d9e01b0fa3cf6d2e7d9970507499c5b3f59fc9ab8307e2e76af86adf40ef02203ae0ea2ef2a81d62d9e6703081308cea5efcbb0ae1bae3c91241310b94712ab501",
- "048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf",
- 0.00000000
- ],
- "",
- "0 0x14 0x7cf9c846cd4882efec4bf07e44ebdad495c94f4b",
- "P2SH",
- "OK",
- "Basic P2WPKH with the wrong key but no WITNESS"
-],
-[
- [
- "304402203204e3898f15bf02602d6c130adf9b11ee9c44e2ac4752ccee115ab8ce0c17e30220719bdc69363e2fc60fc758ae71ea30a53aa9babad7ce27f0a0331099e362725001",
- "41048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26cafac",
- 0.00000000
- ],
- "0x22 0x0020ac8ebd9e52c17619a381fa4f71aebb696087c6ef17c960fd0587addad99c0610",
- "HASH160 0x14 0x61039a003883787c0d6ebc66d97fdabe8e31449d EQUAL",
- "P2SH",
- "OK",
- "Basic P2SH(P2WSH) with the wrong key but no WITNESS"
-],
-[
- [
- "304402205afa9c6cfe060e637533e86fe93218328764dba3a68b613104a04613c08a592402204d30c8707ccd6ce38d72c9d4e900a413e58ffa5225e8855cefececbb86b822fb01",
- "048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf",
- 0.00000000
- ],
- "0x16 0x00147cf9c846cd4882efec4bf07e44ebdad495c94f4b",
- "HASH160 0x14 0x4e0c2aed91315303fc6a1dc4c7bc21c88f75402e EQUAL",
- "P2SH",
- "OK",
- "Basic P2SH(P2WPKH) with the wrong key but no WITNESS"
-],
-[
- [
- "3044022075aab81ee7463c1a620841f8a405109cac9554481c38e6f5edd6176490be21ce022072875f38877fb5886b6dd296f7b924c8df097f3fe4881e50f4b7a0ed835e110701",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000000
- ],
- "",
- "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2WSH with wrong value"
-],
-[
- [
- "304402202f6a8a562a3cb46704b8f3fc99b756896b3666d95a671d0b6f9d472b1bf9be7502203411cc79d21b12442c9df76788261f228a209f9482905dbb8ec165265fbc662c01",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000000
- ],
- "",
- "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2WPKH with wrong value"
-],
-[
- [
- "30440220131f9e4ea76f2db299a76cb224cb421f5e6c1ccc71576aff1fea6dfef5ddf91c0220025966e1259162813e2cf4f502f5cd877b588ce813e93d02b4cb7b5e5ce33f8701",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000000
- ],
- "0x22 0x0020b95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "HASH160 0x14 0xf386c2ba255cc56d20cfa6ea8b062f8b59945518 EQUAL",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2SH(P2WSH) with wrong value"
-],
-[
- [
- "3044022064ec31fcdc57ccfc46de3359e152b119c79074391caa4a9cce6794773bc1eb82022071be8cdda130352afd29fb61d65a526b032709bff7cdf564ffb4315dfe187c1701",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000000
- ],
- "0x16 0x001491b24bf9f5288532960ac687abb035127b1d28a5",
- "HASH160 0x14 0x17743beb429c55c942d2ec703b98c4d57c2df5c6 EQUAL",
- "P2SH,WITNESS",
- "EVAL_FALSE",
- "Basic P2SH(P2WPKH) with wrong value"
-],
-[
- [
- "304402203973920538dc9890a9d7e427bbccf99f74ed314bb20122fffe4edeadc17959fe02205c27ada4bdf198b0e3be3bcad458a727c8263b4f33b1d423d1deef9c01b3e7d501",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000000
- ],
- "",
- "1 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM,P2SH,WITNESS",
- "DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",
- "P2WPKH with future witness version"
-],
-[
- [
- "304402207e0165db8d60508f472b91f733f8d8a7d035ac8739f25eb9eb21aed113438ffb02205d08bd991e024075165afd17414ad5e33c3940b2df20c322f01da06e3ec6de9801",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000000
- ],
- "",
- "0 0x1f 0xb34b78da162751647974d5cb7410aa428ad339dbf7d1e16e833f68a0cbf1c3",
- "P2SH,WITNESS",
- "WITNESS_PROGRAM_WRONG_LENGTH",
- "P2WPKH with wrong witness program length"
-],
-[
- "",
- "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "P2SH,WITNESS",
- "WITNESS_PROGRAM_WITNESS_EMPTY",
- "P2WSH with empty witness"
-],
-[
- [
- "3044022060011fdebc01a685426a5013f20b7c82682e1f891532a3053a0d8ec020f96dc7022024ce6f81fcfcfe3ebd0b73b395b4517dff6be7b61ceb2c187710fd01cb99176f01",
- "400479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000000
- ],
- "",
- "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "P2SH,WITNESS",
- "WITNESS_PROGRAM_MISMATCH",
- "P2WSH with witness program mismatch"
-],
-[
- [
- "304402205b42381c8ce93c1e271ff9b545a8d492383892bc5aa9f2e31721f9a47f323f3c022028b1e4fec4070ebb0c08783ef5779ec1fd3cccdb25cea2dd0a38a8786cc816e101",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- "",
- 0.00000000
- ],
- "",
- "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "P2SH,WITNESS",
- "WITNESS_PROGRAM_MISMATCH",
- "P2WPKH with witness program mismatch"
-],
-[
- [
- "304402205b42381c8ce93c1e271ff9b545a8d492383892bc5aa9f2e31721f9a47f323f3c022028b1e4fec4070ebb0c08783ef5779ec1fd3cccdb25cea2dd0a38a8786cc816e101",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000000
- ],
- "11",
- "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "P2SH,WITNESS",
- "WITNESS_MALLEATED",
- "P2WPKH with non-empty scriptSig"
-],
-[
- [
- "304402205afa9c6cfe060e637533e86fe93218328764dba3a68b613104a04613c08a592402204d30c8707ccd6ce38d72c9d4e900a413e58ffa5225e8855cefececbb86b822fb01",
- "048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf",
- 0.00000000
- ],
- "11 0x16 0x00147cf9c846cd4882efec4bf07e44ebdad495c94f4b",
- "HASH160 0x14 0x4e0c2aed91315303fc6a1dc4c7bc21c88f75402e EQUAL",
- "P2SH,WITNESS",
- "WITNESS_MALLEATED_P2SH",
- "P2SH(P2WPKH) with superfluous push in scriptSig"
-],
-[
- [
- "",
- 0.00000000
- ],
- "0x47 0x304402202f763ef88e392432743b924ae8e4b1c2d0d50c82f6daa3951f5381bda59e607b022064bdd1f2a1264d3eb7d81d6b640d99c7a895f6a4ab210396c026b63e98f642d501",
- "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
- "P2SH,WITNESS",
- "WITNESS_UNEXPECTED",
- "P2PK with witness"
-],
-[
- [
- "304402207c190909d6e5d0e8e577443ea4ea42faa21759e78fdcf2a54eec8fccbf1204f50220695771734ff79d77ba5370cd780ba9d53367ca0d4016301fa7926bfda936545901",
- "210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
- 0.00000001
- ],
- "",
- "0 0x20 0x1863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "Basic P2WSH with compressed key"
-],
-[
- [
- "304402207a1af4309e75e7b4639b75c2421bd4e2a25efc98d35756c4cb3c11c1aa78e18c022001454df5608eee3ac424b3de122f2d71a8fc01fbdba60161b13ec3a1d1c1a19a01",
- "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
- 0.00000001
- ],
- "",
- "0 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "Basic P2WPKH with compressed key"
-],
-[
- [
- "30440220282f5a767a5173e3b612f988dad5767e584025f106c7973b2b0e976dc9dcf46202202cd6d87df00bc30041cb64ff3ee8cb083e9363268d6d0c626439443cc7bec2f901",
- "210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
- 0.00000001
- ],
- "0x22 0x00201863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262",
- "HASH160 0x14 0xe4300531190587e3880d4c3004f5355d88ff928d EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "Basic P2SH(P2WSH) with compressed key"
-],
-[
- [
- "304402203e35b5cf57fce0dc264f83d49323269674e1f955a1f8a9355599406350ad1cc202201e5cd13125e2e0fa9c3f86167c4f48753126270de709ab661097f84fd1e816a601",
- "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
- 0.00000001
- ],
- "0x16 0x0014751e76e8199196d454941c45d1b3a323f1433bd6",
- "HASH160 0x14 0xbcfeb728b584253d5f3f70bcb780e9ef218a68f4 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "Basic P2SH(P2WPKH) with compressed key"
-],
-[
- [
- "3044022016352dc8c84b9b890fb6fd1ae9114aa3d8a845e69daf69f6071ec17479a0aa1e0220045ce064147e898b5f0b2bea963079906d5adb6231b44f134949d180e7f87cd801",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000001
- ],
- "",
- "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "Basic P2WSH"
-],
-[
- [
- "3044022037eb6edecc0cb2c2e2e6f234ba0dfbdac659d0035ea281478f46645f93cb2a710220162a33f108462c4216d346801f10b81ccf88498fe7d5af13a5c07fbb659398d201",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000001
- ],
- "",
- "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "Basic P2WPKH"
-],
-[
- [
- "3044022048300b4f6df240fd6d99b3f4a05de1853f1ae119cc0a592ad42436b146a2554a022005bfcfafd70126204f27ad3b889f82c21c6182f9e51ff0609541eecc52e96f9701",
- "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac",
- 0.00000001
- ],
- "0x22 0x0020b95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64",
- "HASH160 0x14 0xf386c2ba255cc56d20cfa6ea8b062f8b59945518 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "Basic P2SH(P2WSH)"
-],
-[
- [
- "3044022031232887440f3e8b8b737cd2d2752dd90dcd8a7dd367cbfdc83368e2849e2cea022061a3f1b809ea4b31af0543b36645ddd9247f357abcc20da9e502f82ea7a5abfa01",
- "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
- 0.00000001
- ],
- "0x16 0x001491b24bf9f5288532960ac687abb035127b1d28a5",
- "HASH160 0x14 0x17743beb429c55c942d2ec703b98c4d57c2df5c6 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "Basic P2SH(P2WPKH)"
-],
-[
- [
- "",
- "30440220362ac7e95571015b7dafeccc6c1365a166f17c4eeedeac1cb13e447dc430491202202133556011ae59bf4972da83559b0ff860ecc3260fc39dbe6fbc7c4ed384471201",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x06c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2WSH CHECKMULTISIG with compressed keys"
-],
-[
- [
- "",
- "304402201336601eddba440c6a887aada531b306a9697b0caee950beeae2f2403c5f67ed02204a5a997c95baa369f504885b30cd011da29a580564915d603118ceba8dd144b901",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x002006c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460",
- "HASH160 0x14 0x26282aad7c29369d15fed062a778b6100d31a340 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG with compressed keys"
-],
-[
- [
- "",
- "304402207ab7d09e1e999569dcef95f5dea8f9351e94a9ebedb79f44e07b19ad1d94bc0b022016b379168db9ecd1d4f772f6b041053102da11543005c894a0ec5e63c550759e01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x06c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2WSH CHECKMULTISIG with compressed keys"
-],
-[
- [
- "",
- "304402205a9b79fdc350fda415133e29a6f2014977968356f340163a07d3f1943e557144022054e5aab5db5efb99831168323729053b5d9b48c3fe91231fb910c5e5b5c91e7b01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x002006c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460",
- "HASH160 0x14 0x26282aad7c29369d15fed062a778b6100d31a340 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG with compressed keys"
-],
-[
- [
- "",
- "304402201bdb094968744526ec1c520bdd55bf60bba7d777b7e489505d7ccf7124249519022057abae6935a7b29927799c4444e6cbb3dc0c595697e686fb8c6d9572710e769901",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "P2SH,WITNESS",
- "OK",
- "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "304402203d7927f23280a3e073319cd7e185c52ed90eb0042ad522580f03886a9a4f164f0220028f740448c2c994cd419e569afd8250a89f71339aab2c35a5a4e830de2a159901",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG first key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "304402201bdb094968744526ec1c520bdd55bf60bba7d777b7e489505d7ccf7124249519022057abae6935a7b29927799c4444e6cbb3dc0c595697e686fb8c6d9572710e769901",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "304402203d7927f23280a3e073319cd7e185c52ed90eb0042ad522580f03886a9a4f164f0220028f740448c2c994cd419e569afd8250a89f71339aab2c35a5a4e830de2a159901",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "304402200cbdc65fb1e630b69805d8c81c3cfdbf815640413caf8f8a702a09ac260fa5a7022059c2ba0c3c0834b79ad28b1b48a6c3249cda4f44d2a27623ff22855a9533d30b01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "P2SH,WITNESS",
- "OK",
- "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "30440220603b2b7c5a431eb438bece11e58e7e8ff3ac68be9ffef44f8b491913e8ccd06c022058dfe13abfcee8606d6725ccd1c2267b6c937fcab4342017535e4408a607785c01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "304402200cbdc65fb1e630b69805d8c81c3cfdbf815640413caf8f8a702a09ac260fa5a7022059c2ba0c3c0834b79ad28b1b48a6c3249cda4f44d2a27623ff22855a9533d30b01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "30440220603b2b7c5a431eb438bece11e58e7e8ff3ac68be9ffef44f8b491913e8ccd06c022058dfe13abfcee8606d6725ccd1c2267b6c937fcab4342017535e4408a607785c01",
- "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae",
- 0.00000001
- ],
- "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa",
- "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "30440220140fe1d19f61d597812ac6367db8dbed6def1708d1f97671ed256370e3741a2002207c4adc2a4cd36601e6c3a0f5d7bb4c5f99db81bbb17b5554f040e6d0e49319d601",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "P2SH,WITNESS",
- "OK",
- "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "3044022079d9040b4debff97d50c66a3d2c16b27d109508baab5f63a4137b5b091d57cb0022035e7ae4cb59ee5b0bb6a1699e074c0738301203f482ccff2ba79f0bafc0b586f01",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG second key uncompressed and signing with the first key"
-],
-[
- [
- "",
- "30440220140fe1d19f61d597812ac6367db8dbed6def1708d1f97671ed256370e3741a2002207c4adc2a4cd36601e6c3a0f5d7bb4c5f99db81bbb17b5554f040e6d0e49319d601",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used"
-],
-[
- [
- "",
- "3044022079d9040b4debff97d50c66a3d2c16b27d109508baab5f63a4137b5b091d57cb0022035e7ae4cb59ee5b0bb6a1699e074c0738301203f482ccff2ba79f0bafc0b586f01",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used"
-],
-[
- [
- "",
- "30440220339730b62971f96a76020e5e3204940a5f1f4195c696b0dd9e5e7e231ecf3107022071f01fca2641f13d6a9e3c16220b89dcb0f27803981637aa039ad0af7e3da07701",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "P2SH,WITNESS",
- "OK",
- "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "304402204d12cdd54acab2575f7887111867a5f8b2c048b71f530a6b8169df54538373cc022079ce82062677aba2232456034fad18519cac583dc6eef6097e71ff8c9d69b6bc01",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL",
- "P2SH,WITNESS",
- "OK",
- "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "30440220339730b62971f96a76020e5e3204940a5f1f4195c696b0dd9e5e7e231ecf3107022071f01fca2641f13d6a9e3c16220b89dcb0f27803981637aa039ad0af7e3da07701",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "",
- "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key"
-],
-[
- [
- "",
- "304402204d12cdd54acab2575f7887111867a5f8b2c048b71f530a6b8169df54538373cc022079ce82062677aba2232456034fad18519cac583dc6eef6097e71ff8c9d69b6bc01",
- "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae",
- 0.00000001
- ],
- "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb",
- "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL",
- "P2SH,WITNESS,WITNESS_PUBKEYTYPE",
- "WITNESS_PUBKEYTYPE",
- "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key"
-],
diff --git a/build_msvc/test_BGL/test_BGL.vcxproj b/build_msvc/test_BGL/test_BGL.vcxproj
deleted file mode 100644
index 8d6c9f3e5d..0000000000
--- a/build_msvc/test_BGL/test_BGL.vcxproj
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
- {A56B73DB-D46D-4882-8374-1FE3FFA08F07}
-
-
- Application
- $(SolutionDir)$(Platform)\$(Configuration)\
-
-
-
-
-
-
-
-
-
-
-
-
-
- {542007e3-be0d-4b0d-a6b0-aa8813e2558d}
-
-
- {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
-
-
- {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
-
-
- {7c87e378-df58-482e-aa2f-1bc129bc19ce}
-
-
- {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
-
-
- {460fee33-1fe1-483f-b3bf-931ff8e969a5}
-
-
- {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
-
-
- {93b86837-b543-48a5-a89b-7c87abb77df2}
-
-
- {792d487f-f14c-49fc-a9de-3fc150f31c3f}
-
-
- {1e065f03-3566-47d0-8fa9-daa72b084e7d}
-
-
- {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
-
-
- {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
-
-
- {18430fef-6b61-4c53-b396-718e02850f1b}
-
-
-
-
- There was an error executing the JSON test header generation task.
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json
deleted file mode 100644
index 1edc322b9c..0000000000
--- a/build_msvc/vcpkg.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "bgl-core",
- "version-string": "1",
- "dependencies": [
- "berkeleydb",
- "boost-date-time",
- "boost-multi-index",
- "boost-signals2",
- "boost-test",
- "libevent",
- "sqlite3",
- "zeromq"
- ],
- "builtin-baseline": "9edb1b8e590cc086563301d735cae4b6e732d2d2",
- "overrides": [
- {
- "name": "libevent",
- "version": "2.1.12#7"
- }
- ]
-}
diff --git a/ci/README.md b/ci/README.md
deleted file mode 100644
index b4edd4b191..0000000000
--- a/ci/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-## CI Scripts
-
-This directory contains scripts for each build step in each build stage.
-
-### Running a Stage Locally
-
-Be aware that the tests will be built and run in-place, so please run at your own risk.
-If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
-
-The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory.
-While it should be fine to run
-the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and
-testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci
-system in a virtual machine with a Linux operating system of your choice.
-
-To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
-requires `bash`, `docker`, and `python3` to be installed. To run on different architectures than the host `qemu` is also required. To install all requirements on Ubuntu, run
-
-```
-sudo apt install bash docker.io python3 qemu-user-static
-```
-
-It is recommended to run the ci system in a clean env. To run the test stage
-with a specific configuration,
-
-```
-env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
-```
-
-### Configurations
-
-The test files (`FILE_ENV`) are constructed to test a wide range of
-configurations, rather than a single pass/fail. This helps to catch build
-failures and logic errors that present on platforms other than the ones the
-author has tested.
-
-Some builders use the dependency-generator in `./depends`, rather than using
-the system package manager to install build dependencies. This guarantees that
-the tester is using the same versions as the release builds, which also use
-`./depends`.
-
-It is also possible to force a specific configuration without modifying the
-file. For example,
-
-```
-env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
-```
-
-The files starting with `0n` (`n` greater than 0) are the scripts that are run
-in order.
-
-### Cache
-
-In order to avoid rebuilding all dependencies for each build, the binaries are
-cached and reused when possible. Changes in the dependency-generator will
-trigger cache-invalidation and rebuilds as necessary.
diff --git a/ci/ci.sh b/ci/ci.sh
deleted file mode 100755
index c7d2e9e4ea..0000000000
--- a/ci/ci.sh
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/sh
-
-set -eux
-
-export LC_ALL=C
-
-# Print commit and relevant CI environment to allow reproducing the job outside of CI.
-git show --no-patch
-print_environment() {
- # Turn off -x because it messes up the output
- set +x
- # There are many ways to print variable names and their content. This one
- # does not rely on bash.
- for var in WERROR_CFLAGS MAKEFLAGS BUILD \
- ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
- EXPERIMENTAL ECDH RECOVERY SCHNORRSIG ELLSWIFT \
- SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
- EXAMPLES \
- HOST WRAPPER_CMD \
- CC CFLAGS CPPFLAGS AR NM \
- UBSAN_OPTIONS ASAN_OPTIONS LSAN_OPTIONS
- do
- eval "isset=\${$var+x}"
- if [ -n "$isset" ]; then
- eval "val=\${$var}"
- # shellcheck disable=SC2154
- printf '%s="%s" ' "$var" "$val"
- fi
- done
- echo "$0"
- set -x
-}
-print_environment
-
-env >> test_env.log
-
-# If gcc is requested, assert that it's in fact gcc (and not some symlinked Apple clang).
-case "${CC:-undefined}" in
- *gcc*)
- $CC -v 2>&1 | grep -q "gcc version" || exit 1;
- ;;
-esac
-
-if [ -n "${CC+x}" ]; then
- # The MSVC compiler "cl" doesn't understand "-v"
- $CC -v || true
-fi
-if [ "$WITH_VALGRIND" = "yes" ]; then
- valgrind --version
-fi
-if [ -n "$WRAPPER_CMD" ]; then
- $WRAPPER_CMD --version
-fi
-
-# Workaround for https://bugs.kde.org/show_bug.cgi?id=452758 (fixed in valgrind 3.20.0).
-case "${CC:-undefined}" in
- clang*)
- if [ "$CTIMETESTS" = "yes" ] && [ "$WITH_VALGRIND" = "yes" ]
- then
- export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
- else
- case "$WRAPPER_CMD" in
- valgrind*)
- export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
- ;;
- esac
- fi
- ;;
-esac
-
-./autogen.sh
-
-./configure \
- --enable-experimental="$EXPERIMENTAL" \
- --with-test-override-wide-multiply="$WIDEMUL" --with-asm="$ASM" \
- --with-ecmult-window="$ECMULTWINDOW" \
- --with-ecmult-gen-kb="$ECMULTGENKB" \
- --enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
- --enable-module-ellswift="$ELLSWIFT" \
- --enable-module-schnorrsig="$SCHNORRSIG" \
- --enable-examples="$EXAMPLES" \
- --enable-ctime-tests="$CTIMETESTS" \
- --with-valgrind="$WITH_VALGRIND" \
- --host="$HOST" $EXTRAFLAGS
-
-# We have set "-j" in MAKEFLAGS.
-build_exit_code=0
-make > make.log 2>&1 || build_exit_code=$?
-cat make.log
-if [ $build_exit_code -ne 0 ]; then
- case "${CC:-undefined}" in
- *snapshot*)
- # Ignore internal compiler errors in gcc-snapshot and clang-snapshot
- grep -e "internal compiler error:" -e "PLEASE submit a bug report" make.log
- return $?;
- ;;
- *)
- return 1;
- ;;
- esac
-fi
-
-# Print information about binaries so that we can see that the architecture is correct
-file *tests* || true
-file bench* || true
-file .libs/* || true
-
-# This tells `make check` to wrap test invocations.
-export LOG_COMPILER="$WRAPPER_CMD"
-
-make "$BUILD"
-
-# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
-EXEC='./libtool --mode=execute'
-if [ -n "$WRAPPER_CMD" ]
-then
- EXEC="$EXEC $WRAPPER_CMD"
-fi
-
-if [ "$BENCH" = "yes" ]
-then
- {
- $EXEC ./bench_ecmult
- $EXEC ./bench_internal
- $EXEC ./bench
- } >> bench.log 2>&1
-fi
-
-if [ "$CTIMETESTS" = "yes" ]
-then
- if [ "$WITH_VALGRIND" = "yes" ]; then
- ./libtool --mode=execute valgrind --error-exitcode=42 ./ctime_tests > ctime_tests.log 2>&1
- else
- $EXEC ./ctime_tests > ctime_tests.log 2>&1
- fi
-fi
-
-# Rebuild precomputed files (if not cross-compiling).
-if [ -z "$HOST" ]
-then
- make clean-precomp clean-testvectors
- make precomp testvectors
-fi
-
-# Check that no repo files have been modified by the build.
-# (This fails for example if the precomp files need to be updated in the repo.)
-git diff --exit-code
diff --git a/ci/debian_deploy.sh b/ci/debian_deploy.sh
deleted file mode 100755
index dbb578cf47..0000000000
--- a/ci/debian_deploy.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-export LC_ALL=C.UTF-8
-
-set -o errexit; source ./ci/test/00_setup_env.sh
-
-echo "INSTALL"
-
-apt-get update
-
-apt-get install --no-install-recommends --no-upgrade -y build-essential devscripts debhelper g++-8 libssl-dev wget pkg-config libevent-dev fakeroot
-
-echo "INSTALL DONE"
-
-export ARTIFACT_NAME="bitgesell_amd64.deb"
-export RELEASE_ARTIFACT_NAME="bitgesell_${CIRRUS_TAG}_amd64.deb"
-
-mv ./debian.minimal ./debian
-chmod +x ./debian/build-in-docker.sh
-set -o errexit; source ./debian/build-in-docker.sh
-set -o errexit; source ./ci/test/07_script.sh
diff --git a/ci/debian_qt_deploy.sh b/ci/debian_qt_deploy.sh
deleted file mode 100755
index 7be9b377e8..0000000000
--- a/ci/debian_qt_deploy.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-export LC_ALL=C.UTF-8
-
-set -o errexit; source ./ci/test/00_setup_env.sh
-
-echo "INSTALL"
-
-apt-get update
-
-apt-get install --no-install-recommends --no-upgrade -y build-essential devscripts debhelper g++-8 libssl-dev wget pkg-config libevent-dev fakeroot
-
-echo "INSTALL DONE"
-
-export ARTIFACT_NAME="bitgesell-qt-amd64.deb"
-export RELEASE_ARTIFACT_NAME="bitgesell-qt_${CIRRUS_TAG}_amd64.deb"
-
-mv ./debian.qt ./debian
-chmod +x ./debian/build-in-docker.sh
-set -o errexit; source ./debian/build-in-docker.sh
-set -o errexit; source ./ci/test/07_script.sh
diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh
deleted file mode 100755
index 87e3a8fa9b..0000000000
--- a/ci/lint/04_install.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C
-
-export PATH=$PWD/ci/retry:$PATH
-
-${CI_RETRY_EXE} apt-get update
-# Lint dependencies:
-# - automake pkg-config libtool (for lint_includes_build_config)
-# - curl/xz-utils (to install shellcheck)
-# - git (used in many lint scripts)
-# - gpg (used by verify-commits)
-${CI_RETRY_EXE} apt-get install -y automake pkg-config libtool curl xz-utils git gpg
-
-PYTHON_PATH="/python_build"
-if [ ! -d "${PYTHON_PATH}/bin" ]; then
- (
- ${CI_RETRY_EXE} git clone https://github.com/pyenv/pyenv.git
- cd pyenv/plugins/python-build || exit 1
- ./install.sh
- )
- # For dependencies see https://github.com/pyenv/pyenv/wiki#suggested-build-environment
- ${CI_RETRY_EXE} apt-get install -y build-essential libssl-dev zlib1g-dev \
- libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
- libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
- clang
- env CC=clang python-build "$(cat "./.python-version")" "${PYTHON_PATH}"
-fi
-export PATH="${PYTHON_PATH}/bin:${PATH}"
-command -v python3
-python3 --version
-
-export LINT_RUNNER_PATH="/lint_test_runner"
-if [ ! -d "${LINT_RUNNER_PATH}" ]; then
- ${CI_RETRY_EXE} apt-get install -y cargo
- (
- cd ./test/lint/test_runner || exit 1
- cargo build
- mkdir -p "${LINT_RUNNER_PATH}"
- mv target/debug/test_runner "${LINT_RUNNER_PATH}"
- )
-fi
-
-${CI_RETRY_EXE} pip3 install \
- codespell==2.2.6 \
- flake8==6.1.0 \
- lief==0.13.2 \
- mypy==1.4.1 \
- pyzmq==25.1.0 \
- vulture==2.6
-
-SHELLCHECK_VERSION=v0.8.0
-curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \
- tar --xz -xf - --directory /tmp/
-mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
-
-MLC_VERSION=v0.16.3
-MLC_BIN=mlc-x86_64-linux
-curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc"
-chmod +x /usr/bin/mlc
diff --git a/ci/lint/05_before_script.sh b/ci/lint/05_before_script.sh
deleted file mode 100755
index 2987812c8e..0000000000
--- a/ci/lint/05_before_script.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2019 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C
-
-git fetch --unshallow
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
deleted file mode 100755
index 81650aca68..0000000000
--- a/ci/lint/06_script.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C
-
-set -ex
-
-if [ -n "$LOCAL_BRANCH" ]; then
- # To faithfully recreate CI linting locally, specify all commits on the current
- # branch.
- COMMIT_RANGE="$(git merge-base HEAD master)..HEAD"
-elif [ -n "$CIRRUS_PR" ]; then
- COMMIT_RANGE="HEAD~..HEAD"
- echo
- git log --no-merges --oneline "$COMMIT_RANGE"
- echo
- test/lint/commit-script-check.sh "$COMMIT_RANGE"
-else
- COMMIT_RANGE="SKIP_EMPTY_NOT_A_PR"
-fi
-
-RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
-
-if [ "$CIRRUS_REPO_FULL_NAME" = "BGL/BGL" ] && [ "$CIRRUS_PR" = "" ] ; then
- # Sanity check only the last few commits to get notified of missing sigs,
- # missing keys, or expired keys. Usually there is only one new merge commit
- # per push on the master branch and a few commits on release branches, so
- # sanity checking only a few (10) commits seems sufficient and cheap.
- git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
- git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-git-root
- mapfile -t KEYS < contrib/verify-commits/trusted-keys
- git config user.email "ci@ci.ci"
- git config user.name "ci"
- ${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys "${KEYS[@]}" &&
- ./contrib/verify-commits/verify-commits.py;
-fi
diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh
deleted file mode 100755
index a403f923a2..0000000000
--- a/ci/lint/container-entrypoint.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or https://opensource.org/license/mit/.
-
-export LC_ALL=C
-
-# Fixes permission issues when there is a container UID/GID mismatch with the owner
-# of the mounted bitcoin src dir.
-git config --global --add safe.directory /bitcoin
-
-export PATH="/python_build/bin:${PATH}"
-export LINT_RUNNER_PATH="/lint_test_runner"
-
-if [ -z "$1" ]; then
- LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh"
-else
- exec "$@"
-fi
diff --git a/ci/lint_imagefile b/ci/lint_imagefile
deleted file mode 100644
index d32b35b19d..0000000000
--- a/ci/lint_imagefile
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or https://opensource.org/license/mit/.
-
-# See test/lint/README.md for usage.
-
-FROM debian:bookworm
-
-ENV DEBIAN_FRONTEND=noninteractive
-ENV LC_ALL=C.UTF-8
-
-COPY ./.python-version /.python-version
-COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
-COPY ./ci/lint/04_install.sh /install.sh
-COPY ./test/lint/test_runner /test/lint/test_runner
-
-RUN /install.sh && \
- echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
- chmod 755 /entrypoint.sh && \
- rm -rf /var/lib/apt/lists/*
-
-
-WORKDIR /bitcoin
-ENTRYPOINT ["/entrypoint.sh"]
diff --git a/ci/lint_run_all.sh b/ci/lint_run_all.sh
deleted file mode 100755
index b56ee0d303..0000000000
--- a/ci/lint_run_all.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-set -o errexit; source ./ci/test/00_setup_env.sh
-set -o errexit; source ./ci/lint/04_install.sh
-set -o errexit
-./ci/lint/06_script.sh
diff --git a/ci/linux-debian.Dockerfile b/ci/linux-debian.Dockerfile
deleted file mode 100644
index f12545be0d..0000000000
--- a/ci/linux-debian.Dockerfile
+++ /dev/null
@@ -1,31 +0,0 @@
-FROM debian:stable-slim
-
-SHELL ["/bin/bash", "-c"]
-
-WORKDIR /root
-
-# A too high maximum number of file descriptors (with the default value
-# inherited from the docker host) can cause issues with some of our tools:
-# - sanitizers hanging: https://github.com/google/sanitizers/issues/1662
-# - valgrind crashing: https://stackoverflow.com/a/75293014
-# This is not be a problem on our CI hosts, but developers who run the image
-# on their machines may run into this (e.g., on Arch Linux), so warn them.
-# (Note that .bashrc is only executed in interactive bash shells.)
-RUN echo 'if [[ $(ulimit -n) -gt 200000 ]]; then echo "WARNING: Very high value reported by \"ulimit -n\". Consider passing \"--ulimit nofile=32768\" to \"docker run\"."; fi' >> /root/.bashrc
-
-RUN dpkg --add-architecture i386 && \
- dpkg --add-architecture s390x && \
- dpkg --add-architecture armhf && \
- dpkg --add-architecture arm64 && \
- dpkg --add-architecture ppc64el
-
-# dkpg-dev: to make pkg-config work in cross-builds
-# llvm: for llvm-symbolizer, which is used by clang's UBSan for symbolized stack traces
-RUN apt-get update && apt-get install --no-install-recommends -y \
- git ca-certificates \
- make automake libtool pkg-config dpkg-dev valgrind qemu-user \
- gcc g++ clang libclang-rt-dev libc6-dbg \
- gcc-i686-linux-gnu g++-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 \
- g++-s390x-linux-gnu libstdc++6:s390x gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \
- wine wine64 g++-mingw-w64-x86-64
-
diff --git a/ci/retry/README.md b/ci/retry/README.md
deleted file mode 100644
index 1b03c652db..0000000000
--- a/ci/retry/README.md
+++ /dev/null
@@ -1,123 +0,0 @@
-retry - The command line retry tool
-------------------------------------------
-
-Retry any shell command with exponential backoff or constant delay.
-
-### Instructions
-
-Install:
-
-retry is a shell script, so drop it somewhere and make sure it's added to your $PATH. Or you can use the following one-liner:
-
-```sh
-sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
-```
-
-If you're on OS X, retry is also on Homebrew:
-
-```
-brew pull 27283
-brew install retry
-```
-Not popular enough for homebrew-core. Please star this project to help.
-
-### Usage
-
-Help:
-
-`retry -?`
-
- Usage: retry [options] -- execute command
- -h, -?, --help
- -v, --verbose Verbose output
- -t, --tries=# Set max retries: Default 10
- -s, --sleep=secs Constant sleep amount (seconds)
- -m, --min=secs Exponential Backoff: minimum sleep amount (seconds): Default 0.3
- -x, --max=secs Exponential Backoff: maximum sleep amount (seconds): Default 60
- -f, --fail="script +cmds" Fail Script: run in case of final failure
-
-### Examples
-
-No problem:
-
-`retry echo u work good`
-
- u work good
-
-Test functionality:
-
-`retry 'echo "y u no work"; false'`
-
- y u no work
- Before retry #1: sleeping 0.3 seconds
- y u no work
- Before retry #2: sleeping 0.6 seconds
- y u no work
- Before retry #3: sleeping 1.2 seconds
- y u no work
- Before retry #4: sleeping 2.4 seconds
- y u no work
- Before retry #5: sleeping 4.8 seconds
- y u no work
- Before retry #6: sleeping 9.6 seconds
- y u no work
- Before retry #7: sleeping 19.2 seconds
- y u no work
- Before retry #8: sleeping 38.4 seconds
- y u no work
- Before retry #9: sleeping 60.0 seconds
- y u no work
- Before retry #10: sleeping 60.0 seconds
- y u no work
- etc..
-
-Limit retries:
-
-`retry -t 4 'echo "y u no work"; false'`
-
- y u no work
- Before retry #1: sleeping 0.3 seconds
- y u no work
- Before retry #2: sleeping 0.6 seconds
- y u no work
- Before retry #3: sleeping 1.2 seconds
- y u no work
- Before retry #4: sleeping 2.4 seconds
- y u no work
- Retries exhausted
-
-Bad command:
-
-`retry poop`
-
- bash: poop: command not found
-
-Fail command:
-
-`retry -t 3 -f 'echo "oh poopsickles"' 'echo "y u no work"; false'`
-
- y u no work
- Before retry #1: sleeping 0.3 seconds
- y u no work
- Before retry #2: sleeping 0.6 seconds
- y u no work
- Before retry #3: sleeping 1.2 seconds
- y u no work
- Retries exhausted, running fail script
- oh poopsickles
-
-Last attempt passed:
-
-`retry -t 3 -- 'if [ $RETRY_ATTEMPT -eq 3 ]; then echo Passed at attempt $RETRY_ATTEMPT; true; else echo Failed at attempt $RETRY_ATTEMPT; false; fi;'`
-
- Failed at attempt 0
- Before retry #1: sleeping 0.3 seconds
- Failed at attempt 1
- Before retry #2: sleeping 0.6 seconds
- Failed at attempt 2
- Before retry #3: sleeping 1.2 seconds
- Passed at attempt 3
-
-### License
-
-Apache 2.0 - go nuts
diff --git a/ci/retry/retry b/ci/retry/retry
deleted file mode 100755
index 3c06519dbd..0000000000
--- a/ci/retry/retry
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env bash
-
-GETOPT_BIN=$IN_GETOPT_BIN
-GETOPT_BIN=${GETOPT_BIN:-getopt}
-
-__sleep_amount() {
- if [ -n "$constant_sleep" ]; then
- sleep_time=$constant_sleep
- else
- #TODO: check for awk
- #TODO: check if user would rather use one of the other possible dependencies: python, ruby, bc, dc
- sleep_time=`awk "BEGIN {t = $min_sleep * $(( (1<<($attempts -1)) )); print (t > $max_sleep ? $max_sleep : t)}"`
- fi
-}
-
-__log_out() {
- echo "$1" 1>&2
-}
-
-# Parameters: max_tries min_sleep max_sleep constant_sleep fail_script EXECUTION_COMMAND
-retry()
-{
- local max_tries="$1"; shift
- local min_sleep="$1"; shift
- local max_sleep="$1"; shift
- local constant_sleep="$1"; shift
- local fail_script="$1"; shift
- if [ -n "$VERBOSE" ]; then
- __log_out "Retry Parameters: max_tries=$max_tries min_sleep=$min_sleep max_sleep=$max_sleep constant_sleep=$constant_sleep"
- if [ -n "$fail_script" ]; then __log_out "Fail script: $fail_script"; fi
- __log_out ""
- __log_out "Execution Command: $*"
- __log_out ""
- fi
-
- local attempts=0
- local return_code=1
-
-
- while [[ $return_code -ne 0 && $attempts -le $max_tries ]]; do
- if [ $attempts -gt 0 ]; then
- __sleep_amount
- __log_out "Before retry #$attempts: sleeping $sleep_time seconds"
- sleep $sleep_time
- fi
-
- P="$1"
- for param in "${@:2}"; do P="$P '$param'"; done
- #TODO: replace single quotes in each arg with '"'"' ?
- export RETRY_ATTEMPT=$attempts
- bash -c "$P"
- return_code=$?
- #__log_out "Process returned $return_code on attempt $attempts"
- if [ $return_code -eq 127 ]; then
- # command not found
- exit $return_code
- elif [ $return_code -ne 0 ]; then
- attempts=$[$attempts +1]
- fi
- done
-
- if [ $attempts -gt $max_tries ]; then
- if [ -n "$fail_script" ]; then
- __log_out "Retries exhausted, running fail script"
- eval $fail_script
- else
- __log_out "Retries exhausted"
- fi
- fi
-
- exit $return_code
-}
-
-# If we're being sourced, don't worry about such things
-if [ "$BASH_SOURCE" == "$0" ]; then
- # Prints the help text
- help()
- {
- local retry=$(basename $0)
- cat < /dev/null
- if [[ $? -ne 4 ]]; then
- echo "I’m sorry, 'getopt --test' failed in this environment. Please load GNU getopt."
- exit 1
- fi
-
- OPTIONS=vt:s:m:x:f:
- LONGOPTIONS=verbose,tries:,sleep:,min:,max:,fail:
-
- PARSED=$($GETOPT_BIN --options="$OPTIONS" --longoptions="$LONGOPTIONS" --name "$0" -- "$@")
- if [[ $? -ne 0 ]]; then
- # e.g. $? == 1
- # then getopt has complained about wrong arguments to stdout
- exit 2
- fi
- # read getopt’s output this way to handle the quoting right:
- eval set -- "$PARSED"
-
- max_tries=10
- min_sleep=0.3
- max_sleep=60.0
- constant_sleep=
- fail_script=
-
- # now enjoy the options in order and nicely split until we see --
- while true; do
- case "$1" in
- -v|--verbose)
- VERBOSE=true
- shift
- ;;
- -t|--tries)
- max_tries="$2"
- shift 2
- ;;
- -s|--sleep)
- constant_sleep="$2"
- shift 2
- ;;
- -m|--min)
- min_sleep="$2"
- shift 2
- ;;
- -x|--max)
- max_sleep="$2"
- shift 2
- ;;
- -f|--fail)
- fail_script="$2"
- shift 2
- ;;
- --)
- shift
- break
- ;;
- *)
- echo "Programming error"
- exit 3
- ;;
- esac
- done
-
- retry "$max_tries" "$min_sleep" "$max_sleep" "$constant_sleep" "$fail_script" "$@"
-
-fi
diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh
deleted file mode 100755
index fe732da6b9..0000000000
--- a/ci/test/00_setup_env.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-set -ex
-
-# The source root dir, usually from git, usually read-only.
-# The ci system copies this folder.
-BASE_READ_ONLY_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
-export BASE_READ_ONLY_DIR
-# The destination root dir inside the container.
-# This folder will also hold any SDKs.
-# This folder only exists on the ci guest and will be a copy of BASE_READ_ONLY_DIR
-export BASE_ROOT_DIR="${BASE_ROOT_DIR:-/ci_container_base}"
-# The depends dir.
-# This folder exists only on the ci guest, and on the ci host as a volume.
-export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
-# A folder for the ci system to put temporary files (build result, datadirs for tests, ...)
-# This folder only exists on the ci guest.
-export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch}
-# A folder for the ci system to put executables.
-# This folder only exists on the ci guest.
-export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
-
-echo "Setting specific values in env"
-if [ -n "${FILE_ENV}" ]; then
- set -o errexit;
- # shellcheck disable=SC1090
- source "${FILE_ENV}"
-fi
-
-echo "Fallback to default values in env (if not yet set)"
-# The number of parallel jobs to pass down to make and test_runner.py
-export MAKEJOBS=${MAKEJOBS:--j4}
-# Whether to prefer BusyBox over GNU utilities
-export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
-
-export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
-export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
-export RUN_TIDY=${RUN_TIDY:-false}
-# By how much to scale the test_runner timeouts (option --timeout-factor).
-# This is needed because some ci machines have slow CPU or disk, so sanitizers
-# might be slow or a reindex might be waiting on disk IO.
-export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40}
-export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
-
-# Randomize test order.
-# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
-export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
-# See man 7 debconf
-export DEBIAN_FRONTEND=noninteractive
-export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-100M}
-export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
-export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
-# The cache dir.
-# This folder exists only on the ci guest, and on the ci host as a volume.
-export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
-# The depends dir.
-# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
-export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
-# Folder where the build result is put (bin and lib).
-export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
-# Folder where the build is done (dist and out-of-tree build).
-export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
-# The folder for previous release binaries.
-# This folder exists only on the ci guest, and on the ci host as a volume.
-export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
-export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake}
-export GOAL=${GOAL:-install}
-export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
-export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh
deleted file mode 100755
index 396e782959..0000000000
--- a/ci/test/00_setup_env_arm.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export HOST=arm-linux-gnueabihf
-export DPKG_ADD_ARCH="armhf"
-export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
-export CONTAINER_NAME=ci_arm_linux
-export CI_IMAGE_NAME_TAG="docker.io/arm64v8/debian:bookworm" # Check that https://packages.debian.org/bookworm/g++-arm-linux-gnueabihf (version 12.2, similar to guix) can cross-compile
-export USE_BUSY_BOX=true
-export RUN_UNIT_TESTS=true
-export RUN_FUNCTIONAL_TESTS=false
-export GOAL="install"
-# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
-# This could be removed once the ABI change warning does not show up by default
-export BITCOIN_CONFIG="--enable-reduce-exports CXXFLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"
diff --git a/ci/test/00_setup_env_i686_centos.sh b/ci/test/00_setup_env_i686_centos.sh
deleted file mode 100644
index 00da932939..0000000000
--- a/ci/test/00_setup_env_i686_centos.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2020-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export HOST=i686-pc-linux-gnu
-export CONTAINER_NAME=ci_i686_centos
-export CI_IMAGE_NAME_TAG="quay.io/centos/amd64:stream9"
-export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux e2fsprogs cmake"
-export PIP_PACKAGES="pyzmq"
-export GOAL="install"
-export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
-export BGL_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"
-export CONFIG_SHELL="/bin/dash"
diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_multiprocess.sh
deleted file mode 100644
index fd26bf26b3..0000000000
--- a/ci/test/00_setup_env_i686_multiprocess.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2020-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export HOST=i686-pc-linux-gnu
-export CONTAINER_NAME=ci_i686_multiprocess
-export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:24.04"
-export PACKAGES="llvm clang g++-multilib"
-export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
-export GOAL="install"
-export TEST_RUNNER_EXTRA="--v2transport"
-export BGL_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \
-CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='-Wno-error=documentation'"
-export BGLD=BGL-node # Used in functional tests
diff --git a/ci/test/00_setup_env_mac_cross.sh b/ci/test/00_setup_env_mac_cross.sh
deleted file mode 100755
index f607c93ae6..0000000000
--- a/ci/test/00_setup_env_mac_cross.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
-
-export CONTAINER_NAME=ci_macos_cross
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export HOST=x86_64-apple-darwin
-export PACKAGES="clang lld llvm zip"
-export XCODE_VERSION=15.0
-export XCODE_BUILD_ID=15A240d
-export RUN_UNIT_TESTS=false
-export RUN_FUNCTIONAL_TESTS=false
-export GOAL="deploy"
-export BITCOIN_CONFIG="--with-gui --enable-reduce-exports"
diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh
deleted file mode 100644
index 842da60a0c..0000000000
--- a/ci/test/00_setup_env_mac_native.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export HOST=x86_64-apple-darwin
-# Homebrew's python@3.12 is marked as externally managed (PEP 668).
-# Therefore, `--break-system-packages` is needed.
-export PIP_PACKAGES="--break-system-packages zmq"
-export GOAL="install"
-export BGL_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports"
-export CI_OS_NAME="macos"
-export NO_DEPENDS=1
-export OSX_SDK=""
-export CCACHE_MAXSIZE=400M
-export RUN_FUZZ_TESTS=true
diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh
deleted file mode 100755
index aca315a617..0000000000
--- a/ci/test/00_setup_env_native_asan.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-
-# Only install BCC tracing packages in CI. Container has to match the host for BCC to work.
-if [[ "${INSTALL_BCC_TRACING_TOOLS}" == "true" ]]; then
- # Required for USDT functional tests to run
- BPFCC_PACKAGE="bpfcc-tools linux-headers-$(uname --kernel-release)"
- export CI_CONTAINER_CAP="--privileged -v /sys/kernel:/sys/kernel:rw"
-else
- BPFCC_PACKAGE=""
- export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
-fi
-
-export CONTAINER_NAME=ci_native_asan
-export PACKAGES="systemtap-sdt-dev clang-18 llvm-18 libclang-rt-18-dev python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
-export NO_DEPENDS=1
-export GOAL="install"
-export BGL_CONFIG="--enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 \
-CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
---with-sanitizers=address,float-divide-by-zero,integer,undefined \
-CC='clang-18 -ftrivial-auto-var-init=pattern' CXX='clang++-18 -ftrivial-auto-var-init=pattern'"
-export CCACHE_MAXSIZE=300M
diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh
deleted file mode 100755
index 3c1cb47e4d..0000000000
--- a/ci/test/00_setup_env_native_fuzz.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export CONTAINER_NAME=ci_native_fuzz
-export PACKAGES="clang-18 llvm-18 libclang-rt-18-dev libevent-dev libboost-dev libsqlite3-dev"
-export NO_DEPENDS=1
-export RUN_UNIT_TESTS=false
-export RUN_FUNCTIONAL_TESTS=false
-export RUN_FUZZ_TESTS=true
-export GOAL="install"
-export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
-export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \
-CC='clang-18 -ftrivial-auto-var-init=pattern' CXX='clang++-18 -ftrivial-auto-var-init=pattern'"
-export CCACHE_MAXSIZE=200M
-export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-18"
diff --git a/ci/test/00_setup_env_native_fuzz_with_msan.sh b/ci/test/00_setup_env_native_fuzz_with_msan.sh
deleted file mode 100755
index 070e49c909..0000000000
--- a/ci/test/00_setup_env_native_fuzz_with_msan.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2020-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-LIBCXX_DIR="/msan/cxx_build/"
-export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
-LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
-export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
-
-export CONTAINER_NAME="ci_native_fuzz_msan"
-export PACKAGES="ninja-build"
-# BDB generates false-positives and will be removed in future
-export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
-export GOAL="install"
-# _FORTIFY_SOURCE is not compatible with MSAN.
-export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -U_FORTIFY_SOURCE'"
-export USE_MEMORY_SANITIZER="true"
-export RUN_UNIT_TESTS="false"
-export RUN_FUNCTIONAL_TESTS="false"
-export RUN_FUZZ_TESTS=true
-export CCACHE_MAXSIZE=250M
diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh
deleted file mode 100644
index 0ab90a7503..0000000000
--- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export CONTAINER_NAME=ci_native_fuzz_valgrind
-export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libevent-dev libboost-dev libsqlite3-dev valgrind"
-export NO_DEPENDS=1
-export RUN_UNIT_TESTS=false
-export RUN_FUNCTIONAL_TESTS=false
-export RUN_FUZZ_TESTS=true
-export FUZZ_TESTS_CONFIG="--valgrind"
-export GOAL="install"
-export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang-16 CXX=clang++-16"
-export CCACHE_MAXSIZE=200M
diff --git a/ci/test/00_setup_env_native_msan.sh b/ci/test/00_setup_env_native_msan.sh
deleted file mode 100644
index 600f16a5a6..0000000000
--- a/ci/test/00_setup_env_native_msan.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2020-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-LIBCXX_DIR="/msan/cxx_build/"
-export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
-LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
-export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
-
-export CONTAINER_NAME="ci_native_msan"
-export PACKAGES="ninja-build"
-# BDB generates false-positives and will be removed in future
-export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
-export GOAL="install"
-# _FORTIFY_SOURCE is not compatible with MSAN.
-export BGL_CONFIG="--with-sanitizers=memory CPPFLAGS='-U_FORTIFY_SOURCE'"
-export USE_MEMORY_SANITIZER="true"
-export RUN_FUNCTIONAL_TESTS="false"
-export CCACHE_MAXSIZE=250M
diff --git a/ci/test/00_setup_env_native_nowallet_libBGLkernel.sh b/ci/test/00_setup_env_native_nowallet_libBGLkernel.sh
deleted file mode 100644
index 1eb7e666ce..0000000000
--- a/ci/test/00_setup_env_native_nowallet_libBGLkernel.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
-export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
-# Use minimum supported python3.9 and clang-16, see doc/dependencies.md
-export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
-export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
-export GOAL="install"
-export BGL_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
diff --git a/ci/test/00_setup_env_native_previous_releases.sh b/ci/test/00_setup_env_native_previous_releases.sh
deleted file mode 100644
index 555019ca07..0000000000
--- a/ci/test/00_setup_env_native_previous_releases.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-#export PACKAGE_MANAGER_INSTALL #default
-#export MAKEJOBS #default
-#export DANGER_RUN_CI_ON_HOST #default
-#export TEST_RUNNER_PORT_MIN #default
-#export CCACHE_SIZE #default
-#export CCACHE_DIR #default
-
-export CONTAINER_NAME=ci_native_previous_releases
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
-# Use minimum supported python3.9 (or best effort 3.10) and gcc-11, see doc/dependencies.md
-export PACKAGES="gcc-11 g++-11 python3-zmq"
-export DEP_OPTS="NO_UPNP=1 NO_NATPMP=1 DEBUG=1 CC=gcc-11 CXX=g++-11"
-export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
-export RUN_UNIT_TESTS_SEQUENTIAL="true"
-export RUN_UNIT_TESTS="false"
-export GOAL="install"
-export DOWNLOAD_PREVIOUS_RELEASES="true"
-export BGL_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports --enable-debug \
-CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\""
diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh
deleted file mode 100755
index 5f422bbdb6..0000000000
--- a/ci/test/00_setup_env_native_tidy.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2023-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export CONTAINER_NAME=ci_native_tidy
-export TIDY_LLVM_V="18"
-export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
-export NO_DEPENDS=1
-export RUN_UNIT_TESTS=false
-export RUN_FUNCTIONAL_TESTS=false
-export RUN_FUZZ_TESTS=false
-export RUN_TIDY=true
-export GOAL="install"
-export BITCOIN_CONFIG="CC=clang-${TIDY_LLVM_V} CXX=clang++-${TIDY_LLVM_V} --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
-export CCACHE_MAXSIZE=200M
diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh
deleted file mode 100755
index 3fcaa8c6c6..0000000000
--- a/ci/test/00_setup_env_native_tsan.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CONTAINER_NAME=ci_native_tsan
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export PACKAGES="clang-18 llvm-18 libclang-rt-18-dev libc++abi-18-dev libc++-18-dev python3-zmq"
-export DEP_OPTS="CC=clang-18 CXX='clang++-18 -stdlib=libc++'"
-export GOAL="install"
-export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' --with-sanitizers=thread"
diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh
deleted file mode 100755
index 5dbd96ffc1..0000000000
--- a/ci/test/00_setup_env_native_valgrind.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
-export CONTAINER_NAME=ci_native_valgrind
-export PACKAGES="valgrind clang-16 llvm-16 libclang-rt-16-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
-export USE_VALGRIND=1
-export NO_DEPENDS=1
-export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
-export GOAL="install"
-export BGL_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang-16 CXX=clang++-16" # TODO enable GUI
diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh
deleted file mode 100755
index c4698a9075..0000000000
--- a/ci/test/00_setup_env_s390x.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-export HOST=s390x-linux-gnu
-export PACKAGES="python3-zmq"
-export CONTAINER_NAME=ci_s390x
-export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
-export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
-export RUN_FUNCTIONAL_TESTS=true
-export GOAL="install"
-export BGL_CONFIG="--enable-reduce-exports"
diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh
deleted file mode 100644
index a0108cd147..0000000000
--- a/ci/test/00_setup_env_win64.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-#export PACKAGE_MANAGER_INSTALL #default
-#export MAKEJOBS #default
-#export DANGER_RUN_CI_ON_HOST #default
-#export TEST_RUNNER_PORT_MIN #default
-#export CCACHE_SIZE #default
-#export CCACHE_DIR #default
-
-
-export CONTAINER_NAME=ci_win64
-export CI_IMAGE_NAME_TAG="docker.io/amd64/debian:bookworm" # Check that https://packages.debian.org/bookworm/g++-mingw-w64-x86-64-posix (version 12.2, similar to guix) can cross-compile
-export HOST=x86_64-w64-mingw32
-export DPKG_ADD_ARCH="i386"
-export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
-export RUN_FUNCTIONAL_TESTS=false
-export GOAL="deploy"
-# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
-# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/
-# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
-export BGL_CONFIG="--enable-reduce-exports --disable-gui-tests CXXFLAGS='-Wno-return-type -Wno-error=maybe-uninitialized -Wno-error=array-bounds'"
diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh
deleted file mode 100755
index f16321ba55..0000000000
--- a/ci/test/01_base_install.sh
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-set -ex
-
-CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
-
-if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
- echo "Skip base install"
- exit 0
-fi
-
-if [ -n "$DPKG_ADD_ARCH" ]; then
- dpkg --add-architecture "$DPKG_ADD_ARCH"
-fi
-
-if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
- bash -c "dnf -y install epel-release"
- bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
-elif [ "$CI_OS_NAME" != "macos" ]; then
- if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
- echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
- fi
- ${CI_RETRY_EXE} apt-get update
- ${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES"
-fi
-
-if [ -n "$PIP_PACKAGES" ]; then
- # shellcheck disable=SC2086
- ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
-fi
-
-if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
- ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-18.1.3" /msan/llvm-project
-
- cmake -G Ninja -B /msan/clang_build/ \
- -DLLVM_ENABLE_PROJECTS="clang" \
- -DCMAKE_BUILD_TYPE=Release \
- -DLLVM_TARGETS_TO_BUILD=Native \
- -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
- -S /msan/llvm-project/llvm
-
- ninja -C /msan/clang_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
- ninja -C /msan/clang_build/ install-runtimes
-
- update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
- update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
- update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
-
- cmake -G Ninja -B /msan/cxx_build/ \
- -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
- -DCMAKE_BUILD_TYPE=Release \
- -DLLVM_USE_SANITIZER=MemoryWithOrigins \
- -DCMAKE_C_COMPILER=clang \
- -DCMAKE_CXX_COMPILER=clang++ \
- -DLLVM_TARGETS_TO_BUILD=Native \
- -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
- -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
- -DLIBCXX_HARDENING_MODE=debug \
- -S /msan/llvm-project/runtimes
-
- ninja -C /msan/cxx_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
-fi
-
-if [[ "${RUN_TIDY}" == "true" ]]; then
- ${CI_RETRY_EXE} git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_"${TIDY_LLVM_V}" /include-what-you-use
- cmake -B /iwyu-build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-"${TIDY_LLVM_V}" -S /include-what-you-use
- make -C /iwyu-build/ install "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
-fi
-
-mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
-
-OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers"
-
-if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]; then
- OSX_SDK_FILENAME="${OSX_SDK_BASENAME}.tar.gz"
- OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_FILENAME}"
- if [ ! -f "$OSX_SDK_PATH" ]; then
- ${CI_RETRY_EXE} curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
- fi
- tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
-fi
-
-git config --global ${CFG_DONE} "true"
diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh
deleted file mode 100755
index d383948637..0000000000
--- a/ci/test/02_run_container.sh
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-export CI_IMAGE_LABEL="BGL-ci-test"
-
-set -ex
-
-if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
- # Export all env vars to avoid missing some.
- # Though, exclude those with newlines to avoid parsing problems.
- python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee "/tmp/env-$USER-$CONTAINER_NAME"
- # System-dependent env vars must be kept as is. So read them from the container.
- docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
- echo "Creating $CI_IMAGE_NAME_TAG container to run in"
-
- DOCKER_BUILDKIT=1 docker build \
- --file "${BASE_READ_ONLY_DIR}/ci/test_imagefile" \
- --build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
- --build-arg "FILE_ENV=${FILE_ENV}" \
- --label="${CI_IMAGE_LABEL}" \
- --tag="${CONTAINER_NAME}" \
- "${BASE_READ_ONLY_DIR}"
-
- docker volume create "${CONTAINER_NAME}_ccache" || true
- docker volume create "${CONTAINER_NAME}_depends" || true
- docker volume create "${CONTAINER_NAME}_depends_sources" || true
- docker volume create "${CONTAINER_NAME}_previous_releases" || true
-
- CI_CCACHE_MOUNT="type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR"
- CI_DEPENDS_MOUNT="type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built"
- CI_DEPENDS_SOURCES_MOUNT="type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources"
- CI_PREVIOUS_RELEASES_MOUNT="type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR"
-
- if [ "$DANGER_CI_ON_HOST_CACHE_FOLDERS" ]; then
- # ensure the directories exist
- mkdir -p "${CCACHE_DIR}"
- mkdir -p "${DEPENDS_DIR}/built"
- mkdir -p "${DEPENDS_DIR}/sources"
- mkdir -p "${PREVIOUS_RELEASES_DIR}"
-
- CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=$CCACHE_DIR"
- CI_DEPENDS_MOUNT="type=bind,src=${DEPENDS_DIR}/built,dst=$DEPENDS_DIR/built"
- CI_DEPENDS_SOURCES_MOUNT="type=bind,src=${DEPENDS_DIR}/sources,dst=$DEPENDS_DIR/sources"
- CI_PREVIOUS_RELEASES_MOUNT="type=bind,src=${PREVIOUS_RELEASES_DIR},dst=$PREVIOUS_RELEASES_DIR"
- fi
-
- docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true
-
- if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
- echo "Restart docker before run to stop and clear all containers started with --rm"
- podman container rm --force --all # Similar to "systemctl restart docker"
-
- # Still prune everything in case the filtered pruning doesn't work, or if labels were not set
- # on a previous run. Belt and suspenders approach, should be fine to remove in the future.
- # Prune images used by --external containers (e.g. build containers) when
- # using podman.
- echo "Prune all dangling images"
- podman image prune --force --external
- fi
- echo "Prune all dangling $CI_IMAGE_LABEL images"
- # When detecting podman-docker, `--external` should be added.
- docker image prune --force --filter "label=$CI_IMAGE_LABEL"
-
- # Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME
- # to allow support starting multiple runs simultaneously by the same user.
- # shellcheck disable=SC2086
- CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \
- --mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \
- --mount "${CI_CCACHE_MOUNT}" \
- --mount "${CI_DEPENDS_MOUNT}" \
- --mount "${CI_DEPENDS_SOURCES_MOUNT}" \
- --mount "${CI_PREVIOUS_RELEASES_MOUNT}" \
- --env-file /tmp/env-$USER-$CONTAINER_NAME \
- --name "$CONTAINER_NAME" \
- --network ci-ip6net \
- "$CONTAINER_NAME")
- export CI_CONTAINER_ID
- export CI_EXEC_CMD_PREFIX="docker exec ${CI_CONTAINER_ID}"
-else
- echo "Running on host system without docker wrapper"
- echo "Create missing folders"
- mkdir -p "${CCACHE_DIR}"
- mkdir -p "${PREVIOUS_RELEASES_DIR}"
-fi
-
-if [ "$CI_OS_NAME" == "macos" ]; then
- IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt"
- export IN_GETOPT_BIN
-fi
-
-CI_EXEC () {
- $CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*"
-}
-export -f CI_EXEC
-
-# Normalize all folders to BASE_ROOT_DIR
-CI_EXEC rsync --archive --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
-CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh"
-
-# Fixes permission issues when there is a container UID/GID mismatch with the owner
-# of the git source code directory.
-CI_EXEC git config --global --add safe.directory \"*\"
-
-CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
-
-CI_EXEC "${BASE_ROOT_DIR}/ci/test/03_test_script.sh"
-
-if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
- echo "Stop and remove CI container by ID"
- docker container kill "${CI_CONTAINER_ID}"
-fi
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
deleted file mode 100755
index 71d9ad7f72..0000000000
--- a/ci/test/03_test_script.sh
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-set -ex
-
-export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
-export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
-export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1"
-export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
-
-if [ "$CI_OS_NAME" == "macos" ]; then
- top -l 1 -s 0 | awk ' /PhysMem/ {print}'
- echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
-else
- free -m -h
- echo "Number of CPUs (nproc): $(nproc)"
- echo "System info: $(uname --kernel-name --kernel-release)"
- lscpu
-fi
-echo "Free disk space:"
-df -h
-
-# What host to compile for. See also ./depends/README.md
-# Tests that need cross-compilation export the appropriate HOST.
-# Tests that run natively guess the host
-export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
-
-(
- # compact->outputs[i].file_size is uninitialized memory, so reading it is UB.
- # The statistic bytes_written is only used for logging, which is disabled in
- # CI, so as a temporary minimal fix to work around UB and CI failures, leave
- # bytes_written unmodified.
- # See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748
- # Tee patch to stdout to make it clear CI is testing modified code.
- tee >(patch -p1) <<'EOF'
---- a/src/leveldb/db/db_impl.cc
-+++ b/src/leveldb/db/db_impl.cc
-@@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
- stats.bytes_read += compact->compaction->input(which, i)->file_size;
- }
- }
-- for (size_t i = 0; i < compact->outputs.size(); i++) {
-- stats.bytes_written += compact->outputs[i].file_size;
-- }
-
- mutex_.Lock();
- stats_[compact->compaction->level() + 1].Add(stats);
-EOF
-)
-
-if [ "$RUN_FUZZ_TESTS" = "true" ]; then
- export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
- if [ ! -d "$DIR_FUZZ_IN" ]; then
- ${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
- fi
- (
- cd "${DIR_QA_ASSETS}"
- echo "Using qa-assets repo from commit ..."
- git log -1
- )
-elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
- export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
- if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
- mkdir -p "$DIR_UNIT_TEST_DATA"
- ${CI_RETRY_EXE} curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
- fi
-fi
-
-if [ "$USE_BUSY_BOX" = "true" ]; then
- echo "Setup to use BusyBox utils"
- # tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
- # ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
- for util in $(busybox --list | grep -v "^ar$" | grep -v "^tar$" ); do ln -s "$(command -v busybox)" "${BINS_SCRATCH_DIR}/$util"; done
- # Print BusyBox version
- patch --help
-fi
-
-# Make sure default datadir does not exist and is never read by creating a dummy file
-if [ "$CI_OS_NAME" == "macos" ]; then
- echo > "${HOME}/Library/Application Support/Bitcoin"
-else
- echo > "${HOME}/.bitcoin"
-fi
-
-if [ -z "$NO_DEPENDS" ]; then
- if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
- SHELL_OPTS="CONFIG_SHELL=/bin/dash"
- else
- SHELL_OPTS="CONFIG_SHELL="
- fi
- bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1"
-fi
-if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
- test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
-fi
-
-BITCOIN_CONFIG_ALL="--disable-dependency-tracking"
-if [ -z "$NO_DEPENDS" ]; then
- BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
-fi
-if [ -z "$NO_WERROR" ]; then
- BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
-fi
-
-ccache --zero-stats
-PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
-
-BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
-
-if [ -n "$CONFIG_SHELL" ]; then
- "$CONFIG_SHELL" -c "./autogen.sh"
-else
- ./autogen.sh
-fi
-
-mkdir -p "${BASE_BUILD_DIR}"
-cd "${BASE_BUILD_DIR}"
-
-bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
-
-make distdir VERSION="$HOST"
-
-cd "${BASE_BUILD_DIR}/bitcoin-$HOST"
-
-bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
-
-if [[ "${RUN_TIDY}" == "true" ]]; then
- MAYBE_BEAR="bear --config src/.bear-tidy-config"
- MAYBE_TOKEN="--"
-fi
-
-bash -c "${MAYBE_BEAR} ${MAYBE_TOKEN} make $MAKEJOBS $GOAL" || ( echo "Build failure. Verbose build follows." && make "$GOAL" V=1 ; false )
-
-bash -c "${PRINT_CCACHE_STATISTICS}"
-du -sh "${DEPENDS_DIR}"/*/
-du -sh "${PREVIOUS_RELEASES_DIR}"
-
-if [[ $HOST = *-mingw32 ]]; then
- # Generate all binaries, so that they can be wrapped
- make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
- make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1
- "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
-fi
-
-if [ -n "$USE_VALGRIND" ]; then
- "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
-fi
-
-if [ "$RUN_UNIT_TESTS" = "true" ]; then
- DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "${MAKEJOBS}" check VERBOSE=1
-fi
-
-if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
- DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite
-fi
-
-if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
- # shellcheck disable=SC2086
- LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --quiet --failfast
-fi
-
-if [ "${RUN_TIDY}" = "true" ]; then
- cmake -B /tidy-build -DLLVM_DIR=/usr/lib/llvm-"${TIDY_LLVM_V}"/cmake -DCMAKE_BUILD_TYPE=Release -S "${BASE_ROOT_DIR}"/contrib/devtools/bitcoin-tidy
- cmake --build /tidy-build "$MAKEJOBS"
- cmake --build /tidy-build --target bitcoin-tidy-tests "$MAKEJOBS"
-
- set -eo pipefail
- cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
- if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
- grep -C5 "error: " tmp.tidy-out.txt
- echo "^^^ ⚠️ Failure generated from clang-tidy"
- false
- fi
- # Filter out files by regex here, because regex may not be
- # accepted in src/.bear-tidy-config
- # Filter out:
- # * qt qrc and moc generated files
- jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json
- mv tmp.json ../compile_commands.json
- cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
- python3 "/include-what-you-use/iwyu_tool.py" \
- -p . "${MAKEJOBS}" \
- -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
- -Xiwyu --max_line_length=160 \
- 2>&1 | tee /tmp/iwyu_ci.out
- cd "${BASE_ROOT_DIR}/src"
- python3 "/include-what-you-use/fix_includes.py" --nosafe_headers < /tmp/iwyu_ci.out
- git --no-pager diff
-fi
-
-if [ "$RUN_FUZZ_TESTS" = "true" ]; then
- # shellcheck disable=SC2086
- LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
-fi
diff --git a/ci/test/07_script.sh b/ci/test/07_script.sh
deleted file mode 100755
index cadb6e557e..0000000000
--- a/ci/test/07_script.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env bash
-
-echo "UPLOAD ARTIFACTS"
-
-if [[ "$ARTIFACT_NAME" == "" ]]; then
- echo "No artifacts to upload"
- exit 0
-fi
-
-if [[ "$CIRRUS_RELEASE" == "" ]]; then
- echo "Not a release. No need to deploy!"
- exit 0
-fi
-
-if [[ "$GITHUB_TOKEN" == "" ]]; then
- echo "Please provide GitHub access token via GITHUB_TOKEN environment variable!"
- exit 1
-fi
-
-file_content_type="application/octet-stream"
-fpath=$ARTIFACT_NAME
-
-echo "Uploading $fpath..."
-name=$(basename "$RELEASE_ARTIFACT_NAME")
-url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$CIRRUS_RELEASE/assets?name=$name"
-curl -X POST \
- --data-binary @$fpath \
- --header "Authorization: token $GITHUB_TOKEN" \
- --header "Content-Type: $file_content_type" \
- $url_to_upload
\ No newline at end of file
diff --git a/ci/test/wrap-valgrind.sh b/ci/test/wrap-valgrind.sh
deleted file mode 100755
index 2775483184..0000000000
--- a/ci/test/wrap-valgrind.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2021 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-for b_name in "${BASE_OUTDIR}/bin"/*; do
- # shellcheck disable=SC2044
- for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do
- echo "Wrap $b ..."
- mv "$b" "${b}_orig"
- echo '#!/usr/bin/env bash' > "$b"
- echo "valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
- chmod +x "$b"
- done
-done
diff --git a/ci/test/wrap-wine.sh b/ci/test/wrap-wine.sh
deleted file mode 100755
index 3915d6bd8a..0000000000
--- a/ci/test/wrap-wine.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2020-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}.exe; do
- # shellcheck disable=SC2044
- for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do
- if (file "$b" | grep "Windows"); then
- echo "Wrap $b ..."
- mv "$b" "${b}_orig"
- echo '#!/usr/bin/env bash' > "$b"
- echo "wine64 \"${b}_orig\" \"\$@\"" >> "$b"
- chmod +x "$b"
- fi
- done
-done
diff --git a/ci/test_imagefile b/ci/test_imagefile
deleted file mode 100644
index f8b5eea1c8..0000000000
--- a/ci/test_imagefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or https://opensource.org/license/mit/.
-
-# See ci/README.md for usage.
-
-ARG CI_IMAGE_NAME_TAG
-FROM ${CI_IMAGE_NAME_TAG}
-
-ARG FILE_ENV
-ENV FILE_ENV=${FILE_ENV}
-
-COPY ./ci/retry/retry /usr/bin/retry
-COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_container_base/ci/test/
-
-RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]
diff --git a/ci/test_run_all.sh b/ci/test_run_all.sh
deleted file mode 100755
index 3afc47b23e..0000000000
--- a/ci/test_run_all.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C.UTF-8
-
-set -o errexit; source ./ci/test/00_setup_env.sh
-set -o errexit
-"./ci/test/02_run_container.sh"
diff --git a/configure.ac b/configure.ac
deleted file mode 100755
index 15a9d5ad38..0000000000
--- a/configure.ac
+++ /dev/null
@@ -1,1782 +0,0 @@
-AC_PREREQ([2.69])
-define(_CLIENT_VERSION_MAJOR, 0)
-define(_CLIENT_VERSION_MINOR, 1)
-define(_CLIENT_VERSION_BUILD, 13)
-define(_CLIENT_VERSION_RC, 0)
-define(_CLIENT_VERSION_IS_RELEASE, true)
-define(_COPYRIGHT_YEAR, 2024)
-define(_COPYRIGHT_HOLDERS,[The %s developers])
-define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitgesell Core]])
-AC_INIT([Bitgesell Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/BitgesellOfficial/bitgesell/issues],[BGL],[https://bitgesell.ca/])
-AC_CONFIG_SRCDIR([src/validation.cpp])
-AC_CONFIG_HEADERS([src/config/BGL-config.h])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_MACRO_DIR([build-aux/m4])
-
-m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])])
-PKG_PROG_PKG_CONFIG
-if test "$PKG_CONFIG" = ""; then
- AC_MSG_ERROR([pkg-config not found])
-fi
-
-# When compiling with depends, the `PKG_CONFIG_PATH` and `PKG_CONFIG_LIBDIR` variables,
-# being set in a `config.site` file, are not exported to let the `--config-cache` option
-# work properly.
-if test -n "$PKG_CONFIG_PATH"; then
- PKG_CONFIG="env PKG_CONFIG_PATH=$PKG_CONFIG_PATH $PKG_CONFIG"
-fi
-if test -n "$PKG_CONFIG_LIBDIR"; then
- PKG_CONFIG="env PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR $PKG_CONFIG"
-fi
-
-BGL_DAEMON_NAME=BGLd
-BGL_GUI_NAME=BGL-qt
-BGL_TEST_NAME=test_BGL
-BGL_CLI_NAME=BGL-cli
-BGL_TX_NAME=BGL-tx
-BGL_UTIL_NAME=BGL-util
-BGL_CHAINSTATE_NAME=BGL-chainstate
-BGL_WALLET_TOOL_NAME=BGL-wallet
-dnl Multi Process
-BGL_MP_NODE_NAME=BGL-node
-BGL_MP_GUI_NAME=BGL-gui
-
-dnl Unless the user specified ARFLAGS, force it to be cr
-dnl This is also the default as-of libtool 2.4.7
-AC_ARG_VAR([ARFLAGS], [Flags for the archiver, defaults to if not set])
-if test "${ARFLAGS+set}" != "set"; then
- ARFLAGS="cr"
-fi
-
-AC_CANONICAL_HOST
-
-AH_TOP([#ifndef BGL_CONFIG_H])
-AH_TOP([#define BGL_CONFIG_H])
-AH_BOTTOM([#endif //BGL_CONFIG_H])
-
-dnl Automake init set-up and checks
-AM_INIT_AUTOMAKE([1.13 no-define subdir-objects foreign])
-
-AM_MAINTAINER_MODE([enable])
-
-dnl make the compilation flags quiet unless V=1 is used
-AM_SILENT_RULES([yes])
-
-dnl Compiler checks (here before libtool).
-if test "${CXXFLAGS+set}" = "set"; then
- CXXFLAGS_overridden=yes
-else
- CXXFLAGS_overridden=no
-fi
-AC_PROG_CXX
-
-dnl libtool overrides
-case $host in
- *mingw*)
- dnl By default, libtool for mingw refuses to link static libs into a dll for
- dnl fear of mixing pic/non-pic objects, and import/export complications. Since
- dnl we have those under control, re-enable that functionality.
- lt_cv_deplibs_check_method="pass_all"
-
- dnl Remove unwanted -DDLL_EXPORT from these variables.
- dnl We do not use this macro, but system headers may export unwanted symbols
- dnl if it's set.
- lt_cv_prog_compiler_pic="-DPIC"
- lt_cv_prog_compiler_pic_CXX="-DPIC"
- ;;
- *darwin*)
- dnl Because it prints a verbose warning, lld fails the following check
- dnl for "-Wl,-single_module" from libtool.m4:
- dnl # If there is a non-empty error log, and "single_module"
- dnl # appears in it, assume the flag caused a linker warning
- dnl "-single_module" works fine on ld64 and lld, so just bypass the test.
- dnl Failure to set this to "yes" causes libtool to use a very broken
- dnl link-line for shared libs.
- lt_cv_apple_cc_single_mod="yes"
- ;;
-esac
-
-dnl Require C++20 compiler (no GNU extensions)
-AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
-
-dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
-dnl that we get the same -std flags for both.
-m4_ifdef([AC_PROG_OBJCXX],[
-if test "${OBJCXX+set}" = ""; then
- OBJCXX="${CXX}"
-fi
-AC_PROG_OBJCXX
-])
-
-dnl OpenBSD ships with 2.4.2
-LT_PREREQ([2.4.2])
-dnl Libtool init checks.
-LT_INIT([pic-only win32-dll])
-
-dnl Check/return PATH for base programs.
-AC_PATH_TOOL([AR], [ar])
-AC_PATH_TOOL([GCOV], [gcov])
-AC_PATH_TOOL([LLVM_COV], [llvm-cov])
-AC_PATH_PROG([LCOV], [lcov])
-dnl The minimum supported version is specified in .python-version and should be used if available, see doc/dependencies.md
-AC_PATH_PROGS([PYTHON], [python3.9 python3.10 python3.11 python3.12 python3 python])
-AC_PATH_PROG([GENHTML], [genhtml])
-AC_PATH_PROG([GIT], [git])
-AC_PATH_PROG([CCACHE], [ccache])
-AC_PATH_PROG([XGETTEXT], [xgettext])
-AC_PATH_PROG([HEXDUMP], [hexdump])
-AC_PATH_TOOL([OBJDUMP], [objdump])
-AC_PATH_TOOL([OBJCOPY], [objcopy])
-AC_PATH_PROG([DOXYGEN], [doxygen])
-AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
-
-AC_ARG_ENABLE([wallet],
- [AS_HELP_STRING([--disable-wallet],
- [disable wallet (enabled by default)])],
- [enable_wallet=$enableval],
- [enable_wallet=auto])
-
-AC_ARG_WITH([sqlite],
- [AS_HELP_STRING([--with-sqlite=yes|no|auto],
- [enable sqlite wallet support (default: auto, i.e., enabled if wallet is enabled and sqlite is found)])],
- [use_sqlite=$withval],
- [use_sqlite=auto])
-
-AC_ARG_WITH([bdb],
- [AS_HELP_STRING([--without-bdb],
- [disable bdb wallet support (default is enabled if wallet is enabled)])],
- [use_bdb=$withval],
- [use_bdb=auto])
-
-AC_ARG_ENABLE([usdt],
- [AS_HELP_STRING([--enable-usdt],
- [enable tracepoints for Userspace, Statically Defined Tracing (default is yes if sys/sdt.h is found)])],
- [use_usdt=$enableval],
- [use_usdt=yes])
-
-AC_ARG_WITH([miniupnpc],
- [AS_HELP_STRING([--with-miniupnpc],
- [enable UPNP (default is yes if libminiupnpc is found)])],
- [use_upnp=$withval],
- [use_upnp=auto])
-
-AC_ARG_WITH([natpmp],
- [AS_HELP_STRING([--with-natpmp],
- [enable NAT-PMP (default is yes if libnatpmp is found)])],
- [use_natpmp=$withval],
- [use_natpmp=auto])
-
-AC_ARG_ENABLE(tests,
- AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
- [use_tests=$enableval],
- [use_tests=yes])
-
-AC_ARG_ENABLE(gui-tests,
- AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
- [use_gui_tests=$enableval],
- [use_gui_tests=$use_tests])
-
-AC_ARG_ENABLE(bench,
- AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
- [use_bench=$enableval],
- [use_bench=yes])
-
-AC_ARG_ENABLE([extended-functional-tests],
- AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]),
- [use_extended_functional_tests=$enableval],
- [use_extended_functional_tests=no])
-
-AC_ARG_ENABLE([fuzz],
- AS_HELP_STRING([--enable-fuzz],
- [build for fuzzing (default no). enabling this will disable all other targets and override --{enable,disable}-fuzz-binary]),
- [enable_fuzz=$enableval],
- [enable_fuzz=no])
-
-AC_ARG_ENABLE([fuzz-binary],
- AS_HELP_STRING([--enable-fuzz-binary],
- [enable building of fuzz binary (default yes).]),
- [enable_fuzz_binary=$enableval],
- [enable_fuzz_binary=yes])
-
-AC_ARG_WITH([qrencode],
- [AS_HELP_STRING([--with-qrencode],
- [enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
- [use_qr=$withval],
- [use_qr=auto])
-
-AC_ARG_ENABLE([hardening],
- [AS_HELP_STRING([--disable-hardening],
- [do not attempt to harden the resulting executables (default is to harden)])],
- [use_hardening=$enableval],
- [use_hardening=yes])
-
-AC_ARG_ENABLE([reduce-exports],
- [AS_HELP_STRING([--enable-reduce-exports],
- [attempt to reduce exported symbols in the resulting executables (default is no)])],
- [use_reduce_exports=$enableval],
- [use_reduce_exports=no])
-
-AC_ARG_ENABLE([ccache],
- [AS_HELP_STRING([--disable-ccache],
- [do not use ccache for building (default is to use if found)])],
- [use_ccache=$enableval],
- [use_ccache=auto])
-
-dnl Suppress warnings from external headers (e.g. Boost, Qt).
-dnl May be useful if warnings from external headers clutter the build output
-dnl too much, so that it becomes difficult to spot Bitgesell Core warnings
-dnl or if they cause a build failure with --enable-werror.
-AC_ARG_ENABLE([suppress-external-warnings],
- [AS_HELP_STRING([--disable-suppress-external-warnings],
- [Do not suppress warnings from external headers (default is to suppress)])],
- [suppress_external_warnings=$enableval],
- [suppress_external_warnings=yes])
-
-AC_ARG_ENABLE([lcov],
- [AS_HELP_STRING([--enable-lcov],
- [enable lcov testing (default is no)])],
- [use_lcov=$enableval],
- [use_lcov=no])
-
-AC_ARG_ENABLE([zmq],
- [AS_HELP_STRING([--disable-zmq],
- [disable ZMQ notifications])],
- [use_zmq=$enableval],
- [use_zmq=yes])
-
-AC_ARG_WITH([libmultiprocess],
- [AS_HELP_STRING([--with-libmultiprocess=yes|no|auto],
- [Build with libmultiprocess library. (default: auto, i.e. detect with pkg-config)])],
- [with_libmultiprocess=$withval],
- [with_libmultiprocess=auto])
-
-AC_ARG_WITH([mpgen],
- [AS_HELP_STRING([--with-mpgen=yes|no|auto|PREFIX],
- [Build with libmultiprocess codegen tool. Useful to specify different libmultiprocess host system library and build system codegen tool prefixes when cross-compiling (default is host system libmultiprocess prefix)])],
- [with_mpgen=$withval],
- [with_mpgen=auto])
-
-AC_ARG_ENABLE([multiprocess],
- [AS_HELP_STRING([--enable-multiprocess],
- [build multiprocess BGL-node, BGL-wallet, and BGL-gui executables in addition to monolithic BGLd and BGL-qt executables. Requires libmultiprocess library. Experimental (default is no)])],
- [enable_multiprocess=$enableval],
- [enable_multiprocess=no])
-
-AC_ARG_ENABLE(man,
- [AS_HELP_STRING([--disable-man],
- [do not install man pages (default is to install)])],,
- enable_man=yes)
-AM_CONDITIONAL([ENABLE_MAN], [test "$enable_man" != "no"])
-
-dnl Enable debug
-AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug],
- [use compiler flags and macros suited for debugging (default is no)])],
- [enable_debug=$enableval],
- [enable_debug=no])
-
-dnl Enable different -fsanitize options
-AC_ARG_WITH([sanitizers],
- [AS_HELP_STRING([--with-sanitizers],
- [comma separated list of extra sanitizers to build with (default is none enabled)])],
- [use_sanitizers=$withval])
-
-dnl Turn warnings into errors
-AC_ARG_ENABLE([werror],
- [AS_HELP_STRING([--enable-werror],
- [Treat compiler warnings as errors (default is no)])],
- [enable_werror=$enableval],
- [enable_werror=no])
-
-AC_ARG_ENABLE([external-signer],
- [AS_HELP_STRING([--enable-external-signer],[compile external signer support (default is yes)])],
- [use_external_signer=$enableval],
- [use_external_signer=yes])
-
-AC_LANG_PUSH([C++])
-
-dnl Always set -g -O2 in our CXXFLAGS. Autoconf will try and set CXXFLAGS to "-g -O2" by default,
-dnl so we suppress that (if CXXFLAGS hasn't been overridden by the user), given we are adding it
-dnl ourselves.
-CORE_CXXFLAGS="$CORE_CXXFLAGS -g -O2"
-
-if test "$CXXFLAGS_overridden" = "no"; then
- CXXFLAGS=""
-fi
-
-dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may
-dnl appear to succeed because by default they merely emit warnings when they fail.
-dnl
-dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if
-dnl a compile with -Werror can succeed. This is important because the compiler may already be
-dnl warning about something unrelated, for example about some path issue. If that is the case,
-dnl -Werror cannot be used because all of those warnings would be turned into errors.
-AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAG_WERROR="-Werror"], [CXXFLAG_WERROR=""])
-
-dnl Check for a flag to turn linker warnings into errors. When flags are passed to linkers via the
-dnl compiler driver using a -Wl,-foo flag, linker warnings may be swallowed rather than bubbling up.
-dnl See note above, the same applies here as well.
-dnl
-dnl LDFLAG_WERROR Should only be used when testing -Wl,*
-case $host in
- *darwin*)
- AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [LDFLAG_WERROR="-Wl,-fatal_warnings"], [LDFLAG_WERROR=""])
- ;;
- *)
- AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [LDFLAG_WERROR="-Wl,--fatal-warnings"], [LDFLAG_WERROR=""])
- ;;
-esac
-
-if test "$enable_debug" = "yes"; then
-
- dnl Disable all optimizations
- AX_CHECK_COMPILE_FLAG([-O0], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"], [], [$CXXFLAG_WERROR])
-
- dnl Prefer -g3, fall back to -g if that is unavailable.
- AX_CHECK_COMPILE_FLAG(
- [-g3],
- [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"],
- [AX_CHECK_COMPILE_FLAG([-g], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"], [], [$CXXFLAG_WERROR])],
- [$CXXFLAG_WERROR])
-
- AX_CHECK_PREPROC_FLAG([-DDEBUG], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"], [], [$CXXFLAG_WERROR])
- AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"], [], [$CXXFLAG_WERROR])
- AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKCONTENTION], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKCONTENTION"], [], [$CXXFLAG_WERROR])
- AX_CHECK_PREPROC_FLAG([-DRPC_DOC_CHECK], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DRPC_DOC_CHECK"], [], [$CXXFLAG_WERROR])
- AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR])
- AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR])
-fi
-
-if test "$use_sanitizers" != ""; then
- dnl First check if the compiler accepts flags. If an incompatible pair like
- dnl -fsanitize=address,thread is used here, this check will fail. This will also
- dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined
- AX_CHECK_COMPILE_FLAG(
- [-fsanitize=$use_sanitizers],
- [SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"
- SANITIZER_CFLAGS="-fsanitize=$use_sanitizers"],
- [AC_MSG_ERROR([compiler did not accept requested flags])])
-
- dnl Some compilers (e.g. GCC) require additional libraries like libasan,
- dnl libtsan, libubsan, etc. Make sure linking still works with the sanitize
- dnl flag. This is a separate check so we can give a better error message when
- dnl the sanitize flags are supported by the compiler but the actual sanitizer
- dnl libs are missing.
- AX_CHECK_LINK_FLAG(
- [-fsanitize=$use_sanitizers],
- [SANITIZER_LDFLAGS="-fsanitize=$use_sanitizers"],
- [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])],
- [],
- [AC_LANG_PROGRAM([[
- #include
- #include
- extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; }
- __attribute__((weak)) // allow for libFuzzer linking
- ]],[[]])])
-fi
-
-ERROR_CXXFLAGS=
-if test "$enable_werror" = "yes"; then
- if test "$CXXFLAG_WERROR" = ""; then
- AC_MSG_ERROR([enable-werror set but -Werror is not usable])
- fi
- ERROR_CXXFLAGS=$CXXFLAG_WERROR
-fi
-
-AX_CHECK_COMPILE_FLAG([-Wall], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wextra], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wgnu], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"], [], [$CXXFLAG_WERROR])
-dnl some compilers will ignore -Wformat-security without -Wformat, so just combine the two here.
-AX_CHECK_COMPILE_FLAG([-Wformat -Wformat-security], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat -Wformat-security"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wvla], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wshadow-field], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wthread-safety], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wloop-analysis"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wunused-member-function], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wdate-time], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wconditional-uninitialized], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wconditional-uninitialized"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-branches"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wimplicit-fallthrough"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-Wself-assign], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wself-assign"], [], [$CXXFLAG_WERROR])
-
-dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
-dnl unknown options if any other warning is produced. Test the -Wfoo case, and
-dnl set the -Wno-foo case if it works.
-AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"], [], [$CXXFLAG_WERROR])
-
-dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
-AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
-
-dnl Currently all versions of gcc are subject to a class of bugs, see the
-dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and
-dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set
-dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
-AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"])
-
-enable_arm_crc=no
-enable_arm_shani=no
-enable_sse42=no
-enable_sse41=no
-enable_avx2=no
-enable_x86_shani=no
-
-dnl Check for optional instruction set support. Enabling these does _not_ imply that all code will
-dnl be compiled with them, rather that specific objects/libs may use them after checking for runtime
-dnl compatibility.
-
-dnl x86
-AX_CHECK_COMPILE_FLAG([-msse4.2], [SSE42_CXXFLAGS="-msse4.2"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_CXXFLAGS="-msse4.1"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-mavx -mavx2], [AVX2_CXXFLAGS="-mavx -mavx2"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-msse4 -msha], [X86_SHANI_CXXFLAGS="-msse4 -msha"], [], [$CXXFLAG_WERROR])
-
-enable_clmul=
-AX_CHECK_COMPILE_FLAG([-mpclmul], [enable_clmul=yes], [], [$CXXFLAG_WERROR], [AC_LANG_PROGRAM([
- #include
- #include
-], [
- __m128i a = _mm_cvtsi64_si128((uint64_t)7);
- __m128i b = _mm_clmulepi64_si128(a, a, 37);
- __m128i c = _mm_srli_epi64(b, 41);
- __m128i d = _mm_xor_si128(b, c);
- uint64_t e = _mm_cvtsi128_si64(d);
- return e == 0;
-])])
-
-if test "$enable_clmul" = "yes"; then
- CLMUL_CXXFLAGS="-mpclmul"
- AC_DEFINE([HAVE_CLMUL], [1], [Define this symbol if clmul instructions can be used])
-fi
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$SSE42_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for SSE4.2 intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #if defined(_MSC_VER)
- #include
- #elif defined(__GNUC__) && defined(__SSE4_2__)
- #include
- #endif
- ]],[[
- uint64_t l = 0;
- l = _mm_crc32_u8(l, 0);
- l = _mm_crc32_u32(l, 0);
- l = _mm_crc32_u64(l, 0);
- return l;
- ]])],
- [ AC_MSG_RESULT([yes]); enable_sse42=yes],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$SSE41_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for SSE4.1 intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]],[[
- __m128i l = _mm_set1_epi32(0);
- return _mm_extract_epi32(l, 3);
- ]])],
- [ AC_MSG_RESULT([yes]); enable_sse41=yes; AC_DEFINE([ENABLE_SSE41], [1], [Define this symbol to build code that uses SSE4.1 intrinsics]) ],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for AVX2 intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]],[[
- __m256i l = _mm256_set1_epi32(0);
- return _mm256_extract_epi32(l, 7);
- ]])],
- [ AC_MSG_RESULT([yes]); enable_avx2=yes; AC_DEFINE([ENABLE_AVX2], [1], [Define this symbol to build code that uses AVX2 intrinsics]) ],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$X86_SHANI_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for x86 SHA-NI intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]],[[
- __m128i i = _mm_set1_epi32(0);
- __m128i j = _mm_set1_epi32(1);
- __m128i k = _mm_set1_epi32(2);
- return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, i, k), 0);
- ]])],
- [ AC_MSG_RESULT([yes]); enable_x86_shani=yes; AC_DEFINE([ENABLE_X86_SHANI], [1], [Define this symbol to build code that uses x86 SHA-NI intrinsics]) ],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-# ARM
-AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
-AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR])
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for ARMv8 CRC32 intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]],[[
-#ifdef __aarch64__
- __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0);
- vmull_p64(0, 0);
-#else
-#error "crc32c library does not support hardware acceleration on 32-bit ARM"
-#endif
- ]])],
- [ AC_MSG_RESULT([yes]); enable_arm_crc=yes; ],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-TEMP_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$ARM_SHANI_CXXFLAGS $CXXFLAGS"
-AC_MSG_CHECKING([for ARMv8 SHA-NI intrinsics])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]],[[
- uint32x4_t a, b, c;
- vsha256h2q_u32(a, b, c);
- vsha256hq_u32(a, b, c);
- vsha256su0q_u32(a, b);
- vsha256su1q_u32(a, b, c);
- ]])],
- [ AC_MSG_RESULT([yes]); enable_arm_shani=yes; AC_DEFINE([ENABLE_ARM_SHANI], [1], [Define this symbol to build code that uses ARMv8 SHA-NI intrinsics]) ],
- [ AC_MSG_RESULT([no])]
-)
-CXXFLAGS="$TEMP_CXXFLAGS"
-
-CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO"
-
-AC_ARG_WITH([utils],
- [AS_HELP_STRING([--with-utils],
- [build BGL-cli BGL-tx BGL-util BGL-wallet (default=yes)])],
- [build_BGL_utils=$withval],
- [build_BGL_utils=yes])
-
-AC_ARG_ENABLE([util-cli],
- [AS_HELP_STRING([--enable-util-cli],
- [build BGL-cli])],
- [build_BGL_cli=$enableval],
- [build_BGL_cli=$build_BGL_utils])
-
-AC_ARG_ENABLE([util-tx],
- [AS_HELP_STRING([--enable-util-tx],
- [build BGL-tx])],
- [build_BGL_tx=$enableval],
- [build_BGL_tx=$build_BGL_utils])
-
-AC_ARG_ENABLE([util-wallet],
- [AS_HELP_STRING([--enable-util-wallet],
- [build BGL-wallet])],
- [build_BGL_wallet=$enableval],
- [build_BGL_wallet=$build_BGL_utils])
-
-AC_ARG_ENABLE([util-util],
- [AS_HELP_STRING([--enable-util-util],
- [build BGL-util])],
- [build_BGL_util=$enableval],
- [build_BGL_util=$build_BGL_utils])
-
-AC_ARG_ENABLE([experimental-util-chainstate],
- [AS_HELP_STRING([--enable-experimental-util-chainstate],
- [build experimental BGL-chainstate executable (default=no)])],
- [build_BGL_chainstate=$enableval],
- [build_BGL_chainstate=no])
-
-AC_ARG_WITH([experimental-kernel-lib],
- [AS_HELP_STRING([--with-experimental-kernel-lib],
- [build experimental BGLkernel library (default is to build if we're building the experimental build-chainstate executable)])],
- [build_experimental_kernel_lib=$withval],
- [build_experimental_kernel_lib=auto])
-
-AC_ARG_WITH([daemon],
- [AS_HELP_STRING([--with-daemon],
- [build BGLd daemon (default=yes)])],
- [build_BGLd=$withval],
- [build_BGLd=yes])
-
-case $host in
- *mingw*)
- TARGET_OS=windows
- AC_CHECK_LIB([kernel32], [GetModuleFileNameA], [], [AC_MSG_ERROR([libkernel32 missing])])
- AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])])
- AC_CHECK_LIB([gdi32], [main], [], [AC_MSG_ERROR([libgdi32 missing])])
- AC_CHECK_LIB([comdlg32], [main], [], [AC_MSG_ERROR([libcomdlg32 missing])])
- AC_CHECK_LIB([winmm], [main], [], [AC_MSG_ERROR([libwinmm missing])])
- AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])])
- AC_CHECK_LIB([comctl32], [main], [], [AC_MSG_ERROR([libcomctl32 missing])])
- AC_CHECK_LIB([ole32], [CoCreateInstance], [], [AC_MSG_ERROR([libole32 missing])])
- AC_CHECK_LIB([oleaut32], [main], [], [AC_MSG_ERROR([liboleaut32 missing])])
- AC_CHECK_LIB([uuid], [main], [], [AC_MSG_ERROR([libuuid missing])])
- AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])])
- AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])])
- AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])])
- AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])])
-
- dnl -static is interpreted by libtool, where it has a different meaning.
- dnl In libtool-speak, it's -all-static.
- AX_CHECK_LINK_FLAG([-static], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"])
-
- AC_PATH_PROG([MAKENSIS], [makensis], [none])
- if test "$MAKENSIS" = "none"; then
- AC_MSG_WARN([makensis not found. Cannot create installer.])
- fi
-
- AC_PATH_TOOL([WINDRES], [windres], [none])
- if test "$WINDRES" = "none"; then
- AC_MSG_ERROR([windres not found])
- fi
-
- CORE_CPPFLAGS="$CORE_CPPFLAGS -DSECP256K1_STATIC"
-
- CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
- dnl Prevent the definition of min/max macros.
- dnl We always want to use the standard library.
- CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX"
-
- dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
- dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
- dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are
- dnl also overridden to prevent their insertion later.
- dnl This should only affect dll's.
- archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
- postdeps_CXX=
-
- dnl We require Windows 7 (NT 6.1) or later
- AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [$LDFLAG_WERROR])
-
- dnl Avoid the use of aligned vector instructions when building for Windows.
- dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
- AX_CHECK_COMPILE_FLAG([-Wa,-muse-unaligned-vector-move], [CORE_CXXFLAGS="$CORE_CXXFLAGS -Wa,-muse-unaligned-vector-move"], [], [$CXXFLAG_WERROR])
- ;;
- *darwin*)
- TARGET_OS=darwin
- if test $cross_compiling != "yes"; then
- BUILD_OS=darwin
-
- AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR])
-
- AC_CHECK_PROG([BREW], [brew], [brew])
- if test "$BREW" = "brew"; then
- dnl These Homebrew packages may be keg-only, meaning that they won't be found
- dnl in expected paths because they may conflict with system files. Ask
- dnl Homebrew where each one is located, then adjust paths accordingly.
- dnl It's safe to add these paths even if the functionality is disabled by
- dnl the user (--without-wallet or --without-gui for example).
-
- dnl Homebrew may create symlinks in /usr/local/include for some packages.
- dnl Because MacOS's clang internally adds "-I /usr/local/include" to its search
- dnl paths, this will negate efforts to use -isystem for those packages, as they
- dnl will be found first in /usr/local. Use the internal "-internal-isystem"
- dnl option to system-ify all /usr/local/include paths without adding it to the list
- dnl of search paths in case it's not already there.
- if test "$suppress_external_warnings" != "no"; then
- AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem -Xclang /usr/local/include/], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem -Xclang /usr/local/include/"], [], [$CXXFLAG_WERROR])
- fi
-
- if test "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then
- bdb_prefix=$($BREW --prefix berkeley-db@4 2>/dev/null)
- dnl This must precede the call to BGL_FIND_BDB48 below.
- BDB_CFLAGS="-I$bdb_prefix/include"
- BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"
- fi
-
- if $BREW list --versions qt@5 >/dev/null; then
- export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
- fi
-
- case $host in
- *aarch64*)
- dnl The preferred Homebrew prefix for Apple Silicon is /opt/homebrew.
- dnl Therefore, as we do not use pkg-config to detect miniupnpc and libnatpmp
- dnl packages, we should set the CPPFLAGS and LDFLAGS variables for them
- dnl explicitly.
- if test "$use_upnp" != "no" && $BREW list --versions miniupnpc >/dev/null; then
- miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null)
- if test "$suppress_external_warnings" != "no"; then
- MINIUPNPC_CPPFLAGS="-isystem $miniupnpc_prefix/include"
- else
- MINIUPNPC_CPPFLAGS="-I$miniupnpc_prefix/include"
- fi
- MINIUPNPC_LIBS="-L$miniupnpc_prefix/lib"
- fi
- if test "$use_natpmp" != "no" && $BREW list --versions libnatpmp >/dev/null; then
- libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null)
- if test "$suppress_external_warnings" != "no"; then
- NATPMP_CPPFLAGS="-isystem $libnatpmp_prefix/include"
- else
- NATPMP_CPPFLAGS="-I$libnatpmp_prefix/include"
- fi
- NATPMP_LIBS="-L$libnatpmp_prefix/lib"
- fi
- ;;
- esac
- fi
- else
- case $build_os in
- *darwin*)
- BUILD_OS=darwin
- ;;
- *)
- AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
- AC_PATH_PROG([ZIP], [zip], [zip])
-
- dnl libtool will try to strip the static lib, which is a problem for
- dnl cross-builds because strip attempts to call a hard-coded ld,
- dnl which may not exist in the path. Stripping the .a is not
- dnl necessary, so just disable it.
- old_striplib=
- ;;
- esac
- fi
-
- CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
-
- dnl ignore deprecated-declarations warnings coming from objcxx code
- dnl "'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0".
- OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"
- ;;
- *linux*)
- TARGET_OS=linux
- ;;
-esac
-
-if test "$use_extended_functional_tests" != "no"; then
- AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended)
-fi
-
-if test "$use_lcov" = "yes"; then
- if test "$LCOV" = ""; then
- AC_MSG_ERROR([lcov testing requested but lcov not found])
- fi
- if test "$PYTHON" = ""; then
- AC_MSG_ERROR([lcov testing requested but python not found])
- fi
- if test "$GENHTML" = ""; then
- AC_MSG_ERROR([lcov testing requested but genhtml not found])
- fi
-
- AC_MSG_CHECKING([whether compiler is Clang])
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
- #if defined(__clang__) && defined(__llvm__)
- // Compiler is Clang
- #else
- # error Compiler is not Clang
- #endif
- ]])],[
- AC_MSG_RESULT([yes])
- if test "$LLVM_COV" = ""; then
- AC_MSG_ERROR([lcov testing requested but llvm-cov not found])
- fi
- COV_TOOL="$LLVM_COV gcov"
- ],[
- AC_MSG_RESULT([no])
- if test "$GCOV" = "x"; then
- AC_MSG_ERROR([lcov testing requested but gcov not found])
- fi
- COV_TOOL="$GCOV"
- ])
- AC_SUBST(COV_TOOL)
- AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh")
- LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER"
-
- AX_CHECK_LINK_FLAG([--coverage], [CORE_LDFLAGS="$CORE_LDFLAGS --coverage"],
- [AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])])
- AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"],
- [AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])])
- CORE_CXXFLAGS="$CORE_CXXFLAGS -Og"
-
- AC_SUBST(LCOV_OPTS)
-fi
-
-dnl Check for endianness
-AC_C_BIGENDIAN
-
-dnl Check for pthread compile/link requirements
-AX_PTHREAD
-
-dnl Check if -latomic is required for
-CHECK_ATOMIC
-
-dnl The following macro will add the necessary defines to BGL-config.h, but
-dnl they also need to be passed down to any subprojects. Pull the results out of
-dnl the cache and add them to CPPFLAGS.
-AC_SYS_LARGEFILE
-dnl detect POSIX or GNU variant of strerror_r
-AC_FUNC_STRERROR_R
-
-if test "$ac_cv_sys_file_offset_bits" != "" &&
- test "$ac_cv_sys_file_offset_bits" != "no" &&
- test "$ac_cv_sys_file_offset_bits" != "unknown"; then
- CORE_CPPFLAGS="$CORE_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
-fi
-
-if test "$ac_cv_sys_large_files" != "" &&
- test "$ac_cv_sys_large_files" != "no" &&
- test "$ac_cv_sys_large_files" != "unknown"; then
- CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
-fi
-
-if test "$TARGET_OS" != "windows"; then
- dnl All windows code is PIC, forcing it on just adds useless compile warnings
- AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"])
-fi
-
-if test "$use_hardening" != "no"; then
- AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
- AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
-
- AX_CHECK_COMPILE_FLAG([-fcf-protection=full], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fcf-protection=full"])
-
- case $host in
- *mingw*)
- dnl stack-clash-protection doesn't compile with GCC 10 and earlier.
- dnl In any case, it is a no-op for Windows.
- dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
- ;;
- *)
- AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-clash-protection"], [], [$CXXFLAG_WERROR])
- ;;
- esac
-
- case $host in
- *aarch64*)
- AX_CHECK_COMPILE_FLAG([-mbranch-protection=bti], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=bti"])
- ;;
- esac
-
- dnl When enable_debug is yes, all optimizations are disabled.
- dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning.
- dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes.
- if test "$enable_debug" != "yes"; then
- AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=3],[
- AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
- HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
- ])
- HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=3"
- ])
- fi
-
- AX_CHECK_LINK_FLAG([-Wl,--enable-reloc-section], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,--dynamicbase], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,--nxcompat], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,--high-entropy-va], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,-z,relro], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
-fi
-
-dnl These flags are specific to ld64, and may cause issues with other linkers.
-dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
-dnl "ad_strip" as the symbol for the entry point.
-if test "$TARGET_OS" = "darwin"; then
- AX_CHECK_LINK_FLAG([-Wl,-dead_strip], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,-dead_strip_dylibs], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip_dylibs"], [], [$LDFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,-fixup_chains], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [$LDFLAG_WERROR])
-fi
-
-AC_CHECK_HEADERS([sys/select.h sys/prctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
-
-AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
- [#include
- #include ]
-)
-
-dnl These are used for daemonization in BGLd
-AC_CHECK_DECLS([fork])
-AC_CHECK_DECLS([setsid])
-
-AC_CHECK_DECLS([pipe2])
-
-dnl Check for malloc_info (for memory statistics information in getmemoryinfo)
-AC_MSG_CHECKING([for getmemoryinfo])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[ int f = malloc_info(0, NULL); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOC_INFO], [1], [Define this symbol if you have malloc_info]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas)
-AC_MSG_CHECKING([for mallopt M_ARENA_MAX])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[ mallopt(M_ARENA_MAX, 1); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOPT_ARENA_MAX], [1], [Define this symbol if you have mallopt with M_ARENA_MAX]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-dnl Check for posix_fallocate
-AC_MSG_CHECKING([for posix_fallocate])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- // same as in src/util/fs_helpers.cpp
- #ifdef __linux__
- #ifdef _POSIX_C_SOURCE
- #undef _POSIX_C_SOURCE
- #endif
- #define _POSIX_C_SOURCE 200112L
- #endif // __linux__
- #include ]],
- [[ int f = posix_fallocate(0, 0, 0); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define this symbol if you have posix_fallocate]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-AC_MSG_CHECKING([for default visibility attribute])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- int foo(void) __attribute__((visibility("default")));
- int main(){}
- ])],
- [
- AC_DEFINE([HAVE_DEFAULT_VISIBILITY_ATTRIBUTE], [1], [Define if the visibility attribute is supported.])
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- if test "$use_reduce_exports" = "yes"; then
- AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.])
- fi
- ]
-)
-
-AC_MSG_CHECKING([for dllexport attribute])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- __declspec(dllexport) int foo(void);
- int main(){}
- ])],
- [
- AC_DEFINE([HAVE_DLLEXPORT_ATTRIBUTE], [1], [Define if the dllexport attribute is supported.])
- AC_MSG_RESULT([yes])
- ],
- [AC_MSG_RESULT([no])]
-)
-
-dnl Check for different ways of gathering OS randomness
-AC_MSG_CHECKING([for Linux getrandom function])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include ]],
- [[ getrandom(nullptr, 32, 0); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETRANDOM], [1], [Define this symbol if the Linux getrandom function call is available]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-AC_MSG_CHECKING([for getentropy via sys/random.h])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include ]],
- [[ getentropy(nullptr, 32) ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY_RAND], [1], [Define this symbol if the BSD getentropy system call is available with sys/random.h]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-AC_MSG_CHECKING([for sysctl])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
- #include ]],
- [[ #ifdef __linux__
- #error "Don't use sysctl on Linux, it's deprecated even when it works"
- #endif
- sysctl(nullptr, 2, nullptr, nullptr, nullptr, 0); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL], [1], [Define this symbol if the BSD sysctl() is available]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-AC_MSG_CHECKING([for sysctl KERN_ARND])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
- #include ]],
- [[ #ifdef __linux__
- #error "Don't use sysctl on Linux, it's deprecated even when it works"
- #endif
- static int name[2] = {CTL_KERN, KERN_ARND};
- sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL_ARND], [1], [Define this symbol if the BSD sysctl(KERN_ARND) is available]) ],
- [ AC_MSG_RESULT([no])]
-)
-
-AC_MSG_CHECKING([for fdatasync])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[ fdatasync(0); ]])],
- [ AC_MSG_RESULT([yes]); HAVE_FDATASYNC=1 ],
- [ AC_MSG_RESULT([no]); HAVE_FDATASYNC=0 ]
-)
-AC_DEFINE_UNQUOTED([HAVE_FDATASYNC], [$HAVE_FDATASYNC], [Define to 1 if fdatasync is available.])
-
-AC_MSG_CHECKING([for F_FULLFSYNC])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[ fcntl(0, F_FULLFSYNC, 0); ]])],
- [ AC_MSG_RESULT([yes]); HAVE_FULLFSYNC=1 ],
- [ AC_MSG_RESULT([no]); HAVE_FULLFSYNC=0 ]
-)
-
-AC_MSG_CHECKING([for O_CLOEXEC])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],
- [[ open("", O_CLOEXEC); ]])],
- [ AC_MSG_RESULT([yes]); HAVE_O_CLOEXEC=1 ],
- [ AC_MSG_RESULT([no]); HAVE_O_CLOEXEC=0 ]
-)
-AC_DEFINE_UNQUOTED([HAVE_O_CLOEXEC], [$HAVE_O_CLOEXEC], [Define to 1 if O_CLOEXEC flag is available.])
-
-dnl crc32c platform checks
-AC_MSG_CHECKING([for __builtin_prefetch])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
- char data = 0;
- const char* address = &data;
- __builtin_prefetch(address, 0, 0);
- ]])],
- [ AC_MSG_RESULT([yes]); HAVE_BUILTIN_PREFETCH=1 ],
- [ AC_MSG_RESULT([no]); HAVE_BUILTIN_PREFETCH=0 ]
-)
-
-AC_MSG_CHECKING([for _mm_prefetch])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[
- char data = 0;
- const char* address = &data;
- _mm_prefetch(address, _MM_HINT_NTA);
- ]])],
- [ AC_MSG_RESULT([yes]); HAVE_MM_PREFETCH=1 ],
- [ AC_MSG_RESULT([no]); HAVE_MM_PREFETCH=0 ]
-)
-
-AC_MSG_CHECKING([for strong getauxval support in the system headers])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- ]], [[
- getauxval(AT_HWCAP);
- ]])],
- [ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval]) ],
- [ AC_MSG_RESULT([no]); HAVE_STRONG_GETAUXVAL=0 ]
-)
-
-# Check for UNIX sockets
-AC_MSG_CHECKING(for sockaddr_un)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]], [[
- struct sockaddr_un addr;
- addr.sun_family = AF_UNIX;
- ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SOCKADDR_UN], [1], [Define this symbol if platform supports unix domain sockets]) ],
- [ AC_MSG_RESULT([no]); ]
-)
-
-have_any_system=no
-AC_MSG_CHECKING([for std::system])
-AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM(
- [[ #include ]],
- [[ int nErr = std::system(""); ]]
- )],
- [ AC_MSG_RESULT([yes]); have_any_system=yes],
- [ AC_MSG_RESULT([no]) ]
-)
-
-AC_MSG_CHECKING([for ::_wsystem])
-AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM(
- [[ #include ]],
- [[ int nErr = ::_wsystem(NULL); ]]
- )],
- [ AC_MSG_RESULT([yes]); have_any_system=yes],
- [ AC_MSG_RESULT([no]) ]
-)
-
-if test "$have_any_system" != "no"; then
- AC_DEFINE([HAVE_SYSTEM], [1], [Define to 1 if std::system or ::wsystem is available.])
-fi
-
-dnl SUPPRESSED_CPPFLAGS=SUPPRESS_WARNINGS([$SOME_CPPFLAGS])
-dnl Replace -I with -isystem in $SOME_CPPFLAGS to suppress warnings from
-dnl headers from its include directories and return the result.
-dnl See -isystem documentation:
-dnl https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
-dnl https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-isystem-directory
-dnl Do not change "-I/usr/include" to "-isystem /usr/include" because that
-dnl is not necessary (/usr/include is already a system directory) and because
-dnl it would break GCC's #include_next.
-AC_DEFUN([SUPPRESS_WARNINGS],
- [[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include/*( |$);-I/usr/include\1;g')]])
-
-dnl enable-fuzz should disable all other targets
-if test "$enable_fuzz" = "yes"; then
- AC_MSG_WARN([enable-fuzz will disable all other targets and force --enable-fuzz-binary=yes])
- build_BGL_utils=no
- build_BGL_cli=no
- build_BGL_tx=no
- build_BGL_util=no
- build_BGL_chainstate=no
- build_BGL_wallet=no
- build_BGLd=no
- BGL_enable_qt=no
- BGL_enable_qt_test=no
- BGL_enable_qt_dbus=no
- use_bench=no
- use_tests=no
- use_external_signer=no
- use_upnp=no
- use_natpmp=no
- use_zmq=no
- enable_fuzz_binary=yes
-
- AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR])
-else
- BGL_QT_INIT
-
- dnl sets $BGL_enable_qt, $BGL_enable_qt_test, $BGL_enable_qt_dbus
- BGL_QT_CONFIGURE([5.11.3])
-
- dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc
- QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES
- if test "$suppress_external_warnings" != "no" ; then
- QT_INCLUDES=SUPPRESS_WARNINGS($QT_INCLUDES)
- QT_DBUS_INCLUDES=SUPPRESS_WARNINGS($QT_DBUS_INCLUDES)
- QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES)
- fi
-fi
-
-if test "$enable_fuzz_binary" = "yes"; then
- AC_MSG_CHECKING([whether main function is needed for fuzz binary])
- AX_CHECK_LINK_FLAG(
- [],
- [AC_MSG_RESULT([no])],
- [AC_MSG_RESULT([yes]); CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"],
- [$SANITIZER_LDFLAGS],
- [AC_LANG_PROGRAM([[
- #include
- #include
- extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
- /* comment to remove the main function ...
- ]],[[
- */ int not_main() {
- ]])])
-fi
-
-if test "$enable_wallet" != "no"; then
- dnl Check for libdb_cxx only if wallet enabled
- if test "$use_bdb" != "no"; then
- BGL_FIND_BDB48
- if test "$suppress_external_warnings" != "no" ; then
- BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS)
- fi
- fi
-
- dnl Check for sqlite3
- if test "$use_sqlite" != "no"; then
- PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.17], [have_sqlite=yes], [have_sqlite=no])
- fi
- AC_MSG_CHECKING([whether to build wallet with support for sqlite])
- if test "$use_sqlite" = "no"; then
- use_sqlite=no
- elif test "$have_sqlite" = "no"; then
- if test "$use_sqlite" = "yes"; then
- AC_MSG_ERROR([sqlite support requested but cannot be built. Use --without-sqlite])
- fi
- use_sqlite=no
- else
- if test "$use_sqlite" != "no"; then
- AC_DEFINE([USE_SQLITE],[1],[Define if sqlite support should be compiled in])
- use_sqlite=yes
- fi
- fi
- AC_MSG_RESULT([$use_sqlite])
-
- dnl Disable wallet if both --without-bdb and --without-sqlite
- if test "$use_bdb$use_sqlite" = "nono"; then
- if test "$enable_wallet" = "yes"; then
- AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.])
- fi
- enable_wallet=no
- fi
-fi
-
-if test "$use_usdt" != "no"; then
- AC_MSG_CHECKING([whether Userspace, Statically Defined Tracing tracepoints are supported])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [#include ],
- [DTRACE_PROBE(context, event);
- int a, b, c, d, e, f, g;
- DTRACE_PROBE7(context, event, a, b, c, d, e, f, g);]
- )],
- [AC_MSG_RESULT([yes]); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])],
- [AC_MSG_RESULT([no]); use_usdt=no;]
- )
-fi
-AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"])
-
-if test "$build_BGLd$BGL_enable_qt$use_bench$use_tests" = "nononono"; then
- use_upnp=no
- use_natpmp=no
- use_zmq=no
-fi
-
-dnl Check for libminiupnpc (optional)
-if test "$use_upnp" != "no"; then
- TEMP_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $MINIUPNPC_CPPFLAGS"
- AC_CHECK_HEADERS([miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], [], [have_miniupnpc=no])
-
- if test "$have_miniupnpc" != "no"; then
- AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS])
-
- dnl The minimum supported miniUPnPc API version is set to 17. This excludes
- dnl versions with known vulnerabilities.
- AC_MSG_CHECKING([whether miniUPnPc API version is supported])
- AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
- @%:@include
- ]], [[
- #if MINIUPNPC_API_VERSION >= 17
- // Everything is okay
- #else
- # error miniUPnPc API version is too old
- #endif
- ]])],[
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_WARN([miniUPnPc API version < 17 is unsupported, disabling UPnP support.])
- have_miniupnpc=no
- ])
- fi
- CPPFLAGS="$TEMP_CPPFLAGS"
-fi
-
-dnl Check for libnatpmp (optional).
-if test "$use_natpmp" != "no"; then
- TEMP_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $NATPMP_CPPFLAGS"
- AC_CHECK_HEADERS([natpmp.h], [], [have_natpmp=no])
-
- if test "$have_natpmp" != "no"; then
- AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS="$NATPMP_LIBS -lnatpmp"], [have_natpmp=no], [$NATPMP_LIBS])
- fi
-
- CPPFLAGS="$TEMP_CPPFLAGS"
-fi
-
-if test "$build_BGL_wallet$build_BGL_cli$build_BGL_tx$build_BGL_util$build_BGLd$BGL_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then
- use_boost=no
-else
- use_boost=yes
-fi
-
-if test "$use_boost" = "yes"; then
-
- dnl Check for Boost headers
- AX_BOOST_BASE([1.73.0],[],[AC_MSG_ERROR([Boost is not available!])])
- if test "$want_boost" = "no"; then
- AC_MSG_ERROR([Boost is required])
- fi
-
- dnl we don't use multi_index serialization
- BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
-
- dnl Prevent use of std::unary_function, which was removed in C++17,
- dnl and will generate warnings with newer compilers for Boost
- dnl older than 1.80.
- dnl See: https://github.com/boostorg/config/pull/430.
- AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
- [AC_LANG_PROGRAM([[#include ]])])
-
- if test "$suppress_external_warnings" != "no"; then
- BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
- fi
-fi
-
-case $host in
- dnl Re-enable it after enabling Windows support in cpp-subprocess.
- *mingw*)
- use_external_signer="no"
- ;;
-esac
-if test "$use_external_signer" = "yes"; then
- AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
-fi
-AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "$use_external_signer" = "yes"])
-
-dnl Check for reduced exports
-if test "$use_reduce_exports" = "yes"; then
- AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
- [AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])], [$CXXFLAG_WERROR])
- AX_CHECK_LINK_FLAG([-Wl,--exclude-libs,ALL], [RELDFLAGS="-Wl,--exclude-libs,ALL"], [], [$LDFLAG_WERROR])
-fi
-
-if test "$use_tests" = "yes"; then
-
- if test "$HEXDUMP" = ""; then
- AC_MSG_ERROR([hexdump is required for tests])
- fi
-fi
-
-dnl libevent check
-
-use_libevent=no
-if test "$build_BGL_cli$build_BGLd$BGL_enable_qt$enable_fuzz_binary$use_tests$use_bench" != "nononononono"; then
- PKG_CHECK_MODULES([EVENT], [libevent >= 2.1.8], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.1.8 or greater not found.])])
- if test "$TARGET_OS" != "windows"; then
- PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.1.8], [], [AC_MSG_ERROR([libevent_pthreads version 2.1.8 or greater not found.])])
- fi
-
- if test "$suppress_external_warnings" != "no"; then
- EVENT_CFLAGS=SUPPRESS_WARNINGS($EVENT_CFLAGS)
- fi
-fi
-
-if test x$use_libevent = xyes; then
- TEMP_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $EVENT_CFLAGS"
- AC_MSG_CHECKING([if evhttp_connection_get_peer expects const char**])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include
- #include
- ]], [[
- evhttp_connection *conn = (evhttp_connection *)1;
- const char *host;
- uint16_t port;
-
- evhttp_connection_get_peer(conn, &host, &port);
- ]])],
- [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR], [1], [Define this symbol if evhttp_connection_get_peer expects const char**]) ],
- [ AC_MSG_RESULT([no]) ]
- )
- CXXFLAGS="$TEMP_CXXFLAGS"
-fi
-
-dnl QR Code encoding library check
-
-if test "$use_qr" != "no"; then
- BGL_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
-fi
-
-dnl ZMQ check
-
-if test "$use_zmq" = "yes"; then
- PKG_CHECK_MODULES([ZMQ], [libzmq >= 4],
- AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]),
- [AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
- use_zmq=no])
-fi
-
-if test "$use_zmq" = "yes"; then
- dnl Assume libzmq was built for static linking
- case $host in
- *mingw*)
- ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC"
- ;;
- esac
-fi
-
-AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
-
-dnl libmultiprocess library check
-
-libmultiprocess_found=no
-if test "$with_libmultiprocess" = "yes" || test "$with_libmultiprocess" = "auto"; then
- PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [
- libmultiprocess_found=yes;
- libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`;
- ], [true])
-elif test "$with_libmultiprocess" != "no"; then
- AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no])
-fi
-
-dnl Enable multiprocess check
-
-if test "$enable_multiprocess" = "yes"; then
- if test "$libmultiprocess_found" != "yes"; then
- AC_MSG_ERROR([--enable-multiprocess=yes option specified but libmultiprocess library was not found. May need to install libmultiprocess library, or specify install path with PKG_CONFIG_PATH environment variable. Running 'pkg-config --debug libmultiprocess' may be helpful for debugging.])
- fi
- build_multiprocess=yes
-elif test "$enable_multiprocess" = "auto"; then
- build_multiprocess=$libmultiprocess_found
-else
- build_multiprocess=no
-fi
-
-AM_CONDITIONAL([BUILD_MULTIPROCESS], [test "$build_multiprocess" = "yes"])
-AM_CONDITIONAL([BUILD_BGL_NODE], [test "$build_multiprocess" = "yes"])
-AM_CONDITIONAL([BUILD_BGL_GUI], [test "$build_multiprocess" = "yes"])
-
-dnl codegen tools check
-
-if test "$build_multiprocess" != "no"; then
- if test "$with_mpgen" = "yes" || test "$with_mpgen" = "auto"; then
- MPGEN_PREFIX="$libmultiprocess_prefix"
- elif test "$with_mpgen" != "no"; then
- MPGEN_PREFIX="$with_mpgen";
- fi
- AC_SUBST(MPGEN_PREFIX)
-fi
-
-AC_MSG_CHECKING([whether to build BGLd])
-AM_CONDITIONAL([BUILD_BGLD], [test $build_BGLd = "yes"])
-AC_MSG_RESULT($build_BGLd)
-
-AC_MSG_CHECKING([whether to build BGL-cli])
-AM_CONDITIONAL([BUILD_BGL_CLI], [test $build_BGL_cli = "yes"])
-AC_MSG_RESULT($build_BGL_cli)
-
-AC_MSG_CHECKING([whether to build BGL-tx])
-AM_CONDITIONAL([BUILD_BGL_TX], [test $build_BGL_tx = "yes"])
-AC_MSG_RESULT($build_BGL_tx)
-
-AC_MSG_CHECKING([whether to build BGL-wallet])
-AM_CONDITIONAL([BUILD_BGL_WALLET], [test $build_BGL_wallet = "yes"])
-AC_MSG_RESULT($build_BGL_wallet)
-
-AC_MSG_CHECKING([whether to build BGL-util])
-AM_CONDITIONAL([BUILD_BGL_UTIL], [test $build_BGL_util = "yes"])
-AC_MSG_RESULT($build_BGL_util)
-
-AC_MSG_CHECKING([whether to build experimental BGL-chainstate])
-if test "$build_BGL_chainstate" = "yes"; then
- if test "$build_experimental_kernel_lib" = "no"; then
- AC_MSG_ERROR([experimental BGL-chainstate cannot be built without the experimental BGLkernel library. Use --with-experimental-kernel-lib]);
- fi
-fi
-AM_CONDITIONAL([BUILD_BGL_CHAINSTATE], [test $build_BGL_chainstate = "yes"])
-AC_MSG_RESULT($build_BGL_chainstate)
-
-AM_CONDITIONAL([BUILD_BGL_KERNEL_LIB], [test "$build_experimental_kernel_lib" != "no" && ( test "$build_experimental_kernel_lib" = "yes" || test "$build_BGL_chainstate" = "yes" )])
-
-AC_LANG_POP
-
-if test "$use_ccache" != "no"; then
- AC_MSG_CHECKING([if ccache should be used])
- if test "$CCACHE" = ""; then
- if test "$use_ccache" = "yes"; then
- AC_MSG_ERROR([ccache not found.]);
- else
- use_ccache=no
- fi
- else
- use_ccache=yes
- CC="$ac_cv_path_CCACHE $CC"
- CXX="$ac_cv_path_CCACHE $CXX"
- fi
- AC_MSG_RESULT($use_ccache)
- if test "$use_ccache" = "yes"; then
- AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR])
- AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR])
- fi
-fi
-
-dnl enable wallet
-AC_MSG_CHECKING([if wallet should be enabled])
-if test "$enable_wallet" != "no"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions])
- enable_wallet=yes
-
-else
- AC_MSG_RESULT([no])
-fi
-
-dnl enable upnp support
-AC_MSG_CHECKING([whether to build with support for UPnP])
-if test "$have_miniupnpc" = "no"; then
- if test "$use_upnp" = "yes"; then
- AC_MSG_ERROR([UPnP requested but cannot be built. Use --without-miniupnpc])
- fi
- AC_MSG_RESULT([no])
- use_upnp=no
-else
- if test "$use_upnp" != "no"; then
- AC_MSG_RESULT([yes])
- use_upnp=yes
- AC_DEFINE([USE_UPNP], [1], [Define to 1 if UPnP support should be compiled in.])
- if test "$TARGET_OS" = "windows"; then
- MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DMINIUPNP_STATICLIB"
- fi
- else
- AC_MSG_RESULT([no])
- fi
-fi
-
-dnl Enable NAT-PMP support.
-AC_MSG_CHECKING([whether to build with support for NAT-PMP])
-if test "$have_natpmp" = "no"; then
- if test "$use_natpmp" = "yes"; then
- AC_MSG_ERROR([NAT-PMP requested but cannot be built. Use --without-natpmp])
- fi
- AC_MSG_RESULT([no])
- use_natpmp=no
-else
- if test "$use_natpmp" != "no"; then
- AC_MSG_RESULT([yes])
- use_natpmp=yes
- AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.])
- if test "$TARGET_OS" = "windows"; then
- NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB"
- fi
- else
- AC_MSG_RESULT([no])
- fi
-fi
-
-dnl these are only used when qt is enabled
-BUILD_TEST_QT=""
-if test "$BGL_enable_qt" != "no"; then
- dnl enable dbus support
- AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
- if test "$BGL_enable_qt_dbus" != "no"; then
- AC_DEFINE([USE_DBUS], [1], [Define if dbus support should be compiled in])
- fi
- AC_MSG_RESULT([$BGL_enable_qt_dbus])
-
- dnl enable qr support
- AC_MSG_CHECKING([whether to build GUI with support for QR codes])
- if test "$have_qrencode" = "no"; then
- if test "$use_qr" = "yes"; then
- AC_MSG_ERROR([QR support requested but cannot be built. Use --without-qrencode])
- fi
- use_qr=no
- else
- if test "$use_qr" != "no"; then
- AC_DEFINE([USE_QRCODE], [1], [Define if QR support should be compiled in])
- use_qr=yes
- fi
- fi
- AC_MSG_RESULT([$use_qr])
-
- if test "$XGETTEXT" = ""; then
- AC_MSG_WARN([xgettext is required to update qt translations])
- fi
-
- AC_MSG_CHECKING([whether to build test_BGL-qt])
- if test "$use_gui_tests$BGL_enable_qt_test" = "yesyes"; then
- AC_MSG_RESULT([yes])
- BUILD_TEST_QT="yes"
- else
- AC_MSG_RESULT([no])
- fi
-fi
-
-AC_MSG_CHECKING([whether to build test_BGL])
-if test "$use_tests" = "yes"; then
- if test "$enable_fuzz" = "yes"; then
- AC_MSG_RESULT([no, because fuzzing is enabled])
- else
- AC_MSG_RESULT([yes])
- fi
- BUILD_TEST="yes"
-else
- AC_MSG_RESULT([no])
- BUILD_TEST=""
-fi
-
-AC_MSG_CHECKING([whether to reduce exports])
-if test "$use_reduce_exports" = "yes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "$build_BGL_wallet$build_BGL_cli$build_BGL_tx$build_BGL_util$build_BGLd$BGL_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
- AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
-fi
-
-AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
-AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"])
-AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"])
-AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"])
-AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"])
-AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"])
-AM_CONDITIONAL([USE_BDB], [test "$use_bdb" = "yes"])
-AM_CONDITIONAL([ENABLE_TESTS], [test "$BUILD_TEST" = "yes"])
-AM_CONDITIONAL([ENABLE_FUZZ], [test "$enable_fuzz" = "yes"])
-AM_CONDITIONAL([ENABLE_FUZZ_BINARY], [test "$enable_fuzz_binary" = "yes"])
-AM_CONDITIONAL([ENABLE_QT], [test "$BGL_enable_qt" = "yes"])
-AM_CONDITIONAL([ENABLE_QT_TESTS], [test "$BUILD_TEST_QT" = "yes"])
-AM_CONDITIONAL([ENABLE_BENCH], [test "$use_bench" = "yes"])
-AM_CONDITIONAL([USE_QRCODE], [test "$use_qr" = "yes"])
-AM_CONDITIONAL([USE_LCOV], [test "$use_lcov" = "yes"])
-AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"])
-AM_CONDITIONAL([ENABLE_SSE42], [test "$enable_sse42" = "yes"])
-AM_CONDITIONAL([ENABLE_SSE41], [test "$enable_sse41" = "yes"])
-AM_CONDITIONAL([ENABLE_AVX2], [test "$enable_avx2" = "yes"])
-AM_CONDITIONAL([ENABLE_X86_SHANI], [test "$enable_x86_shani" = "yes"])
-AM_CONDITIONAL([ENABLE_ARM_CRC], [test "$enable_arm_crc" = "yes"])
-AM_CONDITIONAL([ENABLE_ARM_SHANI], [test "$enable_arm_shani" = "yes"])
-AM_CONDITIONAL([WORDS_BIGENDIAN], [test "$ac_cv_c_bigendian" = "yes"])
-AM_CONDITIONAL([USE_NATPMP], [test "$use_natpmp" = "yes"])
-AM_CONDITIONAL([USE_UPNP], [test "$use_upnp" = "yes"])
-
-dnl for minisketch
-AM_CONDITIONAL([ENABLE_CLMUL], [test "$enable_clmul" = "yes"])
-
-AC_DEFINE([CLIENT_VERSION_MAJOR], [_CLIENT_VERSION_MAJOR], [Major version])
-AC_DEFINE([CLIENT_VERSION_MINOR], [_CLIENT_VERSION_MINOR], [Minor version])
-AC_DEFINE([CLIENT_VERSION_BUILD], [_CLIENT_VERSION_BUILD], [Version Build])
-AC_DEFINE([CLIENT_VERSION_IS_RELEASE], [_CLIENT_VERSION_IS_RELEASE], [Version is release])
-AC_DEFINE([COPYRIGHT_YEAR], [_COPYRIGHT_YEAR], [Copyright year])
-AC_DEFINE([COPYRIGHT_HOLDERS], ["_COPYRIGHT_HOLDERS"], [Copyright holder(s) before %s replacement])
-AC_DEFINE([COPYRIGHT_HOLDERS_SUBSTITUTION], ["_COPYRIGHT_HOLDERS_SUBSTITUTION"], [Replacement for %s in copyright holders string])
-define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])])
-AC_DEFINE([COPYRIGHT_HOLDERS_FINAL], ["_COPYRIGHT_HOLDERS_FINAL"], [Copyright holder(s)])
-AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR)
-AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR)
-AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD)
-AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
-AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
-AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS")
-AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION")
-AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL")
-AC_SUBST(BGL_DAEMON_NAME)
-AC_SUBST(BGL_GUI_NAME)
-AC_SUBST(BGL_TEST_NAME)
-AC_SUBST(BGL_CLI_NAME)
-AC_SUBST(BGL_TX_NAME)
-AC_SUBST(BGL_UTIL_NAME)
-AC_SUBST(BGL_CHAINSTATE_NAME)
-AC_SUBST(BGL_WALLET_TOOL_NAME)
-AC_SUBST(BGL_MP_NODE_NAME)
-AC_SUBST(BGL_MP_GUI_NAME)
-
-AC_SUBST(RELDFLAGS)
-AC_SUBST(CORE_LDFLAGS)
-AC_SUBST(CORE_CPPFLAGS)
-AC_SUBST(CORE_CXXFLAGS)
-AC_SUBST(DEBUG_CPPFLAGS)
-AC_SUBST(WARN_CXXFLAGS)
-AC_SUBST(NOWARN_CXXFLAGS)
-AC_SUBST(DEBUG_CXXFLAGS)
-AC_SUBST(ERROR_CXXFLAGS)
-AC_SUBST(HARDENED_CXXFLAGS)
-AC_SUBST(HARDENED_CPPFLAGS)
-AC_SUBST(HARDENED_LDFLAGS)
-AC_SUBST(PIC_FLAGS)
-AC_SUBST(PIE_FLAGS)
-AC_SUBST(SANITIZER_CXXFLAGS)
-AC_SUBST(SANITIZER_LDFLAGS)
-AC_SUBST(SSE42_CXXFLAGS)
-AC_SUBST(SSE41_CXXFLAGS)
-AC_SUBST(CLMUL_CXXFLAGS)
-AC_SUBST(AVX2_CXXFLAGS)
-AC_SUBST(X86_SHANI_CXXFLAGS)
-AC_SUBST(ARM_CRC_CXXFLAGS)
-AC_SUBST(ARM_SHANI_CXXFLAGS)
-AC_SUBST(LIBTOOL_APP_LDFLAGS)
-AC_SUBST(USE_SQLITE)
-AC_SUBST(USE_BDB)
-AC_SUBST(ENABLE_EXTERNAL_SIGNER)
-AC_SUBST(USE_UPNP)
-AC_SUBST(USE_QRCODE)
-AC_SUBST(TESTDEFS)
-AC_SUBST(MINIUPNPC_CPPFLAGS)
-AC_SUBST(MINIUPNPC_LIBS)
-AC_SUBST(NATPMP_CPPFLAGS)
-AC_SUBST(NATPMP_LIBS)
-AC_SUBST(HAVE_FDATASYNC)
-AC_SUBST(HAVE_FULLFSYNC)
-AC_SUBST(HAVE_O_CLOEXEC)
-AC_SUBST(HAVE_BUILTIN_PREFETCH)
-AC_SUBST(HAVE_MM_PREFETCH)
-AC_SUBST(HAVE_STRONG_GETAUXVAL)
-AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR)
-AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
-AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
-AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
-AC_CONFIG_LINKS([contrib/devtools/iwyu/BGL.core.imp:contrib/devtools/iwyu/BGL.core.imp])
-AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
-AC_CONFIG_LINKS([src/.bear-tidy-config:src/.bear-tidy-config])
-AC_CONFIG_LINKS([src/.clang-tidy:src/.clang-tidy])
-AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
-AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py])
-AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py])
-AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
-AC_CONFIG_LINKS([src/qt/Makefile:src/qt/Makefile])
-AC_CONFIG_LINKS([src/qt/test/Makefile:src/qt/test/Makefile])
-AC_CONFIG_LINKS([src/test/Makefile:src/test/Makefile])
-
-dnl boost's m4 checks do something really nasty: they export these vars. As a
-dnl result, they leak into secp256k1's configure and crazy things happen.
-dnl Until this is fixed upstream and we've synced, we'll just un-export them.
-CPPFLAGS_TEMP="$CPPFLAGS"
-unset CPPFLAGS
-CPPFLAGS="$CPPFLAGS_TEMP"
-
-if test -n "$use_sanitizers"; then
- export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS"
-fi
-ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-ecmult-gen-kb=86 --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
-AC_CONFIG_SUBDIRS([src/secp256k1])
-
-AC_OUTPUT
-
-dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows
-case ${OS} in
- *Windows*)
- sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini
- mv test/config-2.ini test/config.ini
- ;;
-esac
-
-dnl An old hack similar to a98356fee to remove hard-coded
-dnl bind_at_load flag from libtool
-case $host in
- *darwin*)
- AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.])
- sed < libtool > libtool-2 '/bind_at_load/d'
- mv libtool-2 libtool
- chmod 755 libtool
- ;;
-esac
-
-echo
-echo "Options used to compile and link:"
-echo " external signer = $use_external_signer"
-echo " multiprocess = $build_multiprocess"
-echo " with wallet = $enable_wallet"
-if test "$enable_wallet" != "no"; then
- echo " with sqlite = $use_sqlite"
- echo " with bdb = $use_bdb"
-fi
-echo " with gui / qt = $BGL_enable_qt"
-if test $BGL_enable_qt != "no"; then
- echo " with qr = $use_qr"
-fi
-echo " with zmq = $use_zmq"
-if test $enable_fuzz = "no"; then
- echo " with test = $use_tests"
-else
- echo " with test = not building test_BGL because fuzzing is enabled"
-fi
-echo " with fuzz binary = $enable_fuzz_binary"
-echo " with bench = $use_bench"
-echo " with upnp = $use_upnp"
-echo " with natpmp = $use_natpmp"
-echo " USDT tracing = $use_usdt"
-echo " sanitizers = $use_sanitizers"
-echo " debug enabled = $enable_debug"
-echo " werror = $enable_werror"
-echo
-echo " target os = $host_os"
-echo " build os = $build_os"
-echo
-echo " CC = $CC"
-echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS"
-echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
-echo " CXX = $CXX"
-echo " CXXFLAGS = $CORE_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $SANITIZER_CXXFLAGS $CXXFLAGS"
-echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $SANITIZER_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
-echo " AR = $AR"
-echo " ARFLAGS = $ARFLAGS"
-echo
diff --git a/contrib/BGL-qt.pro b/contrib/BGL-qt.pro
deleted file mode 100644
index 49c37daf8f..0000000000
--- a/contrib/BGL-qt.pro
+++ /dev/null
@@ -1,22 +0,0 @@
-FORMS += \
- ../src/qt/forms/aboutdialog.ui \
- ../src/qt/forms/addressbookpage.ui \
- ../src/qt/forms/askpassphrasedialog.ui \
- ../src/qt/forms/coincontroldialog.ui \
- ../src/qt/forms/editaddressdialog.ui \
- ../src/qt/forms/helpmessagedialog.ui \
- ../src/qt/forms/intro.ui \
- ../src/qt/forms/openuridialog.ui \
- ../src/qt/forms/optionsdialog.ui \
- ../src/qt/forms/overviewpage.ui \
- ../src/qt/forms/receivecoinsdialog.ui \
- ../src/qt/forms/receiverequestdialog.ui \
- ../src/qt/forms/debugwindow.ui \
- ../src/qt/forms/sendcoinsdialog.ui \
- ../src/qt/forms/sendcoinsentry.ui \
- ../src/qt/forms/signverifymessagedialog.ui \
- ../src/qt/forms/transactiondescdialog.ui \
- ../src/qt/forms/createwalletdialog.ui
-
-RESOURCES += \
- ../src/qt/BGL.qrc
diff --git a/contrib/README.md b/contrib/README.md
deleted file mode 100644
index 1a609c1e67..0000000000
--- a/contrib/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-Repository Tools
----------------------
-
-### [Developer tools](/contrib/devtools) ###
-Specific tools for developers working on this repository.
-Additional tools, including the `github-merge.py` script, are available in the [maintainer-tools](https://github.com/BGL-core/BGL-maintainer-tools) repository.
-
-### [Verify-Commits](/contrib/verify-commits) ###
-Tool to verify that every merge commit was signed by a developer using the `github-merge.py` script.
-
-### [Linearize](/contrib/linearize) ###
-Construct a linear, no-fork, best version of the blockchain.
-
-### [Qos](/contrib/qos) ###
-
-A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the BGL network. This means one can have an always-on BGLd instance running, and another local BGLd/BGL-qt instance which connects to this node and receives blocks from it.
-
-### [Seeds](/contrib/seeds) ###
-Utility to generate the pnSeed[] array that is compiled into the client.
-
-Build Tools and Keys
----------------------
-
-### Packaging ###
-The [Debian](/contrib/debian) subfolder contains the copyright file.
-
-All other packaging related files can be found in the [BGL-core/packaging](https://github.com/BGL-core/packaging) repository.
-
-### [MacDeploy](/contrib/macdeploy) ###
-Scripts and notes for Mac builds.
-
-Test and Verify Tools
----------------------
-
-### [TestGen](/contrib/testgen) ###
-Utilities to generate test vectors for the data-driven BGL tests.
-
-### [Verify-Binaries](/contrib/verify-binaries) ###
-This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.
-
-Command Line Tools
----------------------
-
-### [Completions](/contrib/completions) ###
-Shell completions for bash and fish.
diff --git a/contrib/asmap/README.md b/contrib/asmap/README.md
deleted file mode 100644
index 5fab4b285e..0000000000
--- a/contrib/asmap/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ASMap Tool
-
-Tool for performing various operations on textual and binary asmap files,
-particularly encoding/compressing the raw data to the binary format that can
-be used in Bitcoin Core with the `-asmap` option.
-
-Example usage:
-```
-python3 asmap-tool.py encode /path/to/input.file /path/to/output.file
-python3 asmap-tool.py decode /path/to/input.file /path/to/output.file
-python3 asmap-tool.py diff /path/to/first.file /path/to/second.file
-```
diff --git a/contrib/asmap/asmap-tool.py b/contrib/asmap/asmap-tool.py
deleted file mode 100755
index 09c28725e4..0000000000
--- a/contrib/asmap/asmap-tool.py
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2022 Pieter Wuille
-# Distributed under the MIT software license, see the accompanying
-# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
-
-import argparse
-import sys
-import ipaddress
-import math
-
-import asmap
-
-def load_file(input_file):
- try:
- contents = input_file.read()
- except OSError as err:
- sys.exit(f"Input file '{input_file.name}' cannot be read: {err.strerror}.")
- try:
- bin_asmap = asmap.ASMap.from_binary(contents)
- except ValueError:
- bin_asmap = None
- txt_error = None
- entries = None
- try:
- txt_contents = str(contents, encoding="utf-8")
- except UnicodeError:
- txt_error = "invalid UTF-8"
- txt_contents = None
- if txt_contents is not None:
- entries = []
- for line in txt_contents.split("\n"):
- idx = line.find('#')
- if idx >= 0:
- line = line[:idx]
- line = line.lstrip(' ').rstrip(' \t\r\n')
- if len(line) == 0:
- continue
- fields = line.split(' ')
- if len(fields) != 2:
- txt_error = f"unparseable line '{line}'"
- entries = None
- break
- prefix, asn = fields
- if len(asn) <= 2 or asn[:2] != "AS" or any(c < '0' or c > '9' for c in asn[2:]):
- txt_error = f"invalid ASN '{asn}'"
- entries = None
- break
- try:
- net = ipaddress.ip_network(prefix)
- except ValueError:
- txt_error = f"invalid network '{prefix}'"
- entries = None
- break
- entries.append((asmap.net_to_prefix(net), int(asn[2:])))
- if entries is not None and bin_asmap is not None and len(contents) > 0:
- sys.exit(f"Input file '{input_file.name}' is ambiguous.")
- if entries is not None:
- state = asmap.ASMap()
- state.update_multi(entries)
- return state
- if bin_asmap is not None:
- return bin_asmap
- sys.exit(f"Input file '{input_file.name}' is neither a valid binary asmap file nor valid text input ({txt_error}).")
-
-
-def save_binary(output_file, state, fill):
- contents = state.to_binary(fill=fill)
- try:
- output_file.write(contents)
- output_file.close()
- except OSError as err:
- sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.")
-
-def save_text(output_file, state, fill, overlapping):
- for prefix, asn in state.to_entries(fill=fill, overlapping=overlapping):
- net = asmap.prefix_to_net(prefix)
- try:
- print(f"{net} AS{asn}", file=output_file)
- except OSError as err:
- sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.")
- try:
- output_file.close()
- except OSError as err:
- sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.")
-
-def main():
- parser = argparse.ArgumentParser(description="Tool for performing various operations on textual and binary asmap files.")
- subparsers = parser.add_subparsers(title="valid subcommands", dest="subcommand")
-
- parser_encode = subparsers.add_parser("encode", help="convert asmap data to binary format")
- parser_encode.add_argument('-f', '--fill', dest="fill", default=False, action="store_true",
- help="permit reassigning undefined network ranges arbitrarily to reduce size")
- parser_encode.add_argument('infile', nargs='?', type=argparse.FileType('rb'), default=sys.stdin.buffer,
- help="input asmap file (text or binary); default is stdin")
- parser_encode.add_argument('outfile', nargs='?', type=argparse.FileType('wb'), default=sys.stdout.buffer,
- help="output binary asmap file; default is stdout")
-
- parser_decode = subparsers.add_parser("decode", help="convert asmap data to text format")
- parser_decode.add_argument('-f', '--fill', dest="fill", default=False, action="store_true",
- help="permit reassigning undefined network ranges arbitrarily to reduce length")
- parser_decode.add_argument('-n', '--nonoverlapping', dest="overlapping", default=True, action="store_false",
- help="output strictly non-overall ping network ranges (increases output size)")
- parser_decode.add_argument('infile', nargs='?', type=argparse.FileType('rb'), default=sys.stdin.buffer,
- help="input asmap file (text or binary); default is stdin")
- parser_decode.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout,
- help="output text file; default is stdout")
-
- parser_diff = subparsers.add_parser("diff", help="compute the difference between two asmap files")
- parser_diff.add_argument('-i', '--ignore-unassigned', dest="ignore_unassigned", default=False, action="store_true",
- help="ignore unassigned ranges in the first input (useful when second input is filled)")
- parser_diff.add_argument('infile1', type=argparse.FileType('rb'),
- help="first file to compare (text or binary)")
- parser_diff.add_argument('infile2', type=argparse.FileType('rb'),
- help="second file to compare (text or binary)")
-
- args = parser.parse_args()
- if args.subcommand is None:
- parser.print_help()
- elif args.subcommand == "encode":
- state = load_file(args.infile)
- save_binary(args.outfile, state, fill=args.fill)
- elif args.subcommand == "decode":
- state = load_file(args.infile)
- save_text(args.outfile, state, fill=args.fill, overlapping=args.overlapping)
- elif args.subcommand == "diff":
- state1 = load_file(args.infile1)
- state2 = load_file(args.infile2)
- ipv4_changed = 0
- ipv6_changed = 0
- for prefix, old_asn, new_asn in state1.diff(state2):
- if args.ignore_unassigned and old_asn == 0:
- continue
- net = asmap.prefix_to_net(prefix)
- if isinstance(net, ipaddress.IPv4Network):
- ipv4_changed += 1 << (32 - net.prefixlen)
- elif isinstance(net, ipaddress.IPv6Network):
- ipv6_changed += 1 << (128 - net.prefixlen)
- if new_asn == 0:
- print(f"# {net} was AS{old_asn}")
- elif old_asn == 0:
- print(f"{net} AS{new_asn} # was unassigned")
- else:
- print(f"{net} AS{new_asn} # was AS{old_asn}")
- ipv4_change_str = "" if ipv4_changed == 0 else f" (2^{math.log2(ipv4_changed):.2f})"
- ipv6_change_str = "" if ipv6_changed == 0 else f" (2^{math.log2(ipv6_changed):.2f})"
-
- print(
- f"# {ipv4_changed}{ipv4_change_str} IPv4 addresses changed; "
- f"{ipv6_changed}{ipv6_change_str} IPv6 addresses changed"
- )
- else:
- parser.print_help()
- sys.exit("No command provided.")
-
-if __name__ == '__main__':
- main()
diff --git a/contrib/asmap/asmap.py b/contrib/asmap/asmap.py
deleted file mode 100644
index 903a42c945..0000000000
--- a/contrib/asmap/asmap.py
+++ /dev/null
@@ -1,810 +0,0 @@
-# Copyright (c) 2022 Pieter Wuille
-# Distributed under the MIT software license, see the accompanying
-# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
-
-"""
-This module provides the ASNEntry and ASMap classes.
-"""
-
-import copy
-import ipaddress
-import random
-import unittest
-from collections.abc import Callable, Iterable
-from enum import Enum
-from functools import total_ordering
-from typing import Optional, Union, overload
-
-def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> list[bool]:
- """
- Convert an IPv4 or IPv6 network to a prefix represented as a list of bits.
- IPv4 ranges are remapped to their IPv4-mapped IPv6 range (::ffff:0:0/96).
- """
- num_bits = net.prefixlen
- netrange = int.from_bytes(net.network_address.packed, 'big')
-
- # Map an IPv4 prefix into IPv6 space.
- if isinstance(net, ipaddress.IPv4Network):
- num_bits += 96
- netrange += 0xffff00000000
-
- # Strip unused bottom bits.
- assert (netrange & ((1 << (128 - num_bits)) - 1)) == 0
- return [((netrange >> (127 - i)) & 1) != 0 for i in range(num_bits)]
-
-def prefix_to_net(prefix: list[bool]) -> Union[ipaddress.IPv4Network,ipaddress.IPv6Network]:
- """The reverse operation of net_to_prefix."""
- # Convert to number
- netrange = sum(b << (127 - i) for i, b in enumerate(prefix))
- num_bits = len(prefix)
- assert num_bits <= 128
-
- # Return IPv4 range if in ::ffff:0:0/96
- if num_bits >= 96 and (netrange >> 32) == 0xffff:
- return ipaddress.IPv4Network((netrange & 0xffffffff, num_bits - 96), True)
-
- # Return IPv6 range otherwise.
- return ipaddress.IPv6Network((netrange, num_bits), True)
-
-# Shortcut for (prefix, ASN) entries.
-ASNEntry = tuple[list[bool], int]
-
-# Shortcut for (prefix, old ASN, new ASN) entries.
-ASNDiff = tuple[list[bool], int, int]
-
-class _VarLenCoder:
- """
- A class representing a custom variable-length binary encoder/decoder for
- integers. Each object represents a different coder, with different parameters
- minval and clsbits.
- The encoding is easiest to describe using an example. Let's say minval=100 and
- clsbits=[4,2,2,3]. In that case:
- - x in [100..115]: encoded as [0] + [4-bit BE encoding of (x-100)].
- - x in [116..119]: encoded as [1,0] + [2-bit BE encoding of (x-116)].
- - x in [120..123]: encoded as [1,1,0] + [2-bit BE encoding of (x-120)].
- - x in [124..131]: encoded as [1,1,1] + [3-bit BE encoding of (x-124)].
- In general, every number is encoded as:
- - First, k "1"-bits, where k is the class the number falls in (there is one class
- per element of clsbits).
- - Then, a "0"-bit, unless k is the highest class, in which case there is nothing.
- - Lastly, clsbits[k] bits encoding in big endian the position in its class that
- number falls into.
- - Every class k consists of 2^clsbits[k] consecutive integers. k=0 starts at minval,
- other classes start one past the last element of the class before it.
- """
-
- def __init__(self, minval: int, clsbits: list[int]):
- """Construct a new _VarLenCoder."""
- self._minval = minval
- self._clsbits = clsbits
- self._maxval = minval + sum(1 << b for b in clsbits) - 1
-
- def can_encode(self, val: int) -> bool:
- """Check whether value val is in the range this coder supports."""
- return self._minval <= val <= self._maxval
-
- def encode(self, val: int, ret: list[int]) -> None:
- """Append encoding of val onto integer list ret."""
-
- assert self._minval <= val <= self._maxval
- val -= self._minval
- bits = 0
- for k, bits in enumerate(self._clsbits):
- if val >> bits:
- # If the value will not fit in class k, subtract its range from v,
- # emit a "1" bit and continue with the next class.
- val -= 1 << bits
- ret.append(1)
- else:
- if k + 1 < len(self._clsbits):
- # Unless we're in the last class, emit a "0" bit.
- ret.append(0)
- break
- # And then encode v (now the position within the class) in big endian.
- ret.extend((val >> (bits - 1 - b)) & 1 for b in range(bits))
-
- def encode_size(self, val: int) -> int:
- """Compute how many bits are needed to encode val."""
- assert self._minval <= val <= self._maxval
- val -= self._minval
- ret = 0
- bits = 0
- for k, bits in enumerate(self._clsbits):
- if val >> bits:
- val -= 1 << bits
- ret += 1
- else:
- ret += k + 1 < len(self._clsbits)
- break
- return ret + bits
-
- def decode(self, stream, bitpos) -> tuple[int,int]:
- """Decode a number starting at bitpos in stream, returning value and new bitpos."""
- val = self._minval
- bits = 0
- for k, bits in enumerate(self._clsbits):
- bit = 0
- if k + 1 < len(self._clsbits):
- bit = stream[bitpos]
- bitpos += 1
- if not bit:
- break
- val += 1 << bits
- for i in range(bits):
- bit = stream[bitpos]
- bitpos += 1
- val += bit << (bits - 1 - i)
- return val, bitpos
-
-# Variable-length encoders used in the binary asmap format.
-_CODER_INS = _VarLenCoder(0, [0, 0, 1])
-_CODER_ASN = _VarLenCoder(1, list(range(15, 25)))
-_CODER_MATCH = _VarLenCoder(2, list(range(1, 9)))
-_CODER_JUMP = _VarLenCoder(17, list(range(5, 31)))
-
-class _Instruction(Enum):
- """One instruction in the binary asmap format."""
- # A return instruction, encoded as [0], returns a constant ASN. It is followed by
- # an integer using the ASN encoding.
- RETURN = 0
- # A jump instruction, encoded as [1,0] inspects the next unused bit in the input
- # and either continues execution (if 0), or skips a specified number of bits (if 1).
- # It is followed by an integer, and then two subprograms. The integer uses jump encoding
- # and corresponds to the length of the first subprogram (so it can be skipped).
- JUMP = 1
- # A match instruction, encoded as [1,1,0] inspects 1 or more of the next unused bits
- # in the input with its argument. If they all match, execution continues. If they do
- # not, failure is returned. If a default instruction has been executed before, instead
- # of failure the default instruction's argument is returned. It is followed by an
- # integer in match encoding, and a subprogram. That value is at least 2 bits and at
- # most 9 bits. An n-bit value signifies matching (n-1) bits in the input with the lower
- # (n-1) bits in the match value.
- MATCH = 2
- # A default instruction, encoded as [1,1,1] sets the default variable to its argument,
- # and continues execution. It is followed by an integer in ASN encoding, and a subprogram.
- DEFAULT = 3
- # Not an actual instruction, but a way to encode the empty program that fails. In the
- # encoder, it is used more generally to represent the failure case inside MATCH instructions,
- # which may (if used inside the context of a DEFAULT instruction) actually correspond to
- # a successful return. In this usage, they're always converted to an actual MATCH or RETURN
- # before the top level is reached (see make_default below).
- END = 4
-
-class _BinNode:
- """A class representing a (node of) the parsed binary asmap format."""
-
- @overload
- def __init__(self, ins: _Instruction): ...
- @overload
- def __init__(self, ins: _Instruction, arg1: int): ...
- @overload
- def __init__(self, ins: _Instruction, arg1: "_BinNode", arg2: "_BinNode"): ...
- @overload
- def __init__(self, ins: _Instruction, arg1: int, arg2: "_BinNode"): ...
-
- def __init__(self, ins: _Instruction, arg1=None, arg2=None):
- """
- Construct a new asmap node. Possibilities are:
- - _BinNode(_Instruction.RETURN, asn)
- - _BinNode(_Instruction.JUMP, node_0, node_1)
- - _BinNode(_Instruction.MATCH, val, node)
- - _BinNode(_Instruction.DEFAULT, asn, node)
- - _BinNode(_Instruction.END)
- """
- self.ins = ins
- self.arg1 = arg1
- self.arg2 = arg2
- if ins == _Instruction.RETURN:
- assert isinstance(arg1, int)
- assert arg2 is None
- self.size = _CODER_INS.encode_size(ins.value) + _CODER_ASN.encode_size(arg1)
- elif ins == _Instruction.JUMP:
- assert isinstance(arg1, _BinNode)
- assert isinstance(arg2, _BinNode)
- self.size = (_CODER_INS.encode_size(ins.value) + _CODER_JUMP.encode_size(arg1.size) +
- arg1.size + arg2.size)
- elif ins == _Instruction.DEFAULT:
- assert isinstance(arg1, int)
- assert isinstance(arg2, _BinNode)
- self.size = _CODER_INS.encode_size(ins.value) + _CODER_ASN.encode_size(arg1) + arg2.size
- elif ins == _Instruction.MATCH:
- assert isinstance(arg1, int)
- assert isinstance(arg2, _BinNode)
- self.size = (_CODER_INS.encode_size(ins.value) + _CODER_MATCH.encode_size(arg1)
- + arg2.size)
- elif ins == _Instruction.END:
- assert arg1 is None
- assert arg2 is None
- self.size = 0
- else:
- assert False
-
- @staticmethod
- def make_end() -> "_BinNode":
- """Constructor for a _BinNode with just an END instruction."""
- return _BinNode(_Instruction.END)
-
- @staticmethod
- def make_leaf(val: int) -> "_BinNode":
- """Constructor for a _BinNode of just a RETURN instruction."""
- assert val is not None and val > 0
- return _BinNode(_Instruction.RETURN, val)
-
- @staticmethod
- def make_branch(node0: "_BinNode", node1: "_BinNode") -> "_BinNode":
- """
- Construct a _BinNode corresponding to running either the node0 or node1 subprogram,
- based on the next input bit. It exploits shortcuts that are possible in the encoding,
- and uses either a JUMP, MATCH, or END instruction.
- """
- if node0.ins == _Instruction.END and node1.ins == _Instruction.END:
- return node0
- if node0.ins == _Instruction.END:
- if node1.ins == _Instruction.MATCH and node1.arg1 <= 0xFF:
- return _BinNode(node1.ins, node1.arg1 + (1 << node1.arg1.bit_length()), node1.arg2)
- return _BinNode(_Instruction.MATCH, 3, node1)
- if node1.ins == _Instruction.END:
- if node0.ins == _Instruction.MATCH and node0.arg1 <= 0xFF:
- return _BinNode(node0.ins, node0.arg1 + (1 << (node0.arg1.bit_length() - 1)),
- node0.arg2)
- return _BinNode(_Instruction.MATCH, 2, node0)
- return _BinNode(_Instruction.JUMP, node0, node1)
-
- @staticmethod
- def make_default(val: int, sub: "_BinNode") -> "_BinNode":
- """
- Construct a _BinNode that corresponds to the specified subprogram, with the specified
- default value. It exploits shortcuts that are possible in the encoding, and will use
- either a DEFAULT or a RETURN instruction."""
- assert val is not None and val > 0
- if sub.ins == _Instruction.END:
- return _BinNode(_Instruction.RETURN, val)
- if sub.ins in (_Instruction.RETURN, _Instruction.DEFAULT):
- return sub
- return _BinNode(_Instruction.DEFAULT, val, sub)
-
-@total_ordering
-class ASMap:
- """
- A class whose objects represent a mapping from subnets to ASNs.
- Internally the mapping is stored as a binary trie, but can be converted
- from/to a list of ASNEntry objects, and from/to the binary asmap file format.
- In the trie representation, nodes are represented as bare lists for efficiency
- and ease of manipulation:
- - [0] means an unassigned subnet (no ASN mapping for it is present)
- - [int] means a subnet mapped entirely to the specified ASN.
- - [node,node] means a subnet whose lower half and upper half have different
- - mappings, represented by new trie nodes.
- """
-
- def update(self, prefix: list[bool], asn: int) -> None:
- """Update this ASMap object to map prefix to the specified asn."""
- assert asn == 0 or _CODER_ASN.can_encode(asn)
-
- def recurse(node: list, offset: int) -> None:
- if offset == len(prefix):
- # Reached the end of prefix; overwrite this node.
- node.clear()
- node.append(asn)
- return
- if len(node) == 1:
- # Need to descend into a leaf node; split it up.
- oldasn = node[0]
- node.clear()
- node.append([oldasn])
- node.append([oldasn])
- # Descend into the node.
- recurse(node[prefix[offset]], offset + 1)
- # If the result is two identical leaf children, merge them.
- if len(node[0]) == 1 and len(node[1]) == 1 and node[0] == node[1]:
- oldasn = node[0][0]
- node.clear()
- node.append(oldasn)
- recurse(self._trie, 0)
-
- def update_multi(self, entries: list[tuple[list[bool], int]]) -> None:
- """Apply multiple update operations, where longer prefixes take precedence."""
- entries.sort(key=lambda entry: len(entry[0]))
- for prefix, asn in entries:
- self.update(prefix, asn)
-
- def _set_trie(self, trie) -> None:
- """Set trie directly. Internal use only."""
- def recurse(node: list) -> None:
- if len(node) < 2:
- return
- recurse(node[0])
- recurse(node[1])
- if len(node[0]) == 2:
- return
- if node[0] == node[1]:
- if len(node[0]) == 0:
- node.clear()
- else:
- asn = node[0][0]
- node.clear()
- node.append(asn)
- recurse(trie)
- self._trie = trie
-
- def __init__(self, entries: Optional[Iterable[ASNEntry]] = None) -> None:
- """Construct an ASMap object from an optional list of entries."""
- self._trie = [0]
- if entries is not None:
- def entry_key(entry):
- """Sort function that places shorter prefixes first."""
- prefix, asn = entry
- return len(prefix), prefix, asn
- for prefix, asn in sorted(entries, key=entry_key):
- self.update(prefix, asn)
-
- def lookup(self, prefix: list[bool]) -> Optional[int]:
- """Look up a prefix. Returns ASN, or 0 if unassigned, or None if indeterminate."""
- node = self._trie
- for bit in prefix:
- if len(node) == 1:
- break
- node = node[bit]
- if len(node) == 1:
- return node[0]
- return None
-
- def _to_entries_flat(self, fill: bool = False) -> list[ASNEntry]:
- """Convert an ASMap object to a list of non-overlapping (prefix, asn) objects."""
- prefix : list[bool] = []
-
- def recurse(node: list) -> list[ASNEntry]:
- ret = []
- if len(node) == 1:
- if node[0] > 0:
- ret = [(list(prefix), node[0])]
- elif len(node) == 2:
- prefix.append(False)
- ret = recurse(node[0])
- prefix[-1] = True
- ret += recurse(node[1])
- prefix.pop()
- if fill and len(ret) > 1:
- asns = set(x[1] for x in ret)
- if len(asns) == 1:
- ret = [(list(prefix), list(asns)[0])]
- return ret
- return recurse(self._trie)
-
- def _to_entries_minimal(self, fill: bool = False) -> list[ASNEntry]:
- """Convert a trie to a minimal list of ASNEntry objects, exploiting overlap."""
- prefix : list[bool] = []
-
- def recurse(node: list) -> (tuple[dict[Optional[int], list[ASNEntry]], bool]):
- if len(node) == 1 and node[0] == 0:
- return {None if fill else 0: []}, True
- if len(node) == 1:
- return {node[0]: [], None: [(list(prefix), node[0])]}, False
- ret: dict[Optional[int], list[ASNEntry]] = {}
- prefix.append(False)
- left, lhole = recurse(node[0])
- prefix[-1] = True
- right, rhole = recurse(node[1])
- prefix.pop()
- hole = not fill and (lhole or rhole)
- def candidate(ctx: Optional[int], res0: Optional[list[ASNEntry]],
- res1: Optional[list[ASNEntry]]):
- if res0 is not None and res1 is not None:
- if ctx not in ret or len(res0) + len(res1) < len(ret[ctx]):
- ret[ctx] = res0 + res1
- for ctx in set(left) | set(right):
- candidate(ctx, left.get(ctx), right.get(ctx))
- candidate(ctx, left.get(None), right.get(ctx))
- candidate(ctx, left.get(ctx), right.get(None))
- if not hole:
- for ctx in list(ret):
- if ctx is not None:
- candidate(None, [(list(prefix), ctx)], ret[ctx])
- if None in ret:
- ret = {ctx:entries for ctx, entries in ret.items()
- if ctx is None or len(entries) < len(ret[None])}
- if hole:
- ret = {ctx:entries for ctx, entries in ret.items() if ctx is None or ctx == 0}
- return ret, hole
- res, _ = recurse(self._trie)
- return res[0] if 0 in res else res[None]
-
- def __str__(self) -> str:
- """Convert this ASMap object to a string containing Python code constructing it."""
- return f"ASMap({self._trie})"
-
- def to_entries(self, overlapping: bool = True, fill: bool = False) -> list[ASNEntry]:
- """
- Convert the mappings in this ASMap object to a list of ASNEntry objects.
- Arguments:
- overlapping: Permit the subnets in the resulting ASNEntry to overlap.
- Setting this can result in a shorter list.
- fill: Permit the resulting ASNEntry objects to cover subnets that
- are unassigned in this ASMap object. Setting this can
- result in a shorter list.
- """
- if overlapping:
- return self._to_entries_minimal(fill)
- return self._to_entries_flat(fill)
-
- @staticmethod
- def from_random(num_leaves: int = 10, max_asn: int = 6,
- unassigned_prob: float = 0.5) -> "ASMap":
- """
- Construct a random ASMap object, with specified:
- - Number of leaves in its trie (at least 1)
- - Maximum ASN value (at least 1)
- - Probability for leaf nodes to be unassigned
- The number of leaves in the resulting object may be less than what is
- requested. This method is mostly intended for testing.
- """
- assert num_leaves >= 1
- assert max_asn >= 1 or unassigned_prob == 1
- assert _CODER_ASN.can_encode(max_asn)
- assert 0.0 <= unassigned_prob <= 1.0
- trie: list = []
- leaves = [trie]
- ret = ASMap()
- for i in range(1, num_leaves):
- idx = random.randrange(i)
- leaf = leaves[idx]
- lastleaf = leaves.pop()
- if idx + 1 < i:
- leaves[idx] = lastleaf
- leaf.append([])
- leaf.append([])
- leaves.append(leaf[0])
- leaves.append(leaf[1])
- for leaf in leaves:
- if random.random() >= unassigned_prob:
- leaf.append(random.randrange(1, max_asn + 1))
- else:
- leaf.append(0)
- #pylint: disable=protected-access
- ret._set_trie(trie)
- return ret
-
- def _to_binnode(self, fill: bool = False) -> _BinNode:
- """Convert a trie to a _BinNode object."""
- def recurse(node: list) -> tuple[dict[Optional[int], _BinNode], bool]:
- if len(node) == 1 and node[0] == 0:
- return {(None if fill else 0): _BinNode.make_end()}, True
- if len(node) == 1:
- return {None: _BinNode.make_leaf(node[0]), node[0]: _BinNode.make_end()}, False
- ret: dict[Optional[int], _BinNode] = {}
- left, lhole = recurse(node[0])
- right, rhole = recurse(node[1])
- hole = (lhole or rhole) and not fill
-
- def candidate(ctx: Optional[int], arg1, arg2, func: Callable):
- if arg1 is not None and arg2 is not None:
- cand = func(arg1, arg2)
- if ctx not in ret or cand.size < ret[ctx].size:
- ret[ctx] = cand
-
- union = set(left) | set(right)
- sorted_union = sorted(union, key=lambda x: (x is None, x))
- for ctx in sorted_union:
- candidate(ctx, left.get(ctx), right.get(ctx), _BinNode.make_branch)
- candidate(ctx, left.get(None), right.get(ctx), _BinNode.make_branch)
- candidate(ctx, left.get(ctx), right.get(None), _BinNode.make_branch)
- if not hole:
- for ctx in sorted(set(ret) - set([None])):
- candidate(None, ctx, ret[ctx], _BinNode.make_default)
- if None in ret:
- ret = {ctx:enc for ctx, enc in ret.items()
- if ctx is None or enc.size < ret[None].size}
- if hole:
- ret = {ctx:enc for ctx, enc in ret.items() if ctx is None or ctx == 0}
- return ret, hole
- res, _ = recurse(self._trie)
- return res[0] if 0 in res else res[None]
-
- @staticmethod
- def _from_binnode(binnode: _BinNode) -> "ASMap":
- """Construct an ASMap object from a _BinNode. Internal use only."""
- def recurse(node: _BinNode, default: int) -> list:
- if node.ins == _Instruction.RETURN:
- return [node.arg1]
- if node.ins == _Instruction.JUMP:
- return [recurse(node.arg1, default), recurse(node.arg2, default)]
- if node.ins == _Instruction.MATCH:
- val = node.arg1
- sub = recurse(node.arg2, default)
- while val >= 2:
- bit = val & 1
- val >>= 1
- if bit:
- sub = [[default], sub]
- else:
- sub = [sub, [default]]
- return sub
- assert node.ins == _Instruction.DEFAULT
- return recurse(node.arg2, node.arg1)
- ret = ASMap()
- if binnode.ins != _Instruction.END:
- #pylint: disable=protected-access
- ret._set_trie(recurse(binnode, 0))
- return ret
-
- def to_binary(self, fill: bool = False) -> bytes:
- """
- Convert this ASMap object to binary.
- Argument:
- fill: permit the resulting binary encoder to contain mappers for
- unassigned subnets in this ASMap object. Doing so may
- reduce the size of the encoding.
- Returns:
- A bytes object with the encoding of this ASMap object.
- """
- bits: list[int] = []
-
- def recurse(node: _BinNode) -> None:
- _CODER_INS.encode(node.ins.value, bits)
- if node.ins == _Instruction.RETURN:
- _CODER_ASN.encode(node.arg1, bits)
- elif node.ins == _Instruction.JUMP:
- _CODER_JUMP.encode(node.arg1.size, bits)
- recurse(node.arg1)
- recurse(node.arg2)
- elif node.ins == _Instruction.DEFAULT:
- _CODER_ASN.encode(node.arg1, bits)
- recurse(node.arg2)
- else:
- assert node.ins == _Instruction.MATCH
- _CODER_MATCH.encode(node.arg1, bits)
- recurse(node.arg2)
-
- binnode = self._to_binnode(fill)
- if binnode.ins != _Instruction.END:
- recurse(binnode)
-
- val = 0
- nbits = 0
- ret = []
- for bit in bits:
- val += (bit << nbits)
- nbits += 1
- if nbits == 8:
- ret.append(val)
- val = 0
- nbits = 0
- if nbits:
- ret.append(val)
- return bytes(ret)
-
- @staticmethod
- def from_binary(bindata: bytes) -> Optional["ASMap"]:
- """Decode an ASMap object from the provided binary encoding."""
-
- bits: list[int] = []
- for byte in bindata:
- bits.extend((byte >> i) & 1 for i in range(8))
-
- def recurse(bitpos: int) -> tuple[_BinNode, int]:
- insval, bitpos = _CODER_INS.decode(bits, bitpos)
- ins = _Instruction(insval)
- if ins == _Instruction.RETURN:
- asn, bitpos = _CODER_ASN.decode(bits, bitpos)
- return _BinNode(ins, asn), bitpos
- if ins == _Instruction.JUMP:
- jump, bitpos = _CODER_JUMP.decode(bits, bitpos)
- left, bitpos1 = recurse(bitpos)
- if bitpos1 != bitpos + jump:
- raise ValueError("Inconsistent jump")
- right, bitpos = recurse(bitpos1)
- return _BinNode(ins, left, right), bitpos
- if ins == _Instruction.MATCH:
- match, bitpos = _CODER_MATCH.decode(bits, bitpos)
- sub, bitpos = recurse(bitpos)
- return _BinNode(ins, match, sub), bitpos
- assert ins == _Instruction.DEFAULT
- asn, bitpos = _CODER_ASN.decode(bits, bitpos)
- sub, bitpos = recurse(bitpos)
- return _BinNode(ins, asn, sub), bitpos
-
- if len(bits) == 0:
- binnode = _BinNode(_Instruction.END)
- else:
- try:
- binnode, bitpos = recurse(0)
- except (ValueError, IndexError):
- return None
- if bitpos < len(bits) - 7:
- return None
- if not all(bit == 0 for bit in bits[bitpos:]):
- return None
-
- return ASMap._from_binnode(binnode)
-
- def __lt__(self, other: "ASMap") -> bool:
- return self._trie < other._trie
-
- def __eq__(self, other: object) -> bool:
- if isinstance(other, ASMap):
- return self._trie == other._trie
- return False
-
- def extends(self, req: "ASMap") -> bool:
- """Determine whether this matches req for all subranges where req is assigned."""
- def recurse(actual: list, require: list) -> bool:
- if len(require) == 1 and require[0] == 0:
- return True
- if len(require) == 1:
- if len(actual) == 1:
- return bool(require[0] == actual[0])
- return recurse(actual[0], require) and recurse(actual[1], require)
- if len(actual) == 2:
- return recurse(actual[0], require[0]) and recurse(actual[1], require[1])
- return recurse(actual, require[0]) and recurse(actual, require[1])
- assert isinstance(req, ASMap)
- #pylint: disable=protected-access
- return recurse(self._trie, req._trie)
-
- def diff(self, other: "ASMap") -> list[ASNDiff]:
- """Compute the diff from self to other."""
- prefix: list[bool] = []
- ret: list[ASNDiff] = []
-
- def recurse(old_node: list, new_node: list):
- if len(old_node) == 1 and len(new_node) == 1:
- if old_node[0] != new_node[0]:
- ret.append((list(prefix), old_node[0], new_node[0]))
- else:
- old_left: list = old_node if len(old_node) == 1 else old_node[0]
- old_right: list = old_node if len(old_node) == 1 else old_node[1]
- new_left: list = new_node if len(new_node) == 1 else new_node[0]
- new_right: list = new_node if len(new_node) == 1 else new_node[1]
- prefix.append(False)
- recurse(old_left, new_left)
- prefix[-1] = True
- recurse(old_right, new_right)
- prefix.pop()
- assert isinstance(other, ASMap)
- #pylint: disable=protected-access
- recurse(self._trie, other._trie)
- return ret
-
- def __copy__(self) -> "ASMap":
- """Construct a copy of this ASMap object. Its state will not be shared."""
- ret = ASMap()
- #pylint: disable=protected-access
- ret._set_trie(copy.deepcopy(self._trie))
- return ret
-
- def __deepcopy__(self, _) -> "ASMap":
- # ASMap objects do not allow sharing of the _trie member, so we don't need the memoization.
- return self.__copy__()
-
-
-class TestASMap(unittest.TestCase):
- """Unit tests for this module."""
-
- def test_ipv6_prefix_roundtrips(self) -> None:
- """Test that random IPv6 network ranges roundtrip through prefix encoding."""
- for _ in range(20):
- net_bits = random.getrandbits(128)
- for prefix_len in range(0, 129):
- masked_bits = (net_bits >> (128 - prefix_len)) << (128 - prefix_len)
- net = ipaddress.IPv6Network((masked_bits.to_bytes(16, 'big'), prefix_len))
- prefix = net_to_prefix(net)
- self.assertTrue(len(prefix) <= 128)
- net2 = prefix_to_net(prefix)
- self.assertEqual(net, net2)
-
- def test_ipv4_prefix_roundtrips(self) -> None:
- """Test that random IPv4 network ranges roundtrip through prefix encoding."""
- for _ in range(100):
- net_bits = random.getrandbits(32)
- for prefix_len in range(0, 33):
- masked_bits = (net_bits >> (32 - prefix_len)) << (32 - prefix_len)
- net = ipaddress.IPv4Network((masked_bits.to_bytes(4, 'big'), prefix_len))
- prefix = net_to_prefix(net)
- self.assertTrue(32 <= len(prefix) <= 128)
- net2 = prefix_to_net(prefix)
- self.assertEqual(net, net2)
-
- def test_asmap_roundtrips(self) -> None:
- """Test case that verifies random ASMap objects roundtrip to/from entries/binary."""
- # Iterate over the number of leaves the random test ASMap objects have.
- for leaves in range(1, 20):
- # Iterate over the number of bits in the AS numbers used.
- for asnbits in range(0, 24):
- # Iterate over the probability that leaves are unassigned.
- for pct in range(101):
- # Construct a random ASMap object according to the above parameters.
- asmap = ASMap.from_random(num_leaves=leaves, max_asn=1 + (1 << asnbits),
- unassigned_prob=0.01 * pct)
- # Run tests for to_entries and construction from those entries, both
- # for overlapping and non-overlapping ones.
- for overlapping in [False, True]:
- entries = asmap.to_entries(overlapping=overlapping, fill=False)
- random.shuffle(entries)
- asmap2 = ASMap(entries)
- assert asmap2 is not None
- self.assertEqual(asmap2, asmap)
- entries = asmap.to_entries(overlapping=overlapping, fill=True)
- random.shuffle(entries)
- asmap2 = ASMap(entries)
- assert asmap2 is not None
- self.assertTrue(asmap2.extends(asmap))
-
- # Run tests for to_binary and construction from binary.
- enc = asmap.to_binary(fill=False)
- asmap3 = ASMap.from_binary(enc)
- assert asmap3 is not None
- self.assertEqual(asmap3, asmap)
- enc = asmap.to_binary(fill=True)
- asmap3 = ASMap.from_binary(enc)
- assert asmap3 is not None
- self.assertTrue(asmap3.extends(asmap))
-
- def test_patching(self) -> None:
- """Test behavior of update, lookup, extends, and diff."""
- #pylint: disable=too-many-locals,too-many-nested-blocks
- # Iterate over the number of leaves the random test ASMap objects have.
- for leaves in range(1, 20):
- # Iterate over the number of bits in the AS numbers used.
- for asnbits in range(0, 10):
- # Iterate over the probability that leaves are unassigned.
- for pct in range(0, 101):
- # Construct a random ASMap object according to the above parameters.
- asmap = ASMap.from_random(num_leaves=leaves, max_asn=1 + (1 << asnbits),
- unassigned_prob=0.01 * pct)
- # Make a copy of that asmap object to which patches will be applied.
- # It starts off being equal to asmap.
- patched = copy.copy(asmap)
- # Keep a list of patches performed.
- patches: list[ASNEntry] = []
- # Initially there cannot be any difference.
- self.assertEqual(asmap.diff(patched), [])
- # Make 5 patches, each building on top of the previous ones.
- for _ in range(0, 5):
- # Construct a random path and new ASN to assign it to, apply it to patched,
- # and remember it in patches.
- pathlen = random.randrange(5)
- path = [random.getrandbits(1) != 0 for _ in range(pathlen)]
- newasn = random.randrange(1 + (1 << asnbits))
- patched.update(path, newasn)
- patches = [(path, newasn)] + patches
-
- # Compute the diff, and whether asmap extends patched, and the other way
- # around.
- diff = asmap.diff(patched)
- self.assertEqual(asmap == patched, len(diff) == 0)
- extends = asmap.extends(patched)
- back_extends = patched.extends(asmap)
- # Determine whether those extends results are consistent with the diff
- # result.
- self.assertEqual(extends, all(d[2] == 0 for d in diff))
- self.assertEqual(back_extends, all(d[1] == 0 for d in diff))
- # For every diff found:
- for path, old_asn, new_asn in diff:
- # Verify asmap and patched actually differ there.
- self.assertTrue(old_asn != new_asn)
- self.assertEqual(asmap.lookup(path), old_asn)
- self.assertEqual(patched.lookup(path), new_asn)
- for _ in range(2):
- # Extend the path far enough that it's smaller than any mapped
- # range, and check the lookup holds there too.
- spec_path = list(path)
- while len(spec_path) < 32:
- spec_path.append(random.getrandbits(1) != 0)
- self.assertEqual(asmap.lookup(spec_path), old_asn)
- self.assertEqual(patched.lookup(spec_path), new_asn)
- # Search through the list of performed patches to find the last one
- # applying to the extended path (note that patches is in reverse
- # order, so the first match should work).
- found = False
- for patch_path, patch_asn in patches:
- if spec_path[:len(patch_path)] == patch_path:
- # When found, it must match whatever the result was patched
- # to.
- self.assertEqual(new_asn, patch_asn)
- found = True
- break
- # And such a patch must exist.
- self.assertTrue(found)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/contrib/completions/bash/BGL-cli.bash b/contrib/completions/bash/BGL-cli.bash
deleted file mode 100644
index 66f67f087e..0000000000
--- a/contrib/completions/bash/BGL-cli.bash
+++ /dev/null
@@ -1,141 +0,0 @@
-# bash programmable completion for BGL-cli(1)
-# Copyright (c) 2012-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-# call $BGL-cli for RPC
-_BGL_rpc() {
- # determine already specified args necessary for RPC
- local rpcargs=()
- for i in ${COMP_LINE}; do
- case "$i" in
- -conf=*|-datadir=*|-regtest|-rpc*|-testnet)
- rpcargs=( "${rpcargs[@]}" "$i" )
- ;;
- esac
- done
- $BGL_cli "${rpcargs[@]}" "$@"
-}
-
-_BGL_cli() {
- local cur prev words=() cword
- local BGL_cli
-
- # save and use original argument to invoke BGL-cli for -help, help and RPC
- # as BGL-cli might not be in $PATH
- BGL_cli="$1"
-
- COMPREPLY=()
- _get_comp_words_by_ref -n = cur prev words cword
-
- if ((cword > 5)); then
- case ${words[cword-5]} in
- sendtoaddress)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- if ((cword > 4)); then
- case ${words[cword-4]} in
- importaddress|listtransactions|setban)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- signrawtransactionwithkey|signrawtransactionwithwallet)
- COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- if ((cword > 3)); then
- case ${words[cword-3]} in
- addmultisigaddress)
- return 0
- ;;
- getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- if ((cword > 2)); then
- case ${words[cword-2]} in
- addnode)
- COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
- return 0
- ;;
- setban)
- COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
- return 0
- ;;
- fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listreceivedbyaddress|sendrawtransaction)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- case "$prev" in
- backupwallet|dumpwallet|importwallet)
- _filedir
- return 0
- ;;
- getaddednodeinfo|getrawmempool|lockunspent)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- getbalance|getnewaddress|listtransactions|sendmany)
- return 0
- ;;
- esac
-
- case "$cur" in
- -conf=*)
- cur="${cur#*=}"
- _filedir
- return 0
- ;;
- -datadir=*)
- cur="${cur#*=}"
- _filedir -d
- return 0
- ;;
- -*=*) # prevent nonsense completions
- return 0
- ;;
- *)
- local helpopts commands
-
- # only parse -help if senseful
- if [[ -z "$cur" || "$cur" =~ ^- ]]; then
- helpopts=$($BGL_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
- fi
-
- # only parse help if senseful
- if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
- commands=$(_BGL_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
- fi
-
- COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
-
- # Prevent space if an argument is desired
- if [[ $COMPREPLY == *= ]]; then
- compopt -o nospace
- fi
- return 0
- ;;
- esac
-} &&
-complete -F _BGL_cli BGL-cli
-
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 4
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
-# ex: ts=4 sw=4 et filetype=sh
diff --git a/contrib/completions/bash/BGL-tx.bash b/contrib/completions/bash/BGL-tx.bash
deleted file mode 100644
index 4394b339b5..0000000000
--- a/contrib/completions/bash/BGL-tx.bash
+++ /dev/null
@@ -1,57 +0,0 @@
-# bash programmable completion for BGL-tx(1)
-# Copyright (c) 2016-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-_BGL_tx() {
- local cur prev words=() cword
- local BGL_tx
-
- # save and use original argument to invoke BGL-tx for -help
- # it might not be in $PATH
- BGL_tx="$1"
-
- COMPREPLY=()
- _get_comp_words_by_ref -n =: cur prev words cword
-
- case "$cur" in
- load=*:*)
- cur="${cur#load=*:}"
- _filedir
- return 0
- ;;
- *=*) # prevent attempts to complete other arguments
- return 0
- ;;
- esac
-
- if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
- # only options (or an uncompletable hex-string) allowed
- # parse BGL-tx -help for options
- local helpopts
- helpopts=$($BGL_tx -help | sed -e '/^ -/ p' -e d )
- COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
- else
- # only commands are allowed
- # parse -help for commands
- local helpcmds
- helpcmds=$($BGL_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
- COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
- fi
-
- # Prevent space if an argument is desired
- if [[ $COMPREPLY == *= ]]; then
- compopt -o nospace
- fi
-
- return 0
-} &&
-complete -F _BGL_tx BGL-tx
-
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 4
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
-# ex: ts=4 sw=4 et filetype=sh
diff --git a/contrib/completions/bash/BGLd.bash b/contrib/completions/bash/BGLd.bash
deleted file mode 100644
index 385e3110f9..0000000000
--- a/contrib/completions/bash/BGLd.bash
+++ /dev/null
@@ -1,56 +0,0 @@
-# bash programmable completion for BGLd(1) and BGL-qt(1)
-# Copyright (c) 2012-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-_BGLd() {
- local cur prev words=() cword
- local BGLd
-
- # save and use original argument to invoke BGLd for -help
- # it might not be in $PATH
- BGLd="$1"
-
- COMPREPLY=()
- _get_comp_words_by_ref -n = cur prev words cword
-
- case "$cur" in
- -conf=*|-pid=*|-loadblock=*|-rpccookiefile=*|-wallet=*)
- cur="${cur#*=}"
- _filedir
- return 0
- ;;
- -datadir=*)
- cur="${cur#*=}"
- _filedir -d
- return 0
- ;;
- -*=*) # prevent nonsense completions
- return 0
- ;;
- *)
-
- # only parse -help if sensible
- if [[ -z "$cur" || "$cur" =~ ^- ]]; then
- local helpopts
- helpopts=$($BGLd -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
- COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
- fi
-
- # Prevent space if an argument is desired
- if [[ $COMPREPLY == *= ]]; then
- compopt -o nospace
- fi
- return 0
- ;;
- esac
-} &&
-complete -F _BGLd BGLd BGL-qt
-
-# Local variables:
-# mode: shell-script
-# sh-basic-offset: 4
-# sh-indent-comment: t
-# indent-tabs-mode: nil
-# End:
-# ex: ts=4 sw=4 et filetype=sh
diff --git a/contrib/completions/fish/BGL-cli.fish b/contrib/completions/fish/BGL-cli.fish
deleted file mode 100644
index f76b941cbb..0000000000
--- a/contrib/completions/fish/BGL-cli.fish
+++ /dev/null
@@ -1,99 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGL-cli --no-files
-
-function __fish_BGL_cli_get_commands_helper
- set --local cmd (commandline -oc)
-
- # Don't return commands if '-help or -?' in commandline
- if string match --quiet --regex -- '^-help$|^-\?$' $cmd
- return
- end
-
- # Strip help cmd from token to avoid duplication errors
- set --local cmd (string match --invert --regex -- '^help$' $cmd)
- # Strip -stdin* options to avoid waiting for input while we fetch completions
- # TODO: this appears to be broken when run as tab completion (requires ctrl+c to exit)
- set --local cmd (string match --invert --regex -- '^-stdin.*$' $cmd)
-
- # Match, format and return commands
- for command in ($cmd help 2>&1 | string match --invert -r '^\=\=.*' | string match --invert -r '^\\s*$')
- echo $command
- end
-end
-
-function __fish_BGL_cli_get_commands
- argparse 'nohelp' 'commandsonly' -- $argv
- set --local commands
-
- # Exclude description, exclude help
- if set -q _flag_nohelp; and set -q _flag_commandsonly
- set --append commands (__fish_BGL_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help')
- # Include description, exclude help
- else if set -q _flag_nohelp
- set --append commands (__fish_BGL_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help')
- # Exclude description, include help
- else if set -q _flag_commandsonly
- set --append commands (__fish_BGL_cli_get_commands_helper | string replace -r ' .*$' '')
- # Include description, include help
- else
- set --append commands (__fish_BGL_cli_get_commands_helper | string replace ' ' \t)
- end
-
- if string match -q -r '^.*error.*$' $commands[1]
- # RPC offline or RPC wallet not loaded
- return
- else
- for command in $commands
- echo $command
- end
- end
-end
-
-
-function __fish_BGL_cli_get_options
- argparse 'nofiles' -- $argv
- set --local cmd (commandline -oc)
- # Don't return options if '-help or -?' in commandline
- if string match --quiet --regex -- '^-help$|-\?$' $cmd
- return
- end
- set --local options
-
- if set -q _flag_nofiles
- set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
- else
- set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
- end
-
- for option in $options
- echo $option
- end
-end
-
-# Add options with file completion
-# Don't offer after a command is given
-complete \
- --command BGL-cli \
- --no-files \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_cli_get_commands --commandsonly)" \
- --arguments "(__fish_BGL_cli_get_options)"
-# Enable file completions only if the commandline now contains a `*.=` style option
-complete --command BGL-cli \
- --condition 'string match --regex -- ".*=" (commandline -pt)' \
- --force-files
-
-# Add options without file completion
-# Don't offer after a command is given
-complete \
- --command BGL-cli \
- --no-files \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_cli_get_commands --commandsonly)" \
- --arguments "(__fish_BGL_cli_get_options --nofiles)"
-
-# Add commands
-# Permit command completions after `bitcoin-cli help` but not after other commands
-complete \
- --command BGL-cli \
- --no-files \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_cli_get_commands --commandsonly --nohelp)" \
- --arguments "(__fish_BGL_cli_get_commands)"
diff --git a/contrib/completions/fish/BGL-qt.fish b/contrib/completions/fish/BGL-qt.fish
deleted file mode 100644
index ca83e485a2..0000000000
--- a/contrib/completions/fish/BGL-qt.fish
+++ /dev/null
@@ -1,35 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGL-qt --no-files
-
-# Extract options
-function __fish_BGLqt_get_options
- argparse 'nofiles' -- $argv
- set --local cmd (commandline -opc)[1]
- set --local options
-
- if set -q _flag_nofiles
- set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
- else
- set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
- end
-
- for option in $options
- echo $option
- end
-end
-
-
-# Add options with file completion
-complete \
- --command BGL-qt \
- --arguments "(__fish_BGLqt_get_options)"
-# Enable file completions only if the commandline now contains a `*.=` style option
-complete -c BGL-qt \
- --condition 'string match --regex -- ".*=" (commandline -pt)' \
- --force-files
-
-# Add options without file completion
-complete \
- --command BGL-qt \
- --arguments "(__fish_BGLqt_get_options --nofiles)"
-
diff --git a/contrib/completions/fish/BGL-tx.fish b/contrib/completions/fish/BGL-tx.fish
deleted file mode 100644
index 7523f0a933..0000000000
--- a/contrib/completions/fish/BGL-tx.fish
+++ /dev/null
@@ -1,65 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGL-tx --no-files
-
-# Modified version of __fish_seen_subcommand_from
-# Uses regex to detect cmd= syntax
-function __fish_BGL_seen_cmd
- set -l cmd (commandline -oc)
- set -e cmd[1]
- for i in $cmd
- for j in $argv
- if string match --quiet --regex -- "^$j.*" $i
- return 0
- end
- end
- end
- return 1
-end
-
-# Extract options
-function __fish_BGL_tx_get_options
- set --local cmd (commandline -oc)[1]
- if string match --quiet --regex -- '^-help$|-\?$' $cmd
- return
- end
-
- for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
- echo $option
- end
-end
-
-# Extract commands
-function __fish_BGL_tx_get_commands
- argparse 'commandsonly' -- $argv
- set --local cmd (commandline -oc)[1]
- set --local commands
-
- if set -q _flag_commandsonly
- set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '' | string replace -r '=.*' '')
- else
- set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
- end
-
- for command in $commands
- echo $command
- end
-end
-
-# Add options
-complete \
- --command BGL-tx \
- --condition "not __fish_BGL_seen_cmd (__fish_BGL_tx_get_commands --commandsonly)" \
- --arguments "(__fish_BGL_tx_get_options)" \
- --no-files
-
-# Add commands
-complete \
- --command BGL-tx \
- --arguments "(__fish_BGL_tx_get_commands)" \
- --no-files
-
-# Add file completions for load and set commands
-complete \
- --command BGL-tx \
- --condition 'string match --regex -- "(load|set)=" (commandline -pt)' \
- --force-files
diff --git a/contrib/completions/fish/BGL-util.fish b/contrib/completions/fish/BGL-util.fish
deleted file mode 100644
index 2fc6ccf57a..0000000000
--- a/contrib/completions/fish/BGL-util.fish
+++ /dev/null
@@ -1,38 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGL-util --no-files
-
-# Extract options
-function __fish_BGL_util_get_options
- set --local cmd (commandline -opc)[1]
- set --local options
-
- set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
-
- for option in $options
- echo $option
- end
-end
-
-# Extract commands
-function __fish_BGL_util_get_commands
- set --local cmd (commandline -opc)[1]
- set --local commands
-
- set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
- for command in $commands
- echo $command
- end
-end
-
-# Add options
-complete \
- --command BGL-util \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_util_get_commands)" \
- --arguments "(__fish_BGL_util_get_options)"
-
-# Add commands
-complete \
- --command BGL-util \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_util_get_commands)" \
- --arguments "(__fish_BGL_util_get_commands)"
-
diff --git a/contrib/completions/fish/BGL-wallet.fish b/contrib/completions/fish/BGL-wallet.fish
deleted file mode 100644
index 52de0cc03b..0000000000
--- a/contrib/completions/fish/BGL-wallet.fish
+++ /dev/null
@@ -1,35 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGL-wallet --no-files
-
-# Extract options
-function __fish_BGL_wallet_get_options
- set --local cmd (commandline -opc)[1]
- for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
- echo $option
- end
-end
-
-# Extract commands
-function __fish_BGL_wallet_get_commands
- set --local cmd (commandline -opc)[1]
- for command in ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
- echo $command
- end
-end
-
-# Add options
-complete \
- --command BGL-wallet \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_wallet_get_commands)" \
- --arguments "(__fish_BGL_wallet_get_options)"
-
-# Add commands
-complete \
- --command BGL-wallet \
- --condition "not __fish_seen_subcommand_from (__fish_BGL_wallet_get_commands)" \
- --arguments "(__fish_BGL_wallet_get_commands)"
-
-# Add file completions for load and set commands
-complete --command BGL-wallet \
- --condition "string match -r -- '(dumpfile|datadir)*=' (commandline -pt)" \
- --force-files
diff --git a/contrib/completions/fish/BGLd.fish b/contrib/completions/fish/BGLd.fish
deleted file mode 100644
index dbecd87e17..0000000000
--- a/contrib/completions/fish/BGLd.fish
+++ /dev/null
@@ -1,35 +0,0 @@
-# Disable files from being included in completions by default
-complete --command BGLd --no-files
-
-# Extract options
-function __fish_BGLd_get_options
- argparse 'nofiles' -- $argv
- set --local cmd (commandline -opc)[1]
- set --local options
-
- if set -q _flag_nofiles
- set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
- else
- set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
- end
-
- for option in $options
- echo $option
- end
-end
-
-
-# Add options with file completion
-complete \
- --command BGLd \
- --arguments "(__fish_BGLd_get_options)"
-# Enable file completions only if the commandline now contains a `*.=` style option
-complete --command BGLd \
- --condition 'string match --regex -- ".*=" (commandline -pt)' \
- --force-files
-
-# Add options without file completion
-complete \
- --command BGLd \
- --arguments "(__fish_BGLd_get_options --nofiles)"
-
diff --git a/contrib/debian/copyright b/contrib/debian/copyright
deleted file mode 100644
index 641c53997e..0000000000
--- a/contrib/debian/copyright
+++ /dev/null
@@ -1,147 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: Bitcoin
-Upstream-Contact: Satoshi Nakamoto
- irc://#Bitcoin@freenode.net
-Source: https://github.com/BitgesellOfficial/bitgesell
-
-Files: *
-Copyright: 2009-2024, Bitcoin Core Developers
-License: Expat
-Comment: The Bitcoin Core Developers encompasses all contributors to the
- project, listed in the release notes or the git log.
-
-Files: debian/*
-Copyright: 2010-2011, Jonas Smedegaard
- 2011, Matt Corallo
-License: GPL-2+
-
-Files: src/qt/res/icons/add.png
- src/qt/res/icons/address-book.png
- src/qt/res/icons/chevron.png
- src/qt/res/icons/edit.png
- src/qt/res/icons/editcopy.png
- src/qt/res/icons/editpaste.png
- src/qt/res/icons/export.png
- src/qt/res/icons/eye.png
- src/qt/res/icons/history.png
- src/qt/res/icons/lock_*.png
- src/qt/res/icons/overview.png
- src/qt/res/icons/receive.png
- src/qt/res/icons/remove.png
- src/qt/res/icons/send.png
- src/qt/res/icons/synced.png
- src/qt/res/icons/transaction*.png
- src/qt/res/icons/tx_output.png
- src/qt/res/icons/warning.png
-Copyright: Stephen Hutchings (and more)
- http://typicons.com
-License: Expat
-Comment: Site: https://github.com/stephenhutchings/typicons.font
-
-Files: src/qt/res/icons/connect*.png
- src/qt/res/src/connect-*.svg
- src/qt/res/icons/network_disabled.png
- src/qt/res/src/network_disabled.svg
-Copyright: Marco Falke
- Luke Dashjr
-License: Expat
-Comment: Inspired by Stephen Hutchings' Typicons
-
-Files: src/qt/res/icons/tx_mined.png
- src/qt/res/src/mine.svg
- src/qt/res/icons/fontbigger.png
- src/qt/res/icons/fontsmaller.png
- src/qt/res/icons/hd_disabled.png
- src/qt/res/src/hd_disabled.svg
- src/qt/res/icons/hd_enabled.png
- src/qt/res/src/hd_enabled.svg
-Copyright: Jonas Schnelli
-License: Expat
-
-Files: src/qt/res/icons/clock*.png
- src/qt/res/icons/eye_*.png
- src/qt/res/icons/tx_in*.png
- src/qt/res/src/clock_*.svg
- src/qt/res/src/tx_*.svg
-Copyright: Stephen Hutchings, Jonas Schnelli
-License: Expat
-Comment: Modifications of Stephen Hutchings' Typicons
-
-Files: src/qt/res/icons/BGL.*
- share/pixmaps/BGL*
- src/qt/res/src/BGL.svg
-Copyright: Bitboy, Jonas Schnelli
-License: public-domain
-Comment: Site: https://BGLtalk.org/?topic=1756.0
-
-Files: src/qt/res/icons/proxy.png
- src/qt/res/src/proxy.svg
-Copyright: Cristian Mircea Messel
-License: public-domain
-
-Files: src/qt/res/fonts/RobotoMono-Bold.ttf
-License: Apache-2.0
-Comment: Site: https://fonts.google.com/specimen/Roboto+Mono
-
-
-License: Expat
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- .
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-License: GPL-2+
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, 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
- General Public License for more details.
-Comment:
- On Debian systems the GNU General Public License (GPL) version 2 is
- located in '/usr/share/common-licenses/GPL-2'.
- .
- You should have received a copy of the GNU General Public License along
- with this program. If not, see .
-
-License: GPL-3+
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU General Public License, Version 3 or any
- later version published by the Free Software Foundation.
-Comment:
- On Debian systems the GNU General Public License (GPL) version 3 is
- located in '/usr/share/common-licenses/GPL-3'.
- .
- You should have received a copy of the GNU General Public License along
- with this program. If not, see .
-
-License: public-domain
- This work is in the public domain.
-
-License: Apache-2.0
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/contrib/devtools/BGL-tidy/BGL-tidy.cpp b/contrib/devtools/BGL-tidy/BGL-tidy.cpp
deleted file mode 100644
index b7a5e1b922..0000000000
--- a/contrib/devtools/BGL-tidy/BGL-tidy.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2023 Bitcoin Developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "logprintf.h"
-
-#include
-#include
-
-class BGLModule final : public clang::tidy::ClangTidyModule
-{
-public:
- void addCheckFactories(clang::tidy::ClangTidyCheckFactories& CheckFactories) override
- {
- CheckFactories.registerCheck("BGL-unterminated-logprintf");
- }
-};
-
-static clang::tidy::ClangTidyModuleRegistry::Add
- X("BGL-module", "Adds BGL checks.");
-
-volatile int BGLModuleAnchorSource = 0;
diff --git a/contrib/devtools/BGL-tidy/CMakeLists.txt b/contrib/devtools/BGL-tidy/CMakeLists.txt
deleted file mode 100644
index 0fb8eff269..0000000000
--- a/contrib/devtools/BGL-tidy/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-
-project(BGL-tidy VERSION 1.0.0 DESCRIPTION "clang-tidy checks for BGL Core")
-
-include(GNUInstallDirs)
-
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED True)
-set(CMAKE_CXX_EXTENSIONS False)
-
-# TODO: Figure out how to avoid the terminfo check
-find_package(LLVM REQUIRED CONFIG)
-find_program(CLANG_TIDY_EXE NAMES "clang-tidy-${LLVM_VERSION_MAJOR}" "clang-tidy" HINTS ${LLVM_TOOLS_BINARY_DIR})
-message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
-message(STATUS "Found clang-tidy: ${CLANG_TIDY_EXE}")
-
-add_library(BGL-tidy MODULE BGL-tidy.cpp logprintf.cpp)
-target_include_directories(BGL-tidy SYSTEM PRIVATE ${LLVM_INCLUDE_DIRS})
-
-# Disable RTTI and exceptions as necessary
-if (MSVC)
- target_compile_options(BGL-tidy PRIVATE /GR-)
-else()
- target_compile_options(BGL-tidy PRIVATE -fno-rtti)
- target_compile_options(BGL-tidy PRIVATE -fno-exceptions)
-endif()
-
-if(CMAKE_HOST_APPLE)
- # ld64 expects no undefined symbols by default
- target_link_options(BGL-tidy PRIVATE -Wl,-flat_namespace)
- target_link_options(BGL-tidy PRIVATE -Wl,-undefined -Wl,suppress)
-endif()
-
-# Add warnings
-if (MSVC)
- target_compile_options(BGL-tidy PRIVATE /W4)
-else()
- target_compile_options(BGL-tidy PRIVATE -Wall)
- target_compile_options(BGL-tidy PRIVATE -Wextra)
-endif()
-
-if(CMAKE_VERSION VERSION_LESS 3.27)
- set(CLANG_TIDY_COMMAND "${CLANG_TIDY_EXE}" "--load=${CMAKE_BINARY_DIR}/${CMAKE_SHARED_MODULE_PREFIX}BGL-tidy${CMAKE_SHARED_MODULE_SUFFIX}" "-checks=-*,BGL-*")
-else()
- # CLANG_TIDY_COMMAND supports generator expressions as of 3.27
- set(CLANG_TIDY_COMMAND "${CLANG_TIDY_EXE}" "--load=$" "-checks=-*,BGL-*")
-endif()
-
-# Create a dummy library that runs clang-tidy tests as a side-effect of building
-add_library(BGL-tidy-tests OBJECT EXCLUDE_FROM_ALL example_logprintf.cpp)
-add_dependencies(BGL-tidy-tests BGL-tidy)
-
-set_target_properties(BGL-tidy-tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
-
-
-install(TARGETS BGL-tidy LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/contrib/devtools/BGL-tidy/README.md b/contrib/devtools/BGL-tidy/README.md
deleted file mode 100644
index ae8c9ef346..0000000000
--- a/contrib/devtools/BGL-tidy/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Bitcoin Tidy
-
-Example Usage:
-
-```bash
-cmake -S . -B build -DLLVM_DIR=$(llvm-config --cmakedir) -DCMAKE_BUILD_TYPE=Release
-
-cmake --build build -j$(nproc)
-
-cmake --build build --target BGL-tidy-tests -j$(nproc)
-```
diff --git a/contrib/devtools/BGL-tidy/example_logprintf.cpp b/contrib/devtools/BGL-tidy/example_logprintf.cpp
deleted file mode 100644
index 745ad3de08..0000000000
--- a/contrib/devtools/BGL-tidy/example_logprintf.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2023 Bitcoin Developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include
-
-// Test for bitcoin-unterminated-logprintf
-
-enum LogFlags {
- NONE
-};
-
-enum Level {
- None
-};
-
-template
-static inline void LogPrintf_(const std::string& logging_function, const std::string& source_file, const int source_line, const LogFlags flag, const Level level, const char* fmt, const Args&... args)
-{
-}
-
-#define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
-#define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__)
-
-#define LogPrint(category, ...) \
- do { \
- LogPrintf(__VA_ARGS__); \
- } while (0)
-
-
-class CWallet
-{
- std::string GetDisplayName() const
- {
- return "default wallet";
- }
-
-public:
- template
- void WalletLogPrintf(const char* fmt, Params... parameters) const
- {
- LogPrintf(("%s " + std::string{fmt}).c_str(), GetDisplayName(), parameters...);
- };
-};
-
-void good_func()
-{
- LogPrintf("hello world!\n");
-}
-void good_func2()
-{
- CWallet wallet;
- wallet.WalletLogPrintf("hi\n");
-
- const CWallet& walletref = wallet;
- walletref.WalletLogPrintf("hi\n");
-
- auto* walletptr = new CWallet();
- walletptr->WalletLogPrintf("hi\n");
- delete walletptr;
-}
-void bad_func()
-{
- LogPrintf("hello world!");
-}
-void bad_func2()
-{
- LogPrintf("");
-}
-void bad_func3()
-{
- // Ending in "..." has no special meaning.
- LogPrintf("hello world!...");
-}
-void bad_func4_ignored()
-{
- LogPrintf("hello world!"); // NOLINT(BGL-unterminated-logprintf)
-}
-void bad_func5()
-{
- CWallet wallet;
- wallet.WalletLogPrintf("hi");
-
- const CWallet& walletref = wallet;
- walletref.WalletLogPrintf("hi");
-
- auto* walletptr = new CWallet();
- walletptr->WalletLogPrintf("hi");
- delete walletptr;
-}
diff --git a/contrib/devtools/BGL-tidy/logprintf.cpp b/contrib/devtools/BGL-tidy/logprintf.cpp
deleted file mode 100644
index f963f8c921..0000000000
--- a/contrib/devtools/BGL-tidy/logprintf.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2023 Bitcoin Developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "logprintf.h"
-
-#include
-#include
-
-
-namespace {
-AST_MATCHER(clang::StringLiteral, unterminated)
-{
- size_t len = Node.getLength();
- if (len > 0 && Node.getCodeUnit(len - 1) == '\n') {
- return false;
- }
- return true;
-}
-} // namespace
-
-namespace BGL {
-
-void LogPrintfCheck::registerMatchers(clang::ast_matchers::MatchFinder* finder)
-{
- using namespace clang::ast_matchers;
-
- /*
- Logprintf(..., ..., ..., ..., ..., "foo", ...)
- */
-
- finder->addMatcher(
- callExpr(
- callee(functionDecl(hasName("LogPrintf_"))),
- hasArgument(5, stringLiteral(unterminated()).bind("logstring"))),
- this);
-
- /*
- CWallet wallet;
- auto walletptr = &wallet;
- wallet.WalletLogPrintf("foo");
- wallet->WalletLogPrintf("foo");
- */
- finder->addMatcher(
- cxxMemberCallExpr(
- thisPointerType(qualType(hasDeclaration(cxxRecordDecl(hasName("CWallet"))))),
- callee(cxxMethodDecl(hasName("WalletLogPrintf"))),
- hasArgument(0, stringLiteral(unterminated()).bind("logstring"))),
- this);
-}
-
-void LogPrintfCheck::check(const clang::ast_matchers::MatchFinder::MatchResult& Result)
-{
- if (const clang::StringLiteral* lit = Result.Nodes.getNodeAs("logstring")) {
- const clang::ASTContext& ctx = *Result.Context;
- const auto user_diag = diag(lit->getEndLoc(), "Unterminated format string used with LogPrintf");
- const auto& loc = lit->getLocationOfByte(lit->getByteLength(), *Result.SourceManager, ctx.getLangOpts(), ctx.getTargetInfo());
- user_diag << clang::FixItHint::CreateInsertion(loc, "\\n");
- }
-}
-
-} // namespace BGL
diff --git a/contrib/devtools/BGL-tidy/logprintf.h b/contrib/devtools/BGL-tidy/logprintf.h
deleted file mode 100644
index ef735e2dc9..0000000000
--- a/contrib/devtools/BGL-tidy/logprintf.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2023 Bitcoin Developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#ifndef LOGPRINTF_CHECK_H
-#define LOGPRINTF_CHECK_H
-
-#include
-
-namespace BGL {
-
-// Warn about any use of LogPrintf that does not end with a newline.
-class LogPrintfCheck final : public clang::tidy::ClangTidyCheck
-{
-public:
- LogPrintfCheck(clang::StringRef Name, clang::tidy::ClangTidyContext* Context)
- : clang::tidy::ClangTidyCheck(Name, Context) {}
-
- bool isLanguageVersionSupported(const clang::LangOptions& LangOpts) const override
- {
- return LangOpts.CPlusPlus;
- }
- void registerMatchers(clang::ast_matchers::MatchFinder* Finder) override;
- void check(const clang::ast_matchers::MatchFinder::MatchResult& Result) override;
-};
-
-} // namespace BGL
-
-#endif // LOGPRINTF_CHECK_H
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
deleted file mode 100644
index c86efafeb2..0000000000
--- a/contrib/devtools/README.md
+++ /dev/null
@@ -1,158 +0,0 @@
-Contents
-========
-This directory contains tools for developers working on this repository.
-
-clang-format-diff.py
-===================
-
-A script to format unified git diffs according to [.clang-format](../../src/.clang-format).
-
-Requires `clang-format`, installed e.g. via `brew install clang-format` on macOS,
-or `sudo apt install clang-format` on Debian/Ubuntu.
-
-For instance, to format the last commit with 0 lines of context,
-the script should be called from the git root folder as follows.
-
-```
-git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
-```
-
-copyright\_header.py
-====================
-
-Provides utilities for managing copyright headers of `The BGL Core
-developers` in repository source files. It has three subcommands:
-
-```
-$ ./copyright_header.py report [verbose]
-$ ./copyright_header.py update
-$ ./copyright_header.py insert
-```
-Running these subcommands without arguments displays a usage string.
-
-copyright\_header.py report \ [verbose]
----------------------------------------------------------
-
-Produces a report of all copyright header notices found inside the source files
-of a repository. Useful to quickly visualize the state of the headers.
-Specifying `verbose` will list the full filenames of files of each category.
-
-copyright\_header.py update \ [verbose]
----------------------------------------------------------
-Updates all the copyright headers of `The Bitcoin Core developers` which were
-changed in a year more recent than is listed. For example:
-```
-// Copyright (c) - The Bitcoin Core developers
-```
-will be updated to:
-```
-// Copyright (c) - The Bitcoin Core developers
-```
-where `` is obtained from the `git log` history.
-
-This subcommand also handles copyright headers that have only a single year. In
-those cases:
-```
-// Copyright (c) The Bitcoin Core developers
-```
-will be updated to:
-```
-// Copyright (c) - The Bitcoin Core developers
-```
-where the update is appropriate.
-
-copyright\_header.py insert \
-------------------------------------
-Inserts a copyright header for `The Bitcoin Core developers` at the top of the
-file in either Python or C++ style as determined by the file extension. If the
-file is a Python file and it has `#!` starting the first line, the header is
-inserted in the line below it.
-
-The copyright dates will be set to be `-` where
-`` is according to the `git log` history. If
-`` is equal to ``, it will be set as a single
-year rather than two hyphenated years.
-
-If the file already has a copyright for `The Bitcoin Core developers`, the
-script will exit.
-
-gen-manpages.py
-===============
-
-A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
-This requires help2man which can be found at: https://www.gnu.org/software/help2man/
-
-With in-tree builds this tool can be run from any directory within the
-repository. To use this tool with out-of-tree builds set `BUILDDIR`. For
-example:
-
-```bash
-BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
-```
-
-gen-BGL-conf.sh
-=======
-headerssync-params.py
-=====================
-
-A script to generate optimal parameters for the headerssync module (src/headerssync.cpp). It takes no command-line
-options, as all its configuration is set at the top of the file. It runs many times faster inside PyPy. Invocation:
-
-```bash
-pypy3 contrib/devtools/headerssync-params.py
-```
-
-gen-bitcoin-conf.sh
-===================
-
-Generates a BGL.conf file in `share/examples/` by parsing the output from `BGLd --help`. This script is run during the
-release process to include a BGL.conf with the release binaries and can also be run by users to generate a file locally.
-When generating a file as part of the release process, make sure to commit the changes after running the script.
-
-With in-tree builds this tool can be run from any directory within the
-repository. To use this tool with out-of-tree builds set `BUILDDIR`. For
-example:
-
-```bash
-BUILDDIR=$PWD/build contrib/devtools/gen-BGL-conf.sh
-```
-
-security-check.py and test-security-check.py
-============================================
-
-Perform basic security checks on a series of executables.
-
-symbol-check.py
-===============
-
-A script to check that release executables only contain
-certain symbols and are only linked against allowed libraries.
-
-For Linux this means checking for allowed gcc, glibc and libstdc++ version symbols.
-This makes sure they are still compatible with the minimum supported distribution versions.
-
-For macOS and Windows we check that the executables are only linked against libraries we allow.
-
-Example usage:
-
- find ../path/to/executables -type f -executable | xargs python3 contrib/devtools/symbol-check.py
-
-If no errors occur the return value will be 0 and the output will be empty.
-
-If there are any errors the return value will be 1 and output like this will be printed:
-
- .../64/test_BGL: symbol memcpy from unsupported version GLIBC_2.14
- .../64/test_BGL: symbol __fdelt_chk from unsupported version GLIBC_2.15
- .../64/test_BGL: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
- .../64/test_BGL: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
-
-circular-dependencies.py
-========================
-
-Run this script from the root of the source tree (`src/`) to find circular dependencies in the source code.
-This looks only at which files include other files, treating the `.cpp` and `.h` file as one unit.
-
-Example usage:
-
- cd .../src
- ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}
diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py
deleted file mode 100755
index b742a8cea6..0000000000
--- a/contrib/devtools/circular-dependencies.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2018-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-import sys
-import re
-
-MAPPING = {
- 'core_read.cpp': 'core_io.cpp',
- 'core_write.cpp': 'core_io.cpp',
-}
-
-# Directories with header-based modules, where the assumption that .cpp files
-# define functions and variables declared in corresponding .h files is
-# incorrect.
-HEADER_MODULE_PATHS = [
- 'interfaces/'
-]
-
-def module_name(path):
- if path in MAPPING:
- path = MAPPING[path]
- if any(path.startswith(dirpath) for dirpath in HEADER_MODULE_PATHS):
- return path
- if path.endswith(".h"):
- return path[:-2]
- if path.endswith(".c"):
- return path[:-2]
- if path.endswith(".cpp"):
- return path[:-4]
- return None
-
-files = dict()
-deps: dict[str, set[str]] = dict()
-
-RE = re.compile("^#include <(.*)>")
-
-# Iterate over files, and create list of modules
-for arg in sys.argv[1:]:
- module = module_name(arg)
- if module is None:
- print("Ignoring file %s (does not constitute module)\n" % arg)
- else:
- files[arg] = module
- deps[module] = set()
-
-# Iterate again, and build list of direct dependencies for each module
-# TODO: implement support for multiple include directories
-for arg in sorted(files.keys()):
- module = files[arg]
- with open(arg, 'r', encoding="utf8") as f:
- for line in f:
- match = RE.match(line)
- if match:
- include = match.group(1)
- included_module = module_name(include)
- if included_module is not None and included_module in deps and included_module != module:
- deps[module].add(included_module)
-
-# Loop to find the shortest (remaining) circular dependency
-have_cycle: bool = False
-while True:
- shortest_cycle = None
- for module in sorted(deps.keys()):
- # Build the transitive closure of dependencies of module
- closure: dict[str, list[str]] = dict()
- for dep in deps[module]:
- closure[dep] = []
- while True:
- old_size = len(closure)
- old_closure_keys = sorted(closure.keys())
- for src in old_closure_keys:
- for dep in deps[src]:
- if dep not in closure:
- closure[dep] = closure[src] + [src]
- if len(closure) == old_size:
- break
- # If module is in its own transitive closure, it's a circular dependency; check if it is the shortest
- if module in closure and (shortest_cycle is None or len(closure[module]) + 1 < len(shortest_cycle)):
- shortest_cycle = [module] + closure[module]
- if shortest_cycle is None:
- break
- # We have the shortest circular dependency; report it
- module = shortest_cycle[0]
- print("Circular dependency: %s" % (" -> ".join(shortest_cycle + [module])))
- # And then break the dependency to avoid repeating in other cycles
- deps[shortest_cycle[-1]] = deps[shortest_cycle[-1]] - set([module])
- have_cycle = True
-
-sys.exit(1 if have_cycle else 0)
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py
deleted file mode 100755
index e2b661d65d..0000000000
--- a/contrib/devtools/clang-format-diff.py
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/bin/env python3
-#
-# ===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===------------------------------------------------------------------------===#
-
-"""
-This script reads input from a unified diff and reformats all the changed
-lines. This is useful to reformat all the lines touched by a specific patch.
-Example usage for git/svn users:
-
- git diff -U0 --no-color --relative HEAD^ | {clang_format_diff} -p1 -i
- svn diff --diff-cmd=diff -x-U0 | {clang_format_diff} -i
-
-It should be noted that the filename contained in the diff is used unmodified
-to determine the source file to update. Users calling this script directly
-should be careful to ensure that the path in the diff is correct relative to the
-current working directory.
-"""
-from __future__ import absolute_import, division, print_function
-
-import argparse
-import difflib
-import re
-import subprocess
-import sys
-
-from io import StringIO
-
-
-def main():
- parser = argparse.ArgumentParser(
- description=__doc__.format(clang_format_diff="%(prog)s"),
- formatter_class=argparse.RawDescriptionHelpFormatter,
- )
- parser.add_argument(
- "-i",
- action="store_true",
- default=False,
- help="apply edits to files instead of displaying a diff",
- )
- parser.add_argument(
- "-p",
- metavar="NUM",
- default=0,
- help="strip the smallest prefix containing P slashes",
- )
- parser.add_argument(
- "-regex",
- metavar="PATTERN",
- default=None,
- help="custom pattern selecting file paths to reformat "
- "(case sensitive, overrides -iregex)",
- )
- parser.add_argument(
- "-iregex",
- metavar="PATTERN",
- default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp"
- r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)",
- help="custom pattern selecting file paths to reformat "
- "(case insensitive, overridden by -regex)",
- )
- parser.add_argument(
- "-sort-includes",
- action="store_true",
- default=False,
- help="let clang-format sort include blocks",
- )
- parser.add_argument(
- "-v",
- "--verbose",
- action="store_true",
- help="be more verbose, ineffective without -i",
- )
- parser.add_argument(
- "-style",
- help="formatting style to apply (LLVM, GNU, Google, Chromium, "
- "Microsoft, Mozilla, WebKit)",
- )
- parser.add_argument(
- "-fallback-style",
- help="The name of the predefined style used as a"
- "fallback in case clang-format is invoked with"
- "-style=file, but can not find the .clang-format"
- "file to use.",
- )
- parser.add_argument(
- "-binary",
- default="clang-format",
- help="location of binary to use for clang-format",
- )
- args = parser.parse_args()
-
- # Extract changed lines for each file.
- filename = None
- lines_by_file = {}
- for line in sys.stdin:
- match = re.search(r"^\+\+\+\ (.*?/){%s}(\S*)" % args.p, line)
- if match:
- filename = match.group(2)
- if filename is None:
- continue
-
- if args.regex is not None:
- if not re.match("^%s$" % args.regex, filename):
- continue
- else:
- if not re.match("^%s$" % args.iregex, filename, re.IGNORECASE):
- continue
-
- match = re.search(r"^@@.*\+(\d+)(?:,(\d+))?", line)
- if match:
- start_line = int(match.group(1))
- line_count = 1
- if match.group(2):
- line_count = int(match.group(2))
- # The input is something like
- #
- # @@ -1, +0,0 @@
- #
- # which means no lines were added.
- if line_count == 0:
- continue
- # Also format lines range if line_count is 0 in case of deleting
- # surrounding statements.
- end_line = start_line
- if line_count != 0:
- end_line += line_count - 1
- lines_by_file.setdefault(filename, []).extend(
- ["-lines", str(start_line) + ":" + str(end_line)]
- )
-
- # Reformat files containing changes in place.
- for filename, lines in lines_by_file.items():
- if args.i and args.verbose:
- print("Formatting {}".format(filename))
- command = [args.binary, filename]
- if args.i:
- command.append("-i")
- if args.sort_includes:
- command.append("-sort-includes")
- command.extend(lines)
- if args.style:
- command.extend(["-style", args.style])
- if args.fallback_style:
- command.extend(["-fallback-style", args.fallback_style])
-
- try:
- p = subprocess.Popen(
- command,
- stdout=subprocess.PIPE,
- stderr=None,
- stdin=subprocess.PIPE,
- universal_newlines=True,
- )
- except OSError as e:
- # Give the user more context when clang-format isn't
- # found/isn't executable, etc.
- raise RuntimeError(
- 'Failed to run "%s" - %s"' % (" ".join(command), e.strerror)
- )
-
- stdout, stderr = p.communicate()
- if p.returncode != 0:
- sys.exit(p.returncode)
-
- if not args.i:
- with open(filename, encoding="utf8") as f:
- code = f.readlines()
- formatted_code = StringIO(stdout).readlines()
- diff = difflib.unified_diff(
- code,
- formatted_code,
- filename,
- filename,
- "(before formatting)",
- "(after formatting)",
- )
- diff_string = "".join(diff)
- if len(diff_string) > 0:
- sys.stdout.write(diff_string)
- sys.exit(1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
deleted file mode 100755
index 0687a997a2..0000000000
--- a/contrib/devtools/copyright_header.py
+++ /dev/null
@@ -1,603 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2016-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-import re
-import fnmatch
-import sys
-import subprocess
-import datetime
-import os
-
-################################################################################
-# file filtering
-################################################################################
-
-EXCLUDE = [
- # auto generated:
- 'src/qt/BGLstrings.cpp',
- 'src/chainparamsseeds.h',
- # other external copyrights:
- 'src/reverse_iterator.h',
- 'src/test/fuzz/FuzzedDataProvider.h',
- 'src/tinyformat.h',
- 'src/bench/nanobench.h',
- 'test/functional/test_framework/bignum.py',
- # python init:
- '*__init__.py',
-]
-EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE]))
-
-EXCLUDE_DIRS = [
- # git subtrees
- "src/crypto/ctaes/",
- "src/leveldb/",
- "src/secp256k1/",
- "src/crc32c/",
-]
-
-INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.mm', '*.py', '*.sh', '*.bash-completion']
-INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE]))
-
-def applies_to_file(filename):
- for excluded_dir in EXCLUDE_DIRS:
- if filename.startswith(excluded_dir):
- return False
- return ((EXCLUDE_COMPILED.match(filename) is None) and
- (INCLUDE_COMPILED.match(filename) is not None))
-
-################################################################################
-# obtain list of files in repo according to INCLUDE and EXCLUDE
-################################################################################
-
-GIT_LS_CMD = 'git ls-files --full-name'.split(' ')
-GIT_TOPLEVEL_CMD = 'git rev-parse --show-toplevel'.split(' ')
-
-def call_git_ls(base_directory):
- out = subprocess.check_output([*GIT_LS_CMD, base_directory])
- return [f for f in out.decode("utf-8").split('\n') if f != '']
-
-def call_git_toplevel():
- "Returns the absolute path to the project root"
- return subprocess.check_output(GIT_TOPLEVEL_CMD).strip().decode("utf-8")
-
-def get_filenames_to_examine(base_directory):
- "Returns an array of absolute paths to any project files in the base_directory that pass the include/exclude filters"
- root = call_git_toplevel()
- filenames = call_git_ls(base_directory)
- return sorted([os.path.join(root, filename) for filename in filenames if
- applies_to_file(filename)])
-
-################################################################################
-# define and compile regexes for the patterns we are looking for
-################################################################################
-
-
-COPYRIGHT_WITH_C = r'Copyright \(c\)'
-COPYRIGHT_WITHOUT_C = 'Copyright'
-ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C)
-
-YEAR = "20[0-9][0-9]"
-YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
-YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR)
-ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST)
-ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE,
- ANY_YEAR_STYLE))
-
-ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE)
-
-def compile_copyright_regex(copyright_style, year_style, name):
- return re.compile(r'%s %s,? %s( +\*)?\n' % (copyright_style, year_style, name))
-
-EXPECTED_HOLDER_NAMES = [
- r"Satoshi Nakamoto",
- r"The Bitcoin Core developers",
- r"BitPay Inc\.",
- r"University of Illinois at Urbana-Champaign\.",
- r"Pieter Wuille",
- r"Wladimir J\. van der Laan",
- r"Jeff Garzik",
- r"Jan-Klaas Kollhof",
- r"ArtForz -- public domain half-a-node",
- r"Intel Corporation ?",
- r"The Zcash developers",
- r"Jeremy Rubin",
-]
-
-DOMINANT_STYLE_COMPILED = {}
-YEAR_LIST_STYLE_COMPILED = {}
-WITHOUT_C_STYLE_COMPILED = {}
-
-for holder_name in EXPECTED_HOLDER_NAMES:
- DOMINANT_STYLE_COMPILED[holder_name] = (
- compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name))
- YEAR_LIST_STYLE_COMPILED[holder_name] = (
- compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name))
- WITHOUT_C_STYLE_COMPILED[holder_name] = (
- compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE,
- holder_name))
-
-################################################################################
-# search file contents for copyright message of particular category
-################################################################################
-
-def get_count_of_copyrights_of_any_style_any_holder(contents):
- return len(ANY_COPYRIGHT_COMPILED.findall(contents))
-
-def file_has_dominant_style_copyright_for_holder(contents, holder_name):
- match = DOMINANT_STYLE_COMPILED[holder_name].search(contents)
- return match is not None
-
-def file_has_year_list_style_copyright_for_holder(contents, holder_name):
- match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents)
- return match is not None
-
-def file_has_without_c_style_copyright_for_holder(contents, holder_name):
- match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents)
- return match is not None
-
-################################################################################
-# get file info
-################################################################################
-
-def read_file(filename):
- return open(filename, 'r', encoding="utf8").read()
-
-def gather_file_info(filename):
- info = {}
- info['filename'] = filename
- c = read_file(filename)
- info['contents'] = c
-
- info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c)
-
- info['classified_copyrights'] = 0
- info['dominant_style'] = {}
- info['year_list_style'] = {}
- info['without_c_style'] = {}
- for holder_name in EXPECTED_HOLDER_NAMES:
- has_dominant_style = (
- file_has_dominant_style_copyright_for_holder(c, holder_name))
- has_year_list_style = (
- file_has_year_list_style_copyright_for_holder(c, holder_name))
- has_without_c_style = (
- file_has_without_c_style_copyright_for_holder(c, holder_name))
- info['dominant_style'][holder_name] = has_dominant_style
- info['year_list_style'][holder_name] = has_year_list_style
- info['without_c_style'][holder_name] = has_without_c_style
- if has_dominant_style or has_year_list_style or has_without_c_style:
- info['classified_copyrights'] = info['classified_copyrights'] + 1
- return info
-
-################################################################################
-# report execution
-################################################################################
-
-SEPARATOR = '-'.join(['' for _ in range(80)])
-
-def print_filenames(filenames, verbose):
- if not verbose:
- return
- for filename in filenames:
- print("\t%s" % filename)
-
-def print_report(file_infos, verbose):
- print(SEPARATOR)
- examined = [i['filename'] for i in file_infos]
- print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" %
- len(examined))
- print_filenames(examined, verbose)
-
- print(SEPARATOR)
- print('')
- zero_copyrights = [i['filename'] for i in file_infos if
- i['all_copyrights'] == 0]
- print("%4d with zero copyrights" % len(zero_copyrights))
- print_filenames(zero_copyrights, verbose)
- one_copyright = [i['filename'] for i in file_infos if
- i['all_copyrights'] == 1]
- print("%4d with one copyright" % len(one_copyright))
- print_filenames(one_copyright, verbose)
- two_copyrights = [i['filename'] for i in file_infos if
- i['all_copyrights'] == 2]
- print("%4d with two copyrights" % len(two_copyrights))
- print_filenames(two_copyrights, verbose)
- three_copyrights = [i['filename'] for i in file_infos if
- i['all_copyrights'] == 3]
- print("%4d with three copyrights" % len(three_copyrights))
- print_filenames(three_copyrights, verbose)
- four_or_more_copyrights = [i['filename'] for i in file_infos if
- i['all_copyrights'] >= 4]
- print("%4d with four or more copyrights" % len(four_or_more_copyrights))
- print_filenames(four_or_more_copyrights, verbose)
- print('')
- print(SEPARATOR)
- print('Copyrights with dominant style:\ne.g. "Copyright (c)" and '
- '"" or "-":\n')
- for holder_name in EXPECTED_HOLDER_NAMES:
- dominant_style = [i['filename'] for i in file_infos if
- i['dominant_style'][holder_name]]
- if len(dominant_style) > 0:
- print("%4d with '%s'" % (len(dominant_style),
- holder_name.replace('\n', '\\n')))
- print_filenames(dominant_style, verbose)
- print('')
- print(SEPARATOR)
- print('Copyrights with year list style:\ne.g. "Copyright (c)" and '
- '", , ...":\n')
- for holder_name in EXPECTED_HOLDER_NAMES:
- year_list_style = [i['filename'] for i in file_infos if
- i['year_list_style'][holder_name]]
- if len(year_list_style) > 0:
- print("%4d with '%s'" % (len(year_list_style),
- holder_name.replace('\n', '\\n')))
- print_filenames(year_list_style, verbose)
- print('')
- print(SEPARATOR)
- print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "" or '
- '"-":\n')
- for holder_name in EXPECTED_HOLDER_NAMES:
- without_c_style = [i['filename'] for i in file_infos if
- i['without_c_style'][holder_name]]
- if len(without_c_style) > 0:
- print("%4d with '%s'" % (len(without_c_style),
- holder_name.replace('\n', '\\n')))
- print_filenames(without_c_style, verbose)
-
- print('')
- print(SEPARATOR)
-
- unclassified_copyrights = [i['filename'] for i in file_infos if
- i['classified_copyrights'] < i['all_copyrights']]
- print("%d with unexpected copyright holder names" %
- len(unclassified_copyrights))
- print_filenames(unclassified_copyrights, verbose)
- print(SEPARATOR)
-
-def exec_report(base_directory, verbose):
- filenames = get_filenames_to_examine(base_directory)
- file_infos = [gather_file_info(f) for f in filenames]
- print_report(file_infos, verbose)
-
-################################################################################
-# report cmd
-################################################################################
-
-REPORT_USAGE = """
-Produces a report of all copyright header notices found inside the source files
-of a repository.
-
-Usage:
- $ ./copyright_header.py report [verbose]
-
-Arguments:
- - The base directory of a BGL source code repository.
- [verbose] - Includes a list of every file of each subcategory in the report.
-"""
-
-def report_cmd(argv):
- if len(argv) == 2:
- sys.exit(REPORT_USAGE)
-
- base_directory = argv[2]
- if not os.path.exists(base_directory):
- sys.exit("*** bad : %s" % base_directory)
-
- if len(argv) == 3:
- verbose = False
- elif argv[3] == 'verbose':
- verbose = True
- else:
- sys.exit("*** unknown argument: %s" % argv[2])
-
- exec_report(base_directory, verbose)
-
-################################################################################
-# query git for year of last change
-################################################################################
-
-GIT_LOG_CMD = "git log --pretty=format:%%ai %s"
-
-def call_git_log(filename):
- out = subprocess.check_output((GIT_LOG_CMD % filename).split(' '))
- return out.decode("utf-8").split('\n')
-
-def get_git_change_years(filename):
- git_log_lines = call_git_log(filename)
- if len(git_log_lines) == 0:
- return [datetime.date.today().year]
- # timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600"
- return [line.split(' ')[0].split('-')[0] for line in git_log_lines]
-
-def get_most_recent_git_change_year(filename):
- return max(get_git_change_years(filename))
-
-################################################################################
-# read and write to file
-################################################################################
-
-def read_file_lines(filename):
- with open(filename, 'r', encoding="utf8") as f:
- file_lines = f.readlines()
- return file_lines
-
-def write_file_lines(filename, file_lines):
- with open(filename, 'w', encoding="utf8") as f:
- f.write(''.join(file_lines))
-
-################################################################################
-# update header years execution
-################################################################################
-
-COPYRIGHT = r'Copyright \(c\)'
-YEAR = "20[0-9][0-9]"
-YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
-HOLDER = 'The Bitcoin Core developers'
-UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER]))
-
-def get_updatable_copyright_line(file_lines):
- index = 0
- for line in file_lines:
- if UPDATEABLE_LINE_COMPILED.search(line) is not None:
- return index, line
- index = index + 1
- return None, None
-
-def parse_year_range(year_range):
- year_split = year_range.split('-')
- start_year = year_split[0]
- if len(year_split) == 1:
- return start_year, start_year
- return start_year, year_split[1]
-
-def year_range_to_str(start_year, end_year):
- if start_year == end_year:
- return start_year
- return "%s-%s" % (start_year, end_year)
-
-def create_updated_copyright_line(line, last_git_change_year):
- copyright_splitter = 'Copyright (c) '
- copyright_split = line.split(copyright_splitter)
- # Preserve characters on line that are ahead of the start of the copyright
- # notice - they are part of the comment block and vary from file-to-file.
- before_copyright = copyright_split[0]
- after_copyright = copyright_split[1]
-
- space_split = after_copyright.split(' ')
- year_range = space_split[0]
- start_year, end_year = parse_year_range(year_range)
- if end_year >= last_git_change_year:
- return line
- return (before_copyright + copyright_splitter +
- year_range_to_str(start_year, last_git_change_year) + ' ' +
- ' '.join(space_split[1:]))
-
-def update_updatable_copyright(filename):
- file_lines = read_file_lines(filename)
- index, line = get_updatable_copyright_line(file_lines)
- if not line:
- print_file_action_message(filename, "No updatable copyright.")
- return
- last_git_change_year = get_most_recent_git_change_year(filename)
- new_line = create_updated_copyright_line(line, last_git_change_year)
- if line == new_line:
- print_file_action_message(filename, "Copyright up-to-date.")
- return
- file_lines[index] = new_line
- write_file_lines(filename, file_lines)
- print_file_action_message(filename,
- "Copyright updated! -> %s" % last_git_change_year)
-
-def exec_update_header_year(base_directory):
- for filename in get_filenames_to_examine(base_directory):
- update_updatable_copyright(filename)
-
-################################################################################
-# update cmd
-################################################################################
-
-UPDATE_USAGE = """
-Updates all the copyright headers of "The Bitcoin Core developers" which were
-changed in a year more recent than is listed. For example:
-
-// Copyright (c) - The Bitcoin Core developers
-
-will be updated to:
-
-// Copyright (c) - The Bitcoin Core developers
-
-where is obtained from the 'git log' history.
-
-This subcommand also handles copyright headers that have only a single year. In those cases:
-
-// Copyright (c) The Bitcoin Core developers
-
-will be updated to:
-
-// Copyright (c) - The Bitcoin Core developers
-
-where the update is appropriate.
-
-Usage:
- $ ./copyright_header.py update
-
-Arguments:
- - The base directory of a BGL source code repository.
-"""
-
-def print_file_action_message(filename, action):
- print("%-52s %s" % (filename, action))
-
-def update_cmd(argv):
- if len(argv) != 3:
- sys.exit(UPDATE_USAGE)
-
- base_directory = argv[2]
- if not os.path.exists(base_directory):
- sys.exit("*** bad base_directory: %s" % base_directory)
- exec_update_header_year(base_directory)
-
-################################################################################
-# inserted copyright header format
-################################################################################
-
-def get_header_lines(header, start_year, end_year):
- lines = header.split('\n')[1:-1]
- lines[0] = lines[0] % year_range_to_str(start_year, end_year)
- return [line + '\n' for line in lines]
-
-CPP_HEADER = '''
-// Copyright (c) %s The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-
-def get_cpp_header_lines_to_insert(start_year, end_year):
- return reversed(get_header_lines(CPP_HEADER, start_year, end_year))
-
-SCRIPT_HEADER = '''
-# Copyright (c) %s The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-
-def get_script_header_lines_to_insert(start_year, end_year):
- return reversed(get_header_lines(SCRIPT_HEADER, start_year, end_year))
-
-################################################################################
-# query git for year of last change
-################################################################################
-
-def get_git_change_year_range(filename):
- years = get_git_change_years(filename)
- return min(years), max(years)
-
-################################################################################
-# check for existing core copyright
-################################################################################
-
-def file_already_has_core_copyright(file_lines):
- index, _ = get_updatable_copyright_line(file_lines)
- return index is not None
-
-################################################################################
-# insert header execution
-################################################################################
-
-def file_has_hashbang(file_lines):
- if len(file_lines) < 1:
- return False
- if len(file_lines[0]) <= 2:
- return False
- return file_lines[0][:2] == '#!'
-
-def insert_script_header(filename, file_lines, start_year, end_year):
- if file_has_hashbang(file_lines):
- insert_idx = 1
- else:
- insert_idx = 0
- header_lines = get_script_header_lines_to_insert(start_year, end_year)
- for line in header_lines:
- file_lines.insert(insert_idx, line)
- write_file_lines(filename, file_lines)
-
-def insert_cpp_header(filename, file_lines, start_year, end_year):
- file_lines.insert(0, '\n')
- header_lines = get_cpp_header_lines_to_insert(start_year, end_year)
- for line in header_lines:
- file_lines.insert(0, line)
- write_file_lines(filename, file_lines)
-
-def exec_insert_header(filename, style):
- file_lines = read_file_lines(filename)
- if file_already_has_core_copyright(file_lines):
- sys.exit('*** %s already has a copyright by The Bitcoin Core developers'
- % (filename))
- start_year, end_year = get_git_change_year_range(filename)
- if style in ['python', 'shell']:
- insert_script_header(filename, file_lines, start_year, end_year)
- else:
- insert_cpp_header(filename, file_lines, start_year, end_year)
-
-################################################################################
-# insert cmd
-################################################################################
-
-INSERT_USAGE = """
-Inserts a copyright header for "The Bitcoin Core developers" at the top of the
-file in either Python or C++ style as determined by the file extension. If the
-file is a Python file and it has a '#!' starting the first line, the header is
-inserted in the line below it.
-
-The copyright dates will be set to be:
-
-"-"
-
-where is according to the 'git log' history. If
- is equal to , the date will be set to be:
-
-""
-
-If the file already has a copyright for "The Bitcoin Core developers", the
-script will exit.
-
-Usage:
- $ ./copyright_header.py insert
-
-Arguments:
- - A source file in the BGL repository.
-"""
-
-def insert_cmd(argv):
- if len(argv) != 3:
- sys.exit(INSERT_USAGE)
-
- filename = argv[2]
- if not os.path.isfile(filename):
- sys.exit("*** bad filename: %s" % filename)
- _, extension = os.path.splitext(filename)
- if extension not in ['.h', '.cpp', '.cc', '.c', '.py', '.sh']:
- sys.exit("*** cannot insert for file extension %s" % extension)
-
- if extension == '.py':
- style = 'python'
- elif extension == '.sh':
- style = 'shell'
- else:
- style = 'cpp'
- exec_insert_header(filename, style)
-
-################################################################################
-# UI
-################################################################################
-
-USAGE = """
-copyright_header.py - utilities for managing copyright headers of 'The BGL
-Core developers' in repository source files.
-
-Usage:
- $ ./copyright_header
-
-Subcommands:
- report
- update
- insert
-
-To see subcommand usage, run them without arguments.
-"""
-
-SUBCOMMANDS = ['report', 'update', 'insert']
-
-if __name__ == "__main__":
- if len(sys.argv) == 1:
- sys.exit(USAGE)
- subcommand = sys.argv[1]
- if subcommand not in SUBCOMMANDS:
- sys.exit(USAGE)
- if subcommand == 'report':
- report_cmd(sys.argv)
- elif subcommand == 'update':
- update_cmd(sys.argv)
- elif subcommand == 'insert':
- insert_cmd(sys.argv)
diff --git a/contrib/devtools/gen-BGL-conf.sh b/contrib/devtools/gen-BGL-conf.sh
deleted file mode 100755
index e68e8a5145..0000000000
--- a/contrib/devtools/gen-BGL-conf.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2021 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-export LC_ALL=C
-TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
-BUILDDIR=${BUILDDIR:-$TOPDIR}
-BINDIR=${BINDIR:-$BUILDDIR/src}
-BGLD=${BGLD:-$BINDIR/BGLd}
-SHARE_EXAMPLES_DIR=${SHARE_EXAMPLES_DIR:-$TOPDIR/share/examples}
-EXAMPLE_CONF_FILE=${EXAMPLE_CONF_FILE:-$SHARE_EXAMPLES_DIR/bitcoin.conf}
-
-[ ! -x "$BGLD" ] && echo "$BGLD not found or not executable." && exit 1
-
-DIRTY=""
-VERSION_OUTPUT=$($BGLD --version)
-if [[ $VERSION_OUTPUT == *"dirty"* ]]; then
- DIRTY="${DIRTY}${BGLD}\n"
-fi
-
-if [ -n "$DIRTY" ]
-then
- echo -e "WARNING: $BGLD was built from a dirty tree.\n"
- echo -e "To safely generate a BGL.conf file, please commit your changes to $BGLD, rebuild, then run this script again.\n"
-fi
-
-echo 'Generating example BGL.conf file in share/examples/'
-
-# create the directory, if it doesn't exist
-mkdir -p "${SHARE_EXAMPLES_DIR}"
-
-# create the header text
-cat > "${EXAMPLE_CONF_FILE}" << 'EOF'
-##
-## bitcoin.conf configuration file.
-## Generated by contrib/devtools/gen-bitcoin-conf.sh.
-##
-## Lines beginning with # are comments.
-## All possible configuration options are provided. To use, copy this file
-## to your data directory (default or specified by -datadir), uncomment
-## options you would like to change, and save the file.
-##
-
-
-### Options
-EOF
-
-# parse the output from bitcoind --help
-# adding newlines is a bit funky to ensure portability for BSD
-# see here for more details: https://stackoverflow.com/a/24575385
-${BITCOIND} --help \
- | sed '1,/Print this help message and exit/d' \
- | sed -E 's/^[[:space:]]{2}\-/#/' \
- | sed -E 's/^[[:space:]]{7}/# /' \
- | sed -E '/[=[:space:]]/!s/#.*$/&=1/' \
- | awk '/^#[a-z]/{x=$0;next}{if (NF==0) print x"\n",x="";else print}' \
- | sed 's,\(^[[:upper:]].*\)\:$,\
-### \1,' \
- | sed 's/[[:space:]]*$//' >> "${EXAMPLE_CONF_FILE}"
-
-# create the footer text
-cat >> "${EXAMPLE_CONF_FILE}" << 'EOF'
-
-# [Sections]
-# Most options will apply to all networks. To confine an option to a specific
-# network, add it under the relevant section below.
-#
-# Note: If not specified under a network section, the options addnode, connect,
-# port, bind, rpcport, rpcbind, and wallet will only apply to mainnet.
-
-# Options for mainnet
-[main]
-
-# Options for testnet
-[test]
-
-# Options for signet
-[signet]
-
-# Options for regtest
-[regtest]
-EOF
diff --git a/contrib/devtools/gen-manpages.py b/contrib/devtools/gen-manpages.py
deleted file mode 100755
index e760701efd..0000000000
--- a/contrib/devtools/gen-manpages.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-import os
-import subprocess
-import sys
-import tempfile
-
-BINARIES = [
-'src/BGLd',
-'src/BGL-cli',
-'src/BGL-tx',
-'src/BGL-wallet',
-'src/BGL-util',
-'src/qt/BGL-qt',
-]
-
-# Paths to external utilities.
-git = os.getenv('GIT', 'git')
-help2man = os.getenv('HELP2MAN', 'help2man')
-
-# If not otherwise specified, get top directory from git.
-topdir = os.getenv('TOPDIR')
-if not topdir:
- r = subprocess.run([git, 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE, check=True, text=True)
- topdir = r.stdout.rstrip()
-
-# Get input and output directories.
-builddir = os.getenv('BUILDDIR', topdir)
-mandir = os.getenv('MANDIR', os.path.join(topdir, 'doc/man'))
-
-# Verify that all the required binaries are usable, and extract copyright
-# message in a first pass.
-versions = []
-for relpath in BINARIES:
- abspath = os.path.join(builddir, relpath)
- try:
- r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True)
- except IOError:
- print(f'{abspath} not found or not an executable', file=sys.stderr)
- sys.exit(1)
- # take first line (which must contain version)
- verstr = r.stdout.splitlines()[0]
- # last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
- verstr = verstr.split()[-1]
- assert verstr.startswith('v')
- # remaining lines are copyright
- copyright = r.stdout.split('\n')[1:]
- assert copyright[0].startswith('Copyright (C)')
-
- versions.append((abspath, verstr, copyright))
-
-if any(verstr.endswith('-dirty') for (_, verstr, _) in versions):
- print("WARNING: Binaries were built from a dirty tree.")
- print('man pages generated from dirty binaries should NOT be committed.')
- print('To properly generate man pages, please commit your changes (or discard them), rebuild, then run this script again.')
- print()
-
-with tempfile.NamedTemporaryFile('w', suffix='.h2m') as footer:
- # Create copyright footer, and write it to a temporary include file.
- # Copyright is the same for all binaries, so just use the first.
- footer.write('[COPYRIGHT]\n')
- footer.write('\n'.join(versions[0][2]).strip())
- footer.flush()
-
- # Call the binaries through help2man to produce a manual page for each of them.
- for (abspath, verstr, _) in versions:
- outname = os.path.join(mandir, os.path.basename(abspath) + '.1')
- print(f'Generating {outname}…')
- subprocess.run([help2man, '-N', '--version-string=' + verstr, '--include=' + footer.name, '-o', outname, abspath], check=True)
diff --git a/contrib/devtools/headerssync-params.py b/contrib/devtools/headerssync-params.py
deleted file mode 100644
index 0198f5db99..0000000000
--- a/contrib/devtools/headerssync-params.py
+++ /dev/null
@@ -1,357 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2022 Pieter Wuille
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-"""Script to find the optimal parameters for the headerssync module through simulation."""
-
-from math import log, exp, sqrt
-from datetime import datetime, timedelta
-import random
-
-# Parameters:
-
-# Aim for still working fine at some point in the future. [datetime]
-TIME = datetime(2026, 10, 5)
-
-# Expected block interval. [timedelta]
-BLOCK_INTERVAL = timedelta(seconds=600)
-
-# The number of headers corresponding to the minchainwork parameter. [headers]
-MINCHAINWORK_HEADERS = 804000
-
-# Combined processing bandwidth from all attackers to one victim. [bit/s]
-# 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash
-# headers. In practice, the victim's network bandwidth and network processing overheads probably
-# impose a far lower number, but it's a useful upper bound.
-ATTACK_BANDWIDTH = 6000000000
-
-# How much additional permanent memory usage are attackers (jointly) allowed to cause in the victim,
-# expressed as fraction of the normal memory usage due to mainchain growth, for the duration the
-# attack is sustained. [unitless]
-# 0.2 means that attackers, while they keep up the attack, can cause permanent memory usage due to
-# headers storage to grow at 1.2 header per BLOCK_INTERVAL.
-ATTACK_FRACTION = 0.2
-
-# When this is set, the mapping from period size to memory usage (at optimal buffer size for that
-# period) is assumed to be convex. This greatly speeds up the computation, and does not appear
-# to influence the outcome. Set to False for a stronger guarantee to get the optimal result.
-ASSUME_CONVEX = True
-
-# Explanation:
-#
-# The headerssync module implements a DoS protection against low-difficulty header spam which does
-# not rely on checkpoints. In short it works as follows:
-#
-# - (initial) header synchronization is split into two phases:
-# - A commitment phase, in which headers are downloaded from the peer, and a very compact
-# commitment to them is remembered in per-peer memory. The commitment phase ends when the
-# received chain's combined work reaches a predetermined threshold.
-# - A redownload phase, during which the headers are downloaded a second time from the same peer,
-# and compared against the commitment constructed in the first phase. If there is a match, the
-# redownloaded headers are fed to validation and accepted into permanent storage.
-#
-# This separation guarantees that no headers are accepted into permanent storage without
-# requiring the peer to first prove the chain actually has sufficient work.
-#
-# - To actually implement this commitment mechanism, the following approach is used:
-# - Keep a *1 bit* commitment (constructed using a salted hash function), for every block whose
-# height is a multiple of {period} plus an offset value. If RANDOMIZE_OFFSET, the offset,
-# like the salt, is chosen randomly when the synchronization starts and kept fixed afterwards.
-# - When redownloading, headers are fed through a per-peer queue that holds {bufsize} headers,
-# before passing them to validation. All the headers in this queue are verified against the
-# commitment bits created in the first phase before any header is released from it. This means
-# {bufsize/period} bits are checked "on top of" each header before actually processing it,
-# which results in a commitment structure with roughly {bufsize/period} bits of security, as
-# once a header is modified, due to the prevhash inclusion, all future headers necessarily
-# change as well.
-#
-# The question is what these {period} and {bufsize} parameters need to be set to. This program
-# exhaustively tests a range of values to find the optimal choice, taking into account:
-#
-# - Minimizing the (maximum of) two scenarios that trigger per-peer memory usage:
-#
-# - When downloading a (likely honest) chain that reaches the chainwork threshold after {n}
-# blocks, and then redownloads them, we will consume per-peer memory that is sufficient to
-# store {n/period} commitment bits and {bufsize} headers. We only consider attackers without
-# sufficient hashpower (as otherwise they are from a PoW perspective not attackers), which
-# means {n} is restricted to the honest chain's length before reaching minchainwork.
-#
-# - When downloading a (likely false) chain of {n} headers that never reaches the chainwork
-# threshold, we will consume per-peer memory that is sufficient to store {n/period}
-# commitment bits. Such a chain may be very long, by exploiting the timewarp bug to avoid
-# ramping up difficulty. There is however an absolute limit on how long such a chain can be: 6
-# blocks per second since genesis, due to the increasing MTP consensus rule.
-#
-# - Not gratuitously preventing synchronizing any valid chain, however difficult such a chain may
-# be to construct. In particular, the above scenario with an enormous timewarp-expoiting chain
-# cannot simply be ignored, as it is legal that the honest main chain is like that. We however
-# do not bother minimizing the memory usage in that case (because a billion-header long honest
-# chain will inevitably use far larger amounts of memory than designed for).
-#
-# - Keep the rate at which attackers can get low-difficulty headers accepted to the block index
-# negligible. Specifically, the possibility exists for an attacker to send the honest main
-# chain's headers during the commitment phase, but then start deviating at an attacker-chosen
-# point by sending novel low-difficulty headers instead. Depending on how high we set the
-# {bufsize/period} ratio, we can make the probability that such a header makes it in
-# arbitrarily small, but at the cost of higher memory during the redownload phase. It turns out,
-# some rate of memory usage growth is expected anyway due to chain growth, so permitting the
-# attacker to increase that rate by a small factor isn't concerning. The attacker may start
-# somewhat later than genesis, as long as the difficulty doesn't get too high. This reduces
-# the attacker bandwidth required at the cost of higher PoW needed for constructing the
-# alternate chain. This trade-off is ignored here, as it results in at most a small constant
-# factor in attack rate.
-
-
-# System properties:
-
-# Headers in the redownload buffer are stored without prevhash. [bits]
-COMPACT_HEADER_SIZE = 48 * 8
-
-# How many bits a header uses in P2P protocol. [bits]
-NET_HEADER_SIZE = 81 * 8
-
-# How many headers are sent at once. [headers]
-HEADER_BATCH_COUNT = 2000
-
-# Whether or not the offset of which blocks heights get checksummed is randomized.
-RANDOMIZE_OFFSET = True
-
-# Timestamp of the genesis block
-GENESIS_TIME = datetime(2009, 1, 3)
-
-# Derived values:
-
-# What rate of headers worth of RAM attackers are allowed to cause in the victim. [headers/s]
-LIMIT_HEADERRATE = ATTACK_FRACTION / BLOCK_INTERVAL.total_seconds()
-
-# How many headers can attackers (jointly) send a victim per second. [headers/s]
-NET_HEADERRATE = ATTACK_BANDWIDTH / NET_HEADER_SIZE
-
-# What fraction of headers sent by attackers can at most be accepted by a victim [unitless]
-LIMIT_FRACTION = LIMIT_HEADERRATE / NET_HEADERRATE
-
-# How many headers we permit attackers to cause being accepted per attack. [headers/attack]
-ATTACK_HEADERS = LIMIT_FRACTION * MINCHAINWORK_HEADERS
-
-
-def find_max_headers(when):
- """Compute the maximum number of headers a valid Bitcoin chain can have at given time."""
- # When exploiting the timewarp attack, this can be up to 6 per second since genesis.
- return 6 * ((when - GENESIS_TIME) // timedelta(seconds=1))
-
-
-def lambert_w(value):
- """Solve the equation x*exp(x)=value (x > 0, value > 0)."""
- # Initial approximation.
- approx = max(log(value), 0.0)
- for _ in range(10):
- # Newton-Rhapson iteration steps.
- approx += (value * exp(-approx) - approx) / (approx + 1.0)
- return approx
-
-
-def attack_rate(period, bufsize, limit=None):
- """Compute maximal accepted headers per attack in (period, bufsize) configuration.
-
- If limit is provided, the computation is stopped early when the result is known to exceed the
- value in limit.
- """
-
- max_rate = None
- max_honest = None
- # Let the current batch 0 being received be the first one in which the attacker starts lying.
- # They will only ever start doing so right after a commitment block, but where that is can be
- # in a number of places. Let honest be the number of honest headers in this current batch,
- # preceding the forged ones.
- for honest in range(HEADER_BATCH_COUNT):
- # The number of headers the attack under consideration will on average get accepted.
- # This is the number being computed.
- rate = 0
-
- # Iterate over the possible alignments of commitments w.r.t. the first batch. In case
- # the alignments are randomized, try all values. If not, the attacker can know/choose
- # the alignment, and will always start forging right after a commitment.
- if RANDOMIZE_OFFSET:
- align_choices = list(range(period))
- else:
- align_choices = [(honest - 1) % period]
- # Now loop over those possible alignment values, computing the average attack rate
- # over them by dividing each contribution by len(align_choices).
- for align in align_choices:
- # These state variables capture the situation after receiving the first batch.
- # - The number of headers received after the last commitment for an honest block:
- after_good_commit = HEADER_BATCH_COUNT - honest + ((honest - align - 1) % period)
- # - The number of forged headers in the redownload buffer:
- forged_in_buf = HEADER_BATCH_COUNT - honest
-
- # Now iterate over the next batches of headers received, adding contributions to the
- # rate variable.
- while True:
- # Process the first HEADER_BATCH_COUNT headers in the buffer:
- accept_forged_headers = max(forged_in_buf - bufsize, 0)
- forged_in_buf -= accept_forged_headers
- if accept_forged_headers:
- # The probability the attack has not been detected yet at this point:
- prob = 0.5 ** (after_good_commit // period)
- # Update attack rate, divided by align_choices to average over the alignments.
- rate += accept_forged_headers * prob / len(align_choices)
- # If this means we exceed limit, bail out early (performance optimization).
- if limit is not None and rate >= limit:
- return rate, None
- # If the maximal term being added is negligible compared to rate, stop
- # iterating.
- if HEADER_BATCH_COUNT * prob < 1.0e-16 * rate * len(align_choices):
- break
- # Update state from a new incoming batch (which is all forged)
- after_good_commit += HEADER_BATCH_COUNT
- forged_in_buf += HEADER_BATCH_COUNT
-
- if max_rate is None or rate > max_rate:
- max_rate = rate
- max_honest = honest
-
- return max_rate, max_honest
-
-
-def memory_usage(period, bufsize, when):
- """How much memory (max,mainchain,timewarp) does the (period,bufsize) configuration need?"""
-
- # Per-peer memory usage for a timewarp chain that never meets minchainwork
- mem_timewarp = find_max_headers(when) // period
- # Per-peer memory usage for being fed the main chain
- mem_mainchain = (MINCHAINWORK_HEADERS // period) + bufsize * COMPACT_HEADER_SIZE
- # Maximum per-peer memory usage
- max_mem = max(mem_timewarp, mem_mainchain)
-
- return max_mem, mem_mainchain, mem_timewarp
-
-def find_bufsize(period, attack_headers, when, max_mem=None, min_bufsize=1):
- """Determine how big bufsize needs to be given a specific period length.
-
- Given a period, find the smallest value of bufsize such that the attack rate against the
- (period, bufsize) configuration is below attack_headers. If max_mem is provided, and no
- such bufsize exists that needs less than max_mem bits of memory, None is returned.
- min_bufsize is the minimal result to be considered."""
-
- if max_mem is None:
- succ_buf = min_bufsize - 1
- fail_buf = min_bufsize
- # First double iteratively until an upper bound for failure is found.
- while True:
- if attack_rate(period, fail_buf, attack_headers)[0] < attack_headers:
- break
- succ_buf, fail_buf = fail_buf, 3 * fail_buf - 2 * succ_buf
- else:
- # If a long low-work header chain exists that exceeds max_mem already, give up.
- if find_max_headers(when) // period > max_mem:
- return None
- # Otherwise, verify that the maximal buffer size that permits a mainchain sync with less
- # than max_mem memory is sufficient to get the attack rate below attack_headers. If not,
- # also give up.
- max_buf = (max_mem - (MINCHAINWORK_HEADERS // period)) // COMPACT_HEADER_SIZE
- if max_buf < min_bufsize:
- return None
- if attack_rate(period, max_buf, attack_headers)[0] >= attack_headers:
- return None
- # If it is sufficient, that's an upper bound to start our search.
- succ_buf = min_bufsize - 1
- fail_buf = max_buf
-
- # Then perform a bisection search to narrow it down.
- while fail_buf > succ_buf + 1:
- try_buf = (succ_buf + fail_buf) // 2
- if attack_rate(period, try_buf, attack_headers)[0] >= attack_headers:
- succ_buf = try_buf
- else:
- fail_buf = try_buf
- return fail_buf
-
-
-def optimize(when):
- """Find the best (period, bufsize) configuration."""
-
- # When period*bufsize = memory_scale, the per-peer memory for a mainchain sync and a maximally
- # long low-difficulty header sync are equal.
- memory_scale = (find_max_headers(when) - MINCHAINWORK_HEADERS) / COMPACT_HEADER_SIZE
- # Compute approximation for {bufsize/period}, using a formula for a simplified problem.
- approx_ratio = lambert_w(log(4) * memory_scale / ATTACK_HEADERS**2) / log(4)
- # Use those for a first attempt.
- print("Searching configurations:")
- period = int(sqrt(memory_scale / approx_ratio) + 0.5)
- bufsize = find_bufsize(period, ATTACK_HEADERS, when)
- mem = memory_usage(period, bufsize, when)
- best = (period, bufsize, mem)
- maps = [(period, bufsize), (MINCHAINWORK_HEADERS + 1, None)]
- print(f"- Initial: period={period}, buffer={bufsize}, mem={mem[0] / 8192:.3f} KiB")
-
- # Consider all period values between 1 and MINCHAINWORK_HEADERS, except the one just tried.
- periods = [iv for iv in range(1, MINCHAINWORK_HEADERS + 1) if iv != period]
- # Iterate, picking a random element from periods, computing its corresponding bufsize, and
- # then using the result to shrink the period.
- while True:
- # Remove all periods whose memory usage for low-work long chain sync exceed the best
- # memory usage we've found so far.
- periods = [p for p in periods if find_max_headers(when) // p < best[2][0]]
- # Stop if there is nothing left to try.
- if len(periods) == 0:
- break
- # Pick a random remaining option for period size, and compute corresponding bufsize.
- period = periods.pop(random.randrange(len(periods)))
- # The buffer size (at a given attack level) cannot shrink as the period grows. Find the
- # largest period smaller than the selected one we know the buffer size for, and use that
- # as a lower bound to find_bufsize.
- min_bufsize = max([(p, b) for p, b in maps if p < period] + [(0,0)])[1]
- bufsize = find_bufsize(period, ATTACK_HEADERS, when, best[2][0], min_bufsize)
- if bufsize is not None:
- # We found a (period, bufsize) configuration with better memory usage than our best
- # so far. Remember it for future lower bounds.
- maps.append((period, bufsize))
- mem = memory_usage(period, bufsize, when)
- assert mem[0] <= best[2][0]
- if ASSUME_CONVEX:
- # Remove all periods that are on the other side of the former best as the new
- # best.
- periods = [p for p in periods if (p < best[0]) == (period < best[0])]
- best = (period, bufsize, mem)
- print(f"- New best: period={period}, buffer={bufsize}, mem={mem[0] / 8192:.3f} KiB")
- else:
- # The (period, bufsize) configuration we found is worse than what we already had.
- if ASSUME_CONVEX:
- # Remove all periods that are on the other side of the tried configuration as the
- # best one.
- periods = [p for p in periods if (p < period) == (best[0] < period)]
-
- # Return the result.
- period, bufsize, _ = best
- return period, bufsize
-
-
-def analyze(when):
- """Find the best configuration and print it out."""
-
- period, bufsize = optimize(when)
- # Compute accurate statistics for the best found configuration.
- _, mem_mainchain, mem_timewarp = memory_usage(period, bufsize, when)
- headers_per_attack, _ = attack_rate(period, bufsize)
- attack_volume = NET_HEADER_SIZE * MINCHAINWORK_HEADERS
- # And report them.
- print()
- print("Optimal configuration:")
- print()
- print("//! Store one header commitment per HEADER_COMMITMENT_PERIOD blocks.")
- print(f"constexpr size_t HEADER_COMMITMENT_PERIOD{{{period}}};")
- print()
- print("//! Only feed headers to validation once this many headers on top have been")
- print("//! received and validated against commitments.")
- print(f"constexpr size_t REDOWNLOAD_BUFFER_SIZE{{{bufsize}}};"
- f" // {bufsize}/{period} = ~{bufsize/period:.1f} commitments")
- print()
- print("Properties:")
- print(f"- Per-peer memory for mainchain sync: {mem_mainchain / 8192:.3f} KiB")
- print(f"- Per-peer memory for timewarp attack: {mem_timewarp / 8192:.3f} KiB")
- print(f"- Attack rate: {1/headers_per_attack:.1f} attacks for 1 header of memory growth")
- print(f" (where each attack costs {attack_volume / 8388608:.3f} MiB bandwidth)")
-
-
-analyze(TIME)
diff --git a/contrib/devtools/iwyu/BGL.core.imp b/contrib/devtools/iwyu/BGL.core.imp
deleted file mode 100644
index befc949f18..0000000000
--- a/contrib/devtools/iwyu/BGL.core.imp
+++ /dev/null
@@ -1,4 +0,0 @@
-# Fixups / upstreamed changes
-[
- { include: [ "", private, "", public ] },
-]
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
deleted file mode 100755
index 49b5e1cb7f..0000000000
--- a/contrib/devtools/security-check.py
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2015-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Perform basic security checks on a series of executables.
-Exit status will be 0 if successful, and the program will be silent.
-Otherwise the exit status will be 1 and it will log which executables failed which checks.
-Needs `objdump` (for PE).
-'''
-import sys
-
-import lief
-
-def check_ELF_RELRO(binary) -> bool:
- '''
- Check for read-only relocations.
- GNU_RELRO program header must exist
- Dynamic section must have BIND_NOW flag
- '''
- binary = lief.parse(executable)
- have_gnu_relro = False
- for segment in binary.segments:
- # Note: not checking p_flags == PF_R: here as linkers set the permission differently
- # This does not affect security: the permission flags of the GNU_RELRO program
- # header are ignored, the PT_LOAD header determines the effective permissions.
- # However, the dynamic linker need to write to this area so these are RW.
- # Glibc itself takes care of mprotecting this area R after relocations are finished.
- # See also https://marc.info/?l=binutils&m=1498883354122353
- if segment.type == lief.ELF.SEGMENT_TYPES.GNU_RELRO:
- have_gnu_relro = True
-
- have_bindnow = False
- try:
- flags = binary.get(lief.ELF.DYNAMIC_TAGS.FLAGS)
- if flags.value & lief.ELF.DYNAMIC_FLAGS.BIND_NOW:
- have_bindnow = True
- except Exception:
- have_bindnow = False
-
- for line in stdout.splitlines():
- tokens = line.split()
- if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]):
- have_bindnow = True
- return have_gnu_relro and have_bindnow
-
-def check_ELF_Canary(binary) -> bool:
- '''
- Check for use of stack canary
- '''
- binary = lief.parse(executable)
- return binary.has_symbol('__stack_chk_fail')
-
-def check_ELF_separate_code(binary):
- '''
- Check that sections are appropriately separated in virtual memory,
- based on their permissions. This checks for missing -Wl,-z,separate-code
- and potentially other problems.
- '''
- binary = lief.parse(executable)
- R = lief.ELF.SEGMENT_FLAGS.R
- W = lief.ELF.SEGMENT_FLAGS.W
- E = lief.ELF.SEGMENT_FLAGS.X
- EXPECTED_FLAGS = {
- # Read + execute
- '.init': R | E,
- '.plt': R | E,
- '.plt.got': R | E,
- '.plt.sec': R | E,
- '.text': R | E,
- '.fini': R | E,
- # Read-only data
- '.interp': R,
- '.note.gnu.property': R,
- '.note.gnu.build-id': R,
- '.note.ABI-tag': R,
- '.gnu.hash': R,
- '.dynsym': R,
- '.dynstr': R,
- '.gnu.version': R,
- '.gnu.version_r': R,
- '.rela.dyn': R,
- '.rela.plt': R,
- '.rodata': R,
- '.eh_frame_hdr': R,
- '.eh_frame': R,
- '.qtmetadata': R,
- '.gcc_except_table': R,
- '.stapsdt.base': R,
- # Writable data
- '.init_array': R | W,
- '.fini_array': R | W,
- '.dynamic': R | W,
- '.got': R | W,
- '.data': R | W,
- '.bss': R | W,
- }
- if binary.header.machine_type == lief.ELF.ARCH.PPC64:
- # .plt is RW on ppc64 even with separate-code
- EXPECTED_FLAGS['.plt'] = R | W
- # For all LOAD program headers get mapping to the list of sections,
- # and for each section, remember the flags of the associated program header.
- flags_per_section = {}
- for segment in binary.segments:
- if segment.type == lief.ELF.SEGMENT_TYPES.LOAD:
- for section in segment.sections:
- flags_per_section[section.name] = segment.flags
- # Spot-check ELF LOAD program header flags per section
- # If these sections exist, check them against the expected R/W/E flags
- for (section, flags) in flags_per_section.items():
- if section in EXPECTED_FLAGS:
- if int(EXPECTED_FLAGS[section]) != int(flags):
- return False
- return True
-
-def check_ELF_control_flow(binary) -> bool:
- '''
- Check for control flow instrumentation
- '''
- main = binary.get_function_address('main')
- content = binary.get_content_from_virtual_address(main, 4, lief.Binary.VA_TYPES.AUTO)
-
- if content.tolist() == [243, 15, 30, 250]: # endbr64
- return True
- return False
-
-def check_PE_DYNAMIC_BASE(binary) -> bool:
- '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
- return lief.PE.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists
-
-# Must support high-entropy 64-bit address space layout randomization
-# in addition to DYNAMIC_BASE to have secure ASLR.
-def check_PE_HIGH_ENTROPY_VA(binary) -> bool:
- '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
- return lief.PE.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists
-
-def check_PE_RELOC_SECTION(binary) -> bool:
- '''Check for a reloc section. This is required for functional ASLR.'''
- return binary.has_relocations
-
-def check_PE_control_flow(binary) -> bool:
- '''
- Check for control flow instrumentation
- '''
- main = binary.get_symbol('main').value
-
- section_addr = binary.section_from_rva(main).virtual_address
- virtual_address = binary.optional_header.imagebase + section_addr + main
-
- content = binary.get_content_from_virtual_address(virtual_address, 4, lief.Binary.VA_TYPES.VA)
-
- if content.tolist() == [243, 15, 30, 250]: # endbr64
- return True
- return False
-
-def check_PE_Canary(binary) -> bool:
- '''
- Check for use of stack canary
- '''
- return binary.has_symbol('__stack_chk_fail')
-
-def check_MACHO_NOUNDEFS(binary) -> bool:
- '''
- Check for no undefined references.
- '''
- return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS)
-
-def check_MACHO_FIXUP_CHAINS(binary) -> bool:
- '''
- Check for use of chained fixups.
- '''
- return binary.has_dyld_chained_fixups
-
-def check_MACHO_Canary(binary) -> bool:
- '''
- Check for use of stack canary
- '''
- return binary.has_symbol('___stack_chk_fail')
-
-def check_PIE(binary) -> bool:
- '''
- Check for position independent executable (PIE),
- allowing for address space randomization.
- '''
- return binary.is_pie
-
-def check_NX(binary) -> bool:
- '''
- Check for no stack execution
- '''
- return binary.has_nx
-
-def check_MACHO_control_flow(binary) -> bool:
- '''
- Check for control flow instrumentation
- '''
- content = binary.get_content_from_virtual_address(binary.entrypoint, 4, lief.Binary.VA_TYPES.AUTO)
-
- if content.tolist() == [243, 15, 30, 250]: # endbr64
- return True
- return False
-
-def check_MACHO_branch_protection(binary) -> bool:
- '''
- Check for branch protection instrumentation
- '''
- content = binary.get_content_from_virtual_address(binary.entrypoint, 4, lief.Binary.VA_TYPES.AUTO)
-
- if content.tolist() == [95, 36, 3, 213]: # bti
- return True
- return False
-
-BASE_ELF = [
- ('PIE', check_PIE),
- ('NX', check_NX),
- ('RELRO', check_ELF_RELRO),
- ('Canary', check_ELF_Canary),
- ('separate_code', check_ELF_separate_code),
-]
-
-BASE_PE = [
- ('PIE', check_PIE),
- ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE),
- ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
- ('NX', check_NX),
- ('RELOC_SECTION', check_PE_RELOC_SECTION),
- ('CONTROL_FLOW', check_PE_control_flow),
- ('Canary', check_PE_Canary),
-]
-
-BASE_MACHO = [
- ('NOUNDEFS', check_MACHO_NOUNDEFS),
- ('Canary', check_MACHO_Canary),
- ('FIXUP_CHAINS', check_MACHO_FIXUP_CHAINS),
-]
-
-CHECKS = {
- lief.EXE_FORMATS.ELF: {
- lief.ARCHITECTURES.X86: BASE_ELF + [('CONTROL_FLOW', check_ELF_control_flow)],
- lief.ARCHITECTURES.ARM: BASE_ELF,
- lief.ARCHITECTURES.ARM64: BASE_ELF,
- lief.ARCHITECTURES.PPC: BASE_ELF,
- lief.ARCHITECTURES.RISCV: BASE_ELF,
- },
- lief.EXE_FORMATS.PE: {
- lief.ARCHITECTURES.X86: BASE_PE,
- },
- lief.EXE_FORMATS.MACHO: {
- lief.ARCHITECTURES.X86: BASE_MACHO + [('PIE', check_PIE),
- ('NX', check_NX),
- ('CONTROL_FLOW', check_MACHO_control_flow)],
- lief.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_branch_protection)],
- }
-}
-
-if __name__ == '__main__':
- retval: int = 0
- for filename in sys.argv[1:]:
- try:
- binary = lief.parse(filename)
- etype = binary.format
- arch = binary.abstract.header.architecture
- binary.concrete
-
- if etype == lief.EXE_FORMATS.UNKNOWN:
- print(f'{filename}: unknown executable format')
- retval = 1
- continue
-
- if arch == lief.ARCHITECTURES.NONE:
- print(f'{filename}: unknown architecture')
- retval = 1
- continue
-
- failed: list[str] = []
- for (name, func) in CHECKS[etype][arch]:
- if not func(binary):
- failed.append(name)
- if failed:
- print(f'{filename}: failed {" ".join(failed)}')
- retval = 1
- except IOError:
- print(f'{filename}: cannot open')
- retval = 1
- sys.exit(retval)
-
diff --git a/contrib/devtools/split-debug.sh b/contrib/devtools/split-debug.sh
deleted file mode 100755
index 3822fd1310..0000000000
--- a/contrib/devtools/split-debug.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-set -e
-if [ $# -ne 3 ];
- then echo "usage: $0 "
-fi
-
-/usr/bin/objcopy --enable-deterministic-archives -p --only-keep-debug $1 $3
-/usr/bin/objcopy --enable-deterministic-archives -p --strip-debug $1 $2
-strip --enable-deterministic-archives -p -s $2
-/usr/bin/objcopy --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2
diff --git a/contrib/devtools/split-debug.sh.in b/contrib/devtools/split-debug.sh.in
deleted file mode 100644
index 92b72b1446..0000000000
--- a/contrib/devtools/split-debug.sh.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-set -e
-if [ $# -ne 3 ];
- then echo "usage: $0 "
-fi
-
-@OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3
-@OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2
-@STRIP@ --enable-deterministic-archives -p -s $2
-@OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
deleted file mode 100755
index 12f2bb9d4b..0000000000
--- a/contrib/devtools/symbol-check.py
+++ /dev/null
@@ -1,318 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2014 Wladimir J. van der Laan
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-A script to check that release executables only contain certain symbols
-and are only linked against allowed libraries.
-
-Example usage:
-
- find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py
-'''
-import sys
-
-import lief
-
-# Debian 11 (Bullseye) EOL: 2026. https://wiki.debian.org/LTS
-#
-# - libgcc version 10.2.1 (https://packages.debian.org/bullseye/libgcc-s1)
-# - libc version 2.31 (https://packages.debian.org/source/bullseye/glibc)
-#
-# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam
-#
-# - libgcc version 10.5.0 (https://packages.ubuntu.com/focal/libgcc1)
-# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6)
-#
-# CentOS Stream 9 EOL: 2027. https://www.centos.org/cl-vs-cs/#end-of-life
-#
-# - libgcc version 12.2.1 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
-# - libc version 2.34 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
-#
-# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
-
-MAX_VERSIONS = {
-'GCC': (4,3,0),
-'GLIBC': {
- lief.ELF.ARCH.x86_64: (2,31),
- lief.ELF.ARCH.ARM: (2,31),
- lief.ELF.ARCH.AARCH64:(2,31),
- lief.ELF.ARCH.PPC64: (2,31),
- lief.ELF.ARCH.RISCV: (2,31),
-},
-'LIBATOMIC': (1,0),
-'V': (0,5,0), # xkb (bitcoin-qt only)
-}
-
-# Ignore symbols that are exported as part of every executable
-IGNORE_EXPORTS = {
-'environ', '_environ', '__environ', '_fini', '_init', 'stdin',
-'stdout', 'stderr',
-}
-
-# Expected linker-loader names can be found here:
-# https://sourceware.org/glibc/wiki/ABIList?action=recall&rev=16
-ELF_INTERPRETER_NAMES: dict[lief.ELF.ARCH, dict[lief.ENDIANNESS, str]] = {
- lief.ELF.ARCH.x86_64: {
- lief.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2",
- },
- lief.ELF.ARCH.ARM: {
- lief.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3",
- },
- lief.ELF.ARCH.AARCH64: {
- lief.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1",
- },
- lief.ELF.ARCH.PPC64: {
- lief.ENDIANNESS.BIG: "/lib64/ld64.so.1",
- lief.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
- },
- lief.ELF.ARCH.RISCV: {
- lief.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
- },
-}
-
-ELF_ABIS: dict[lief.ELF.ARCH, dict[lief.ENDIANNESS, list[int]]] = {
- lief.ELF.ARCH.x86_64: {
- lief.ENDIANNESS.LITTLE: [3,2,0],
- },
- lief.ELF.ARCH.ARM: {
- lief.ENDIANNESS.LITTLE: [3,2,0],
- },
- lief.ELF.ARCH.AARCH64: {
- lief.ENDIANNESS.LITTLE: [3,7,0],
- },
- lief.ELF.ARCH.PPC64: {
- lief.ENDIANNESS.LITTLE: [3,10,0],
- lief.ENDIANNESS.BIG: [3,2,0],
- },
- lief.ELF.ARCH.RISCV: {
- lief.ENDIANNESS.LITTLE: [4,15,0],
- },
-}
-
-# Allowed NEEDED libraries
-ELF_ALLOWED_LIBRARIES = {
-# BGLd and BGL-qt
-'libgcc_s.so.1', # GCC base support
-'libc.so.6', # C library
-'libpthread.so.0', # threading
-'libm.so.6', # math library
-'libatomic.so.1',
-'ld-linux-x86-64.so.2', # 64-bit dynamic linker
-'ld-linux.so.2', # 32-bit dynamic linker
-'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker
-'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
-'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker
-# BGL-qt only
-'libxcb.so.1', # part of X11
-'libxkbcommon.so.0', # keyboard keymapping
-'libxkbcommon-x11.so.0', # keyboard keymapping
-'libfontconfig.so.1', # font support
-'libfreetype.so.6', # font parsing
-'libdl.so.2', # programming interface to dynamic linker
-'libxcb-icccm.so.4',
-'libxcb-image.so.0',
-'libxcb-shm.so.0',
-'libxcb-keysyms.so.1',
-'libxcb-randr.so.0',
-'libxcb-render-util.so.0',
-'libxcb-render.so.0',
-'libxcb-shape.so.0',
-'libxcb-sync.so.1',
-'libxcb-xfixes.so.0',
-'libxcb-xinerama.so.0',
-'libxcb-xkb.so.1',
-}
-
-MACHO_ALLOWED_LIBRARIES = {
-# bitcoind and bitcoin-qt
-'libc++.1.dylib', # C++ Standard Library
-'libSystem.B.dylib', # libc, libm, libpthread, libinfo
-# bitcoin-qt only
-'AppKit', # user interface
-'ApplicationServices', # common application tasks.
-'Carbon', # deprecated c back-compat API
-'ColorSync',
-'CoreFoundation', # low level func, data types
-'CoreGraphics', # 2D rendering
-'CoreServices', # operating system services
-'CoreText', # interface for laying out text and handling fonts.
-'CoreVideo', # video processing
-'Foundation', # base layer functionality for apps/frameworks
-'ImageIO', # read and write image file formats.
-'IOKit', # user-space access to hardware devices and drivers.
-'IOSurface', # cross process image/drawing buffers
-'libobjc.A.dylib', # Objective-C runtime library
-'Metal', # 3D graphics
-'Security', # access control and authentication
-'QuartzCore', # animation
-}
-
-PE_ALLOWED_LIBRARIES = {
-'ADVAPI32.dll', # security & registry
-'IPHLPAPI.DLL', # IP helper API
-'KERNEL32.dll', # win32 base APIs
-'msvcrt.dll', # C standard library for MSVC
-'SHELL32.dll', # shell API
-'WS2_32.dll', # sockets
-# bitcoin-qt only
-'dwmapi.dll', # desktop window manager
-'GDI32.dll', # graphics device interface
-'IMM32.dll', # input method editor
-'NETAPI32.dll', # network management
-'ole32.dll', # component object model
-'OLEAUT32.dll', # OLE Automation API
-'SHLWAPI.dll', # light weight shell API
-'USER32.dll', # user interface
-'USERENV.dll', # user management
-'UxTheme.dll', # visual style
-'VERSION.dll', # version checking
-'WINMM.dll', # WinMM audio API
-'WTSAPI32.dll', # Remote Desktop
-}
-
-def check_version(max_versions, version, arch) -> bool:
- (lib, _, ver) = version.rpartition('_')
- ver = tuple([int(x) for x in ver.split('.')])
- if not lib in max_versions:
- return False
- if isinstance(max_versions[lib], tuple):
- return ver <= max_versions[lib]
- else:
- return ver <= max_versions[lib][arch]
-
-def check_imported_symbols(binary) -> bool:
- ok: bool = True
-
- for symbol in binary.imported_symbols:
- if not symbol.imported:
- continue
-
- version = symbol.symbol_version if symbol.has_version else None
-
- if version:
- aux_version = version.symbol_version_auxiliary.name if version.has_auxiliary_version else None
- if aux_version and not check_version(MAX_VERSIONS, aux_version, binary.header.machine_type):
- print(f'{filename}: symbol {symbol.name} from unsupported version {version}')
- ok = False
- return ok
-
-def check_exported_symbols(binary) -> bool:
- ok: bool = True
-
- for symbol in binary.dynamic_symbols:
- if not symbol.exported:
- continue
- name = symbol.name
- if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS:
- continue
- print(f'{binary.name}: export of symbol {name} not allowed!')
- ok = False
- return ok
-
-def check_RUNPATH(binary) -> bool:
- assert binary.get(lief.ELF.DYNAMIC_TAGS.RUNPATH) is None
- assert binary.get(lief.ELF.DYNAMIC_TAGS.RPATH) is None
- return True
-
-def check_ELF_libraries(binary) -> bool:
- ok: bool = True
- for library in binary.libraries:
- if library not in ELF_ALLOWED_LIBRARIES:
- print(f'{filename}: {library} is not in ALLOWED_LIBRARIES!')
- ok = False
- return ok
-
-def check_MACHO_libraries(binary) -> bool:
- ok: bool = True
- for dylib in binary.libraries:
- split = dylib.name.split('/')
- if split[-1] not in MACHO_ALLOWED_LIBRARIES:
- print(f'{split[-1]} is not in ALLOWED_LIBRARIES!')
- ok = False
- return ok
-
-def check_MACHO_min_os(binary) -> bool:
- if binary.build_version.minos == [11,0,0]:
- return True
- return False
-
-def check_MACHO_sdk(binary) -> bool:
- if binary.build_version.sdk == [14, 0, 0]:
- return True
- return False
-
-def check_MACHO_lld(binary) -> bool:
- if binary.build_version.tools[0].version == [18, 1, 6]:
- return True
- return False
-
-def check_PE_libraries(binary) -> bool:
- ok: bool = True
- for dylib in binary.libraries:
- if dylib not in PE_ALLOWED_LIBRARIES:
- print(f'{dylib} is not in ALLOWED_LIBRARIES!')
- ok = False
- return ok
-
-def check_PE_subsystem_version(binary) -> bool:
- major: int = binary.optional_header.major_subsystem_version
- minor: int = binary.optional_header.minor_subsystem_version
- if major == 6 and minor == 1:
- return True
- return False
-
-def check_ELF_interpreter(binary) -> bool:
- expected_interpreter = ELF_INTERPRETER_NAMES[binary.header.machine_type][binary.abstract.header.endianness]
-
- return binary.concrete.interpreter == expected_interpreter
-
-def check_ELF_ABI(binary) -> bool:
- expected_abi = ELF_ABIS[binary.header.machine_type][binary.abstract.header.endianness]
- note = binary.concrete.get(lief.ELF.NOTE_TYPES.ABI_TAG)
- assert note.details.abi == lief.ELF.NOTE_ABIS.LINUX
- return note.details.version == expected_abi
-
-CHECKS = {
-lief.EXE_FORMATS.ELF: [
- ('IMPORTED_SYMBOLS', check_imported_symbols),
- ('EXPORTED_SYMBOLS', check_exported_symbols),
- ('LIBRARY_DEPENDENCIES', check_ELF_libraries),
- ('INTERPRETER_NAME', check_ELF_interpreter),
- ('ABI', check_ELF_ABI),
- ('RUNPATH', check_RUNPATH),
-],
-lief.EXE_FORMATS.MACHO: [
- ('DYNAMIC_LIBRARIES', check_MACHO_libraries),
- ('MIN_OS', check_MACHO_min_os),
- ('SDK', check_MACHO_sdk),
- ('LLD', check_MACHO_lld),
-],
-lief.EXE_FORMATS.PE: [
- ('DYNAMIC_LIBRARIES', check_PE_libraries),
- ('SUBSYSTEM_VERSION', check_PE_subsystem_version),
-]
-}
-
-if __name__ == '__main__':
- retval: int = 0
- for filename in sys.argv[1:]:
- try:
- binary = lief.parse(filename)
- etype = binary.format
- if etype == lief.EXE_FORMATS.UNKNOWN:
- print(f'{filename}: unknown executable format')
- retval = 1
- continue
-
- failed: list[str] = []
- for (name, func) in CHECKS[etype]:
- if not func(binary):
- failed.append(name)
- if failed:
- print(f'{filename}: failed {" ".join(failed)}')
- retval = 1
- except IOError:
- print(f'{filename}: cannot open')
- retval = 1
- sys.exit(retval)
diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py
deleted file mode 100755
index 7bfd4d98da..0000000000
--- a/contrib/devtools/test-security-check.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2015-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Test script for security-check.py
-'''
-import lief
-import os
-import subprocess
-import unittest
-
-from utils import determine_wellknown_cmd
-
-def write_testcode(filename):
- with open(filename, 'w', encoding="utf8") as f:
- f.write('''
- #include
- int main()
- {
- printf("the quick brown fox jumps over the lazy god\\n");
- return 0;
- }
- ''')
-
-def clean_files(source, executable):
- os.remove(source)
- os.remove(executable)
-
-def env_flags() -> list[str]:
- # This should behave the same as AC_TRY_LINK, so arrange well-known flags
- # in the same order as autoconf would.
- #
- # See the definitions for ac_link in autoconf's lib/autoconf/c.m4 file for
- # reference.
- flags: list[str] = []
- for var in ['CFLAGS', 'CPPFLAGS', 'LDFLAGS']:
- flags += filter(None, os.environ.get(var, '').split(' '))
- return flags
-
-def call_security_check(cc: str, source: str, executable: str, options) -> tuple:
- subprocess.run([*cc,source,'-o',executable] + env_flags() + options, check=True)
- p = subprocess.run([os.path.join(os.path.dirname(__file__), 'security-check.py'), executable], stdout=subprocess.PIPE, text=True)
- return (p.returncode, p.stdout.rstrip())
-
-def get_arch(cc, source, executable):
- subprocess.run([*cc, source, '-o', executable] + env_flags(), check=True)
- binary = lief.parse(executable)
- arch = binary.abstract.header.architecture
- os.remove(executable)
- return arch
-
-class TestSecurityChecks(unittest.TestCase):
- def test_ELF(self):
- source = 'test1.c'
- executable = 'test1'
- cc = determine_wellknown_cmd('CC', 'gcc')
- write_testcode(source)
- arch = get_arch(cc, source, executable)
-
- if arch == lief.ARCHITECTURES.X86:
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE NX RELRO CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE RELRO CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE RELRO CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
- (1, executable+': failed RELRO CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
- (1, executable+': failed separate_code CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
- (1, executable+': failed CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code', '-fcf-protection=full']),
- (0, ''))
- else:
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE NX RELRO'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE RELRO'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
- (1, executable+': failed PIE RELRO'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
- (1, executable+': failed RELRO'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
- (1, executable+': failed separate_code'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
- (0, ''))
-
- clean_files(source, executable)
-
- def test_PE(self):
- source = 'test1.c'
- executable = 'test1.exe'
- cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')
- write_testcode(source)
-
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--disable-nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fno-stack-protector']),
- (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION CONTROL_FLOW Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']),
- (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']),
- (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
- (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW')) # -pie -fPIE does nothing unless --dynamicbase is also supplied
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
- (1, executable+': failed HIGH_ENTROPY_VA CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']),
- (1, executable+': failed CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE', '-fcf-protection=full','-fstack-protector-all', '-lssp']),
- (0, ''))
-
- clean_files(source, executable)
-
- def test_MACHO(self):
- source = 'test1.c'
- executable = 'test1'
- cc = determine_wellknown_cmd('CC', 'clang')
- write_testcode(source)
- arch = get_arch(cc, source, executable)
-
- if arch == lief.ARCHITECTURES.X86:
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']),
- (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains']),
- (1, executable+': failed NOUNDEFS Canary CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
- (1, executable+': failed NOUNDEFS CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains']),
- (1, executable+': failed CONTROL_FLOW'))
- self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
- (0, ''))
- else:
- # arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']),
- (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS BRANCH_PROTECTION'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains', '-mbranch-protection=bti']),
- (1, executable+': failed NOUNDEFS Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains', '-mbranch-protection=bti']),
- (1, executable+': failed NOUNDEFS'))
- self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains', '-mbranch-protection=bti']),
- (0, ''))
-
-
- clean_files(source, executable)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py
deleted file mode 100755
index b00004586c..0000000000
--- a/contrib/devtools/test-symbol-check.py
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2020-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Test script for symbol-check.py
-'''
-import os
-import subprocess
-import unittest
-
-from utils import determine_wellknown_cmd
-
-def call_symbol_check(cc: list[str], source, executable, options):
- # This should behave the same as AC_TRY_LINK, so arrange well-known flags
- # in the same order as autoconf would.
- #
- # See the definitions for ac_link in autoconf's lib/autoconf/c.m4 file for
- # reference.
- env_flags: list[str] = []
- for var in ['CFLAGS', 'CPPFLAGS', 'LDFLAGS']:
- env_flags += filter(None, os.environ.get(var, '').split(' '))
-
- subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True)
- p = subprocess.run([os.path.join(os.path.dirname(__file__), 'symbol-check.py'), executable], stdout=subprocess.PIPE, text=True)
- os.remove(source)
- os.remove(executable)
- return (p.returncode, p.stdout.rstrip())
-
-class TestSymbolChecks(unittest.TestCase):
- def test_ELF(self):
- source = 'test1.c'
- executable = 'test1'
- cc = determine_wellknown_cmd('CC', 'gcc')
-
- # -lutil is part of the libc6 package so a safe bet that it's installed
- # it's also out of context enough that it's unlikely to ever become a real dependency
- source = 'test2.c'
- executable = 'test2'
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- login(0);
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-lutil']),
- (1, executable + ': libutil.so.1 is not in ALLOWED_LIBRARIES!\n' +
- executable + ': failed LIBRARY_DEPENDENCIES'))
-
- # finally, check a simple conforming binary
- source = 'test3.c'
- executable = 'test3'
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- printf("42");
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, []),
- (0, ''))
-
- def test_MACHO(self):
- source = 'test1.c'
- executable = 'test1'
- cc = determine_wellknown_cmd('CC', 'clang')
-
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- XML_ExpatVersion();
- return 0;
- }
-
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']),
- (1, 'libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' +
- f'{executable}: failed DYNAMIC_LIBRARIES MIN_OS SDK'))
-
- source = 'test2.c'
- executable = 'test2'
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- CGMainDisplayID();
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-framework', 'CoreGraphics', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']),
- (1, f'{executable}: failed MIN_OS SDK'))
-
- source = 'test3.c'
- executable = 'test3'
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- int main()
- {
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,11.0', '-Wl,11.4']),
- (1, f'{executable}: failed SDK'))
-
- def test_PE(self):
- source = 'test1.c'
- executable = 'test1.exe'
- cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')
-
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- PdhConnectMachineA(NULL);
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
- (1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' +
- executable + ': failed DYNAMIC_LIBRARIES'))
-
- source = 'test2.c'
- executable = 'test2.exe'
-
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- int main()
- {
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,--major-subsystem-version', '-Wl,9', '-Wl,--minor-subsystem-version', '-Wl,9']),
- (1, executable + ': failed SUBSYSTEM_VERSION'))
-
- source = 'test3.c'
- executable = 'test3.exe'
- with open(source, 'w', encoding="utf8") as f:
- f.write('''
- #include
-
- int main()
- {
- CoFreeUnusedLibrariesEx(0,0);
- return 0;
- }
- ''')
-
- self.assertEqual(call_symbol_check(cc, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
- (0, ''))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/contrib/devtools/test_deterministic_coverage.sh b/contrib/devtools/test_deterministic_coverage.sh
deleted file mode 100755
index d621e35b68..0000000000
--- a/contrib/devtools/test_deterministic_coverage.sh
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-# Test for deterministic coverage across unit test runs.
-
-export LC_ALL=C
-
-# Use GCOV_EXECUTABLE="gcov" if compiling with gcc.
-# Use GCOV_EXECUTABLE="llvm-cov gcov" if compiling with clang.
-GCOV_EXECUTABLE="gcov"
-
-# Disable tests known to cause non-deterministic behaviour and document the source or point of non-determinism.
-NON_DETERMINISTIC_TESTS=(
- "blockfilter_index_tests/blockfilter_index_initial_sync" # src/checkqueue.h: In CCheckQueue::Loop(): while (queue.empty()) { ... }
- "coinselector_tests/knapsack_solver_test" # coinselector_tests.cpp: if (equal_sets(setCoinsRet, setCoinsRet2))
- "fs_tests/fsbridge_fstream" # deterministic test failure?
- "miner_tests/CreateNewBlock_validity" # validation.cpp: if (signals.CallbacksPending() > 10)
- "scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue()
- "scheduler_tests/singlethreadedscheduler_ordered" # scheduler.cpp: CScheduler::serviceQueue()
- "txvalidationcache_tests/checkinputs_test" # validation.cpp: if (signals.CallbacksPending() > 10)
- "txvalidationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (signals.CallbacksPending() > 10)
- "txindex_tests/txindex_initial_sync" # validation.cpp: if (signals.CallbacksPending() > 10)
- "txvalidation_tests/tx_mempool_reject_coinbase" # validation.cpp: if (signals.CallbacksPending() > 10)
- "validation_block_tests/processnewblock_signals_ordering" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/coin_mark_dirty_immature_credit" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/dummy_input_size_test" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/importmulti_rescan" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/importwallet_rescan" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/ListCoins" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/scan_for_wallet_transactions" # validation.cpp: if (signals.CallbacksPending() > 10)
- "wallet_tests/wallet_disableprivkeys" # validation.cpp: if (signals.CallbacksPending() > 10)
-)
-
-TEST_BGL_BINARY="src/test/test_BGL"
-
-print_usage() {
- echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]"
-}
-
-N_TEST_RUNS=2
-BOOST_TEST_RUN_FILTERS=""
-if [[ $# != 0 ]]; then
- if [[ $1 == "--help" ]]; then
- print_usage
- exit
- fi
- PARSED_ARGUMENTS=0
- if [[ $1 =~ [a-z] ]]; then
- BOOST_TEST_RUN_FILTERS=$1
- PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1))
- shift
- fi
- if [[ $1 =~ ^[0-9]+$ ]]; then
- N_TEST_RUNS=$1
- PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1))
- shift
- fi
- if [[ ${PARSED_ARGUMENTS} == 0 || $# -gt 2 || ${N_TEST_RUNS} -lt 2 ]]; then
- print_usage
- exit
- fi
-fi
-if [[ ${BOOST_TEST_RUN_FILTERS} == "" ]]; then
- BOOST_TEST_RUN_FILTERS="$(IFS=":"; echo "!${NON_DETERMINISTIC_TESTS[*]}" | sed 's/:/:!/g')"
-else
- echo "Using Boost test filter: ${BOOST_TEST_RUN_FILTERS}"
- echo
-fi
-
-if ! command -v gcov > /dev/null; then
- echo "Error: gcov not installed. Exiting."
- exit 1
-fi
-
-if ! command -v gcovr > /dev/null; then
- echo "Error: gcovr not installed. Exiting."
- exit 1
-fi
-
-if [[ ! -e ${TEST_BGL_BINARY} ]]; then
- echo "Error: Executable ${TEST_BGL_BINARY} not found. Run \"./configure --enable-lcov\" and compile."
- exit 1
-fi
-
-get_file_suffix_count() {
- find src/ -type f -name "*.$1" | wc -l
-}
-
-if [[ $(get_file_suffix_count gcno) == 0 ]]; then
- echo "Error: Could not find any *.gcno files. The *.gcno files are generated by the compiler. Run \"./configure --enable-lcov\" and re-compile."
- exit 1
-fi
-
-get_covr_filename() {
- echo "gcovr.run-$1.txt"
-}
-
-TEST_RUN_ID=0
-while [[ ${TEST_RUN_ID} -lt ${N_TEST_RUNS} ]]; do
- TEST_RUN_ID=$((TEST_RUN_ID + 1))
- echo "[$(date +"%Y-%m-%d %H:%M:%S")] Measuring coverage, run #${TEST_RUN_ID} of ${N_TEST_RUNS}"
- find src/ -type f -name "*.gcda" -exec rm {} \;
- if [[ $(get_file_suffix_count gcda) != 0 ]]; then
- echo "Error: Stale *.gcda files found. Exiting."
- exit 1
- fi
- TEST_OUTPUT_TEMPFILE=$(mktemp)
- if ! BOOST_TEST_RUN_FILTERS="${BOOST_TEST_RUN_FILTERS}" ${TEST_BGL_BINARY} > "${TEST_OUTPUT_TEMPFILE}" 2>&1; then
- cat "${TEST_OUTPUT_TEMPFILE}"
- rm "${TEST_OUTPUT_TEMPFILE}"
- exit 1
- fi
- rm "${TEST_OUTPUT_TEMPFILE}"
- if [[ $(get_file_suffix_count gcda) == 0 ]]; then
- echo "Error: Running the test suite did not create any *.gcda files. The gcda files are generated when the instrumented test programs are executed. Run \"./configure --enable-lcov\" and re-compile."
- exit 1
- fi
- GCOVR_TEMPFILE=$(mktemp)
- if ! gcovr --gcov-executable "${GCOV_EXECUTABLE}" -r src/ > "${GCOVR_TEMPFILE}"; then
- echo "Error: gcovr failed. Output written to ${GCOVR_TEMPFILE}. Exiting."
- exit 1
- fi
- GCOVR_FILENAME=$(get_covr_filename ${TEST_RUN_ID})
- mv "${GCOVR_TEMPFILE}" "${GCOVR_FILENAME}"
- if grep -E "^TOTAL *0 *0 " "${GCOVR_FILENAME}"; then
- echo "Error: Spurious gcovr output. Make sure the correct GCOV_EXECUTABLE variable is set in $0 (\"gcov\" for gcc, \"llvm-cov gcov\" for clang)."
- exit 1
- fi
- if [[ ${TEST_RUN_ID} != 1 ]]; then
- COVERAGE_DIFF=$(diff -u "$(get_covr_filename 1)" "${GCOVR_FILENAME}")
- if [[ ${COVERAGE_DIFF} != "" ]]; then
- echo
- echo "The line coverage is non-deterministic between runs. Exiting."
- echo
- echo "The test suite must be deterministic in the sense that the set of lines executed at least"
- echo "once must be identical between runs. This is a necessary condition for meaningful"
- echo "coverage measuring."
- echo
- echo "${COVERAGE_DIFF}"
- exit 1
- fi
- rm "${GCOVR_FILENAME}"
- fi
-done
-
-echo
-echo "Coverage test passed: Deterministic coverage across ${N_TEST_RUNS} runs."
-exit
diff --git a/contrib/devtools/test_utxo_snapshots.sh b/contrib/devtools/test_utxo_snapshots.sh
deleted file mode 100755
index d7c019f4a6..0000000000
--- a/contrib/devtools/test_utxo_snapshots.sh
+++ /dev/null
@@ -1,209 +0,0 @@
-#!/usr/bin/env bash
-# Demonstrate the creation and usage of UTXO snapshots.
-#
-# A server node starts up, IBDs up to a certain height, then generates a UTXO
-# snapshot at that point.
-#
-# The server then downloads more blocks (to create a diff from the snapshot).
-#
-# We bring a client up, load the UTXO snapshot, and we show the client sync to
-# the "network tip" and then start a background validation of the snapshot it
-# loaded. We see the background validation chainstate removed after validation
-# completes.
-#
-# The shellcheck rule SC2086 (quoted variables) disablements are necessary
-# since this rule needs to be violated in order to get bitcoind to pick up on
-# $EARLY_IBD_FLAGS for the script to work.
-
-export LC_ALL=C
-set -e
-
-BASE_HEIGHT=${1:-30000}
-INCREMENTAL_HEIGHT=20000
-FINAL_HEIGHT=$((BASE_HEIGHT + INCREMENTAL_HEIGHT))
-
-SERVER_DATADIR="$(pwd)/utxodemo-data-server-$BASE_HEIGHT"
-CLIENT_DATADIR="$(pwd)/utxodemo-data-client-$BASE_HEIGHT"
-UTXO_DAT_FILE="$(pwd)/utxo.$BASE_HEIGHT.dat"
-
-# Chosen to try to not interfere with any running bitcoind processes.
-SERVER_PORT=8633
-SERVER_RPC_PORT=8632
-
-CLIENT_PORT=8733
-CLIENT_RPC_PORT=8732
-
-SERVER_PORTS="-port=${SERVER_PORT} -rpcport=${SERVER_RPC_PORT}"
-CLIENT_PORTS="-port=${CLIENT_PORT} -rpcport=${CLIENT_RPC_PORT}"
-
-# Ensure the client exercises all indexes to test that snapshot use works
-# properly with indexes.
-ALL_INDEXES="-txindex -coinstatsindex -blockfilterindex=1"
-
-if ! command -v jq >/dev/null ; then
- echo "This script requires jq to parse JSON RPC output. Please install it."
- echo "(e.g. sudo apt install jq)"
- exit 1
-fi
-
-DUMP_OUTPUT="dumptxoutset-output-$BASE_HEIGHT.json"
-
-finish() {
- echo
- echo "Killing server and client PIDs ($SERVER_PID, $CLIENT_PID) and cleaning up datadirs"
- echo
- rm -f "$UTXO_DAT_FILE" "$DUMP_OUTPUT"
- rm -rf "$SERVER_DATADIR" "$CLIENT_DATADIR"
- kill -9 "$SERVER_PID" "$CLIENT_PID"
-}
-
-trap finish EXIT
-
-# Need to specify these to trick client into accepting server as a peer
-# it can IBD from, otherwise the default values prevent IBD from the server node.
-EARLY_IBD_FLAGS="-maxtipage=9223372036854775207 -minimumchainwork=0x00"
-
-server_rpc() {
- ./src/bitcoin-cli -rpcport=$SERVER_RPC_PORT -datadir="$SERVER_DATADIR" "$@"
-}
-client_rpc() {
- ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir="$CLIENT_DATADIR" "$@"
-}
-server_sleep_til_boot() {
- while ! server_rpc ping >/dev/null 2>&1; do sleep 0.1; done
-}
-client_sleep_til_boot() {
- while ! client_rpc ping >/dev/null 2>&1; do sleep 0.1; done
-}
-server_sleep_til_shutdown() {
- while server_rpc ping >/dev/null 2>&1; do sleep 0.1; done
-}
-
-mkdir -p "$SERVER_DATADIR" "$CLIENT_DATADIR"
-
-echo "Hi, welcome to the assumeutxo demo/test"
-echo
-echo "We're going to"
-echo
-echo " - start up a 'server' node, sync it via mainnet IBD to height ${BASE_HEIGHT}"
-echo " - create a UTXO snapshot at that height"
-echo " - IBD ${INCREMENTAL_HEIGHT} more blocks on top of that"
-echo
-echo "then we'll demonstrate assumeutxo by "
-echo
-echo " - starting another node (the 'client') and loading the snapshot in"
-echo " * first you'll have to modify the code slightly (chainparams) and recompile"
-echo " * don't worry, we'll make it easy"
-echo " - observing the client sync ${INCREMENTAL_HEIGHT} blocks on top of the snapshot from the server"
-echo " - observing the client validate the snapshot chain via background IBD"
-echo
-read -p "Press [enter] to continue" _
-
-echo
-echo "-- Starting the demo. You might want to run the two following commands in"
-echo " separate terminal windows:"
-echo
-echo " watch -n0.1 tail -n 30 $SERVER_DATADIR/debug.log"
-echo " watch -n0.1 tail -n 30 $CLIENT_DATADIR/debug.log"
-echo
-read -p "Press [enter] to continue" _
-
-echo
-echo "-- IBDing the blocks (height=$BASE_HEIGHT) required to the server node..."
-# shellcheck disable=SC2086
-./src/bitcoind -logthreadnames=1 $SERVER_PORTS \
- -datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -stopatheight="$BASE_HEIGHT" >/dev/null
-
-echo
-echo "-- Creating snapshot at ~ height $BASE_HEIGHT ($UTXO_DAT_FILE)..."
-server_sleep_til_shutdown # wait for stopatheight to be hit
-# shellcheck disable=SC2086
-./src/bitcoind -logthreadnames=1 $SERVER_PORTS \
- -datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -connect=0 -listen=0 >/dev/null &
-SERVER_PID="$!"
-
-server_sleep_til_boot
-server_rpc dumptxoutset "$UTXO_DAT_FILE" > "$DUMP_OUTPUT"
-cat "$DUMP_OUTPUT"
-kill -9 "$SERVER_PID"
-
-RPC_BASE_HEIGHT=$(jq -r .base_height < "$DUMP_OUTPUT")
-RPC_AU=$(jq -r .txoutset_hash < "$DUMP_OUTPUT")
-RPC_NCHAINTX=$(jq -r .nchaintx < "$DUMP_OUTPUT")
-RPC_BLOCKHASH=$(jq -r .base_hash < "$DUMP_OUTPUT")
-
-server_sleep_til_shutdown
-
-echo
-echo "-- Now: add the following to CMainParams::m_assumeutxo_data"
-echo " in src/kernel/chainparams.cpp, and recompile:"
-echo
-echo " {${RPC_BASE_HEIGHT}, AssumeutxoHash{uint256S(\"0x${RPC_AU}\")}, ${RPC_NCHAINTX}, uint256S(\"0x${RPC_BLOCKHASH}\")},"
-echo
-echo
-echo "-- IBDing more blocks to the server node (height=$FINAL_HEIGHT) so there is a diff between snapshot and tip..."
-# shellcheck disable=SC2086
-./src/bitcoind $SERVER_PORTS -logthreadnames=1 -datadir="$SERVER_DATADIR" \
- $EARLY_IBD_FLAGS -stopatheight="$FINAL_HEIGHT" >/dev/null
-
-echo
-echo "-- Starting the server node to provide blocks to the client node..."
-# shellcheck disable=SC2086
-./src/bitcoind $SERVER_PORTS -logthreadnames=1 -debug=net -datadir="$SERVER_DATADIR" \
- $EARLY_IBD_FLAGS -connect=0 -listen=1 >/dev/null &
-SERVER_PID="$!"
-server_sleep_til_boot
-
-echo
-echo "-- Okay, what you're about to see is the client starting up and activating the snapshot."
-echo " I'm going to display the top 14 log lines from the client on top of an RPC called"
-echo " getchainstates, which is like getblockchaininfo but for both the snapshot and "
-echo " background validation chainstates."
-echo
-echo " You're going to first see the snapshot chainstate sync to the server's tip, then"
-echo " the background IBD chain kicks in to validate up to the base of the snapshot."
-echo
-echo " Once validation of the snapshot is done, you should see log lines indicating"
-echo " that we've deleted the background validation chainstate."
-echo
-echo " Once everything completes, exit the watch command with CTRL+C."
-echo
-read -p "When you're ready for all this, hit [enter]" _
-
-echo
-echo "-- Starting the client node to get headers from the server, then load the snapshot..."
-# shellcheck disable=SC2086
-./src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" \
- -connect=0 -addnode=127.0.0.1:$SERVER_PORT -debug=net $EARLY_IBD_FLAGS >/dev/null &
-CLIENT_PID="$!"
-client_sleep_til_boot
-
-echo
-echo "-- Initial state of the client:"
-client_rpc getchainstates
-
-echo
-echo "-- Loading UTXO snapshot into client. Calling RPC in a loop..."
-while ! client_rpc loadtxoutset "$UTXO_DAT_FILE" ; do sleep 10; done
-
-watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"
-
-echo
-echo "-- Okay, now I'm going to restart the client to make sure that the snapshot chain reloads "
-echo " as the main chain properly..."
-echo
-echo " Press CTRL+C after you're satisfied to exit the demo"
-echo
-read -p "Press [enter] to continue"
-
-client_sleep_til_boot
-# shellcheck disable=SC2086
-./src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" -connect=0 \
- -addnode=127.0.0.1:$SERVER_PORT "$EARLY_IBD_FLAGS" >/dev/null &
-CLIENT_PID="$!"
-client_sleep_til_boot
-
-watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"
-
-echo
-echo "-- Done!"
diff --git a/contrib/devtools/utils.py b/contrib/devtools/utils.py
deleted file mode 100755
index 8b4c67c6c0..0000000000
--- a/contrib/devtools/utils.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2021 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Common utility functions
-'''
-import shutil
-import sys
-import os
-
-
-def determine_wellknown_cmd(envvar, progname) -> list[str]:
- maybe_env = os.getenv(envvar)
- maybe_which = shutil.which(progname)
- if maybe_env:
- return maybe_env.split(' ') # Well-known vars are often meant to be word-split
- elif maybe_which:
- return [ maybe_which ]
- else:
- sys.exit(f"{progname} not found")
diff --git a/contrib/devtools/utxo_snapshot.sh b/contrib/devtools/utxo_snapshot.sh
deleted file mode 100755
index b98f72edcc..0000000000
--- a/contrib/devtools/utxo_snapshot.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2019-2023 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-export LC_ALL=C
-
-set -ueo pipefail
-
-NETWORK_DISABLED=false
-
-if (( $# < 3 )); then
- echo 'Usage: utxo_snapshot.sh '
- echo
- echo " if is '-', don't produce a snapshot file but instead print the "
- echo " expected assumeutxo hash"
- echo
- echo 'Examples:'
- echo
- echo " ./contrib/devtools/utxo_snapshot.sh 570000 utxo.dat ./src/BGL-cli -datadir=\$(pwd)/testdata"
- echo ' ./contrib/devtools/utxo_snapshot.sh 570000 - ./src/BGL-cli'
- exit 1
-fi
-
-GENERATE_AT_HEIGHT="${1}"; shift;
-OUTPUT_PATH="${1}"; shift;
-# Most of the calls we make take a while to run, so pad with a lengthy timeout.
-BGL_CLI_CALL="${*} -rpcclienttimeout=9999999"
-
-# Check if the node is pruned and get the pruned block height
-PRUNED=$( ${BITCOIN_CLI_CALL} getblockchaininfo | awk '/pruneheight/ {print $2}' | tr -d ',' )
-
-if (( GENERATE_AT_HEIGHT < PRUNED )); then
- echo "Error: The requested snapshot height (${GENERATE_AT_HEIGHT}) should be greater than the pruned block height (${PRUNED})."
- exit 1
-fi
-
-# Early exit if file at OUTPUT_PATH already exists
-if [[ -e "$OUTPUT_PATH" ]]; then
- (>&2 echo "Error: $OUTPUT_PATH already exists or is not a valid path.")
- exit 1
-fi
-
-# Validate that the path is correct
-if [[ "${OUTPUT_PATH}" != "-" && ! -d "$(dirname "${OUTPUT_PATH}")" ]]; then
- (>&2 echo "Error: The directory $(dirname "${OUTPUT_PATH}") does not exist.")
- exit 1
-fi
-
-function cleanup {
- (>&2 echo "Restoring chain to original height; this may take a while")
- ${BITCOIN_CLI_CALL} reconsiderblock "${PIVOT_BLOCKHASH}"
-
- if $NETWORK_DISABLED; then
- (>&2 echo "Restoring network activity")
- ${BITCOIN_CLI_CALL} setnetworkactive true
- fi
-}
-
-function early_exit {
- (>&2 echo "Exiting due to Ctrl-C")
- cleanup
- exit 1
-}
-
-# Prompt the user to disable network activity
-read -p "Do you want to disable network activity (setnetworkactive false) before running invalidateblock? (Y/n): " -r
-if [[ "$REPLY" =~ ^[Yy]*$ || -z "$REPLY" ]]; then
- # User input is "Y", "y", or Enter key, proceed with the action
- NETWORK_DISABLED=true
- (>&2 echo "Disabling network activity")
- ${BITCOIN_CLI_CALL} setnetworkactive false
-else
- (>&2 echo "Network activity remains enabled")
-fi
-
-# Block we'll invalidate/reconsider to rewind/fast-forward the chain.
-PIVOT_BLOCKHASH=$($BGL_CLI_CALL getblockhash $(( GENERATE_AT_HEIGHT + 1 )) )
-
-# Trap for normal exit and Ctrl-C
-trap cleanup EXIT
-trap early_exit INT
-
-(>&2 echo "Rewinding chain back to height ${GENERATE_AT_HEIGHT} (by invalidating ${PIVOT_BLOCKHASH}); this may take a while")
-${BGL_CLI_CALL} invalidateblock "${PIVOT_BLOCKHASH}"
-
-if [[ "${OUTPUT_PATH}" = "-" ]]; then
- (>&2 echo "Generating txoutset info...")
- ${BGL_CLI_CALL} gettxoutsetinfo | grep hash_serialized_3 | sed 's/^.*: "\(.\+\)\+",/\1/g'
-else
- (>&2 echo "Generating UTXO snapshot...")
- ${BGL_CLI_CALL} dumptxoutset "${OUTPUT_PATH}"
-fi
diff --git a/contrib/filter-lcov.py b/contrib/filter-lcov.py
deleted file mode 100755
index db780ad53b..0000000000
--- a/contrib/filter-lcov.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2017-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-import argparse
-
-parser = argparse.ArgumentParser(description='Remove the coverage data from a tracefile for all files matching the pattern.')
-parser.add_argument('--pattern', '-p', action='append', help='the pattern of files to remove', required=True)
-parser.add_argument('tracefile', help='the tracefile to remove the coverage data from')
-parser.add_argument('outfile', help='filename for the output to be written to')
-
-args = parser.parse_args()
-tracefile = args.tracefile
-pattern = args.pattern
-outfile = args.outfile
-
-in_remove = False
-with open(tracefile, 'r', encoding="utf8") as f:
- with open(outfile, 'w', encoding="utf8") as wf:
- for line in f:
- for p in pattern:
- if line.startswith("SF:") and p in line:
- in_remove = True
- if not in_remove:
- wf.write(line)
- if line == 'end_of_record\n':
- in_remove = False
diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md
deleted file mode 100644
index 22ba246953..0000000000
--- a/contrib/guix/INSTALL.md
+++ /dev/null
@@ -1,810 +0,0 @@
-# Guix Installation and Setup
-
-This only needs to be done once per machine. If you have already completed the
-installation and setup, please proceed to [perform a build](./README.md).
-
-Otherwise, you may choose from one of the following options to install Guix:
-
-1. Using the official **shell installer script** [⤓ skip to section][install-script]
- - Maintained by Guix developers
- - Easiest (automatically performs *most* setup)
- - Works on nearly all Linux distributions
- - Only installs latest release
- - Binary installation only, requires high level of trust
- - Note: The script needs to be run as root, so it should be inspected before it's run
-2. Using the official **binary tarball** [⤓ skip to section][install-bin-tarball]
- - Maintained by Guix developers
- - Normal difficulty (full manual setup required)
- - Works on nearly all Linux distributions
- - Installs any release
- - Binary installation only, requires high level of trust
-3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker]
- - Maintained by fanquake
- - Easy (automatically performs *some* setup)
- - Works wherever Docker images work
- - Installs any release
- - Binary installation only, requires high level of trust
-4. Using a **distribution-maintained package** [⤓ skip to section][install-distro-pkg]
- - Maintained by distribution's Guix package maintainer
- - Normal difficulty (manual setup required)
- - Works only on distributions with Guix packaged, see: https://repology.org/project/guix/versions
- - Installs a release decided on by package maintainer
- - Source or binary installation depending on the distribution
-5. Building **from source** [⤓ skip to section][install-source]
- - Maintained by you
- - Hard, but rewarding
- - Can be made to work on most Linux distributions
- - Installs any commit (more granular)
- - Source installation, requires lower level of trust
-
-## Options 1 and 2: Using the official shell installer script or binary tarball
-
-The installation instructions for both the official shell installer script and
-the binary tarballs can be found in the GNU Guix Manual's [Binary Installation
-section](https://guix.gnu.org/manual/en/html_node/Binary-Installation.html).
-
-Note that running through the binary tarball installation steps is largely
-equivalent to manually performing what the shell installer script does.
-
-Note that at the time of writing (July 5th, 2021), the shell installer script
-automatically creates an `/etc/profile.d` entry which the binary tarball
-installation instructions do not ask you to create. However, you will likely
-need this entry for better desktop integration. Please see [this
-section](#add-an-etcprofiled-entry) for instructions on how to add a
-`/etc/profile.d/guix.sh` entry.
-
-Regardless of which installation option you chose, the changes to
-`/etc/profile.d` will not take effect until the next shell or desktop session,
-so you should log out and log back in.
-
-## Option 3: Using fanquake's Docker image
-
-Please refer to fanquake's instructions
-[here](https://github.com/fanquake/core-review/tree/master/guix).
-
-## Option 4: Using a distribution-maintained package
-
-Note that this section is based on the distro packaging situation at the time of
-writing (July 2021). Guix is expected to be more widely packaged over time. For
-an up-to-date view on Guix's package status/version across distros, please see:
-https://repology.org/project/guix/versions
-
-### Debian / Ubuntu
-
-Guix is available as a distribution package in [Debian
-](https://packages.debian.org/search?keywords=guix) and [Ubuntu
-](https://packages.ubuntu.com/search?keywords=guix).
-
-To install:
-```sh
-sudo apt install guix
-```
-
-### Arch Linux
-
-Guix is available in the AUR as
-[`guix`](https://aur.archlinux.org/packages/guix/), please follow the
-installation instructions in the Arch Linux Wiki ([live
-link](https://wiki.archlinux.org/index.php/Guix#AUR_Package_Installation),
-[2021/03/30
-permalink](https://wiki.archlinux.org/index.php?title=Guix&oldid=637559#AUR_Package_Installation))
-to install Guix.
-
-At the time of writing (2021/03/30), the `check` phase will fail if the path to
-guix's build directory is longer than 36 characters due to an anachronistic
-character limit on the shebang line. Since the `check` phase happens after the
-`build` phase, which may take quite a long time, it is recommended that users
-either:
-
-1. Skip the `check` phase
- - For `makepkg`: `makepkg --nocheck ...`
- - For `yay`: `yay --mflags="--nocheck" ...`
- - For `paru`: `paru --nocheck ...`
-2. Or, check their build directory's length beforehand
- - For those building with `makepkg`: `pwd | wc -c`
-
-## Option 5: Building from source
-
-Building Guix from source is a rather involved process but a rewarding one for
-those looking to minimize trust and maximize customizability (e.g. building a
-particular commit of Guix). Previous experience with using autotools-style build
-systems to build packages from source will be helpful. *hic sunt dracones.*
-
-I strongly urge you to at least skim through the entire section once before you
-start issuing commands, as it will save you a lot of unnecessary pain and
-anguish.
-
-### Installing common build tools
-
-There are a few basic build tools that are required for most things we'll build,
-so let's install them now:
-
-Text transformation/i18n:
-- `autopoint` (sometimes packaged in `gettext`)
-- `help2man`
-- `po4a`
-- `texinfo`
-
-Build system tools:
-- `g++` w/ C++11 support
-- `libtool`
-- `autoconf`
-- `automake`
-- `pkg-config` (sometimes packaged as `pkgconf`)
-- `make`
-- `cmake`
-
-Miscellaneous:
-- `git`
-- `gnupg`
-- `python3`
-
-### Building and Installing Guix's dependencies
-
-In order to build Guix itself from source, we need to first make sure that the
-necessary dependencies are installed and discoverable. The most up-to-date list
-of Guix's dependencies is kept in the ["Requirements"
-section](https://guix.gnu.org/manual/en/html_node/Requirements.html) of the Guix
-Reference Manual.
-
-Depending on your distribution, most or all of these dependencies may already be
-packaged and installable without manually building and installing.
-
-For reference, the graphic below outlines Guix v1.3.0's dependency graph:
-
-
-
-If you do not care about building each dependency from source, and Guix is
-already packaged for your distribution, you can easily install only the build
-dependencies of Guix. For example, to enable deb-src and install the Guix build
-dependencies on Ubuntu/Debian:
-
-```sh
-sed -i 's|# deb-src|deb-src|g' /etc/apt/sources.list
-apt update
-apt-get build-dep -y guix
-```
-
-If this succeeded, you can likely skip to section
-["Building and Installing Guix itself"](#building-and-installing-guix-itself).
-
-#### Guile
-
-###### Corner case: Multiple versions of Guile on one system
-
-It is recommended to only install the required version of Guile, so that build systems do
-not get confused about which Guile to use.
-
-However, if you insist on having more versions of Guile installed on
-your system, then you need to **consistently** specify
-`GUILE_EFFECTIVE_VERSION=3.0` to all
-`./configure` invocations for Guix and its dependencies.
-
-##### Installing Guile
-
-If your distribution splits packages into `-dev`-suffixed and
-non-`-dev`-suffixed sub-packages (as is the case for Debian-derived
-distributions), please make sure to install both. For example, to install Guile
-v3.0 on Debian/Ubuntu:
-
-```sh
-apt install guile-3.0 guile-3.0-dev
-```
-
-#### Mixing distribution packages and source-built packages
-
-At the time of writing, most distributions have _some_ of Guix's dependencies
-packaged, but not all. This means that you may want to install the distribution
-package for some dependencies, and manually build-from-source for others.
-
-Distribution packages usually install to `/usr`, which is different from the
-default `./configure` prefix of source-built packages: `/usr/local`.
-
-This means that if you mix-and-match distribution packages and source-built
-packages and do not specify exactly `--prefix=/usr` to `./configure` for
-source-built packages, you will need to augment the `GUILE_LOAD_PATH` and
-`GUILE_LOAD_COMPILED_PATH` environment variables so that Guile will look
-under the right prefix and find your source-built packages.
-
-For example, if you are using Guile v3.0, and have Guile packages in the
-`/usr/local` prefix, either add the following lines to your `.profile` or
-`.bash_profile` so that the environment variable is properly set for all future
-shell logins, or paste the lines into a POSIX-style shell to temporarily modify
-the environment variables of your current shell session.
-
-```sh
-# Help Guile v3.0.x find packages in /usr/local
-export GUILE_LOAD_PATH="/usr/local/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
-export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH"
-```
-
-Note that these environment variables are used to check for packages during
-`./configure`, so they should be set as soon as possible should you want to use
-a prefix other than `/usr`.
-
-#### Building and installing source-built packages
-
-***IMPORTANT**: A few dependencies have non-obvious quirks/errata which are
-documented in the sub-sections immediately below. Please read these sections
-before proceeding to build and install these packages.*
-
-Although you should always refer to the README or INSTALL files for the most
-accurate information, most of these dependencies use autoconf-style build
-systems (check if there's a `configure.ac` file), and will likely do the right
-thing with the following:
-
-Clone the repository and check out the latest release:
-```sh
-git clone /.git
-cd
-git tag -l # check for the latest release
-git checkout
-```
-
-For autoconf-based build systems (if `./autogen.sh` or `configure.ac` exists at
-the root of the repository):
-
-```sh
-./autogen.sh || autoreconf -vfi
-./configure --prefix=
-make
-sudo make install
-```
-
-For CMake-based build systems (if `CMakeLists.txt` exists at the root of the
-repository):
-
-```sh
-mkdir build && cd build
-cmake .. -DCMAKE_INSTALL_PREFIX=
-sudo cmake --build . --target install
-```
-
-If you choose not to specify exactly `--prefix=/usr` to `./configure`, please
-make sure you've carefully read the [previous section] on mixing distribution
-packages and source-built packages.
-
-##### Binding packages require `-dev`-suffixed packages
-
-Relevant for:
-- Everyone
-
-When building bindings, the `-dev`-suffixed version of the original package
-needs to be installed. For example, building `Guile-zlib` on Debian-derived
-distributions requires that `zlib1g-dev` is installed.
-
-When using bindings, the `-dev`-suffixed version of the original package still
-needs to be installed. This is particularly problematic when distribution
-packages are mispackaged like `guile-sqlite3` is in Ubuntu Focal such that
-installing `guile-sqlite3` does not automatically install `libsqlite3-dev` as a
-dependency.
-
-Below is a list of relevant Guile bindings and their corresponding `-dev`
-packages in Debian at the time of writing.
-
-| Guile binding package | -dev Debian package |
-|-----------------------|---------------------|
-| guile-gcrypt | libgcrypt-dev |
-| guile-git | libgit2-dev |
-| guile-gnutls | (none) |
-| guile-json | (none) |
-| guile-lzlib | liblz-dev |
-| guile-ssh | libssh-dev |
-| guile-sqlite3 | libsqlite3-dev |
-| guile-zlib | zlib1g-dev |
-
-##### `guile-git` actually depends on `libgit2 >= 1.1`
-
-Relevant for:
-- Those building `guile-git` from source against `libgit2 < 1.1`
-- Those installing `guile-git` from their distribution where `guile-git` is
- built against `libgit2 < 1.1`
-
-As of v0.5.2, `guile-git` claims to only require `libgit2 >= 0.28.0`, however,
-it actually requires `libgit2 >= 1.1`, otherwise, it will be confused by a
-reference of `origin/keyring`: instead of interpreting the reference as "the
-'keyring' branch of the 'origin' remote", the reference is interpreted as "the
-branch literally named 'origin/keyring'"
-
-This is especially notable because Ubuntu Focal packages `libgit2 v0.28.4`, and
-`guile-git` is built against it.
-
-Should you be in this situation, you need to build both `libgit2 v1.1.x` and
-`guile-git` from source.
-
-Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
-
-### Building and Installing Guix itself
-
-Start by cloning Guix:
-
-```
-git clone https://git.savannah.gnu.org/git/guix.git
-cd guix
-```
-
-You will likely want to build the latest release.
-At the time of writing (November 2023), the latest release was `v1.4.0`.
-
-```
-git branch -a -l 'origin/version-*' # check for the latest release
-git checkout
-```
-
-Bootstrap the build system:
-```
-./bootstrap
-```
-
-Configure with the recommended `--localstatedir` flag:
-```
-./configure --localstatedir=/var
-```
-
-Note: If you intend to hack on Guix in the future, you will need to supply the
-same `--localstatedir=` flag for all future Guix `./configure` invocations. See
-the last paragraph of this
-[section](https://guix.gnu.org/manual/en/html_node/Requirements.html) for more
-details.
-
-Build Guix (this will take a while):
-```
-make -j$(nproc)
-```
-
-Install Guix:
-
-```
-sudo make install
-```
-
-### Post-"build from source" Setup
-
-#### Creating and starting a `guix-daemon-original` service with a fixed `argv[0]`
-
-At this point, guix will be installed to `${bindir}`, which is likely
-`/usr/local/bin` if you did not override directory variables at
-`./configure`-time. More information on standard Automake directory variables
-can be found
-[here](https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html).
-
-However, the Guix init scripts and service configurations for Upstart, systemd,
-SysV, and OpenRC are installed to launch
-`${localstatedir}/guix/profiles/per-user/root/current-guix/bin/guix-daemon`,
-which does not yet exist, and will only exist after `root` performs their first
-`guix pull`. TODO: Link to `guix pull` as root section
-
-We need to create a `-original` version of these init scripts that's pointed to
-the binaries we just built and `make install`'ed in `${bindir}` (normally,
-`/usr/local/bin`).
-
-Example for `systemd`, run as `root`:
-
-```sh
-# Create guix-daemon-original.service by modifying guix-daemon.service
-bindir="$(dirname $(command -v guix-daemon))"
-sed -E -e "s|/\S*/guix/profiles/per-user/root/current-guix/bin/guix-daemon|${bindir}/guix-daemon|" /etc/systemd/system/guix-daemon.service > /etc/systemd/system/guix-daemon-original.service
-chmod 664 /etc/systemd/system/guix-daemon-original.service
-
-# Make systemd recognize the new service
-systemctl daemon-reload
-
-# Make sure that the non-working guix-daemon.service is stopped and disabled
-systemctl stop guix-daemon
-systemctl disable guix-daemon
-
-# Make sure that the working guix-daemon-original.service is started and enabled
-systemctl enable guix-daemon-original
-systemctl start guix-daemon-original
-```
-
-#### Creating `guix-daemon` users / groups
-
-Please see the [relevant
-section](https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html)
-in the Guix Reference Manual for more details.
-
-## Optional setup
-
-At this point, you are set up to [use Guix to build Bitcoin
-Core](./README.md#usage). However, if you want to polish your setup a bit and
-make it "what Guix intended", then read the next few subsections.
-
-### Add an `/etc/profile.d` entry
-
-This section definitely does not apply to you if you installed Guix using:
-1. The shell installer script
-2. fanquake's Docker image
-3. Debian's `guix` package
-
-#### Background
-
-Although Guix knows how to update itself and its packages, it does so in a
-non-invasive way (it does not modify `/usr/local/bin/guix`).
-
-Instead, it does the following:
-
-- After a `guix pull`, it updates
- `/var/guix/profiles/per-user/$USER/current-guix`, and creates a symlink
- targeting this directory at `$HOME/.config/guix/current`
-
-- After a `guix install`, it updates
- `/var/guix/profiles/per-user/$USER/guix-profile`, and creates a symlink
- targeting this directory at `$HOME/.guix-profile`
-
-Therefore, in order for these operations to affect your shell/desktop sessions
-(and for the principle of least astonishment to hold), their corresponding
-directories have to be added to well-known environment variables like `$PATH`,
-`$INFOPATH`, `$XDG_DATA_DIRS`, etc.
-
-In other words, if `$HOME/.config/guix/current/bin` does not exist in your
-`$PATH`, a `guix pull` will have no effect on what `guix` you are using. Same
-goes for `$HOME/.guix-profile/bin`, `guix install`, and installed packages.
-
-Helpfully, after a `guix pull` or `guix install`, a message will be printed like
-so:
-
-```
-hint: Consider setting the necessary environment variables by running:
-
- GUIX_PROFILE="$HOME/.guix-profile"
- . "$GUIX_PROFILE/etc/profile"
-
-Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'.
-```
-
-However, this is somewhat tedious to do for both `guix pull` and `guix install`
-for each user on the system that wants to properly use `guix`. I recommend that
-you instead add an entry to `/etc/profile.d` instead. This is done by default
-when installing the Debian package later than 1.2.0-4 and when using the shell
-script installer.
-
-#### Instructions
-
-Create `/etc/profile.d/guix.sh` with the following content:
-```sh
-# _GUIX_PROFILE: `guix pull` profile
-_GUIX_PROFILE="$HOME/.config/guix/current"
-if [ -L $_GUIX_PROFILE ]; then
- export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
- # Export INFOPATH so that the updated info pages can be found
- # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
- # When INFOPATH is unset, add a trailing colon so that Emacs
- # searches 'Info-default-directory-list'.
- export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
-fi
-
-# GUIX_PROFILE: User's default profile
-GUIX_PROFILE="$HOME/.guix-profile"
-[ -L $GUIX_PROFILE ] || return
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
-export GUIX_PROFILE GUIX_LOCPATH
-
-[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-
-# set XDG_DATA_DIRS to include Guix installations
-export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
-```
-
-Please note that this will not take effect until the next shell or desktop
-session (log out and log back in).
-
-### `guix pull` as root
-
-Before you do this, you need to read the section on [choosing your security
-model][security-model] and adjust `guix` and `guix-daemon` flags according to
-your choice, as invoking `guix pull` may pull substitutes from substitute
-servers (which you may not want).
-
-As mentioned in a previous section, Guix expects
-`${localstatedir}/guix/profiles/per-user/root/current-guix` to be populated with
-`root`'s Guix profile, `guix pull`-ed and built by some former version of Guix.
-However, this is not the case when we build from source. Therefore, we need to
-perform a `guix pull` as `root`:
-
-```sh
-sudo --login guix pull --branch=version-
-# or
-sudo --login guix pull --commit=
-```
-
-`guix pull` is quite a long process (especially if you're using
-`--no-substitutes`). If you encounter build problems, please refer to the
-[troubleshooting section](#troubleshooting).
-
-Note that running a bare `guix pull` with no commit or branch specified will
-pull the latest commit on Guix's master branch, which is likely fine, but not
-recommended.
-
-If you installed Guix from source, you may get an error like the following:
-```sh
-error: while creating symlink '/root/.config/guix/current' No such file or directory
-```
-To resolve this, simply:
-```
-sudo mkdir -p /root/.config/guix
-```
-Then try the `guix pull` command again.
-
-After the `guix pull` finishes successfully,
-`${localstatedir}/guix/profiles/per-user/root/current-guix` should be populated.
-
-#### Using the newly-pulled `guix` by restarting the daemon
-
-Depending on how you installed Guix, you should now make sure that your init
-scripts and service configurations point to the newly-pulled `guix-daemon`.
-
-##### If you built Guix from source
-
-If you followed the instructions for [fixing argv\[0\]][fix-argv0], you can now
-do the following:
-
-```sh
-systemctl stop guix-daemon-original
-systemctl disable guix-daemon-original
-
-systemctl enable guix-daemon
-systemctl start guix-daemon
-```
-
-Remember to set `--no-substitutes` in `$libdir/systemd/system/guix-daemon.service` and other customizations if you used them for `guix-daemon-original.service`.
-
-##### If you installed Guix via the Debian/Ubuntu distribution packages
-
-You will need to create a `guix-daemon-latest` service which points to the new
-`guix` rather than a pinned one.
-
-```sh
-# Create guix-daemon-latest.service by modifying guix-daemon.service
-sed -E -e "s|/usr/bin/guix-daemon|/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon|" /etc/systemd/system/guix-daemon.service > /lib/systemd/system/guix-daemon-latest.service
-chmod 664 /lib/systemd/system/guix-daemon-latest.service
-
-# Make systemd recognize the new service
-systemctl daemon-reload
-
-# Make sure that the old guix-daemon.service is stopped and disabled
-systemctl stop guix-daemon
-systemctl disable guix-daemon
-
-# Make sure that the new guix-daemon-latest.service is started and enabled
-systemctl enable guix-daemon-latest
-systemctl start guix-daemon-latest
-```
-
-##### If you installed Guix via lantw44's Arch Linux AUR package
-
-At the time of writing (July 5th, 2021) the systemd unit for "updated Guix" is
-`guix-daemon-latest.service`, therefore, you should do the following:
-
-```sh
-systemctl stop guix-daemon
-systemctl disable guix-daemon
-
-systemctl enable guix-daemon-latest
-systemctl start guix-daemon-latest
-```
-
-##### Otherwise...
-
-Simply do:
-
-```sh
-systemctl restart guix-daemon
-```
-
-### Checking everything
-
-If you followed all the steps above to make your Guix setup "prim and proper,"
-you can check that you did everything properly by running through this
-checklist.
-
-1. `/etc/profile.d/guix.sh` should exist and be sourced at each shell login
-
-2. `guix describe` should not print `guix describe: error: failed to determine
- origin`, but rather something like:
-
- ```
- Generation 38 Feb 22 2021 16:39:31 (current)
- guix f350df4
- repository URL: https://git.savannah.gnu.org/git/guix.git
- branch: version-1.2.0
- commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7
- ```
-
-3. `guix-daemon` should be running from `${localstatedir}/guix/profiles/per-user/root/current-guix`
-
-# Troubleshooting
-
-## Derivation failed to build
-
-When you see a build failure like below:
-
-```
-building /gnu/store/...-foo-3.6.12.drv...
-/ 'check' phasenote: keeping build directory `/tmp/guix-build-foo-3.6.12.drv-0'
-builder for `/gnu/store/...-foo-3.6.12.drv' failed with exit code 1
-build of /gnu/store/...-foo-3.6.12.drv failed
-View build log at '/var/log/guix/drvs/../...-foo-3.6.12.drv.bz2'.
-cannot build derivation `/gnu/store/...-qux-7.69.1.drv': 1 dependencies couldn't be built
-cannot build derivation `/gnu/store/...-bar-3.16.5.drv': 1 dependencies couldn't be built
-cannot build derivation `/gnu/store/...-baz-2.0.5.drv': 1 dependencies couldn't be built
-guix time-machine: error: build of `/gnu/store/...-baz-2.0.5.drv' failed
-```
-
-It means that `guix` failed to build a package named `foo`, which was a
-dependency of `qux`, `bar`, and `baz`. Importantly, note that the last "failed"
-line is not necessarily the root cause, the first "failed" line is.
-
-Most of the time, the build failure is due to a spurious test failure or the
-package's build system/test suite breaking when running multi-threaded. To
-rebuild _just_ this derivation in a single-threaded fashion (please don't forget
-to add other `guix` flags like `--no-substitutes` as appropriate):
-
-```sh
-$ guix build --cores=1 /gnu/store/...-foo-3.6.12.drv
-```
-
-If the single-threaded rebuild did not succeed, you may need to dig deeper.
-You may view `foo`'s build logs in `less` like so (please replace paths with the
-path you see in the build failure output):
-
-```sh
-$ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less
-```
-
-`foo`'s build directory is also preserved and available at
-`/tmp/guix-build-foo-3.6.12.drv-0`. However, if you fail to build `foo` multiple
-times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build
-failure output for the most accurate, up-to-date information.
-
-### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character
-
-This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem
-which rejects characters not present in the UTF-8 character code set. An example
-is ZFS with the utf8only=on option set.
-
-More information: https://github.com/python/cpython/issues/81765
-
-### openssl-1.1.1l and openssl-1.1.1n
-
-OpenSSL includes tests that will fail once some certificate has expired.
-The workarounds from the GnuTLS section immediately below can be used.
-
-### GnuTLS: test-suite FAIL: status-request-revoked
-
-*The derivation is likely identified by: `/gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv`*
-
-This unfortunate error is most common for non-substitute builders who installed
-Guix v1.2.0. The problem stems from the fact that one of GnuTLS's tests uses a
-hardcoded certificate which expired on 2020-10-24.
-
-What's more unfortunate is that this GnuTLS derivation is somewhat special in
-Guix's dependency graph and is not affected by the package transformation flags
-like `--without-tests=`.
-
-The easiest solution for those encountering this problem is to install a newer
-version of Guix. However, there are ways to work around this issue:
-
-#### Workaround 1: Using substitutes for this single derivation
-
-If you've authorized the official Guix build farm's key (more info
-[here](./README.md#step-1-authorize-the-signing-keys)), then you can use
-substitutes just for this single derivation by invoking the following:
-
-```sh
-guix build --substitute-urls="https://ci.guix.gnu.org" /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
-```
-
-See [this section](./README.md#removing-authorized-keys) for instructions on how
-to remove authorized keys if you don't want to keep the build farm's key
-authorized.
-
-#### Workaround 2: Temporarily setting the system clock back
-
-This workaround was described [here](https://issues.guix.gnu.org/44559#5).
-
-Basically:
-2. Turn off NTP
-3. Set system time to 2020-10-01
-4. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
-5. Set system time back to accurate current time
-6. Turn NTP back on
-
-For example,
-
-```sh
-sudo timedatectl set-ntp no
-sudo date --set "01 oct 2020 15:00:00"
-guix build /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
-sudo timedatectl set-ntp yes
-```
-
-#### Workaround 3: Disable the tests in the Guix source code for this single derivation
-
-If all of the above workarounds fail, you can also disable the `tests` phase of
-the derivation via the `arguments` option, as described in the official
-[`package`
-reference](https://guix.gnu.org/manual/en/html_node/package-Reference.html).
-
-For example, to disable the openssl-1.1 check phase:
-
-```diff
-diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
-index f1e844b..1077c4b 100644
---- a/gnu/packages/tls.scm
-+++ b/gnu/packages/tls.scm
-@@ -494,4 +494,5 @@ (define-public openssl-1.1
- (arguments
- `(#:parallel-tests? #f
-+ #:tests? #f
- #:test-target "test"
-```
-
-### coreutils: FAIL: tests/tail-2/inotify-dir-recreate
-
-The inotify-dir-create test fails on "remote" filesystems such as overlayfs
-(Docker's default filesystem) due to the filesystem being mistakenly recognized
-as non-remote.
-
-A relatively easy workaround to this is to make sure that a somewhat traditional
-filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For
-Docker users, this might mean [using a volume][docker/volumes], [binding
-mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
-[mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag.
-
-Please see the following links for more details:
-
-- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
-- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5)
-- A commit to skip this test in Guix has been merged into the core-updates branch:
-[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
-
-
-[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
-[install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
-[install-fanquake-docker]: #option-3-using-fanquakes-docker-image
-[install-distro-pkg]: #option-4-using-a-distribution-maintained-package
-[install-source]: #option-5-building-from-source
-
-[fix-argv0]: #creating-and-starting-a-guix-daemon-original-service-with-a-fixed-argv0
-[security-model]: ./README.md#choosing-your-security-model
-
-[docker/volumes]: https://docs.docker.com/storage/volumes/
-[docker/bind-mnt]: https://docs.docker.com/storage/bind-mounts/
-[docker/tmpfs]: https://docs.docker.com/storage/tmpfs/
-
-# Purging/Uninstalling Guix
-
-In the extraordinarily rare case where you messed up your Guix installation in
-an irreversible way, you may want to completely purge Guix from your system and
-start over.
-
-1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
- purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
-2. Remove all build users and groups
-
- You may check for relevant users and groups using:
-
- ```
- getent passwd | grep guix
- getent group | grep guix
- ```
-
- Then, you may remove users and groups using:
-
- ```
- sudo userdel
- sudo groupdel
- ```
-
-3. Remove all possible Guix-related directories
- - `/var/guix/`
- - `/var/log/guix/`
- - `/gnu/`
- - `/etc/guix/`
- - `/home/*/.config/guix/`
- - `/home/*/.cache/guix/`
- - `/home/*/.guix-profile/`
- - `/root/.config/guix/`
- - `/root/.cache/guix/`
- - `/root/.guix-profile/`
diff --git a/contrib/guix/README.md b/contrib/guix/README.md
deleted file mode 100644
index cece3a4d15..0000000000
--- a/contrib/guix/README.md
+++ /dev/null
@@ -1,435 +0,0 @@
-# Bootstrappable BGL Core Builds
-
-This directory contains the files necessary to perform bootstrappable BGL
-Core builds.
-
-[Bootstrappability][b17e] furthers our binary security guarantees by allowing us
-to _audit and reproduce_ our toolchain instead of blindly _trusting_ binary
-downloads.
-
-We achieve bootstrappability by using Guix as a functional package manager.
-
-# Requirements
-
-Conservatively, you will need:
-
-- 16GB of free disk space on the partition that /gnu/store will reside in
-- 8GB of free disk space **per platform triple** you're planning on building
- (see the `HOSTS` [environment variable description][env-vars-list])
-
-# Installation and Setup
-
-If you don't have Guix installed and set up, please follow the instructions in
-[INSTALL.md](./INSTALL.md)
-
-# Usage
-
-If you haven't considered your security model yet, please read [the relevant
-section](#choosing-your-security-model) before proceeding to perform a build.
-
-## Making the Xcode SDK available for macOS cross-compilation
-
-In order to perform a build for macOS (which is included in the default set of
-platform triples to build), you'll need to extract the macOS SDK tarball using
-tools found in the [`macdeploy` directory](../macdeploy/README.md).
-
-You can then either point to the SDK using the `SDK_PATH` environment variable:
-
-```sh
-# Extract the SDK tarball to /path/to/parent/dir/of/extracted/SDK/Xcode---extracted-SDK-with-libcxx-headers
-tar -C /path/to/parent/dir/of/extracted/SDK -xaf /path/to/Xcode---extracted-SDK-with-libcxx-headers.tar.gz
-
-# Indicate where to locate the SDK tarball
-export SDK_PATH=/path/to/parent/dir/of/extracted/SDK
-```
-
-or extract it into `depends/SDKs`:
-
-```sh
-mkdir -p depends/SDKs
-tar -C depends/SDKs -xaf /path/to/SDK/tarball
-```
-
-## Building
-
-*The author highly recommends at least reading over the [common usage patterns
-and examples](#common-guix-build-invocation-patterns-and-examples) section below
-before starting a build. For a full list of customization options, see the
-[recognized environment variables][env-vars-list] section.*
-
-To build Bitcoin Core reproducibly with all default options, invoke the
-following from the top of a clean repository:
-
-```sh
-./contrib/guix/guix-build
-```
-
-## Codesigning build outputs
-
-The `guix-codesign` command attaches codesignatures (produced by codesigners) to
-existing non-codesigned outputs. Please see the [release process
-documentation](/doc/release-process.md) for more context.
-
-It respects many of the same environment variable flags as `guix-build`, with 2
-crucial differences:
-
-1. Since only Windows and macOS build outputs require codesigning, the `HOSTS`
- environment variable will have a sane default value of `x86_64-w64-mingw32
- x86_64-apple-darwin arm64-apple-darwin` instead of all the platforms.
-2. The `guix-codesign` command ***requires*** a `DETACHED_SIGS_REPO` flag.
- * _**DETACHED_SIGS_REPO**_
-
- Set the directory where detached codesignatures can be found for the current
- Bitcoin Core version being built.
-
- _REQUIRED environment variable_
-
-An invocation with all default options would look like:
-
-```
-env DETACHED_SIGS_REPO= ./contrib/guix-codesign
-```
-
-## Cleaning intermediate work directories
-
-By default, `guix-build` leaves all intermediate files or "work directories"
-(e.g. `depends/work`, `guix-build-*/distsrc-*`) intact at the end of a build so
-that they are available to the user (to aid in debugging, etc.). However, these
-directories usually take up a large amount of disk space. Therefore, a
-`guix-clean` convenience script is provided which cleans the current `git`
-worktree to save disk space:
-
-```
-./contrib/guix/guix-clean
-```
-
-
-## Attesting to build outputs
-
-Much like how Gitian build outputs are attested to in a `gitian.sigs`
-repository, Guix build outputs are attested to in the [`guix.sigs`
-repository](https://github.com/bitcoin-core/guix.sigs).
-
-After you've cloned the `guix.sigs` repository, to attest to the current
-worktree's commit/tag:
-
-```
-env GUIX_SIGS_REPO= SIGNER= ./contrib/guix/guix-attest
-```
-
-See `./contrib/guix/guix-attest --help` for more information on the various ways
-`guix-attest` can be invoked.
-
-## Verifying build output attestations
-
-After at least one other signer has uploaded their signatures to the `guix.sigs`
-repository:
-
-```
-git -C pull
-env GUIX_SIGS_REPO= ./contrib/guix/guix-verify
-```
-
-
-## Common `guix-build` invocation patterns and examples
-
-### Keeping caches and SDKs outside of the worktree
-
-If you perform a lot of builds and have a bunch of worktrees, you may find it
-more efficient to keep the depends tree's download cache, build cache, and SDKs
-outside of the worktrees to avoid duplicate downloads and unnecessary builds. To
-help with this situation, the `guix-build` script honours the `SOURCES_PATH`,
-`BASE_CACHE`, and `SDK_PATH` environment variables and will pass them on to the
-depends tree so that you can do something like:
-
-```sh
-env SOURCES_PATH="$HOME/depends-SOURCES_PATH" BASE_CACHE="$HOME/depends-BASE_CACHE" SDK_PATH="$HOME/macOS-SDKs" ./contrib/guix/guix-build
-```
-
-Note that the paths that these environment variables point to **must be
-directories**, and **NOT symlinks to directories**.
-
-See the [recognized environment variables][env-vars-list] section for more
-details.
-
-### Building a subset of platform triples
-
-Sometimes you only want to build a subset of the supported platform triples, in
-which case you can override the default list by setting the space-separated
-`HOSTS` environment variable:
-
-```sh
-env HOSTS='x86_64-w64-mingw32 x86_64-apple-darwin' ./contrib/guix/guix-build
-```
-
-See the [recognized environment variables][env-vars-list] section for more
-details.
-
-### Controlling the number of threads used by `guix` build commands
-
-Depending on your system's RAM capacity, you may want to decrease the number of
-threads used to decrease RAM usage or vice versa.
-
-By default, the scripts under `./contrib/guix` will invoke all `guix` build
-commands with `--cores="$JOBS"`. Note that `$JOBS` defaults to `$(nproc)` if not
-specified. However, astute manual readers will also notice that `guix` build
-commands also accept a `--max-jobs=` flag (which defaults to 1 if unspecified).
-
-Here is the difference between `--cores=` and `--max-jobs=`:
-
-> Note: When I say "derivation," think "package"
-
-`--cores=`
-
- - controls the number of CPU cores to build each derivation. This is the value
- passed to `make`'s `--jobs=` flag.
-
-`--max-jobs=`
-
- - controls how many derivations can be built in parallel
- - defaults to 1
-
-Therefore, the default is for `guix` build commands to build one derivation at a
-time, utilizing `$JOBS` threads.
-
-Specifying the `$JOBS` environment variable will only modify `--cores=`, but you
-can also modify the value for `--max-jobs=` by specifying
-`$ADDITIONAL_GUIX_COMMON_FLAGS`. For example, if you have a LOT of memory, you
-may want to set:
-
-```sh
-export ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8'
-```
-
-Which allows for a maximum of 8 derivations to be built at the same time, each
-utilizing `$JOBS` threads.
-
-Or, if you'd like to avoid spurious build failures caused by issues with
-parallelism within a single package, but would still like to build multiple
-packages when the dependency graph allows for it, you may want to try:
-
-```sh
-export JOBS=1 ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8'
-```
-
-See the [recognized environment variables][env-vars-list] section for more
-details.
-
-## Recognized environment variables
-
-* _**HOSTS**_
-
- Override the space-separated list of platform triples for which to perform a
- bootstrappable build.
-
- _(defaults to "x86\_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu
- riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
- x86\_64-w64-mingw32 x86\_64-apple-darwin arm64-apple-darwin")_
-
-* _**SOURCES_PATH**_
-
- Set the depends tree download cache for sources. This is passed through to the
- depends tree. Setting this to the same directory across multiple builds of the
- depends tree can eliminate unnecessary redownloading of package sources.
-
- The path that this environment variable points to **must be a directory**, and
- **NOT a symlink to a directory**.
-
-* _**BASE_CACHE**_
-
- Set the depends tree cache for built packages. This is passed through to the
- depends tree. Setting this to the same directory across multiple builds of the
- depends tree can eliminate unnecessary building of packages.
-
- The path that this environment variable points to **must be a directory**, and
- **NOT a symlink to a directory**.
-
-* _**SDK_PATH**_
-
- Set the path where _extracted_ SDKs can be found. This is passed through to
- the depends tree. Note that this is should be set to the _parent_ directory of
- the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of
- `$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`).
-
- The path that this environment variable points to **must be a directory**, and
- **NOT a symlink to a directory**.
-
-* _**JOBS**_
-
- Override the number of jobs to run simultaneously, you might want to do so on
- a memory-limited machine. This may be passed to:
-
- - `guix` build commands as in `guix shell --cores="$JOBS"`
- - `make` as in `make --jobs="$JOBS"`
- - `xargs` as in `xargs -P"$JOBS"`
-
- See [here](#controlling-the-number-of-threads-used-by-guix-build-commands) for
- more details.
-
- _(defaults to the value of `nproc` outside the container)_
-
-* _**SOURCE_DATE_EPOCH**_
-
- Override the reference UNIX timestamp used for bit-for-bit reproducibility,
- the variable name conforms to [standard][r12e/source-date-epoch].
-
- _(defaults to the output of `$(git log --format=%at -1)`)_
-
-* _**V**_
-
- If non-empty, will pass `V=1` to all `make` invocations, making `make` output
- verbose.
-
- Note that any given value is ignored. The variable is only checked for
- emptiness. More concretely, this means that `V=` (setting `V` to the empty
- string) is interpreted the same way as not setting `V` at all, and that `V=0`
- has the same effect as `V=1`.
-
-* _**SUBSTITUTE_URLS**_
-
- A whitespace-delimited list of URLs from which to download pre-built packages.
- A URL is only used if its signing key is authorized (refer to the [substitute
- servers section](#option-1-building-with-substitutes) for more details).
-
-* _**ADDITIONAL_GUIX_COMMON_FLAGS**_
-
- Additional flags to be passed to all `guix` commands.
-
-* _**ADDITIONAL_GUIX_TIMEMACHINE_FLAGS**_
-
- Additional flags to be passed to `guix time-machine`.
-
-* _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_
-
- Additional flags to be passed to the invocation of `guix shell` inside
- `guix time-machine`.
-
-# Choosing your security model
-
-No matter how you installed Guix, you need to decide on your security model for
-building packages with Guix.
-
-Guix allows us to achieve better binary security by using our CPU time to build
-everything from scratch. However, it doesn't sacrifice user choice in pursuit of
-this: users can decide whether or not to use **substitutes** (pre-built
-packages).
-
-## Option 1: Building with substitutes
-
-### Step 1: Authorize the signing keys
-
-Depending on the installation procedure you followed, you may have already
-authorized the Guix build farm key. In particular, the official shell installer
-script asks you if you want the key installed, and the debian distribution
-package authorized the key during installation.
-
-You can check the current list of authorized keys at `/etc/guix/acl`.
-
-At the time of writing, a `/etc/guix/acl` with just the Guix build farm key
-authorized looks something like:
-
-```lisp
-(acl
- (entry
- (public-key
- (ecc
- (curve Ed25519)
- (q #8D156F295D24B0D9A86FA5741A840FF2D24F60F7B6C4134814AD55625971B394#)
- )
- )
- (tag
- (guix import)
- )
- )
- )
-```
-
-If you've determined that the official Guix build farm key hasn't been
-authorized, and you would like to authorize it, run the following as root:
-
-```
-guix archive --authorize < /var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub
-```
-
-If
-`/var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub`
-doesn't exist, try:
-
-```sh
-guix archive --authorize < /share/guix/ci.guix.gnu.org.pub
-```
-
-Where `` is likely:
-- `/usr` if you installed from a distribution package
-- `/usr/local` if you installed Guix from source and didn't supply any
- prefix-modifying flags to Guix's `./configure`
-
-For dongcarl's substitute server at https://guix.carldong.io, run as root:
-
-```sh
-wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize
-```
-
-#### Removing authorized keys
-
-To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the
-`(entry (public-key ...))` entry.
-
-### Step 2: Specify the substitute servers
-
-Once its key is authorized, the official Guix build farm at
-https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag
-is supplied. This default list of substitute servers is overridable both on a
-`guix-daemon` level and when you invoke `guix` commands. See examples below for
-the various ways of adding dongcarl's substitute server after having [authorized
-his signing key](#step-1-authorize-the-signing-keys).
-
-Change the **default list** of substitute servers by starting `guix-daemon` with
-the `--substitute-urls` option (you will likely need to edit your init script):
-
-```sh
-guix-daemon --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
-```
-
-Override the default list of substitute servers by passing the
-`--substitute-urls` option for invocations of `guix` commands:
-
-```sh
-guix --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
-```
-
-For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment
-variable:
-
-```sh
-export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org'
-```
-
-## Option 2: Disabling substitutes on an ad-hoc basis
-
-If you prefer not to use any substitutes, make sure to supply `--no-substitutes`
-like in the following snippet. The first build will take a while, but the
-resulting packages will be cached for future builds.
-
-For direct invocations of `guix`:
-```sh
-guix --no-substitutes
-```
-
-For the scripts under `./contrib/guix/`:
-```sh
-export ADDITIONAL_GUIX_COMMON_FLAGS='--no-substitutes'
-```
-
-## Option 3: Disabling substitutes by default
-
-`guix-daemon` accepts a `--no-substitutes` flag, which will make sure that,
-unless otherwise overridden by a command line invocation, no substitutes will be
-used.
-
-If you start `guix-daemon` using an init script, you can edit said script to
-supply this flag.
-
-[b17e]: https://bootstrappable.org/
-[r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/
-[env-vars-list]: #recognized-environment-variables
diff --git a/contrib/guix/guix-attest b/contrib/guix/guix-attest
deleted file mode 100755
index b0ef28dc3f..0000000000
--- a/contrib/guix/guix-attest
+++ /dev/null
@@ -1,263 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# Source the common prelude, which:
-# 1. Checks if we're at the top directory of the Bitcoin Core repository
-# 2. Defines a few common functions and variables
-#
-# shellcheck source=libexec/prelude.bash
-source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
-
-
-###################
-## Sanity Checks ##
-###################
-
-################
-# Required non-builtin commands should be invokable
-################
-
-check_tools cat env basename mkdir diff sort
-
-if [ -z "$NO_SIGN" ]; then
- # make it possible to override the gpg binary
- GPG=${GPG:-gpg}
-
- # $GPG can contain extra arguments passed to the binary
- # so let's check only the existence of arg[0]
- # shellcheck disable=SC2206
- GPG_ARRAY=($GPG)
- check_tools "${GPG_ARRAY[0]}"
-fi
-
-################
-# Required env vars should be non-empty
-################
-
-cmd_usage() {
-cat < \\
- SIGNER=GPG_KEY_NAME[=SIGNER_NAME] \\
- [ NO_SIGN=1 ]
- ./contrib/guix/guix-attest
-
-Example w/o overriding signing name:
-
- env GUIX_SIGS_REPO=/home/achow101/guix.sigs \\
- SIGNER=achow101 \\
- ./contrib/guix/guix-attest
-
-Example overriding signing name:
-
- env GUIX_SIGS_REPO=/home/dongcarl/guix.sigs \\
- SIGNER=0x96AB007F1A7ED999=dongcarl \\
- ./contrib/guix/guix-attest
-
-Example w/o signing, just creating SHA256SUMS:
-
- env GUIX_SIGS_REPO=/home/achow101/guix.sigs \\
- SIGNER=achow101 \\
- NO_SIGN=1 \\
- ./contrib/guix/guix-attest
-
-EOF
-}
-
-if [ -z "$GUIX_SIGS_REPO" ] || [ -z "$SIGNER" ]; then
- cmd_usage
- exit 1
-fi
-
-################
-# GUIX_SIGS_REPO should exist as a directory
-################
-
-if [ ! -d "$GUIX_SIGS_REPO" ]; then
-cat << EOF
-ERR: The specified GUIX_SIGS_REPO is not an existent directory:
-
- '$GUIX_SIGS_REPO'
-
-Hint: Please clone the guix.sigs repository and point to it with the
- GUIX_SIGS_REPO environment variable.
-
-EOF
-cmd_usage
-exit 1
-fi
-
-################
-# The key specified in SIGNER should be usable
-################
-
-IFS='=' read -r gpg_key_name signer_name <<< "$SIGNER"
-if [ -z "${signer_name}" ]; then
- signer_name="$gpg_key_name"
-fi
-
-if [ -z "$NO_SIGN" ] && ! ${GPG} --dry-run --list-secret-keys "${gpg_key_name}" >/dev/null 2>&1; then
- echo "ERR: GPG can't seem to find any key named '${gpg_key_name}'"
- exit 1
-fi
-
-################
-# We should be able to find at least one output
-################
-
-echo "Looking for build output SHA256SUMS fragments in ${OUTDIR_BASE}"
-
-shopt -s nullglob
-sha256sum_fragments=( "$OUTDIR_BASE"/*/SHA256SUMS.part ) # This expands to an array of directories...
-shopt -u nullglob
-
-noncodesigned_fragments=()
-codesigned_fragments=()
-
-if (( ${#sha256sum_fragments[@]} )); then
- echo "Found build output SHA256SUMS fragments:"
- for outdir in "${sha256sum_fragments[@]}"; do
- echo " '$outdir'"
- case "$outdir" in
- "$OUTDIR_BASE"/*-codesigned/SHA256SUMS.part)
- codesigned_fragments+=("$outdir")
- ;;
- *)
- noncodesigned_fragments+=("$outdir")
- ;;
- esac
- done
- echo
-else
- echo "ERR: Could not find any build output SHA256SUMS fragments in ${OUTDIR_BASE}"
- exit 1
-fi
-
-##############
-## Attest ##
-##############
-
-# Usage: out_name $outdir
-#
-# HOST: The output directory being attested
-#
-out_name() {
- basename "$(dirname "$1")"
-}
-
-shasum_already_exists() {
-cat < "$temp_noncodesigned"
- if [ -e noncodesigned.SHA256SUMS ]; then
- # The SHA256SUMS already exists, make sure it's exactly what we
- # expect, error out if not
- if diff -u noncodesigned.SHA256SUMS "$temp_noncodesigned"; then
- echo "A noncodesigned.SHA256SUMS file already exists for '${VERSION}' and is up-to-date."
- else
- shasum_already_exists noncodesigned.SHA256SUMS
- exit 1
- fi
- else
- mv "$temp_noncodesigned" noncodesigned.SHA256SUMS
- fi
- else
- echo "ERR: No noncodesigned outputs found for '${VERSION}', exiting..."
- exit 1
- fi
-
- temp_all="$(mktemp)"
- trap 'rm -rf -- "$temp_all"' EXIT
-
- if (( ${#codesigned_fragments[@]} )); then
- # Note: all.SHA256SUMS attests to all of $sha256sum_fragments, but is
- # not needed if there are no $codesigned_fragments
- cat "${sha256sum_fragments[@]}" \
- | sort -u \
- | sort -k2 \
- | basenameify_SHA256SUMS \
- > "$temp_all"
- if [ -e all.SHA256SUMS ]; then
- # The SHA256SUMS already exists, make sure it's exactly what we
- # expect, error out if not
- if diff -u all.SHA256SUMS "$temp_all"; then
- echo "An all.SHA256SUMS file already exists for '${VERSION}' and is up-to-date."
- else
- shasum_already_exists all.SHA256SUMS
- exit 1
- fi
- else
- mv "$temp_all" all.SHA256SUMS
- fi
- else
- # It is fine to have the codesigned outputs be missing (perhaps the
- # detached codesigs have not been published yet), just print a log
- # message instead of erroring out
- echo "INFO: No codesigned outputs found for '${VERSION}', skipping..."
- fi
-
- if [ -z "$NO_SIGN" ]; then
- echo "Signing SHA256SUMS to produce SHA256SUMS.asc"
- for i in *.SHA256SUMS; do
- if [ ! -e "$i".asc ]; then
- ${GPG} --detach-sign \
- --digest-algo sha256 \
- --local-user "$gpg_key_name" \
- --armor \
- --output "$i".asc "$i"
- else
- echo "Signature already there"
- fi
- done
- else
- echo "Not signing SHA256SUMS as \$NO_SIGN is not empty"
- fi
- echo ""
-)
diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build
deleted file mode 100755
index 2a79e42ce4..0000000000
--- a/contrib/guix/guix-build
+++ /dev/null
@@ -1,467 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# Source the common prelude, which:
-# 1. Checks if we're at the top directory of the Bitcoin Core repository
-# 2. Defines a few common functions and variables
-#
-# shellcheck source=libexec/prelude.bash
-source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
-
-
-###################
-## SANITY CHECKS ##
-###################
-
-################
-# Required non-builtin commands should be invocable
-################
-
-check_tools cat mkdir make getent curl git guix
-
-################
-# GUIX_BUILD_OPTIONS should be empty
-################
-#
-# GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that
-# can perform builds. This seems like what we want instead of
-# ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually
-# _appended_ to normal command-line options. Meaning that they will take
-# precedence over the command-specific ADDITIONAL_GUIX__FLAGS.
-#
-# This seems like a poor user experience. Thus we check for GUIX_BUILD_OPTIONS's
-# existence here and direct users of this script to use our (more flexible)
-# custom environment variables.
-if [ -n "$GUIX_BUILD_OPTIONS" ]; then
-cat << EOF
-Error: Environment variable GUIX_BUILD_OPTIONS is not empty:
- '$GUIX_BUILD_OPTIONS'
-
-Unfortunately this script is incompatible with GUIX_BUILD_OPTIONS, please unset
-GUIX_BUILD_OPTIONS and use ADDITIONAL_GUIX_COMMON_FLAGS to set build options
-across guix commands or ADDITIONAL_GUIX__FLAGS to set build options for a
-specific guix command.
-
-See contrib/guix/README.md for more details.
-EOF
-exit 1
-fi
-
-################
-# The git worktree should not be dirty
-################
-
-if ! git diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then
-cat << EOF
-ERR: The current git worktree is dirty, which may lead to broken builds.
-
- Aborting...
-
-Hint: To make your git worktree clean, You may want to:
- 1. Commit your changes,
- 2. Stash your changes, or
- 3. Set the 'FORCE_DIRTY_WORKTREE' environment variable if you insist on
- using a dirty worktree
-EOF
-exit 1
-fi
-
-mkdir -p "$VERSION_BASE"
-
-################
-# Build directories should not exist
-################
-
-# Default to building for all supported HOSTs (overridable by environment)
-# powerpc64le-linux-gnu currently disabled due non-determinism issues across build arches.
-export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu
- x86_64-w64-mingw32
- x86_64-apple-darwin arm64-apple-darwin}"
-
-# Usage: distsrc_for_host HOST
-#
-# HOST: The current platform triple we're building for
-#
-distsrc_for_host() {
- echo "${DISTSRC_BASE}/distsrc-${VERSION}-${1}"
-}
-
-# Accumulate a list of build directories that already exist...
-hosts_distsrc_exists=""
-for host in $HOSTS; do
- if [ -e "$(distsrc_for_host "$host")" ]; then
- hosts_distsrc_exists+=" ${host}"
- fi
-done
-
-if [ -n "$hosts_distsrc_exists" ]; then
-# ...so that we can print them out nicely in an error message
-cat << EOF
-ERR: Build directories for this commit already exist for the following platform
- triples you're attempting to build, probably because of previous builds.
- Please remove, or otherwise deal with them prior to starting another build.
-
- Aborting...
-
-Hint: To blow everything away, you may want to use:
-
- $ ./contrib/guix/guix-clean
-
-Specifically, this will remove all files without an entry in the index,
-excluding the SDK directory, the depends download cache, the depends built
-packages cache, the garbage collector roots for Guix environments, and the
-output directory.
-EOF
-for host in $hosts_distsrc_exists; do
- echo " ${host} '$(distsrc_for_host "$host")'"
-done
-exit 1
-else
- mkdir -p "$DISTSRC_BASE"
-fi
-
-################
-# When building for darwin, the macOS SDK should exist
-################
-
-for host in $HOSTS; do
- case "$host" in
- *darwin*)
- OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=@@g')"
- if [ -e "$OSX_SDK" ]; then
- echo "Found macOS SDK at '${OSX_SDK}', using..."
- break
- else
- echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, or define SDK_PATH environment variable. Exiting..."
- exit 1
- fi
- ;;
- esac
-done
-
-################
-# VERSION_BASE should have enough space
-################
-
-avail_KiB="$(df -Pk "$VERSION_BASE" | sed 1d | tr -s ' ' | cut -d' ' -f4)"
-total_required_KiB=0
-for host in $HOSTS; do
- case "$host" in
- *darwin*) required_KiB=440000 ;;
- *mingw*) required_KiB=7600000 ;;
- *) required_KiB=6400000 ;;
- esac
- total_required_KiB=$((total_required_KiB+required_KiB))
-done
-
-if (( total_required_KiB > avail_KiB )); then
- total_required_GiB=$((total_required_KiB / 1048576))
- avail_GiB=$((avail_KiB / 1048576))
- echo "Performing a Bitcoin Core Guix build for the selected HOSTS requires ${total_required_GiB} GiB, however, only ${avail_GiB} GiB is available. Please free up some disk space before performing the build."
- exit 1
-fi
-
-################
-# Check that we can connect to the guix-daemon
-################
-
-cat << EOF
-Checking that we can connect to the guix-daemon...
-
-Hint: If this hangs, you may want to try turning your guix-daemon off and on
- again.
-
-EOF
-if ! guix gc --list-failures > /dev/null; then
-cat << EOF
-
-ERR: Failed to connect to the guix-daemon, please ensure that one is running and
- reachable.
-EOF
-exit 1
-fi
-
-# Developer note: we could use `guix repl` for this check and run:
-#
-# (import (guix store)) (close-connection (open-connection))
-#
-# However, the internal API is likely to change more than the CLI invocation
-
-################
-# Services database must have basic entries
-################
-
-if ! getent services http https ftp > /dev/null 2>&1; then
-cat << EOF
-ERR: Your system's C library cannot find service database entries for at least
- one of the following services: http, https, ftp.
-
-Hint: Most likely, /etc/services does not exist yet (common for docker images
- and minimal distros), or you don't have permissions to access it.
-
- If /etc/services does not exist yet, you may want to install the
- appropriate package for your distro which provides it.
-
- On Debian/Ubuntu: netbase
- On Arch Linux: iana-etc
-
- For more information, see: getent(1), services(5)
-
-EOF
-
-fi
-
-#########
-# SETUP #
-#########
-
-# Determine the maximum number of jobs to run simultaneously (overridable by
-# environment)
-JOBS="${JOBS:-$(nproc)}"
-
-# Usage: host_to_commonname HOST
-#
-# HOST: The current platform triple we're building for
-#
-host_to_commonname() {
- case "$1" in
- *darwin*) echo osx ;;
- *mingw*) echo win ;;
- *linux*) echo linux ;;
- *) exit 1 ;;
- esac
-}
-
-# Determine the reference time used for determinism (overridable by environment)
-SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
-
-# Precious directories are those which should not be cleaned between successive
-# guix builds
-depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
-precious_dir_names="${depends_precious_dir_names} OUTDIR_BASE PROFILES_BASE"
-
-# Usage: contains IFS-SEPARATED-LIST ITEM
-contains() {
- for i in ${1}; do
- if [ "$i" = "${2}" ]; then
- return 0 # Found!
- fi
- done
- return 1
-}
-
-# If the user explicitly specified a precious directory, create it so we
-# can map it into the container
-for precious_dir_name in $precious_dir_names; do
- precious_dir_path="${!precious_dir_name}"
- if [ -n "$precious_dir_path" ]; then
- if [ ! -e "$precious_dir_path" ]; then
- mkdir -p "$precious_dir_path"
- elif [ -L "$precious_dir_path" ]; then
- echo "ERR: ${precious_dir_name} cannot be a symbolic link"
- exit 1
- elif [ ! -d "$precious_dir_path" ]; then
- echo "ERR: ${precious_dir_name} must be a directory"
- exit 1
- fi
- fi
-done
-
-mkdir -p "$VAR_BASE"
-
-# Record the _effective_ values of precious directories such that guix-clean can
-# avoid clobbering them if appropriate.
-#
-# shellcheck disable=SC2046,SC2086
-{
- # Get depends precious dir definitions from depends
- make -C "${PWD}/depends" \
- --no-print-directory \
- -- $(printf "print-%s\n" $depends_precious_dir_names)
-
- # Get remaining precious dir definitions from the environment
- for precious_dir_name in $precious_dir_names; do
- precious_dir_path="${!precious_dir_name}"
- if ! contains "$depends_precious_dir_names" "$precious_dir_name"; then
- echo "${precious_dir_name}=${precious_dir_path}"
- fi
- done
-} > "${VAR_BASE}/precious_dirs"
-
-# Make sure an output directory exists for our builds
-OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
-mkdir -p "$OUTDIR_BASE"
-
-# Download the depends sources now as we won't have internet access in the build
-# container
-for host in $HOSTS; do
- make -C "${PWD}/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"}
-done
-
-# Usage: outdir_for_host HOST SUFFIX
-#
-# HOST: The current platform triple we're building for
-#
-outdir_for_host() {
- echo "${OUTDIR_BASE}/${1}${2:+-${2}}"
-}
-
-# Usage: profiledir_for_host HOST SUFFIX
-#
-# HOST: The current platform triple we're building for
-#
-profiledir_for_host() {
- echo "${PROFILES_BASE}/${1}${2:+-${2}}"
-}
-
-
-#########
-# BUILD #
-#########
-
-# Function to be called when building for host ${1} and the user interrupts the
-# build
-int_trap() {
-cat << EOF
-** INT received while building ${1}, you may want to clean up the relevant
- work directories (e.g. distsrc-*) before rebuilding
-
-Hint: To blow everything away, you may want to use:
-
- $ ./contrib/guix/guix-clean
-
-Specifically, this will remove all files without an entry in the index,
-excluding the SDK directory, the depends download cache, the depends built
-packages cache, the garbage collector roots for Guix environments, and the
-output directory.
-EOF
-}
-
-# Deterministically build Bitcoin Core
-# shellcheck disable=SC2153
-for host in $HOSTS; do
-
- # Display proper warning when the user interrupts the build
- trap 'int_trap ${host}' INT
-
- (
- # Required for 'contrib/guix/manifest.scm' to output the right manifest
- # for the particular $HOST we're building for
- export HOST="$host"
-
- # shellcheck disable=SC2030
-cat << EOF
-INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}:
- ...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
- ...running at most ${JOBS:?not set} jobs
- ...from worktree directory: '${PWD}'
- ...bind-mounted in container to: '/BGL'
- ...in build directory: '$(distsrc_for_host "$HOST")'
- ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
- ...outputting in: '$(outdir_for_host "$HOST")'
- ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")'
- ADDITIONAL FLAGS (if set)
- ADDITIONAL_GUIX_COMMON_FLAGS: ${ADDITIONAL_GUIX_COMMON_FLAGS}
- ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS}
- ADDITIONAL_GUIX_TIMEMACHINE_FLAGS: ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS}
-EOF
-
- # Run the build script 'contrib/guix/libexec/build.sh' in the build
- # container specified by 'contrib/guix/manifest.scm'.
- #
- # Explanation of `guix shell` flags:
- #
- # --container run command within an isolated container
- #
- # Running in an isolated container minimizes build-time differences
- # between machines and improves reproducibility
- #
- # --pure unset existing environment variables
- #
- # Same rationale as --container
- #
- # --no-cwd do not share current working directory with an
- # isolated container
- #
- # When --container is specified, the default behavior is to share
- # the current working directory with the isolated container at the
- # same exact path (e.g. mapping '/home/satoshi/BGL/' to
- # '/home/satoshi/BGL/'). This means that the $PWD inside the
- # container becomes a source of irreproducibility. --no-cwd disables
- # this behaviour.
- #
- # --share=SPEC for containers, share writable host file system
- # according to SPEC
- #
- # --share="$PWD"=/BGL
- #
- # maps our current working directory to /BGL
- # inside the isolated container, which we later cd
- # into.
- #
- # While we don't want to map our current working directory to the
- # same exact path (as this introduces irreproducibility), we do want
- # it to be at a _fixed_ path _somewhere_ inside the isolated
- # container so that we have something to build. '/BGL' was
- # chosen arbitrarily.
- #
- # ${SOURCES_PATH:+--share="$SOURCES_PATH"}
- #
- # make the downloaded depends sources path available
- # inside the isolated container
- #
- # The isolated container has no network access as it's in a
- # different network namespace from the main machine, so we have to
- # make the downloaded depends sources available to it. The sources
- # should have been downloaded prior to this invocation.
- #
- # --keep-failed keep build tree of failed builds
- #
- # When builds of the Guix environment itself (not Bitcoin Core)
- # fail, it is useful for the build tree to be kept for debugging
- # purposes.
- #
- # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"}
- #
- # fetch substitute from SUBSTITUTE_URLS if they are
- # authorized
- #
- # Depending on the user's security model, it may be desirable to use
- # substitutes (pre-built packages) from servers that the user trusts.
- # Please read the README.md in the same directory as this file for
- # more information.
- #
- # shellcheck disable=SC2086,SC2031
- time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \
- --container \
- --pure \
- --no-cwd \
- --share="$PWD"=/BGL \
- --share="$DISTSRC_BASE"=/distsrc-base \
- --share="$OUTDIR_BASE"=/outdir-base \
- --expose="$(git rev-parse --git-common-dir)" \
- ${SOURCES_PATH:+--share="$SOURCES_PATH"} \
- ${BASE_CACHE:+--share="$BASE_CACHE"} \
- ${SDK_PATH:+--share="$SDK_PATH"} \
- --cores="$JOBS" \
- --keep-failed \
- --link-profile \
- --root="$(profiledir_for_host "${HOST}")" \
- ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
- ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
- -- env HOST="$host" \
- DISTNAME="$DISTNAME" \
- JOBS="$JOBS" \
- SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
- ${V:+V=1} \
- ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
- ${BASE_CACHE:+BASE_CACHE="$BASE_CACHE"} \
- ${SDK_PATH:+SDK_PATH="$SDK_PATH"} \
- DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \
- OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \
- DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
- bash -c "cd /BGL && bash contrib/guix/libexec/build.sh"
- )
-
-done
diff --git a/contrib/guix/guix-clean b/contrib/guix/guix-clean
deleted file mode 100755
index 9af0a793cf..0000000000
--- a/contrib/guix/guix-clean
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# Source the common prelude, which:
-# 1. Checks if we're at the top directory of the Bitcoin Core repository
-# 2. Defines a few common functions and variables
-#
-# shellcheck source=libexec/prelude.bash
-source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
-
-
-###################
-## Sanity Checks ##
-###################
-
-################
-# Required non-builtin commands should be invokable
-################
-
-check_tools cat mkdir make git guix
-
-
-#############
-## Clean ##
-#############
-
-# Usage: under_dir MAYBE_PARENT MAYBE_CHILD
-#
-# If MAYBE_CHILD is a subdirectory of MAYBE_PARENT, print the relative path
-# from MAYBE_PARENT to MAYBE_CHILD. Otherwise, return 1 as the error code.
-#
-# NOTE: This does not perform any symlink-resolving or path canonicalization.
-#
-under_dir() {
- local path_residue
- path_residue="${2##"${1}"}"
- if [ -z "$path_residue" ] || [ "$path_residue" = "$2" ]; then
- return 1
- else
- echo "$path_residue"
- fi
-}
-
-# Usage: dir_under_git_root MAYBE_CHILD
-#
-# If MAYBE_CHILD is under the current git repository and exists, print the
-# relative path from the git repository's top-level directory to MAYBE_CHILD,
-# otherwise, exit with an error code.
-#
-dir_under_git_root() {
- local rv
- rv="$(under_dir "$(git_root)" "$1")"
- [ -n "$rv" ] && echo "$rv"
-}
-
-shopt -s nullglob
-found_precious_dirs_files=( "${version_base_prefix}"*/"${var_base_basename}/precious_dirs" ) # This expands to an array of directories...
-shopt -u nullglob
-
-exclude_flags=()
-
-for precious_dirs_file in "${found_precious_dirs_files[@]}"; do
- # Make sure the precious directories (e.g. SOURCES_PATH, BASE_CACHE, SDK_PATH)
- # are excluded from git-clean
- echo "Found precious_dirs file: '${precious_dirs_file}'"
-
- # Exclude the precious_dirs file itself
- if dirs_file_exclude_fragment=$(dir_under_git_root "$(dirname "$precious_dirs_file")"); then
- exclude_flags+=( --exclude="${dirs_file_exclude_fragment}/precious_dirs" )
- fi
-
- # Read each 'name=dir' pair from the precious_dirs file
- while IFS='=' read -r name dir; do
- # Add an exclusion flag if the precious directory is under the git root.
- if under=$(dir_under_git_root "$dir"); then
- echo "Avoiding ${name}: ${under}"
- exclude_flags+=( --exclude="$under" )
- fi
- done < "$precious_dirs_file"
-done
-
-git clean -xdff "${exclude_flags[@]}"
diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign
deleted file mode 100755
index ce8b125286..0000000000
--- a/contrib/guix/guix-codesign
+++ /dev/null
@@ -1,378 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# Source the common prelude, which:
-# 1. Checks if we're at the top directory of the Bitcoin Core repository
-# 2. Defines a few common functions and variables
-#
-# shellcheck source=libexec/prelude.bash
-source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
-
-
-###################
-## SANITY CHECKS ##
-###################
-
-################
-# Required non-builtin commands should be invocable
-################
-
-check_tools cat mkdir git guix
-
-################
-# Required env vars should be non-empty
-################
-
-cmd_usage() {
- cat < \\
- ./contrib/guix/guix-codesign
-
-EOF
-}
-
-if [ -z "$DETACHED_SIGS_REPO" ]; then
- cmd_usage
- exit 1
-fi
-
-################
-# GUIX_BUILD_OPTIONS should be empty
-################
-#
-# GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that
-# can perform builds. This seems like what we want instead of
-# ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually
-# _appended_ to normal command-line options. Meaning that they will take
-# precedence over the command-specific ADDITIONAL_GUIX__FLAGS.
-#
-# This seems like a poor user experience. Thus we check for GUIX_BUILD_OPTIONS's
-# existence here and direct users of this script to use our (more flexible)
-# custom environment variables.
-if [ -n "$GUIX_BUILD_OPTIONS" ]; then
-cat << EOF
-Error: Environment variable GUIX_BUILD_OPTIONS is not empty:
- '$GUIX_BUILD_OPTIONS'
-
-Unfortunately this script is incompatible with GUIX_BUILD_OPTIONS, please unset
-GUIX_BUILD_OPTIONS and use ADDITIONAL_GUIX_COMMON_FLAGS to set build options
-across guix commands or ADDITIONAL_GUIX__FLAGS to set build options for a
-specific guix command.
-
-See contrib/guix/README.md for more details.
-EOF
-exit 1
-fi
-
-################
-# The codesignature git worktree should not be dirty
-################
-
-if ! git -C "$DETACHED_SIGS_REPO" diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then
- cat << EOF
-ERR: The DETACHED CODESIGNATURE git worktree is dirty, which may lead to broken builds.
-
- Aborting...
-
-Hint: To make your git worktree clean, You may want to:
- 1. Commit your changes,
- 2. Stash your changes, or
- 3. Set the 'FORCE_DIRTY_WORKTREE' environment variable if you insist on
- using a dirty worktree
-EOF
- exit 1
-fi
-
-################
-# Build directories should not exist
-################
-
-# Default to building for all supported HOSTs (overridable by environment)
-export HOSTS="${HOSTS:-x86_64-w64-mingw32 x86_64-apple-darwin arm64-apple-darwin}"
-
-# Usage: distsrc_for_host HOST
-#
-# HOST: The current platform triple we're building for
-#
-distsrc_for_host() {
- echo "${DISTSRC_BASE}/distsrc-${VERSION}-${1}-codesigned"
-}
-
-# Accumulate a list of build directories that already exist...
-hosts_distsrc_exists=""
-for host in $HOSTS; do
- if [ -e "$(distsrc_for_host "$host")" ]; then
- hosts_distsrc_exists+=" ${host}"
- fi
-done
-
-if [ -n "$hosts_distsrc_exists" ]; then
-# ...so that we can print them out nicely in an error message
-cat << EOF
-ERR: Build directories for this commit already exist for the following platform
- triples you're attempting to build, probably because of previous builds.
- Please remove, or otherwise deal with them prior to starting another build.
-
- Aborting...
-
-Hint: To blow everything away, you may want to use:
-
- $ ./contrib/guix/guix-clean
-
-Specifically, this will remove all files without an entry in the index,
-excluding the SDK directory, the depends download cache, the depends built
-packages cache, the garbage collector roots for Guix environments, and the
-output directory.
-EOF
-for host in $hosts_distsrc_exists; do
- echo " ${host} '$(distsrc_for_host "$host")'"
-done
-exit 1
-else
- mkdir -p "$DISTSRC_BASE"
-fi
-
-
-################
-# Unsigned tarballs SHOULD exist
-################
-
-# Usage: outdir_for_host HOST SUFFIX
-#
-# HOST: The current platform triple we're building for
-#
-outdir_for_host() {
- echo "${OUTDIR_BASE}/${1}${2:+-${2}}"
-}
-
-
-unsigned_tarball_for_host() {
- case "$1" in
- *mingw*)
- echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz"
- ;;
- *darwin*)
- echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz"
- ;;
- *)
- exit 1
- ;;
- esac
-}
-
-# Accumulate a list of build directories that already exist...
-hosts_unsigned_tarball_missing=""
-for host in $HOSTS; do
- if [ ! -e "$(unsigned_tarball_for_host "$host")" ]; then
- hosts_unsigned_tarball_missing+=" ${host}"
- fi
-done
-
-if [ -n "$hosts_unsigned_tarball_missing" ]; then
- # ...so that we can print them out nicely in an error message
- cat << EOF
-ERR: Unsigned tarballs do not exist
-...
-
-EOF
-for host in $hosts_unsigned_tarball_missing; do
- echo " ${host} '$(unsigned_tarball_for_host "$host")'"
-done
-exit 1
-fi
-
-################
-# Check that we can connect to the guix-daemon
-################
-
-cat << EOF
-Checking that we can connect to the guix-daemon...
-
-Hint: If this hangs, you may want to try turning your guix-daemon off and on
- again.
-
-EOF
-if ! guix gc --list-failures > /dev/null; then
- cat << EOF
-
-ERR: Failed to connect to the guix-daemon, please ensure that one is running and
- reachable.
-EOF
- exit 1
-fi
-
-# Developer note: we could use `guix repl` for this check and run:
-#
-# (import (guix store)) (close-connection (open-connection))
-#
-# However, the internal API is likely to change more than the CLI invocation
-
-
-#########
-# SETUP #
-#########
-
-# Determine the maximum number of jobs to run simultaneously (overridable by
-# environment)
-JOBS="${JOBS:-$(nproc)}"
-
-# Determine the reference time used for determinism (overridable by environment)
-SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
-
-# Make sure an output directory exists for our builds
-OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
-mkdir -p "$OUTDIR_BASE"
-
-# Usage: profiledir_for_host HOST SUFFIX
-#
-# HOST: The current platform triple we're building for
-#
-profiledir_for_host() {
- echo "${PROFILES_BASE}/${1}${2:+-${2}}"
-}
-
-#########
-# BUILD #
-#########
-
-# Function to be called when codesigning for host ${1} and the user interrupts
-# the codesign
-int_trap() {
-cat << EOF
-** INT received while codesigning ${1}, you may want to clean up the relevant
- work directories (e.g. distsrc-*) before recodesigning
-
-Hint: To blow everything away, you may want to use:
-
- $ ./contrib/guix/guix-clean
-
-Specifically, this will remove all files without an entry in the index,
-excluding the SDK directory, the depends download cache, the depends built
-packages cache, the garbage collector roots for Guix environments, and the
-output directory.
-EOF
-}
-
-# Deterministically build Bitcoin Core
-# shellcheck disable=SC2153
-for host in $HOSTS; do
-
- # Display proper warning when the user interrupts the build
- trap 'int_trap ${host}' INT
-
- (
- # Required for 'contrib/guix/manifest.scm' to output the right manifest
- # for the particular $HOST we're building for
- export HOST="$host"
-
- # shellcheck disable=SC2030
-cat << EOF
-INFO: Codesigning ${VERSION:?not set} for platform triple ${HOST:?not set}:
- ...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
- ...from worktree directory: '${PWD}'
- ...bind-mounted in container to: '/bitgesell'
- ...in build directory: '$(distsrc_for_host "$HOST")'
- ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
- ...outputting in: '$(outdir_for_host "$HOST" codesigned)'
- ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)'
- ...using detached signatures in: '${DETACHED_SIGS_REPO:?not set}'
- ...bind-mounted in container to: '/detached-sigs'
-EOF
-
-
- # Run the build script 'contrib/guix/libexec/build.sh' in the build
- # container specified by 'contrib/guix/manifest.scm'.
- #
- # Explanation of `guix shell` flags:
- #
- # --container run command within an isolated container
- #
- # Running in an isolated container minimizes build-time differences
- # between machines and improves reproducibility
- #
- # --pure unset existing environment variables
- #
- # Same rationale as --container
- #
- # --no-cwd do not share current working directory with an
- # isolated container
- #
- # When --container is specified, the default behavior is to share
- # the current working directory with the isolated container at the
- # same exact path (e.g. mapping '/home/satoshi/bitcoin/' to
- # '/home/satoshi/bitcoin/'). This means that the $PWD inside the
- # container becomes a source of irreproducibility. --no-cwd disables
- # this behaviour.
- #
- # --share=SPEC for containers, share writable host file system
- # according to SPEC
- #
- # --share="$PWD"=/bitcoin
- #
- # maps our current working directory to /bitcoin
- # inside the isolated container, which we later cd
- # into.
- #
- # While we don't want to map our current working directory to the
- # same exact path (as this introduces irreproducibility), we do want
- # it to be at a _fixed_ path _somewhere_ inside the isolated
- # container so that we have something to build. '/bitcoin' was
- # chosen arbitrarily.
- #
- # ${SOURCES_PATH:+--share="$SOURCES_PATH"}
- #
- # make the downloaded depends sources path available
- # inside the isolated container
- #
- # The isolated container has no network access as it's in a
- # different network namespace from the main machine, so we have to
- # make the downloaded depends sources available to it. The sources
- # should have been downloaded prior to this invocation.
- #
- # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"}
- #
- # fetch substitute from SUBSTITUTE_URLS if they are
- # authorized
- #
- # Depending on the user's security model, it may be desirable to use
- # substitutes (pre-built packages) from servers that the user trusts.
- # Please read the README.md in the same directory as this file for
- # more information.
- #
- # shellcheck disable=SC2086,SC2031
- time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \
- --container \
- --pure \
- --no-cwd \
- --share="$PWD"=/bitgesell \
- --share="$DISTSRC_BASE"=/distsrc-base \
- --share="$OUTDIR_BASE"=/outdir-base \
- --share="$DETACHED_SIGS_REPO"=/detached-sigs \
- --expose="$(git rev-parse --git-common-dir)" \
- --expose="$(git -C "$DETACHED_SIGS_REPO" rev-parse --git-common-dir)" \
- ${SOURCES_PATH:+--share="$SOURCES_PATH"} \
- --cores="$JOBS" \
- --keep-failed \
- --fallback \
- --link-profile \
- --root="$(profiledir_for_host "${HOST}" codesigned)" \
- ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
- ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
- -- env HOST="$host" \
- DISTNAME="$DISTNAME" \
- JOBS="$JOBS" \
- SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
- ${V:+V=1} \
- ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
- DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \
- OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)" \
- DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
- DETACHED_SIGS_REPO=/detached-sigs \
- UNSIGNED_TARBALL="$(OUTDIR_BASE=/outdir-base && unsigned_tarball_for_host "$HOST")" \
- bash -c "cd /bitgesell && bash contrib/guix/libexec/codesign.sh"
- )
-
-done
diff --git a/contrib/guix/guix-verify b/contrib/guix/guix-verify
deleted file mode 100755
index 02ae022741..0000000000
--- a/contrib/guix/guix-verify
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# Source the common prelude, which:
-# 1. Checks if we're at the top directory of the Bitcoin Core repository
-# 2. Defines a few common functions and variables
-#
-# shellcheck source=libexec/prelude.bash
-source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
-
-
-###################
-## Sanity Checks ##
-###################
-
-################
-# Required non-builtin commands should be invokable
-################
-
-check_tools cat diff gpg
-
-################
-# Required env vars should be non-empty
-################
-
-cmd_usage() {
-cat < [ SIGNER= ] ./contrib/guix/guix-verify
-
-Example overriding signer's manifest to use as base
-
- env GUIX_SIGS_REPO=/home/dongcarl/guix.sigs SIGNER=achow101 ./contrib/guix/guix-verify
-
-EOF
-}
-
-if [ -z "$GUIX_SIGS_REPO" ]; then
- cmd_usage
- exit 1
-fi
-
-################
-# GUIX_SIGS_REPO should exist as a directory
-################
-
-if [ ! -d "$GUIX_SIGS_REPO" ]; then
-cat << EOF
-ERR: The specified GUIX_SIGS_REPO is not an existent directory:
-
- '$GUIX_SIGS_REPO'
-
-Hint: Please clone the guix.sigs repository and point to it with the
- GUIX_SIGS_REPO environment variable.
-
-EOF
-cmd_usage
-exit 1
-fi
-
-##############
-## Verify ##
-##############
-
-OUTSIGDIR_BASE="${GUIX_SIGS_REPO}/${VERSION}"
-echo "Looking for signature directories in '${OUTSIGDIR_BASE}'"
-echo ""
-
-# Usage: verify compare_manifest current_manifest
-verify() {
- local compare_manifest="$1"
- local current_manifest="$2"
- if ! gpg --quiet --batch --verify "$current_manifest".asc "$current_manifest" 1>&2; then
- echo "ERR: Failed to verify GPG signature in '${current_manifest}'"
- echo ""
- echo "Hint: Either the signature is invalid or the public key is missing"
- echo ""
- failure=1
- elif ! diff --report-identical "$compare_manifest" "$current_manifest" 1>&2; then
- echo "ERR: The SHA256SUMS attestation in these two directories differ:"
- echo " '${compare_manifest}'"
- echo " '${current_manifest}'"
- echo ""
- failure=1
- else
- echo "Verified: '${current_manifest}'"
- echo ""
- fi
-}
-
-shopt -s nullglob
-all_noncodesigned=( "$OUTSIGDIR_BASE"/*/noncodesigned.SHA256SUMS )
-shopt -u nullglob
-
-echo "--------------------"
-echo ""
-if (( ${#all_noncodesigned[@]} )); then
- compare_noncodesigned="${all_noncodesigned[0]}"
- if [[ -n "$SIGNER" ]]; then
- signer_noncodesigned="$OUTSIGDIR_BASE/$SIGNER/noncodesigned.SHA256SUMS"
- if [[ -f "$signer_noncodesigned" ]]; then
- echo "Using $SIGNER's manifest as the base to compare against"
- compare_noncodesigned="$signer_noncodesigned"
- else
- echo "Unable to find $SIGNER's manifest, using the first one found"
- fi
- else
- echo "No SIGNER provided, using the first manifest found"
- fi
-
- for current_manifest in "${all_noncodesigned[@]}"; do
- verify "$compare_noncodesigned" "$current_manifest"
- done
-
- echo "DONE: Checking output signatures for noncodesigned.SHA256SUMS"
- echo ""
-else
- echo "WARN: No signature directories with noncodesigned.SHA256SUMS found"
- echo ""
-fi
-
-shopt -s nullglob
-all_all=( "$OUTSIGDIR_BASE"/*/all.SHA256SUMS )
-shopt -u nullglob
-
-echo "--------------------"
-echo ""
-if (( ${#all_all[@]} )); then
- compare_all="${all_all[0]}"
- if [[ -n "$SIGNER" ]]; then
- signer_all="$OUTSIGDIR_BASE/$SIGNER/all.SHA256SUMS"
- if [[ -f "$signer_all" ]]; then
- echo "Using $SIGNER's manifest as the base to compare against"
- compare_all="$signer_all"
- else
- echo "Unable to find $SIGNER's manifest, using the first one found"
- fi
- else
- echo "No SIGNER provided, using the first manifest found"
- fi
-
- for current_manifest in "${all_all[@]}"; do
- verify "$compare_all" "$current_manifest"
- done
-
- # Sanity check: there should be no entries that exist in
- # noncodesigned.SHA256SUMS that doesn't exist in all.SHA256SUMS
- if [[ "$(comm -23 <(sort "$compare_noncodesigned") <(sort "$compare_all") | wc -c)" -ne 0 ]]; then
- echo "ERR: There are unique lines in noncodesigned.SHA256SUMS which"
- echo " do not exist in all.SHA256SUMS, something went very wrong."
- exit 1
- fi
-
- echo "DONE: Checking output signatures for all.SHA256SUMS"
- echo ""
-else
- echo "WARN: No signature directories with all.SHA256SUMS found"
- echo ""
-fi
-
-echo "===================="
-echo ""
-if (( ${#all_noncodesigned[@]} + ${#all_all[@]} == 0 )); then
- echo "ERR: Unable to perform any verifications as no signature directories"
- echo " were found"
- echo ""
- exit 1
-fi
-
-if [ -n "$failure" ]; then
- exit 1
-fi
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
deleted file mode 100644
index 86cd855364..0000000000
--- a/contrib/guix/libexec/build.sh
+++ /dev/null
@@ -1,404 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2019-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-export LC_ALL=C
-set -e -o pipefail
-export TZ=UTC
-
-# Although Guix _does_ set umask when building its own packages (in our case,
-# this is all packages in manifest.scm), it does not set it for `guix
-# shell`. It does make sense for at least `guix shell --container`
-# to set umask, so if that change gets merged upstream and we bump the
-# time-machine to a commit which includes the aforementioned change, we can
-# remove this line.
-#
-# This line should be placed before any commands which creates files.
-umask 0022
-
-if [ -n "$V" ]; then
- # Print both unexpanded (-v) and expanded (-x) forms of commands as they are
- # read from this file.
- set -vx
- # Set VERBOSE for CMake-based builds
- export VERBOSE="$V"
-fi
-
-# Check that required environment variables are set
-cat << EOF
-Required environment variables as seen inside the container:
- DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set}
- DISTNAME: ${DISTNAME:?not set}
- HOST: ${HOST:?not set}
- SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set}
- JOBS: ${JOBS:?not set}
- DISTSRC: ${DISTSRC:?not set}
- OUTDIR: ${OUTDIR:?not set}
-EOF
-
-ACTUAL_OUTDIR="${OUTDIR}"
-OUTDIR="${DISTSRC}/output"
-
-#####################
-# Environment Setup #
-#####################
-
-# The depends folder also serves as a base-prefix for depends packages for
-# $HOSTs after successfully building.
-BASEPREFIX="${PWD}/depends"
-
-# Given a package name and an output name, return the path of that output in our
-# current guix environment
-store_path() {
- grep --extended-regexp "/[^-]{32}-${1}-[^-]+${2:+-${2}}" "${GUIX_ENVIRONMENT}/manifest" \
- | head --lines=1 \
- | sed --expression='s|^[[:space:]]*"||' \
- --expression='s|"[[:space:]]*$||'
-}
-
-
-# Set environment variables to point the NATIVE toolchain to the right
-# includes/libs
-NATIVE_GCC="$(store_path gcc-toolchain)"
-
-unset LIBRARY_PATH
-unset CPATH
-unset C_INCLUDE_PATH
-unset CPLUS_INCLUDE_PATH
-unset OBJC_INCLUDE_PATH
-unset OBJCPLUS_INCLUDE_PATH
-
-export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
-export C_INCLUDE_PATH="${NATIVE_GCC}/include"
-export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
-export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
-export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
-
-case "$HOST" in
- *darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
- *mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
- *)
- NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
- export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
- ;;
-esac
-
-# Set environment variables to point the CROSS toolchain to the right
-# includes/libs for $HOST
-case "$HOST" in
- *mingw*)
- # Determine output paths to use in CROSS_* environment variables
- CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")"
- CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
- CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
- CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
- CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
-
- # The search path ordering is generally:
- # 1. gcc-related search paths
- # 2. libc-related search paths
- # 2. kernel-header-related search paths (not applicable to mingw-w64 hosts)
- export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
- export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
- export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
- ;;
- *darwin*)
- # The CROSS toolchain for darwin uses the SDK and ignores environment variables.
- # See depends/hosts/darwin.mk for more details.
- ;;
- *linux*)
- CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")"
- CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)"
- CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")"
- CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
- CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
- CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
- CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
-
- export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
- export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
- export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
- ;;
- *)
- exit 1 ;;
-esac
-
-# Sanity check CROSS_*_PATH directories
-IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}"
-for p in "${PATHS[@]}"; do
- if [ -n "$p" ] && [ ! -d "$p" ]; then
- echo "'$p' doesn't exist or isn't a directory... Aborting..."
- exit 1
- fi
-done
-
-# Disable Guix ld auto-rpath behavior
-export GUIX_LD_WRAPPER_DISABLE_RPATH=yes
-
-# Make /usr/bin if it doesn't exist
-[ -e /usr/bin ] || mkdir -p /usr/bin
-
-# Symlink file and env to a conventional path
-[ -e /usr/bin/file ] || ln -s --no-dereference "$(command -v file)" /usr/bin/file
-[ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env
-
-# Determine the correct value for -Wl,--dynamic-linker for the current $HOST
-case "$HOST" in
- *linux*)
- glibc_dynamic_linker=$(
- case "$HOST" in
- x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;;
- arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;;
- aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;;
- riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;;
- powerpc64-linux-gnu) echo /lib64/ld64.so.1;;
- powerpc64le-linux-gnu) echo /lib64/ld64.so.2;;
- *) exit 1 ;;
- esac
- )
- ;;
-esac
-
-# Environment variables for determinism
-export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
-export TZ="UTC"
-
-####################
-# Depends Building #
-####################
-
-# Build the depends tree, overriding variables that assume multilib gcc
-make -C depends --jobs="$JOBS" HOST="$HOST" \
- ${V:+V=1} \
- ${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
- ${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
- ${SDK_PATH+SDK_PATH="$SDK_PATH"} \
- x86_64_linux_CC=x86_64-linux-gnu-gcc \
- x86_64_linux_CXX=x86_64-linux-gnu-g++ \
- x86_64_linux_AR=x86_64-linux-gnu-gcc-ar \
- x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \
- x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
- x86_64_linux_STRIP=x86_64-linux-gnu-strip
-
-
-###########################
-# Source Tarball Building #
-###########################
-
-GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz"
-
-# Create the source tarball if not already there
-if [ ! -e "$GIT_ARCHIVE" ]; then
- mkdir -p "$(dirname "$GIT_ARCHIVE")"
- git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
-fi
-
-mkdir -p "$OUTDIR"
-
-###########################
-# Binary Tarball Building #
-###########################
-
-# CONFIGFLAGS
-CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
-
-# CFLAGS
-HOST_CFLAGS="-O2 -g"
-case "$HOST" in
- *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
- *mingw*) HOST_CFLAGS+=" -fno-ident" ;;
- *darwin*) unset HOST_CFLAGS ;;
-esac
-
-# CXXFLAGS
-HOST_CXXFLAGS="$HOST_CFLAGS"
-
-case "$HOST" in
- arm-linux-gnueabihf) HOST_CXXFLAGS="${HOST_CXXFLAGS} -Wno-psabi" ;;
-esac
-
-# LDFLAGS
-case "$HOST" in
- *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" ;;
- *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
-esac
-
-# Make $HOST-specific native binaries from depends available in $PATH
-export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
-mkdir -p "$DISTSRC"
-(
- cd "$DISTSRC"
-
- # Extract the source tarball
- tar --strip-components=1 -xf "${GIT_ARCHIVE}"
-
- ./autogen.sh
-
- # Configure this DISTSRC for $HOST
- # shellcheck disable=SC2086
- env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \
- ./configure --prefix=/ \
- --disable-ccache \
- --disable-maintainer-mode \
- --disable-dependency-tracking \
- ${CONFIGFLAGS} \
- ${HOST_CFLAGS:+CFLAGS="${HOST_CFLAGS}"} \
- ${HOST_CXXFLAGS:+CXXFLAGS="${HOST_CXXFLAGS}"} \
- ${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"}
-
- sed -i.old 's/-lstdc++ //g' config.status libtool
-
- # Build Bitcoin Core
- make --jobs="$JOBS" ${V:+V=1}
-
- # Check that symbol/security checks tools are sane.
- make test-security-check ${V:+V=1}
- # Perform basic security checks on a series of executables.
- make -C src --jobs=1 check-security ${V:+V=1}
- # Check that executables only contain allowed version symbols.
- make -C src --jobs=1 check-symbols ${V:+V=1}
-
- mkdir -p "$OUTDIR"
-
- # Make the os-specific installers
- case "$HOST" in
- *mingw*)
- make deploy ${V:+V=1} BGL_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
- ;;
- esac
-
- # Setup the directory where our BGL Core build for HOST will be
- # installed. This directory will also later serve as the input for our
- # binary tarballs.
- INSTALLPATH="${PWD}/installed/${DISTNAME}"
- mkdir -p "${INSTALLPATH}"
- # Install built BGL Core to $INSTALLPATH
- case "$HOST" in
- *darwin*)
- make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1}
- ;;
- *)
- make install DESTDIR="${INSTALLPATH}" ${V:+V=1}
- ;;
- esac
-
- case "$HOST" in
- *darwin*)
- make deploydir ${V:+V=1}
- mkdir -p "unsigned-app-${HOST}"
- cp --target-directory="unsigned-app-${HOST}" \
- contrib/macdeploy/detached-sig-create.sh
- mv --target-directory="unsigned-app-${HOST}" dist
- (
- cd "unsigned-app-${HOST}"
- find . -print0 \
- | sort --zero-terminated \
- | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
- | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 )
- )
- make deploy ${V:+V=1} OSX_ZIP="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
- ;;
- esac
- (
- cd installed
-
- # Prune libtool and object archives
- find . -name "lib*.la" -delete
- find . -name "lib*.a" -delete
-
- case "$HOST" in
- *darwin*) ;;
- *)
- # Split binaries from their debug symbols
- {
- find "${DISTNAME}/bin" -type f -executable -print0
- } | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg
- ;;
- esac
-
- case "$HOST" in
- *mingw*)
- cp "${DISTSRC}/doc/README_windows.txt" "${DISTNAME}/readme.txt"
- ;;
- *linux*)
- cp "${DISTSRC}/README.md" "${DISTNAME}/"
- ;;
- esac
-
- # copy over the example bitcoin.conf file. if contrib/devtools/gen-bitcoin-conf.sh
- # has not been run before buildling, this file will be a stub
- cp "${DISTSRC}/share/examples/BGL.conf" "${DISTNAME}/"
-
- cp -r "${DISTSRC}/share/rpcauth" "${DISTNAME}/share/"
-
- # Finally, deterministically produce {non-,}debug binary tarballs ready
- # for release
- case "$HOST" in
- *mingw*)
- find "${DISTNAME}" -not -name "*.dbg" -print0 \
- | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
- find "${DISTNAME}" -not -name "*.dbg" \
- | sort \
- | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" && exit 1 )
- find "${DISTNAME}" -name "*.dbg" -print0 \
- | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
- find "${DISTNAME}" -name "*.dbg" \
- | sort \
- | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" && exit 1 )
- ;;
- *linux*)
- find "${DISTNAME}" -not -name "*.dbg" -print0 \
- | sort --zero-terminated \
- | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
- | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
- find "${DISTNAME}" -name "*.dbg" -print0 \
- | sort --zero-terminated \
- | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
- | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
- ;;
- *darwin*)
- find "${DISTNAME}" -print0 \
- | sort --zero-terminated \
- | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
- | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
- ;;
- esac
- ) # $DISTSRC/installed
-
- case "$HOST" in
- *mingw*)
- cp -rf --target-directory=. contrib/windeploy
- (
- cd ./windeploy
- mkdir -p unsigned
- cp --target-directory=unsigned/ "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
- find . -print0 \
- | sort --zero-terminated \
- | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
- | gzip -9n > "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" \
- || ( rm -f "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" && exit 1 )
- )
- ;;
- esac
-) # $DISTSRC
-
-rm -rf "$ACTUAL_OUTDIR"
-mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
- || ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )
-
-(
- cd /outdir-base
- {
- echo "$GIT_ARCHIVE"
- find "$ACTUAL_OUTDIR" -type f
- } | xargs realpath --relative-base="$PWD" \
- | xargs sha256sum \
- | sort -k2 \
- | sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
-)
diff --git a/contrib/guix/libexec/codesign.sh b/contrib/guix/libexec/codesign.sh
deleted file mode 100755
index b56d2a2309..0000000000
--- a/contrib/guix/libexec/codesign.sh
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2021-2022 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-export LC_ALL=C
-set -e -o pipefail
-export TZ=UTC
-
-# Although Guix _does_ set umask when building its own packages (in our case,
-# this is all packages in manifest.scm), it does not set it for `guix
-# shell`. It does make sense for at least `guix shell --container`
-# to set umask, so if that change gets merged upstream and we bump the
-# time-machine to a commit which includes the aforementioned change, we can
-# remove this line.
-#
-# This line should be placed before any commands which creates files.
-umask 0022
-
-if [ -n "$V" ]; then
- # Print both unexpanded (-v) and expanded (-x) forms of commands as they are
- # read from this file.
- set -vx
- # Set VERBOSE for CMake-based builds
- export VERBOSE="$V"
-fi
-
-# Check that required environment variables are set
-cat << EOF
-Required environment variables as seen inside the container:
- UNSIGNED_TARBALL: ${UNSIGNED_TARBALL:?not set}
- DETACHED_SIGS_REPO: ${DETACHED_SIGS_REPO:?not set}
- DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set}
- DISTNAME: ${DISTNAME:?not set}
- HOST: ${HOST:?not set}
- SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set}
- DISTSRC: ${DISTSRC:?not set}
- OUTDIR: ${OUTDIR:?not set}
-EOF
-
-ACTUAL_OUTDIR="${OUTDIR}"
-OUTDIR="${DISTSRC}/output"
-
-git_head_version() {
- local recent_tag
- if recent_tag="$(git -C "$1" describe --exact-match HEAD 2> /dev/null)"; then
- echo "${recent_tag#v}"
- else
- git -C "$1" rev-parse --short=12 HEAD
- fi
-}
-
-CODESIGNATURE_GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}-codesignatures-$(git_head_version "$DETACHED_SIGS_REPO").tar.gz"
-
-# Create the codesignature tarball if not already there
-if [ ! -e "$CODESIGNATURE_GIT_ARCHIVE" ]; then
- mkdir -p "$(dirname "$CODESIGNATURE_GIT_ARCHIVE")"
- git -C "$DETACHED_SIGS_REPO" archive --output="$CODESIGNATURE_GIT_ARCHIVE" HEAD
-fi
-
-mkdir -p "$OUTDIR"
-
-mkdir -p "$DISTSRC"
-(
- cd "$DISTSRC"
-
- tar -xf "$UNSIGNED_TARBALL"
-
- mkdir -p codesignatures
- tar -C codesignatures -xf "$CODESIGNATURE_GIT_ARCHIVE"
-
- case "$HOST" in
- *mingw*)
- find "$PWD" -name "*-unsigned.exe" | while read -r infile; do
- infile_base="$(basename "$infile")"
-
- # Codesigned *-unsigned.exe and output to OUTDIR
- osslsigncode attach-signature \
- -in "$infile" \
- -out "${OUTDIR}/${infile_base/-unsigned}" \
- -CAfile "$GUIX_ENVIRONMENT/etc/ssl/certs/ca-certificates.crt" \
- -sigin codesignatures/win/"$infile_base".pem
- done
- ;;
- *darwin*)
- # Apply detached codesignatures to dist/ (in-place)
- signapple apply dist/Bitcoin-Qt.app codesignatures/osx/dist
-
- # Make a .zip from dist/
- cd dist/
- find . -print0 \
- | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
- find . | sort \
- | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST}.zip"
- ;;
- *)
- exit 1
- ;;
- esac
-) # $DISTSRC
-
-rm -rf "$ACTUAL_OUTDIR"
-mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
- || ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )
-
-(
- cd /outdir-base
- {
- echo "$UNSIGNED_TARBALL"
- echo "$CODESIGNATURE_GIT_ARCHIVE"
- find "$ACTUAL_OUTDIR" -type f
- } | xargs realpath --relative-base="$PWD" \
- | xargs sha256sum \
- | sort -k2 \
- | sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
-)
diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash
deleted file mode 100644
index f126b2295a..0000000000
--- a/contrib/guix/libexec/prelude.bash
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-export LC_ALL=C
-set -e -o pipefail
-
-# shellcheck source=contrib/shell/realpath.bash
-source contrib/shell/realpath.bash
-
-# shellcheck source=contrib/shell/git-utils.bash
-source contrib/shell/git-utils.bash
-
-################
-# Required non-builtin commands should be invocable
-################
-
-check_tools() {
- for cmd in "$@"; do
- if ! command -v "$cmd" > /dev/null 2>&1; then
- echo "ERR: This script requires that '$cmd' is installed and available in your \$PATH"
- exit 1
- fi
- done
-}
-
-check_tools cat env readlink dirname basename git
-
-################
-# We should be at the top directory of the repository
-################
-
-same_dir() {
- local resolved1 resolved2
- resolved1="$(bash_realpath "${1}")"
- resolved2="$(bash_realpath "${2}")"
- [ "$resolved1" = "$resolved2" ]
-}
-
-if ! same_dir "${PWD}" "$(git_root)"; then
-cat << EOF
-ERR: This script must be invoked from the top level of the git repository
-
-Hint: This may look something like:
- env FOO=BAR ./contrib/guix/guix-
-
-EOF
-exit 1
-fi
-
-################
-# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
-# across time.
-time-machine() {
- # shellcheck disable=SC2086
- guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
- --commit=f0bb724211872cd6158fce6162e0b8c73efed126 \
- --cores="$JOBS" \
- --keep-failed \
- --fallback \
- ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
- ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
- -- "$@"
-}
-
-
-################
-# Set common variables
-################
-
-VERSION="${FORCE_VERSION:-$(git_head_version)}"
-DISTNAME="${DISTNAME:-BGL-${VERSION}}"
-
-version_base_prefix="${PWD}/guix-build-"
-VERSION_BASE="${version_base_prefix}${VERSION}" # TOP
-
-DISTSRC_BASE="${DISTSRC_BASE:-${VERSION_BASE}}"
-
-OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
-
-var_base_basename="var"
-VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}"
-
-profiles_base_basename="profiles"
-PROFILES_BASE="${PROFILES_BASE:-${VAR_BASE}/${profiles_base_basename}}"
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
deleted file mode 100644
index da0891a60f..0000000000
--- a/contrib/guix/manifest.scm
+++ /dev/null
@@ -1,538 +0,0 @@
-(use-modules (gnu packages)
- (gnu packages autotools)
- ((gnu packages bash) #:select (bash-minimal))
- (gnu packages bison)
- ((gnu packages certs) #:select (nss-certs))
- ((gnu packages cmake) #:select (cmake-minimal))
- (gnu packages commencement)
- (gnu packages compression)
- (gnu packages cross-base)
- (gnu packages file)
- (gnu packages gawk)
- (gnu packages gcc)
- ((gnu packages installers) #:select (nsis-x86_64))
- ((gnu packages linux) #:select (linux-libre-headers-6.1 util-linux))
- (gnu packages llvm)
- (gnu packages mingw)
- (gnu packages moreutils)
- (gnu packages pkg-config)
- ((gnu packages python) #:select (python-minimal))
- ((gnu packages python-build) #:select (python-tomli))
- ((gnu packages python-crypto) #:select (python-asn1crypto))
- ((gnu packages tls) #:select (openssl))
- ((gnu packages version-control) #:select (git-minimal))
- (guix build-system cmake)
- (guix build-system gnu)
- (guix build-system python)
- (guix build-system trivial)
- (guix gexp)
- (guix git-download)
- ((guix licenses) #:prefix license:)
- (guix packages)
- ((guix utils) #:select (substitute-keyword-arguments)))
-
-(define-syntax-rule (search-our-patches file-name ...)
- "Return the list of absolute file names corresponding to each
-FILE-NAME found in ./patches relative to the current file."
- (parameterize
- ((%patch-path (list (string-append (dirname (current-filename)) "/patches"))))
- (list (search-patch file-name) ...)))
-
-(define building-on (string-append "--build=" (list-ref (string-split (%current-system) #\-) 0) "-guix-linux-gnu"))
-
-(define (make-cross-toolchain target
- base-gcc-for-libc
- base-kernel-headers
- base-libc
- base-gcc)
- "Create a cross-compilation toolchain package for TARGET"
- (let* ((xbinutils (cross-binutils target))
- ;; 1. Build a cross-compiling gcc without targeting any libc, derived
- ;; from BASE-GCC-FOR-LIBC
- (xgcc-sans-libc (cross-gcc target
- #:xgcc base-gcc-for-libc
- #:xbinutils xbinutils))
- ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
- ;; from BASE-KERNEL-HEADERS
- (xkernel (cross-kernel-headers target
- base-kernel-headers
- xgcc-sans-libc
- xbinutils))
- ;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL,
- ;; derived from BASE-LIBC
- (xlibc (cross-libc target
- base-libc
- xgcc-sans-libc
- xbinutils
- xkernel))
- ;; 4. Build a cross-compiling gcc targeting XLIBC, derived from
- ;; BASE-GCC
- (xgcc (cross-gcc target
- #:xgcc base-gcc
- #:xbinutils xbinutils
- #:libc xlibc)))
- ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
- ;; XGCC
- (package
- (name (string-append target "-toolchain"))
- (version (package-version xgcc))
- (source #f)
- (build-system trivial-build-system)
- (arguments '(#:builder (begin (mkdir %output) #t)))
- (propagated-inputs
- (list xbinutils
- xlibc
- xgcc
- `(,xlibc "static")
- `(,xgcc "lib")))
- (synopsis (string-append "Complete GCC tool chain for " target))
- (description (string-append "This package provides a complete GCC tool
-chain for " target " development."))
- (home-page (package-home-page xgcc))
- (license (package-license xgcc)))))
-
-(define base-gcc gcc-12)
-(define base-linux-kernel-headers linux-libre-headers-6.1)
-
-(define* (make-BGL-cross-toolchain target
- #:key
- (base-gcc-for-libc linux-base-gcc)
- (base-kernel-headers base-linux-kernel-headers)
- (base-libc glibc-2.31)
- (base-gcc linux-base-gcc))
- "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
-desirable for building BGL Core release binaries."
- (make-cross-toolchain target
- base-gcc-for-libc
- base-kernel-headers
- base-libc
- base-gcc))
-
-(define (gcc-mingw-patches gcc)
- (package-with-extra-patches gcc
- (search-our-patches "gcc-remap-guix-store.patch")))
-
-(define (binutils-mingw-patches binutils)
- (package-with-extra-patches binutils
- (search-our-patches "binutils-unaligned-default.patch")))
-
-(define (make-mingw-pthreads-cross-toolchain target)
- "Create a cross-compilation toolchain package for TARGET"
- (let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
- (pthreads-xlibc mingw-w64-x86_64-winpthreads)
- (pthreads-xgcc (cross-gcc target
- #:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
- #:xbinutils xbinutils
- #:libc pthreads-xlibc)))
- ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
- ;; XGCC
- (package
- (name (string-append target "-posix-toolchain"))
- (version (package-version pthreads-xgcc))
- (source #f)
- (build-system trivial-build-system)
- (arguments '(#:builder (begin (mkdir %output) #t)))
- (propagated-inputs
- (list xbinutils
- pthreads-xlibc
- pthreads-xgcc
- `(,pthreads-xgcc "lib")))
- (synopsis (string-append "Complete GCC tool chain for " target))
- (description (string-append "This package provides a complete GCC tool
-chain for " target " development."))
- (home-page (package-home-page pthreads-xgcc))
- (license (package-license pthreads-xgcc)))))
-
-;; While LIEF is packaged in Guix, we maintain our own package,
-;; to simplify building, and more easily apply updates.
-;; Moreover, the Guix's package uses cmake, which caused build
-;; failure; see https://github.com/bitcoin/bitcoin/pull/27296.
-(define-public python-lief
- (package
- (name "python-lief")
- (version "0.13.2")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/lief-project/LIEF")
- (commit version)))
- (file-name (git-file-name name version))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Configure build for Python bindings.
- (substitute* "api/python/config-default.toml"
- (("(ninja = )true" all m)
- (string-append m "false"))
- (("(parallel-jobs = )0" all m)
- (string-append m (number->string (parallel-job-count)))))))
- (sha256
- (base32
- "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll"))))
- (build-system python-build-system)
- (native-inputs (list cmake-minimal python-tomli))
- (arguments
- (list
- #:tests? #f ;needs network
- #:phases #~(modify-phases %standard-phases
- (add-before 'build 'change-directory
- (lambda _
- (chdir "api/python")))
- (replace 'build
- (lambda _
- (invoke "python" "setup.py" "build"))))))
- (home-page "https://github.com/lief-project/LIEF")
- (synopsis "Library to instrument executable formats")
- (description
- "@code{python-lief} is a cross platform library which can parse, modify
-and abstract ELF, PE and MachO formats.")
- (license license:asl2.0)))
-
-(define osslsigncode
- (package
- (name "osslsigncode")
- (version "2.5")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/mtrojnar/osslsigncode")
- (commit version)))
- (sha256
- (base32
- "1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz"))))
- (build-system cmake-build-system)
- (inputs (list openssl))
- (home-page "https://github.com/mtrojnar/osslsigncode")
- (synopsis "Authenticode signing and timestamping tool")
- (description "osslsigncode is a small tool that implements part of the
-functionality of the Microsoft tool signtool.exe - more exactly the Authenticode
-signing and timestamping. But osslsigncode is based on OpenSSL and cURL, and
-thus should be able to compile on most platforms where these exist.")
- (license license:gpl3+))) ; license is with openssl exception
-
-(define-public python-elfesteem
- (let ((commit "87bbd79ab7e361004c98cc8601d4e5f029fd8bd5"))
- (package
- (name "python-elfesteem")
- (version (git-version "0.1" "1" commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/LRGH/elfesteem")
- (commit commit)))
- (file-name (git-file-name name commit))
- (sha256
- (base32
- "1nyvjisvyxyxnd0023xjf5846xd03lwawp5pfzr8vrky7wwm5maz"))
- (patches (search-our-patches "elfsteem-value-error-python-39.patch"))))
- (build-system python-build-system)
- ;; There are no tests, but attempting to run python setup.py test leads to
- ;; PYTHONPATH problems, just disable the test
- (arguments '(#:tests? #f))
- (home-page "https://github.com/LRGH/elfesteem")
- (synopsis "ELF/PE/Mach-O parsing library")
- (description "elfesteem parses ELF, PE and Mach-O files.")
- (license license:lgpl2.1))))
-
-(define-public python-oscrypto
- (package
- (name "python-oscrypto")
- (version "1.2.1")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wbond/oscrypto")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1d4d8s4z340qhvb3g5m5v3436y3a71yc26wk4749q64m09kxqc3l"))
- (patches (search-our-patches "oscrypto-hard-code-openssl.patch"))))
- (build-system python-build-system)
- (native-search-paths
- (list (search-path-specification
- (variable "SSL_CERT_FILE")
- (file-type 'regular)
- (separator #f) ;single entry
- (files '("etc/ssl/certs/ca-certificates.crt")))))
-
- (propagated-inputs
- (list python-asn1crypto openssl))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'hard-code-path-to-libscrypt
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((openssl (assoc-ref inputs "openssl")))
- (substitute* "oscrypto/__init__.py"
- (("@GUIX_OSCRYPTO_USE_OPENSSL@")
- (string-append openssl "/lib/libcrypto.so" "," openssl "/lib/libssl.so")))
- #t)))
- (add-after 'unpack 'disable-broken-tests
- (lambda _
- ;; This test is broken as there is no keyboard interrupt.
- (substitute* "tests/test_trust_list.py"
- (("^(.*)class TrustListTests" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_tls.py"
- (("^(.*)class TLSTests" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- #t))
- (replace 'check
- (lambda _
- (invoke "python" "run.py" "tests")
- #t)))))
- (home-page "https://github.com/wbond/oscrypto")
- (synopsis "Compiler-free Python crypto library backed by the OS")
- (description "oscrypto is a compilation-free, always up-to-date encryption library for Python.")
- (license license:expat)))
-
-(define-public python-oscryptotests
- (package (inherit python-oscrypto)
- (name "python-oscryptotests")
- (propagated-inputs
- (list python-oscrypto))
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'hard-code-path-to-libscrypt
- (lambda* (#:key inputs #:allow-other-keys)
- (chdir "tests")
- #t)))))))
-
-(define-public python-certvalidator
- (let ((commit "a145bf25eb75a9f014b3e7678826132efbba6213"))
- (package
- (name "python-certvalidator")
- (version (git-version "0.1" "1" commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/achow101/certvalidator")
- (commit commit)))
- (file-name (git-file-name name commit))
- (sha256
- (base32
- "1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-asn1crypto
- python-oscrypto
- python-oscryptotests)) ;; certvalidator tests import oscryptotests
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-broken-tests
- (lambda _
- (substitute* "tests/test_certificate_validator.py"
- (("^(.*)class CertificateValidatorTests" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_crl_client.py"
- (("^(.*)def test_fetch_crl" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_ocsp_client.py"
- (("^(.*)def test_fetch_ocsp" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_registry.py"
- (("^(.*)def test_build_paths" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_validate.py"
- (("^(.*)def test_revocation_mode_hard" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- (substitute* "tests/test_validate.py"
- (("^(.*)def test_revocation_mode_soft" line indent)
- (string-append indent
- "@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- #t))
- (replace 'check
- (lambda _
- (invoke "python" "run.py" "tests")
- #t)))))
- (home-page "https://github.com/wbond/certvalidator")
- (synopsis "Python library for validating X.509 certificates and paths")
- (description "certvalidator is a Python library for validating X.509
-certificates or paths. Supports various options, including: validation at a
-specific moment in time, whitelisting and revocation checks.")
- (license license:expat))))
-
-(define-public python-signapple
- (let ((commit "62155712e7417aba07565c9780a80e452823ae6a"))
- (package
- (name "python-signapple")
- (version (git-version "0.1" "1" commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/achow101/signapple")
- (commit commit)))
- (file-name (git-file-name name commit))
- (sha256
- (base32
- "1nm6rm4h4m7kbq729si4cm8rzild62mk4ni8xr5zja7l33fhv3gb"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-asn1crypto
- python-oscrypto
- python-certvalidator
- python-elfesteem))
- ;; There are no tests, but attempting to run python setup.py test leads to
- ;; problems, just disable the test
- (arguments '(#:tests? #f))
- (home-page "https://github.com/achow101/signapple")
- (synopsis "Mach-O binary signature tool")
- (description "signapple is a Python tool for creating, verifying, and
-inspecting signatures in Mach-O binaries.")
- (license license:expat))))
-
-(define-public mingw-w64-base-gcc
- (package
- (inherit base-gcc)
- (arguments
- (substitute-keyword-arguments (package-arguments base-gcc)
- ((#:configure-flags flags)
- `(append ,flags
- ;; https://gcc.gnu.org/install/configure.html
- (list "--enable-threads=posix",
- "--enable-default-ssp=yes",
- building-on)))))))
-
-(define-public linux-base-gcc
- (package
- (inherit base-gcc)
- (arguments
- (substitute-keyword-arguments (package-arguments base-gcc)
- ((#:configure-flags flags)
- `(append ,flags
- ;; https://gcc.gnu.org/install/configure.html
- (list "--enable-initfini-array=yes",
- "--enable-default-ssp=yes",
- "--enable-default-pie=yes",
- building-on)))
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Given a XGCC package, return a modified package that replace each instance of
- ;; -rpath in the default system spec that's inserted by Guix with -rpath-link
- (add-after 'pre-configure 'replace-rpath-with-rpath-link
- (lambda _
- (substitute* (cons "gcc/config/rs6000/sysv4.h"
- (find-files "gcc/config"
- "^gnu-user.*\\.h$"))
- (("-rpath=") "-rpath-link="))
- #t))))))))
-
-(define-public glibc-2.31
- (let ((commit "8e30f03744837a85e33d84ccd34ed3abe30d37c3"))
- (package
- (inherit glibc) ;; 2.35
- (version "2.31")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://sourceware.org/git/glibc.git")
- (commit commit)))
- (file-name (git-file-name "glibc" commit))
- (sha256
- (base32
- "1zi0s9yy5zkisw823vivn7zlj8w6g9p3mm7lmlqiixcxdkz4dbn6"))
- (patches (search-our-patches "glibc-guix-prefix.patch"))))
- (arguments
- (substitute-keyword-arguments (package-arguments glibc)
- ((#:configure-flags flags)
- `(append ,flags
- ;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
- (list "--enable-stack-protector=all",
- "--enable-bind-now",
- "--disable-werror",
- building-on)))
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'configure 'set-etc-rpc-installation-directory
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Install the rpc data base file under `$out/etc/rpc'.
- ;; Otherwise build will fail with "Permission denied."
- ;; Can be removed when we are building 2.32 or later.
- (let ((out (assoc-ref outputs "out")))
- (substitute* "sunrpc/Makefile"
- (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
- (string-append out "/etc/rpc" suffix "\n"))
- (("^install-others =.*$")
- (string-append "install-others = " out "/etc/rpc\n")))))))))))))
-
-(packages->manifest
- (append
- (list ;; The Basics
- bash-minimal
- which
- coreutils-minimal
- util-linux
- ;; File(system) inspection
- file
- grep
- diffutils
- findutils
- ;; File transformation
- patch
- gawk
- sed
- moreutils
- ;; Compression and archiving
- tar
- gzip
- xz
- ;; Build tools
- cmake-minimal
- gnu-make
- libtool-2.4.7
- autoconf-2.71
- automake
- pkg-config
- bison
- ;; Scripting
- python-minimal ;; (3.9)
- ;; Git
- git-minimal
- ;; Tests
- python-lief)
- (let ((target (getenv "HOST")))
- (cond ((string-suffix? "-mingw32" target)
- (list ;; Native GCC 12 toolchain
- gcc-toolchain-12
- zip
- (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
- nsis-x86_64
- nss-certs
- osslsigncode))
- ((string-contains target "-linux-")
- (list ;; Native GCC 12 toolchain
- gcc-toolchain-12
- (list gcc-toolchain-12 "static")
- (make-BGL-cross-toolchain target)))
- ((string-contains target "darwin")
- (list ;; Native GCC 11 toolchain
- gcc-toolchain-11
- clang-toolchain-18
- lld-18
- (make-lld-wrapper lld-18 #:lld-as-ld? #t)
- python-signapple
- zip))
- (else '())))))
diff --git a/contrib/guix/patches/binutils-unaligned-default.patch b/contrib/guix/patches/binutils-unaligned-default.patch
deleted file mode 100644
index d1bc71aee1..0000000000
--- a/contrib/guix/patches/binutils-unaligned-default.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit 6537181f59ed186a341db621812a6bc35e22eaf6
-Author: fanquake
-Date: Wed Apr 10 12:15:52 2024 +0200
-
- build: turn on -muse-unaligned-vector-move by default
-
- This allows us to avoid (more invasively) patching GCC, to avoid
- unaligned instruction use.
-
-diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
-index e0632681477..14a9653abdf 100644
---- a/gas/config/tc-i386.c
-+++ b/gas/config/tc-i386.c
-@@ -801,7 +801,7 @@ static unsigned int no_cond_jump_promotion = 0;
- static unsigned int sse2avx;
-
- /* Encode aligned vector move as unaligned vector move. */
--static unsigned int use_unaligned_vector_move;
-+static unsigned int use_unaligned_vector_move = 1;
-
- /* Encode scalar AVX instructions with specific vector length. */
- static enum
diff --git a/contrib/guix/patches/elfsteem-value-error-python-39.patch b/contrib/guix/patches/elfsteem-value-error-python-39.patch
deleted file mode 100644
index 21e1228afd..0000000000
--- a/contrib/guix/patches/elfsteem-value-error-python-39.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/examples/otool.py b/examples/otool.py
-index 2b8efc0..d797b2e 100755
---- a/examples/otool.py
-+++ b/examples/otool.py
-@@ -342,7 +342,7 @@ if __name__ == '__main__':
- try:
- e = macho_init.MACHO(raw,
- parseSymbols = False)
-- except ValueError, err:
-+ except ValueError as err:
- print("%s:" %file)
- print(" %s" % err)
- continue
diff --git a/contrib/guix/patches/gcc-broken-longjmp.patch b/contrib/guix/patches/gcc-broken-longjmp.patch
deleted file mode 100644
index 56568813c0..0000000000
--- a/contrib/guix/patches/gcc-broken-longjmp.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-commit eb5698897c52702498938592d7f76e67d126451f
-Author: Eric Botcazou
-Date: Wed May 5 22:48:51 2021 +0200
-
- Fix PR target/100402
-
- This is a regression for 64-bit Windows present from mainline down to the 9
- branch and introduced by the fix for PR target/99234. Again SEH, but with
- a twist related to the way MinGW implements setjmp/longjmp, which turns out
- to be piggybacked on SEH with recent versions of MinGW, i.e. the longjmp
- performs a bona-fide unwinding of the stack, because it calls RtlUnwindEx
- with the second argument initially passed to setjmp, which is the result of
- __builtin_frame_address (0) in the MinGW header file:
-
- define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
-
- This means that we directly expose the frame pointer to the SEH machinery
- here (unlike with regular exception handling where we use an intermediate
- CFA) and thus that we cannot do whatever we want with it. The old code
- would leave it unaligned, i.e. not multiple of 16, whereas the new code
- aligns it, but this breaks for some reason; at least it appears that a
- .seh_setframe directive with 0 as second argument always works, so the
- fix aligns it this way.
-
- gcc/
- PR target/100402
- * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
- always return the establisher frame for __builtin_frame_address (0).
- gcc/testsuite/
- * gcc.c-torture/execute/20210505-1.c: New test.
-
- This patch can be dropped when we are building with GCC 10.4.0 or later.
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 2f838840e96..06ad1b2274e 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6356,12 +6356,29 @@ ix86_compute_frame_layout (void)
- area, see the SEH code in config/i386/winnt.c for the rationale. */
- frame->hard_frame_pointer_offset = frame->sse_reg_save_offset;
-
-- /* If we can leave the frame pointer where it is, do so. Also, return
-+ /* If we can leave the frame pointer where it is, do so; however return
- the establisher frame for __builtin_frame_address (0) or else if the
-- frame overflows the SEH maximum frame size. */
-+ frame overflows the SEH maximum frame size.
-+
-+ Note that the value returned by __builtin_frame_address (0) is quite
-+ constrained, because setjmp is piggybacked on the SEH machinery with
-+ recent versions of MinGW:
-+
-+ # elif defined(__SEH__)
-+ # if defined(__aarch64__) || defined(_ARM64_)
-+ # define setjmp(BUF) _setjmp((BUF), __builtin_sponentry())
-+ # elif (__MINGW_GCC_VERSION < 40702)
-+ # define setjmp(BUF) _setjmp((BUF), mingw_getsp())
-+ # else
-+ # define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
-+ # endif
-+
-+ and the second argument passed to _setjmp, if not null, is forwarded
-+ to the TargetFrame parameter of RtlUnwindEx by longjmp (after it has
-+ built an ExceptionRecord on the fly describing the setjmp buffer). */
- const HOST_WIDE_INT diff
- = frame->stack_pointer_offset - frame->hard_frame_pointer_offset;
-- if (diff <= 255)
-+ if (diff <= 255 && !crtl->accesses_prior_frames)
- {
- /* The resulting diff will be a multiple of 16 lower than 255,
- i.e. at most 240 as required by the unwind data structure. */
diff --git a/contrib/guix/patches/gcc-remap-guix-store.patch b/contrib/guix/patches/gcc-remap-guix-store.patch
deleted file mode 100644
index a47ef7a2df..0000000000
--- a/contrib/guix/patches/gcc-remap-guix-store.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From aad25427e74f387412e8bc9a9d7bbc6c496c792f Mon Sep 17 00:00:00 2001
-From: Andrew Chow