mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-23 16:44:52 +01:00
Compare commits
243 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d6426c296 | ||
|
|
46d9b9091b | ||
|
|
b2026fa290 | ||
|
|
3226616493 | ||
|
|
8bcb90d7e3 | ||
|
|
abf4a6eeae | ||
|
|
398c176ea8 | ||
|
|
d82fc69829 | ||
|
|
513cef75ee | ||
|
|
eea16f7de7 | ||
|
|
6b3c1dbc5c | ||
|
|
d1b5d4e9ca | ||
|
|
2d7ebd2d91 | ||
|
|
a8bb76b61f | ||
|
|
666aec7d49 | ||
|
|
6f23ead4a2 | ||
|
|
9d9baafc6f | ||
|
|
22ab141243 | ||
|
|
118abf4c30 | ||
|
|
f6d49d0a09 | ||
|
|
5750355139 | ||
|
|
78d93effd0 | ||
|
|
4a034cbeb4 | ||
|
|
6ded1fe117 | ||
|
|
4e8b64b181 | ||
|
|
773e4cda94 | ||
|
|
4339787379 | ||
|
|
c7f290b826 | ||
|
|
a08c3cc51c | ||
|
|
06424fb004 | ||
|
|
0f0378fe3c | ||
|
|
643385b22d | ||
|
|
3b2dcc8b9a | ||
|
|
b4286cf354 | ||
|
|
5057b9a6ff | ||
|
|
85ec6c6882 | ||
|
|
544f902b2a | ||
|
|
e826c3daa5 | ||
|
|
835b5b8bb1 | ||
|
|
a91567a980 | ||
|
|
819ee09af3 | ||
|
|
894a3cbe42 | ||
|
|
82c60a3151 | ||
|
|
849993377d | ||
|
|
f9f3e8b686 | ||
|
|
af086431e8 | ||
|
|
0a649d07c9 | ||
|
|
f3089fb2cf | ||
|
|
1faf918a16 | ||
|
|
954c1a55e4 | ||
|
|
301aa5d814 | ||
|
|
f63b8e960d | ||
|
|
7e1eca4882 | ||
|
|
f2bd79f80c | ||
|
|
461dd13faf | ||
|
|
9bc4afb62c | ||
|
|
61cdc04a83 | ||
|
|
1288d44804 | ||
|
|
569ceb0df4 | ||
|
|
4c940d4789 | ||
|
|
9b95ab5e9d | ||
|
|
e97588fc3d | ||
|
|
324caa8497 | ||
|
|
2717331981 | ||
|
|
a0e438bd49 | ||
|
|
7c6be9acae | ||
|
|
ea40fa95d9 | ||
|
|
5513516241 | ||
|
|
f9939cdbe0 | ||
|
|
0fba5ae021 | ||
|
|
10cbf2255d | ||
|
|
fd784f2774 | ||
|
|
084c95a18c | ||
|
|
37d115c67e | ||
|
|
b0d88bcc50 | ||
|
|
99ab2e70e7 | ||
|
|
6448ebb5a7 | ||
|
|
162c009c1d | ||
|
|
fcac8022d8 | ||
|
|
16b1710d97 | ||
|
|
027a60d218 | ||
|
|
65dc198d2c | ||
|
|
89fe999cda | ||
|
|
0034dcfba9 | ||
|
|
eb1574af0c | ||
|
|
f9f1ca5445 | ||
|
|
9dd7efc8c3 | ||
|
|
bbdab3ef7b | ||
|
|
da30ca0efa | ||
|
|
a0ae3fc8a7 | ||
|
|
1c1970fb45 | ||
|
|
3a7e093f94 | ||
|
|
567c3ee3cb | ||
|
|
6b5396c4b1 | ||
|
|
03da7aff99 | ||
|
|
4e3cfa660d | ||
|
|
c5196bc9c4 | ||
|
|
0022e25333 | ||
|
|
206f5902db | ||
|
|
dfdd407c42 | ||
|
|
11538160b3 | ||
|
|
4ed7a51642 | ||
|
|
acfa83d9d0 | ||
|
|
81751341e9 | ||
|
|
7c3820ff63 | ||
|
|
dfe4e19f66 | ||
|
|
273ffda2c8 | ||
|
|
9cde68fa98 | ||
|
|
25f975b8df | ||
|
|
24c793d06c | ||
|
|
0b6b096421 | ||
|
|
a0992a842e | ||
|
|
41262cc4d5 | ||
|
|
4987c03531 | ||
|
|
837c5c7fd8 | ||
|
|
b9e637bd0e | ||
|
|
2b9738a083 | ||
|
|
4e8abca445 | ||
|
|
a08886d564 | ||
|
|
264418f80c | ||
|
|
a18b53f99e | ||
|
|
9437415024 | ||
|
|
3cd8612cd7 | ||
|
|
565af03c37 | ||
|
|
4c2d285b70 | ||
|
|
06eb42d83c | ||
|
|
735ffad864 | ||
|
|
4bf77955ed | ||
|
|
951b349af1 | ||
|
|
c6fe6971bf | ||
|
|
380b5aded2 | ||
|
|
8063d55446 | ||
|
|
f25dc84b28 | ||
|
|
411e15194b | ||
|
|
5e327e6703 | ||
|
|
79e1a3c9c6 | ||
|
|
313023369b | ||
|
|
0a4671d5eb | ||
|
|
204b965915 | ||
|
|
ef380a454c | ||
|
|
5300295083 | ||
|
|
730886b92b | ||
|
|
f798c317a0 | ||
|
|
bc2147c884 | ||
|
|
58b1a65ab0 | ||
|
|
f85d41c224 | ||
|
|
84c0c0e64b | ||
|
|
83ee49b1dc | ||
|
|
e5a7575a6d | ||
|
|
59a83fb8d1 | ||
|
|
9f3690b978 | ||
|
|
8a4a938db5 | ||
|
|
3a57bfaaf9 | ||
|
|
f82015ccfc | ||
|
|
222fbfcc6a | ||
|
|
d360a6ef56 | ||
|
|
ef2a013e31 | ||
|
|
4b656e2023 | ||
|
|
1c0e19b93a | ||
|
|
eafea2393d | ||
|
|
a3c1939d6e | ||
|
|
a990c1002b | ||
|
|
5987c1b6ab | ||
|
|
e37a70bf71 | ||
|
|
983b268768 | ||
|
|
0922f6bbc3 | ||
|
|
5697605414 | ||
|
|
4c7ed36c96 | ||
|
|
3e23b47a6f | ||
|
|
616baf3c27 | ||
|
|
ef6111bd18 | ||
|
|
8246c6a65f | ||
|
|
a18085a18b | ||
|
|
7264459c0d | ||
|
|
27c533052c | ||
|
|
1b51d750ad | ||
|
|
aea8a394b1 | ||
|
|
23e76ef520 | ||
|
|
876a7b2db5 | ||
|
|
78688c8413 | ||
|
|
c899334e36 | ||
|
|
247ee59f55 | ||
|
|
4a1143b083 | ||
|
|
646fa1d028 | ||
|
|
17b31fc802 | ||
|
|
e34b6fbcad | ||
|
|
142153ee42 | ||
|
|
589b56192f | ||
|
|
a0d1f69b55 | ||
|
|
6c0f26d3bd | ||
|
|
e685b4eca2 | ||
|
|
25aa15ee7f | ||
|
|
cf034172bf | ||
|
|
c966158426 | ||
|
|
6c4e3de2ac | ||
|
|
edd4073d70 | ||
|
|
cc2fcdfc5e | ||
|
|
caec3cc41b | ||
|
|
fabf4ff237 | ||
|
|
f9d2c67a0c | ||
|
|
6ed087dede | ||
|
|
2f6c802b54 | ||
|
|
f4d9546425 | ||
|
|
5aa4956cd3 | ||
|
|
3665310808 | ||
|
|
4ed5c34abb | ||
|
|
3dbd2b3d17 | ||
|
|
64552c83b2 | ||
|
|
85f3e1de68 | ||
|
|
ca70d5cb25 | ||
|
|
3fad438b83 | ||
|
|
fc60337733 | ||
|
|
f490f5562d | ||
|
|
87e53781f7 | ||
|
|
56ed476a29 | ||
|
|
977db54233 | ||
|
|
190e718e83 | ||
|
|
50108104d7 | ||
|
|
1344d3bd0f | ||
|
|
f80ab9a5d8 | ||
|
|
7c05ef5673 | ||
|
|
c0756b758f | ||
|
|
477345207b | ||
|
|
7bc7af9951 | ||
|
|
288163ea0f | ||
|
|
a3060483fa | ||
|
|
d6db87165c | ||
|
|
74df31cb0b | ||
|
|
8082f88d1a | ||
|
|
472d582bfe | ||
|
|
a4c30bd00a | ||
|
|
4e438d326e | ||
|
|
7ff0b02161 | ||
|
|
5ebcb59fdb | ||
|
|
458655bca8 | ||
|
|
15ecae31a8 | ||
|
|
80c5d57bd1 | ||
|
|
e9e6825b8c | ||
|
|
47e2fa86dc | ||
|
|
21f423939e | ||
|
|
86a3ce6209 | ||
|
|
95c21b1fdd | ||
|
|
153bd443ec |
2
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
2
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
@@ -28,7 +28,7 @@ body:
|
||||
id: useful-skills
|
||||
attributes:
|
||||
label: Useful Skills
|
||||
description: For example, “`std::thread`”, “Qt6 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
|
||||
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
|
||||
|
||||
26
.github/actions/configure-docker/action.yml
vendored
26
.github/actions/configure-docker/action.yml
vendored
@@ -1,24 +1,12 @@
|
||||
name: 'Configure Docker'
|
||||
description: 'Set up Docker build driver and configure build cache args'
|
||||
inputs:
|
||||
cache-provider:
|
||||
description: 'gha or cirrus cache provider'
|
||||
use-cirrus:
|
||||
description: 'Use cirrus cache'
|
||||
required: true
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Check inputs
|
||||
shell: bash
|
||||
run: |
|
||||
# We expect only gha or cirrus as inputs to cache-provider
|
||||
case "${{ inputs.cache-provider }}" in
|
||||
gha|cirrus)
|
||||
;;
|
||||
*)
|
||||
echo "::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}"
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
@@ -31,12 +19,8 @@ runs:
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
Object.keys(process.env).forEach(function (key) {
|
||||
if (key.startsWith('ACTIONS_')) {
|
||||
core.info(`Exporting ${key}`);
|
||||
core.exportVariable(key, process.env[key]);
|
||||
}
|
||||
});
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
|
||||
|
||||
- name: Construct docker build cache args
|
||||
shell: bash
|
||||
@@ -48,7 +32,7 @@ runs:
|
||||
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
|
||||
|
||||
# Use cirrus cache host
|
||||
if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then
|
||||
if [[ ${{ inputs.use-cirrus }} == 'true' ]]; then
|
||||
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
|
||||
else
|
||||
url_args=""
|
||||
|
||||
@@ -17,7 +17,7 @@ runs:
|
||||
- name: Set cache hashes
|
||||
shell: bash
|
||||
run: |
|
||||
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
echo "PREVIOUS_RELEASES_HASH=$(git ls-tree HEAD test/get_previous_releases.py | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Get container name
|
||||
|
||||
67
.github/ci-test-each-commit-exec.py
vendored
67
.github/ci-test-each-commit-exec.py
vendored
@@ -1,67 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import shlex
|
||||
|
||||
|
||||
def run(cmd, **kwargs):
|
||||
print("+ " + shlex.join(cmd), flush=True)
|
||||
try:
|
||||
return subprocess.run(cmd, check=True, **kwargs)
|
||||
except Exception as e:
|
||||
sys.exit(e)
|
||||
|
||||
|
||||
def main():
|
||||
print("Running tests on commit ...")
|
||||
run(["git", "log", "-1"])
|
||||
|
||||
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
|
||||
|
||||
run([
|
||||
"cmake",
|
||||
"-B",
|
||||
"build",
|
||||
"-Werror=dev",
|
||||
# Use clang++, because it is a bit faster and uses less memory than g++
|
||||
"-DCMAKE_C_COMPILER=clang",
|
||||
"-DCMAKE_CXX_COMPILER=clang++",
|
||||
# Use mold, because it is faster than the default linker
|
||||
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold",
|
||||
# Use Debug build type for more debug checks, but enable optimizations
|
||||
"-DAPPEND_CXXFLAGS='-O3 -g2'",
|
||||
"-DAPPEND_CFLAGS='-O3 -g2'",
|
||||
"-DCMAKE_BUILD_TYPE=Debug",
|
||||
"-DWERROR=ON",
|
||||
"-DWITH_ZMQ=ON",
|
||||
"-DBUILD_GUI=ON",
|
||||
"-DBUILD_BENCH=ON",
|
||||
"-DBUILD_FUZZ_BINARY=ON",
|
||||
"-DWITH_USDT=ON",
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
|
||||
])
|
||||
run(["cmake", "--build", "build", "-j", str(num_procs)])
|
||||
run([
|
||||
"ctest",
|
||||
"--output-on-failure",
|
||||
"--stop-on-failure",
|
||||
"--test-dir",
|
||||
"build",
|
||||
"-j",
|
||||
str(num_procs),
|
||||
])
|
||||
run([
|
||||
sys.executable,
|
||||
"./build/test/functional/test_runner.py",
|
||||
"-j",
|
||||
str(num_procs * 2),
|
||||
"--combinedlogslen=99999999",
|
||||
])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
209
.github/workflows/ci.yml
vendored
209
.github/workflows/ci.yml
vendored
@@ -1,6 +1,6 @@
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit.
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
name: CI
|
||||
on:
|
||||
@@ -22,26 +22,20 @@ env:
|
||||
CIRRUS_CACHE_HOST: http://127.0.0.1:12321/ # When using Cirrus Runners this host can be used by the docker `gha` build cache type.
|
||||
REPO_USE_CIRRUS_RUNNERS: 'bitcoin/bitcoin' # Use cirrus runners and cache for this repo, instead of falling back to the slow GHA runners
|
||||
|
||||
defaults:
|
||||
run:
|
||||
# Enforce fail-fast behavior for all platforms.
|
||||
# See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
runners:
|
||||
name: 'determine runners'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
provider: ${{ steps.runners.outputs.provider }}
|
||||
use-cirrus-runners: ${{ steps.runners.outputs.use-cirrus-runners }}
|
||||
steps:
|
||||
- id: runners
|
||||
run: |
|
||||
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then
|
||||
echo "provider=cirrus" >> "$GITHUB_OUTPUT"
|
||||
echo "use-cirrus-runners=true" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice title=Runner Selection::Using Cirrus Runners"
|
||||
else
|
||||
echo "provider=gha" >> "$GITHUB_OUTPUT"
|
||||
echo "use-cirrus-runners=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice title=Runner Selection::Using GitHub-hosted runners"
|
||||
fi
|
||||
|
||||
@@ -55,7 +49,7 @@ jobs:
|
||||
steps:
|
||||
- name: Determine fetch depth
|
||||
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||
@@ -88,18 +82,14 @@ jobs:
|
||||
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: |
|
||||
git fetch origin "${GITHUB_BASE_REF}"
|
||||
git config user.email "ci@example.com"
|
||||
git config user.name "CI"
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang mold ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev capnproto libcapnp-dev -y
|
||||
sudo pip3 install --break-system-packages pycapnp
|
||||
sudo apt-get install clang ccache build-essential cmake pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-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
|
||||
git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && python3 ./.github/ci-test-each-commit-exec.py && git reset --hard" ${{ env.TEST_BASE }}
|
||||
# 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 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999" ${{ env.TEST_BASE }}
|
||||
|
||||
macos-native-arm64:
|
||||
name: ${{ matrix.job-name }}
|
||||
@@ -155,12 +145,7 @@ jobs:
|
||||
run: |
|
||||
# A workaround for "The `brew link` step did not complete successfully" error.
|
||||
brew install --quiet python@3 || brew link --overwrite python@3
|
||||
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp
|
||||
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
git clone -b v2.1.0 https://github.com/capnproto/pycapnp
|
||||
pip3 install ./pycapnp -C force-bundled-libcapnp=True --break-system-packages
|
||||
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@5 qrencode
|
||||
|
||||
- name: Set Ccache directory
|
||||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
|
||||
@@ -186,8 +171,10 @@ jobs:
|
||||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
|
||||
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
|
||||
|
||||
windows-native-dll:
|
||||
win64-native:
|
||||
name: ${{ matrix.job-name }}
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
|
||||
# See: https://github.com/actions/runner-images#available-images.
|
||||
runs-on: windows-2022
|
||||
|
||||
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||
@@ -202,11 +189,11 @@ jobs:
|
||||
job-type: [standard, fuzz]
|
||||
include:
|
||||
- job-type: standard
|
||||
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
|
||||
job-name: 'Windows native, VS 2022'
|
||||
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
|
||||
job-name: 'Win64 native, VS 2022'
|
||||
- job-type: fuzz
|
||||
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
|
||||
job-name: 'Windows native, fuzz, VS 2022'
|
||||
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
|
||||
job-name: 'Win64 native fuzz, VS 2022'
|
||||
|
||||
steps:
|
||||
- *CHECKOUT
|
||||
@@ -218,7 +205,6 @@ jobs:
|
||||
arch: x64
|
||||
|
||||
- name: Get tool information
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake -version | Tee-Object -FilePath "cmake_version"
|
||||
Write-Output "---"
|
||||
@@ -226,11 +212,12 @@ jobs:
|
||||
$env:VCToolsVersion | Tee-Object -FilePath "toolset_version"
|
||||
py -3 --version
|
||||
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
|
||||
bash --version
|
||||
|
||||
- name: Using vcpkg with MSBuild
|
||||
shell: bash
|
||||
run: |
|
||||
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
|
||||
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
|
||||
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
|
||||
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
|
||||
|
||||
@@ -249,7 +236,7 @@ jobs:
|
||||
|
||||
- name: Generate build system
|
||||
run: |
|
||||
cmake -B build -Werror=dev --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
|
||||
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
|
||||
|
||||
- name: Save vcpkg binary cache
|
||||
uses: actions/cache/save@v4
|
||||
@@ -261,44 +248,32 @@ jobs:
|
||||
- name: Build
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake --build . -j $NUMBER_OF_PROCESSORS --config Release
|
||||
|
||||
- name: Get bitcoind manifest
|
||||
if: matrix.job-type == 'standard'
|
||||
working-directory: build
|
||||
run: |
|
||||
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -out:bitcoind.manifest
|
||||
cat bitcoind.manifest
|
||||
echo
|
||||
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -validate_manifest
|
||||
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
|
||||
|
||||
- name: Run test suite
|
||||
if: matrix.job-type == 'standard'
|
||||
working-directory: build
|
||||
env:
|
||||
QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
|
||||
run: |
|
||||
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
|
||||
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
|
||||
|
||||
- name: Run functional tests
|
||||
if: matrix.job-type == 'standard'
|
||||
working-directory: build
|
||||
env:
|
||||
BITCOIN_BIN: '${{ github.workspace }}\build\bin\Release\bitcoin.exe'
|
||||
BITCOIND: '${{ github.workspace }}\build\bin\Release\bitcoind.exe'
|
||||
BITCOINCLI: '${{ github.workspace }}\build\bin\Release\bitcoin-cli.exe'
|
||||
BITCOINTX: '${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe'
|
||||
BITCOINUTIL: '${{ github.workspace }}\build\bin\Release\bitcoin-util.exe'
|
||||
BITCOINWALLET: '${{ github.workspace }}\build\bin\Release\bitcoin-wallet.exe'
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
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}
|
||||
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 corpora
|
||||
if: matrix.job-type == 'fuzz'
|
||||
run: |
|
||||
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${RUNNER_TEMP}/qa-assets"
|
||||
cd "${RUNNER_TEMP}/qa-assets"
|
||||
echo "Using qa-assets repo from commit ..."
|
||||
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 tests
|
||||
@@ -306,123 +281,14 @@ jobs:
|
||||
working-directory: build
|
||||
env:
|
||||
BITCOINFUZZ: '${{ github.workspace }}\build\bin\Release\fuzz.exe'
|
||||
shell: cmd
|
||||
run: |
|
||||
py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
|
||||
|
||||
windows-cross:
|
||||
name: 'Linux->Windows cross, no tests'
|
||||
needs: runners
|
||||
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
|
||||
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
FILE_ENV: './ci/test/00_setup_env_win64.sh'
|
||||
DANGER_CI_ON_HOST_FOLDERS: 1
|
||||
|
||||
steps:
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Configure environment
|
||||
uses: ./.github/actions/configure-environment
|
||||
|
||||
- name: Restore caches
|
||||
id: restore-cache
|
||||
uses: ./.github/actions/restore-caches
|
||||
|
||||
- name: Configure Docker
|
||||
uses: ./.github/actions/configure-docker
|
||||
with:
|
||||
cache-provider: ${{ needs.runners.outputs.provider }}
|
||||
|
||||
- name: CI script
|
||||
run: ./ci/test_run_all.sh
|
||||
|
||||
- name: Save caches
|
||||
uses: ./.github/actions/save-caches
|
||||
|
||||
- name: Upload built executables
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
|
||||
path: |
|
||||
${{ env.BASE_BUILD_DIR }}/bin/*.exe
|
||||
${{ env.BASE_BUILD_DIR }}/src/secp256k1/bin/*.exe
|
||||
${{ env.BASE_BUILD_DIR }}/src/univalue/*.exe
|
||||
${{ env.BASE_BUILD_DIR }}/test/config.ini
|
||||
|
||||
windows-native-test:
|
||||
name: 'Windows, test cross-built'
|
||||
runs-on: windows-2022
|
||||
needs: windows-cross
|
||||
|
||||
env:
|
||||
PYTHONUTF8: 1
|
||||
TEST_RUNNER_TIMEOUT_FACTOR: 40
|
||||
|
||||
steps:
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Download built executables
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
|
||||
|
||||
- name: Run bitcoind.exe
|
||||
run: ./bin/bitcoind.exe -version
|
||||
|
||||
- name: Find mt.exe tool
|
||||
shell: pwsh
|
||||
run: |
|
||||
$sdk_dir = (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' -Name KitsRoot10).KitsRoot10
|
||||
$sdk_latest = (Get-ChildItem "$sdk_dir\bin" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object Name -Descending | Select-Object -First 1).Name
|
||||
"MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Get bitcoind manifest
|
||||
shell: pwsh
|
||||
run: |
|
||||
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
|
||||
Get-Content bitcoind.manifest
|
||||
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
|
||||
|
||||
- name: Run unit tests
|
||||
# Can't use ctest here like other jobs as we don't have a CMake build tree.
|
||||
run: |
|
||||
./bin/test_bitcoin.exe -l test_suite # Intentionally run sequentially here, to catch test case failures caused by dirty global state from prior test cases.
|
||||
./src/secp256k1/bin/exhaustive_tests.exe
|
||||
./src/secp256k1/bin/noverify_tests.exe
|
||||
./src/secp256k1/bin/tests.exe
|
||||
./src/univalue/object.exe
|
||||
./src/univalue/unitester.exe
|
||||
|
||||
- name: Run benchmarks
|
||||
run: ./bin/bench_bitcoin.exe -sanity-check
|
||||
|
||||
- name: Adjust paths in test/config.ini
|
||||
shell: pwsh
|
||||
run: |
|
||||
(Get-Content "test/config.ini") -replace '(?<=^SRCDIR=).*', '${{ github.workspace }}' -replace '(?<=^BUILDDIR=).*', '${{ github.workspace }}' -replace '(?<=^RPCAUTH=).*', '${{ github.workspace }}/share/rpcauth/rpcauth.py' | Set-Content "test/config.ini"
|
||||
Get-Content "test/config.ini"
|
||||
|
||||
- name: Set previous release directory
|
||||
run: |
|
||||
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Get previous releases
|
||||
working-directory: test
|
||||
run: ./get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
|
||||
|
||||
- name: Run functional tests
|
||||
env:
|
||||
# TODO: Fix the excluded test and re-enable it.
|
||||
# feature_unsupported_utxo_db.py fails on windows because of emojis in the test data directory
|
||||
EXCLUDE: '--exclude wallet_multiwallet.py,feature_unsupported_utxo_db.py'
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
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 $EXCLUDE $TEST_RUNNER_EXTRA
|
||||
py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
|
||||
|
||||
ci-matrix:
|
||||
name: ${{ matrix.name }}
|
||||
needs: runners
|
||||
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && matrix.cirrus-runner || matrix.fallback-runner }}
|
||||
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && matrix.cirrus-runner || matrix.fallback-runner }}
|
||||
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||
timeout-minutes: ${{ matrix.timeout-minutes }}
|
||||
|
||||
@@ -439,7 +305,12 @@ jobs:
|
||||
fallback-runner: 'ubuntu-24.04-arm'
|
||||
timeout-minutes: 120
|
||||
file-env: './ci/test/00_setup_env_arm.sh'
|
||||
provider: 'gha'
|
||||
|
||||
- name: 'win64 Cross'
|
||||
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
|
||||
fallback-runner: 'ubuntu-24.04'
|
||||
timeout-minutes: 120
|
||||
file-env: './ci/test/00_setup_env_win64.sh'
|
||||
|
||||
- name: 'ASan + LSan + UBSan + integer, no depends, USDT'
|
||||
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
|
||||
@@ -459,11 +330,11 @@ jobs:
|
||||
timeout-minutes: 120
|
||||
file-env: './ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh'
|
||||
|
||||
- name: 'no IPC, i686, DEBUG'
|
||||
- name: 'i686, multiprocess, DEBUG'
|
||||
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
|
||||
fallback-runner: 'ubuntu-24.04'
|
||||
timeout-minutes: 120
|
||||
file-env: './ci/test/00_setup_env_i686_no_ipc.sh'
|
||||
file-env: './ci/test/00_setup_env_i686_multiprocess.sh'
|
||||
|
||||
- name: 'fuzzer,address,undefined,integer, no depends'
|
||||
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
|
||||
@@ -514,7 +385,7 @@ jobs:
|
||||
- name: Configure Docker
|
||||
uses: ./.github/actions/configure-docker
|
||||
with:
|
||||
cache-provider: ${{ matrix.provider || needs.runners.outputs.provider }}
|
||||
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
|
||||
|
||||
- name: Enable bpfcc script
|
||||
if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }}
|
||||
@@ -536,7 +407,7 @@ jobs:
|
||||
lint:
|
||||
name: 'lint'
|
||||
needs: runners
|
||||
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xs' || 'ubuntu-24.04' }}
|
||||
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xs' || 'ubuntu-24.04' }}
|
||||
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
@@ -551,7 +422,7 @@ jobs:
|
||||
- name: Configure Docker
|
||||
uses: ./.github/actions/configure-docker
|
||||
with:
|
||||
cache-provider: ${{ needs.runners.outputs.provider }}
|
||||
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
|
||||
|
||||
- name: CI script
|
||||
run: |
|
||||
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,8 +1,3 @@
|
||||
# Patterns that are specific to a text editor, IDE, operating system, or user
|
||||
# environment are not added here. They should be added to your local gitignore
|
||||
# file instead:
|
||||
# https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer
|
||||
|
||||
# Build subdirectories.
|
||||
/*build*
|
||||
!/build-aux
|
||||
@@ -20,8 +15,8 @@
|
||||
# Previous releases
|
||||
/releases
|
||||
|
||||
# cargo default target dir
|
||||
target/
|
||||
#build tests
|
||||
test/lint/test_runner/target/
|
||||
|
||||
/guix-build-*
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-030x]
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-029x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.xlf
|
||||
source_file = src/qt/locale/bitcoin_en.xlf
|
||||
source_lang = en
|
||||
|
||||
213
CMakeLists.txt
213
CMakeLists.txt
@@ -27,12 +27,12 @@ get_directory_property(precious_variables CACHE_VARIABLES)
|
||||
# Project / Package metadata
|
||||
#=============================
|
||||
set(CLIENT_NAME "Bitcoin Core")
|
||||
set(CLIENT_VERSION_MAJOR 30)
|
||||
set(CLIENT_VERSION_MAJOR 29)
|
||||
set(CLIENT_VERSION_MINOR 2)
|
||||
set(CLIENT_VERSION_BUILD 0)
|
||||
set(CLIENT_VERSION_RC 0)
|
||||
set(CLIENT_VERSION_IS_RELEASE "true")
|
||||
set(COPYRIGHT_YEAR "2026")
|
||||
set(COPYRIGHT_YEAR "2025")
|
||||
|
||||
# During the enabling of the CXX and CXXOBJ languages, we modify
|
||||
# CMake's compiler/linker invocation strings by appending the content
|
||||
@@ -94,12 +94,11 @@ endif()
|
||||
#=============================
|
||||
include(CMakeDependentOption)
|
||||
# When adding a new option, end the <help_text> with a full stop for consistency.
|
||||
option(BUILD_BITCOIN_BIN "Build bitcoin executable." ON)
|
||||
option(BUILD_DAEMON "Build bitcoind executable." ON)
|
||||
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
|
||||
option(BUILD_CLI "Build bitcoin-cli executable." ON)
|
||||
|
||||
option(BUILD_TESTS "Build test_bitcoin and other unit test executables." ON)
|
||||
option(BUILD_TESTS "Build test_bitcoin executable." ON)
|
||||
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
|
||||
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
|
||||
|
||||
@@ -107,16 +106,35 @@ option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable."
|
||||
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
|
||||
|
||||
option(ENABLE_WALLET "Enable wallet." ON)
|
||||
if(ENABLE_WALLET)
|
||||
option(WITH_SQLITE "Enable SQLite wallet support." ${ENABLE_WALLET})
|
||||
if(WITH_SQLITE)
|
||||
if(VCPKG_TARGET_TRIPLET)
|
||||
# Use of the `unofficial::` namespace is a vcpkg package manager convention.
|
||||
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||
else()
|
||||
find_package(SQLite3 3.7.17 REQUIRED)
|
||||
endif()
|
||||
set(USE_SQLITE ON)
|
||||
endif()
|
||||
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
|
||||
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
|
||||
if(WITH_BDB)
|
||||
find_package(BerkeleyDB 4.8 MODULE REQUIRED)
|
||||
set(USE_BDB ON)
|
||||
if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8)
|
||||
message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
|
||||
"BDB (legacy) wallets opened by this build will not be portable!"
|
||||
)
|
||||
if(WARN_INCOMPATIBLE_BDB)
|
||||
message(WARNING "If this is intended, pass \"-DWARN_INCOMPATIBLE_BDB=OFF\".\n"
|
||||
"Passing \"-DWITH_BDB=OFF\" will suppress this warning."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
|
||||
|
||||
option(ENABLE_HARDENING "Attempt to harden the resulting executables." ON)
|
||||
option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF)
|
||||
option(WERROR "Treat compiler warnings as errors." OFF)
|
||||
option(WITH_CCACHE "Attempt to use ccache for compiling." ON)
|
||||
@@ -131,7 +149,7 @@ if(WITH_USDT)
|
||||
find_package(USDT MODULE REQUIRED)
|
||||
endif()
|
||||
|
||||
option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON)
|
||||
cmake_dependent_option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
|
||||
|
||||
cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OFF)
|
||||
if(WITH_QRENCODE)
|
||||
@@ -141,9 +159,8 @@ endif()
|
||||
|
||||
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "NOT CMAKE_SYSTEM_NAME MATCHES \"(Windows|Darwin)\" AND BUILD_GUI" OFF)
|
||||
|
||||
cmake_dependent_option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables." ON "NOT WIN32" OFF)
|
||||
cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful for developing libmultiprocess itself." OFF "ENABLE_IPC" OFF)
|
||||
if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
|
||||
option(WITH_MULTIPROCESS "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
|
||||
if(WITH_MULTIPROCESS)
|
||||
find_package(Libmultiprocess REQUIRED COMPONENTS Lib)
|
||||
find_package(LibmultiprocessNative REQUIRED COMPONENTS Bin
|
||||
NAMES Libmultiprocess
|
||||
@@ -163,7 +180,7 @@ if(BUILD_GUI)
|
||||
if(BUILD_GUI_TESTS)
|
||||
list(APPEND qt_components Test)
|
||||
endif()
|
||||
find_package(Qt 6.2 MODULE REQUIRED
|
||||
find_package(Qt 5.11.3 MODULE REQUIRED
|
||||
COMPONENTS ${qt_components}
|
||||
)
|
||||
unset(qt_components)
|
||||
@@ -203,7 +220,6 @@ target_link_libraries(core_interface INTERFACE
|
||||
|
||||
if(BUILD_FOR_FUZZING)
|
||||
message(WARNING "BUILD_FOR_FUZZING=ON will disable all other targets and force BUILD_FUZZ_BINARY=ON.")
|
||||
set(BUILD_BITCOIN_BIN OFF)
|
||||
set(BUILD_DAEMON OFF)
|
||||
set(BUILD_CLI OFF)
|
||||
set(BUILD_TX OFF)
|
||||
@@ -217,7 +233,6 @@ if(BUILD_FOR_FUZZING)
|
||||
set(BUILD_TESTS OFF)
|
||||
set(BUILD_GUI_TESTS OFF)
|
||||
set(BUILD_BENCH OFF)
|
||||
set(ENABLE_IPC OFF)
|
||||
set(BUILD_FUZZ_BINARY ON)
|
||||
|
||||
target_compile_definitions(core_interface INTERFACE
|
||||
@@ -279,10 +294,6 @@ if(WIN32)
|
||||
/Zc:__cplusplus
|
||||
/sdl
|
||||
)
|
||||
target_link_options(core_interface INTERFACE
|
||||
# We embed our own manifests.
|
||||
/MANIFEST:NO
|
||||
)
|
||||
# Improve parallelism in MSBuild.
|
||||
# See: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/.
|
||||
list(APPEND CMAKE_VS_GLOBALS "UseMultiToolTask=true")
|
||||
@@ -341,28 +352,13 @@ target_link_libraries(core_interface INTERFACE
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
# Define sanitize_interface with -fsanitize flags intended to apply to all
|
||||
# libraries and executables.
|
||||
add_library(sanitize_interface INTERFACE)
|
||||
target_link_libraries(core_interface INTERFACE sanitize_interface)
|
||||
if(SANITIZERS)
|
||||
# Transform list of sanitizers into -fsanitize flags, replacing "fuzzer" with
|
||||
# "fuzzer-no-link" in sanitize_interface flags, and moving "fuzzer" to
|
||||
# fuzzer_interface flags. If -DSANITIZERS=fuzzer is specified, the fuzz test
|
||||
# binary should be built with -fsanitize=fuzzer (so it can use libFuzzer's
|
||||
# main function), but libraries should be built with -fsanitize=fuzzer-no-link
|
||||
# (so they can be linked into other executables that have their own main
|
||||
# functions).
|
||||
string(REGEX REPLACE "(^|,)fuzzer($|,)" "\\1fuzzer-no-link\\2" sanitize_opts "${SANITIZERS}")
|
||||
set(fuzz_flag "")
|
||||
if(NOT sanitize_opts STREQUAL SANITIZERS)
|
||||
set(fuzz_flag "-fsanitize=fuzzer")
|
||||
endif()
|
||||
|
||||
# First check if the compiler accepts flags. If an incompatible pair like
|
||||
# -fsanitize=address,thread is used here, this check will fail. This will also
|
||||
# fail if a bad argument is passed, e.g. -fsanitize=undfeined
|
||||
try_append_cxx_flags("-fsanitize=${sanitize_opts}" TARGET sanitize_interface
|
||||
try_append_cxx_flags("-fsanitize=${SANITIZERS}" TARGET sanitize_interface
|
||||
RESULT_VAR cxx_supports_sanitizers
|
||||
SKIP_LINK
|
||||
)
|
||||
@@ -375,11 +371,12 @@ if(SANITIZERS)
|
||||
# flag. This is a separate check so we can give a better error message when
|
||||
# the sanitize flags are supported by the compiler but the actual sanitizer
|
||||
# libs are missing.
|
||||
try_append_linker_flag("-fsanitize=${sanitize_opts}" VAR SANITIZER_LDFLAGS
|
||||
try_append_linker_flag("-fsanitize=${SANITIZERS}" VAR SANITIZER_LDFLAGS
|
||||
SOURCE "
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
|
||||
__attribute__((weak)) // allow for libFuzzer linking
|
||||
int main() { return 0; }
|
||||
"
|
||||
RESULT_VAR linker_supports_sanitizers
|
||||
@@ -391,10 +388,8 @@ if(SANITIZERS)
|
||||
endif()
|
||||
target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS})
|
||||
|
||||
# Define fuzzer_interface with flags intended to apply to the fuzz test binary,
|
||||
# and perform a test compilation to determine correct value of
|
||||
# FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION.
|
||||
if(BUILD_FUZZ_BINARY)
|
||||
target_link_libraries(core_interface INTERFACE ${FUZZ_LIBS})
|
||||
include(CheckSourceCompilesWithFlags)
|
||||
check_cxx_source_compiles_with_flags("
|
||||
#include <cstdint>
|
||||
@@ -402,12 +397,9 @@ if(BUILD_FUZZ_BINARY)
|
||||
extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
|
||||
// No main() function.
|
||||
" FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION
|
||||
LDFLAGS ${SANITIZER_LDFLAGS} ${fuzz_flag}
|
||||
LDFLAGS ${SANITIZER_LDFLAGS}
|
||||
LINK_LIBRARIES ${FUZZ_LIBS}
|
||||
)
|
||||
add_library(fuzzer_interface INTERFACE)
|
||||
target_link_options(fuzzer_interface INTERFACE ${fuzz_flag})
|
||||
target_link_libraries(fuzzer_interface INTERFACE ${FUZZ_LIBS})
|
||||
endif()
|
||||
|
||||
include(AddBoostIfNeeded)
|
||||
@@ -444,7 +436,6 @@ else()
|
||||
try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK)
|
||||
@@ -497,70 +488,62 @@ try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
|
||||
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag).
|
||||
try_append_cxx_flags("-fstack-reuse=none" TARGET core_interface)
|
||||
|
||||
if(MSVC)
|
||||
try_append_linker_flag("/DYNAMICBASE" TARGET core_interface)
|
||||
try_append_linker_flag("/HIGHENTROPYVA" TARGET core_interface)
|
||||
try_append_linker_flag("/NXCOMPAT" TARGET core_interface)
|
||||
else()
|
||||
if(ENABLE_HARDENING)
|
||||
add_library(hardening_interface INTERFACE)
|
||||
target_link_libraries(core_interface INTERFACE hardening_interface)
|
||||
if(MSVC)
|
||||
try_append_linker_flag("/DYNAMICBASE" TARGET hardening_interface)
|
||||
try_append_linker_flag("/HIGHENTROPYVA" TARGET hardening_interface)
|
||||
try_append_linker_flag("/NXCOMPAT" TARGET hardening_interface)
|
||||
else()
|
||||
|
||||
# _FORTIFY_SOURCE requires that there is some level of optimization,
|
||||
# otherwise it does nothing and just creates a compiler warning.
|
||||
try_append_cxx_flags("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
|
||||
RESULT_VAR cxx_supports_fortify_source
|
||||
SOURCE "int main() {
|
||||
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
|
||||
#error
|
||||
#endif
|
||||
}"
|
||||
)
|
||||
if(cxx_supports_fortify_source)
|
||||
target_compile_options(core_interface INTERFACE
|
||||
-U_FORTIFY_SOURCE
|
||||
-D_FORTIFY_SOURCE=3
|
||||
# _FORTIFY_SOURCE requires that there is some level of optimization,
|
||||
# otherwise it does nothing and just creates a compiler warning.
|
||||
try_append_cxx_flags("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
|
||||
RESULT_VAR cxx_supports_fortify_source
|
||||
SOURCE "int main() {
|
||||
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
|
||||
#error
|
||||
#endif
|
||||
}"
|
||||
)
|
||||
endif()
|
||||
unset(cxx_supports_fortify_source)
|
||||
|
||||
try_append_cxx_flags("-Wstack-protector" TARGET core_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-fstack-protector-all" TARGET core_interface)
|
||||
try_append_cxx_flags("-fcf-protection=full" TARGET core_interface)
|
||||
|
||||
if(MINGW)
|
||||
# stack-clash-protection is a no-op for Windows.
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
|
||||
else()
|
||||
try_append_cxx_flags("-fstack-clash-protection" TARGET core_interface)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
try_append_cxx_flags("-mbranch-protection=bti" TARGET core_interface SKIP_LINK)
|
||||
else()
|
||||
try_append_cxx_flags("-mbranch-protection=standard" TARGET core_interface SKIP_LINK)
|
||||
if(cxx_supports_fortify_source)
|
||||
target_compile_options(hardening_interface INTERFACE
|
||||
-U_FORTIFY_SOURCE
|
||||
-D_FORTIFY_SOURCE=3
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
unset(cxx_supports_fortify_source)
|
||||
|
||||
try_append_linker_flag("-Wl,--enable-reloc-section" TARGET core_interface)
|
||||
try_append_linker_flag("-Wl,--dynamicbase" TARGET core_interface)
|
||||
try_append_linker_flag("-Wl,--nxcompat" TARGET core_interface)
|
||||
try_append_linker_flag("-Wl,--high-entropy-va" TARGET core_interface)
|
||||
try_append_linker_flag("-Wl,-z,relro" TARGET core_interface)
|
||||
try_append_linker_flag("-Wl,-z,now" TARGET core_interface)
|
||||
# TODO: This can be dropped once Bitcoin Core no longer supports
|
||||
# NetBSD 10.0 or if upstream fix is backported.
|
||||
# NetBSD's dynamic linker ld.elf_so < 11.0 supports exactly 2
|
||||
# `PT_LOAD` segments and binaries linked with `-z separate-code`
|
||||
# have 4 `PT_LOAD` segments.
|
||||
# Relevant discussions:
|
||||
# - https://github.com/bitcoin/bitcoin/pull/28724#issuecomment-2589347934
|
||||
# - https://mail-index.netbsd.org/tech-userlevel/2023/01/05/msg013666.html
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD" AND CMAKE_SYSTEM_VERSION VERSION_LESS 11.0)
|
||||
try_append_linker_flag("-Wl,-z,noseparate-code" TARGET core_interface)
|
||||
else()
|
||||
try_append_linker_flag("-Wl,-z,separate-code" TARGET core_interface)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
try_append_linker_flag("-Wl,-fixup_chains" TARGET core_interface)
|
||||
try_append_cxx_flags("-Wstack-protector" TARGET hardening_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-fstack-protector-all" TARGET hardening_interface)
|
||||
try_append_cxx_flags("-fcf-protection=full" TARGET hardening_interface)
|
||||
|
||||
if(MINGW)
|
||||
# stack-clash-protection is a no-op for Windows.
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
|
||||
else()
|
||||
try_append_cxx_flags("-fstack-clash-protection" TARGET hardening_interface)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
try_append_cxx_flags("-mbranch-protection=bti" TARGET hardening_interface SKIP_LINK)
|
||||
else()
|
||||
try_append_cxx_flags("-mbranch-protection=standard" TARGET hardening_interface SKIP_LINK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
try_append_linker_flag("-Wl,--enable-reloc-section" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,--dynamicbase" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,--nxcompat" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,--high-entropy-va" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,-z,relro" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,-z,now" TARGET hardening_interface)
|
||||
try_append_linker_flag("-Wl,-z,separate-code" TARGET hardening_interface)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
try_append_linker_flag("-Wl,-fixup_chains" TARGET hardening_interface)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -591,9 +574,11 @@ set(Python3_FIND_FRAMEWORK LAST CACHE STRING "")
|
||||
set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "")
|
||||
mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES)
|
||||
find_package(Python3 3.10 COMPONENTS Interpreter)
|
||||
if(NOT TARGET Python3::Interpreter)
|
||||
if(Python3_EXECUTABLE)
|
||||
set(PYTHON_COMMAND ${Python3_EXECUTABLE})
|
||||
else()
|
||||
list(APPEND configure_warnings
|
||||
"Minimum required Python not found."
|
||||
"Minimum required Python not found. Utils and rpcauth tests are disabled."
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -637,6 +622,8 @@ add_subdirectory(doc)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
include(cmake/tests.cmake)
|
||||
|
||||
include(Maintenance)
|
||||
setup_split_debug_script()
|
||||
add_maintenance_targets()
|
||||
@@ -647,16 +634,15 @@ message("\n")
|
||||
message("Configure summary")
|
||||
message("=================")
|
||||
message("Executables:")
|
||||
message(" bitcoin ............................. ${BUILD_BITCOIN_BIN}")
|
||||
message(" bitcoind ............................ ${BUILD_DAEMON}")
|
||||
if(BUILD_DAEMON AND ENABLE_IPC)
|
||||
if(BUILD_DAEMON AND WITH_MULTIPROCESS)
|
||||
set(bitcoin_daemon_status ON)
|
||||
else()
|
||||
set(bitcoin_daemon_status OFF)
|
||||
endif()
|
||||
message(" bitcoin-node (multiprocess) ......... ${bitcoin_daemon_status}")
|
||||
message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}")
|
||||
if(BUILD_GUI AND ENABLE_IPC)
|
||||
if(BUILD_GUI AND WITH_MULTIPROCESS)
|
||||
set(bitcoin_gui_status ON)
|
||||
else()
|
||||
set(bitcoin_gui_status OFF)
|
||||
@@ -670,18 +656,12 @@ message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}")
|
||||
message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
|
||||
message("Optional features:")
|
||||
message(" wallet support ...................... ${ENABLE_WALLET}")
|
||||
if(ENABLE_WALLET)
|
||||
message(" - descriptor wallets (SQLite) ...... ${WITH_SQLITE}")
|
||||
message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}")
|
||||
endif()
|
||||
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")
|
||||
message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
||||
if(ENABLE_IPC)
|
||||
if (WITH_EXTERNAL_LIBMULTIPROCESS)
|
||||
set(ipc_status "ON (with external libmultiprocess)")
|
||||
else()
|
||||
set(ipc_status ON)
|
||||
endif()
|
||||
else()
|
||||
set(ipc_status OFF)
|
||||
endif()
|
||||
message(" IPC ................................. ${ipc_status}")
|
||||
message(" USDT tracing ........................ ${WITH_USDT}")
|
||||
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
||||
message(" DBus (GUI) .......................... ${WITH_DBUS}")
|
||||
@@ -700,6 +680,7 @@ message("Cross compiling ....................... ${cross_status}")
|
||||
message("C++ compiler .......................... ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, ${CMAKE_CXX_COMPILER}")
|
||||
include(FlagsSummary)
|
||||
flags_summary()
|
||||
message("Attempt to harden executables ......... ${ENABLE_HARDENING}")
|
||||
message("Treat compiler warnings as errors ..... ${WERROR}")
|
||||
message("Use ccache for compiling .............. ${WITH_CCACHE}")
|
||||
message("\n")
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
"name": "dev-mode",
|
||||
"displayName": "Developer mode, with all features/dependencies enabled",
|
||||
"binaryDir": "${sourceDir}/build_dev_mode",
|
||||
"errors": {"dev": true},
|
||||
"cacheVariables": {
|
||||
"BUILD_BENCH": "ON",
|
||||
"BUILD_CLI": "ON",
|
||||
@@ -77,9 +76,13 @@
|
||||
"BUILD_UTIL_CHAINSTATE": "ON",
|
||||
"BUILD_WALLET_TOOL": "ON",
|
||||
"ENABLE_EXTERNAL_SIGNER": "ON",
|
||||
"ENABLE_HARDENING": "ON",
|
||||
"ENABLE_WALLET": "ON",
|
||||
"ENABLE_IPC": "ON",
|
||||
"WARN_INCOMPATIBLE_BDB": "OFF",
|
||||
"WITH_BDB": "ON",
|
||||
"WITH_MULTIPROCESS": "ON",
|
||||
"WITH_QRENCODE": "ON",
|
||||
"WITH_SQLITE": "ON",
|
||||
"WITH_USDT": "ON",
|
||||
"WITH_ZMQ": "ON"
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ facilitates social contribution, easy testing and peer review.
|
||||
|
||||
To contribute a patch, the workflow is as follows:
|
||||
|
||||
1. Fork repository ([only for the first time](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo))
|
||||
1. Fork repository ([only for the first time](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
|
||||
1. Create topic branch
|
||||
1. Commit patches
|
||||
|
||||
@@ -115,14 +115,13 @@ 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.
|
||||
This means tests must be updated in the same commit that changes the behavior.
|
||||
|
||||
Commit messages should be verbose by default consisting of a short subject line
|
||||
(50 chars max), a blank line and detailed explanatory text as separate
|
||||
paragraph(s), unless the title alone is self-explanatory (like "Correct typo
|
||||
in init.cpp") in which case a single title line is sufficient. Commit messages should be
|
||||
helpful to people reading your code in the future, so explain the reasoning for
|
||||
your decisions. Further explanation [here](https://cbea.ms/git-commit/).
|
||||
your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/).
|
||||
|
||||
If a particular commit references another issue, please add the reference. For
|
||||
example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords
|
||||
@@ -183,7 +182,7 @@ 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/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
|
||||
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
|
||||
@@ -402,7 +401,7 @@ about:
|
||||
- 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/repositories/working-with-files/using-files/viewing-and-understanding-files). Simply
|
||||
[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
|
||||
|
||||
4
COPYING
4
COPYING
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2026 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2026 Bitcoin Developers
|
||||
Copyright (c) 2009-2025 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2025 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
|
||||
|
||||
@@ -1 +1 @@
|
||||
See [doc/build-\*.md](/doc)
|
||||
See [doc/build-\*.md](/doc)
|
||||
@@ -19,7 +19,7 @@ License
|
||||
-------
|
||||
|
||||
Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
|
||||
information or see https://opensource.org/license/MIT.
|
||||
information or see https://opensource.org/licenses/MIT.
|
||||
|
||||
Development Process
|
||||
-------------------
|
||||
@@ -56,8 +56,8 @@ in Python.
|
||||
These tests can be run (if the [test dependencies](/test) are installed) with: `build/test/functional/test_runner.py`
|
||||
(assuming `build` is your build directory).
|
||||
|
||||
The CI (Continuous Integration) systems make sure that every pull request is tested on Windows, Linux, and macOS.
|
||||
The CI must pass on all commits before merge to avoid unrelated CI failures on new pull requests.
|
||||
The CI (Continuous Integration) systems make sure that every pull request is built for Windows, Linux, and macOS,
|
||||
and that unit/sanity tests are run automatically.
|
||||
|
||||
### Manual Quality Assurance (QA) Testing
|
||||
|
||||
|
||||
@@ -6,19 +6,16 @@
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
set -o errexit -o pipefail -o xtrace
|
||||
|
||||
export CI_RETRY_EXE="/ci_retry --"
|
||||
|
||||
pushd "/"
|
||||
|
||||
${CI_RETRY_EXE} apt-get update
|
||||
# Lint dependencies:
|
||||
# - cargo (used to run the lint tests)
|
||||
# - curl/xz-utils (to install shellcheck)
|
||||
# - git (used in many lint scripts)
|
||||
# - gpg (used by verify-commits)
|
||||
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg
|
||||
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
|
||||
|
||||
PYTHON_PATH="/python_build"
|
||||
if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
||||
@@ -38,20 +35,31 @@ 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.4.1 \
|
||||
lief==0.16.6 \
|
||||
codespell==2.2.6 \
|
||||
lief==0.13.2 \
|
||||
mypy==1.4.1 \
|
||||
pyzmq==25.1.0 \
|
||||
ruff==0.5.5 \
|
||||
vulture==2.6
|
||||
|
||||
SHELLCHECK_VERSION=v0.11.0
|
||||
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=v1
|
||||
MLC_VERSION=v0.19.0
|
||||
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
|
||||
@@ -16,7 +16,7 @@ if [ -n "$CIRRUS_PR" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml"
|
||||
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
|
||||
|
||||
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
||||
# Sanity check only the last few commits to get notified of missing sigs,
|
||||
|
||||
@@ -11,6 +11,7 @@ export LC_ALL=C
|
||||
git config --global --add safe.directory /bitcoin
|
||||
|
||||
export PATH="/python_build/bin:${PATH}"
|
||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
bash -ic "./ci/lint/06_script.sh"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# See test/lint/README.md for usage.
|
||||
|
||||
FROM mirror.gcr.io/ubuntu:24.04
|
||||
FROM mirror.gcr.io/debian:bookworm
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LC_ALL=C.UTF-8
|
||||
@@ -12,7 +12,8 @@ ENV LC_ALL=C.UTF-8
|
||||
COPY ./ci/retry/retry /ci_retry
|
||||
COPY ./.python-version /.python-version
|
||||
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
|
||||
COPY ./ci/lint/01_install.sh /install.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 && \
|
||||
|
||||
@@ -64,7 +64,7 @@ export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
|
||||
# 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 pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake ninja-build}
|
||||
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf 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 --"}
|
||||
|
||||
@@ -10,13 +10,12 @@ 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="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.x, similar to guix) can cross-compile
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.3, similar to guix) can cross-compile
|
||||
export CI_IMAGE_PLATFORM="linux/arm64"
|
||||
export USE_BUSY_BOX=true
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="install"
|
||||
export CI_LIMIT_STACK_SIZE=1
|
||||
# -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="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export CONTAINER_NAME=ci_i686_no_multiprocess
|
||||
export CONTAINER_NAME=ci_i686_multiprocess
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export CI_IMAGE_PLATFORM="linux/amd64"
|
||||
export PACKAGES="llvm clang g++-multilib"
|
||||
export DEP_OPTS="DEBUG=1 NO_IPC=1"
|
||||
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
||||
export GOAL="install"
|
||||
export CI_LIMIT_STACK_SIZE=1
|
||||
export TEST_RUNNER_EXTRA="--v2transport --usecli"
|
||||
export TEST_RUNNER_EXTRA="--v2transport"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_C_COMPILER='clang;-m32' \
|
||||
-DCMAKE_CXX_COMPILER='clang++;-m32' \
|
||||
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
|
||||
"
|
||||
export BITCOIND=bitcoin-node # Used in functional tests
|
||||
@@ -10,10 +10,9 @@ export LC_ALL=C.UTF-8
|
||||
# Therefore, `--break-system-packages` is needed.
|
||||
export CONTAINER_NAME="ci_mac_native" # macos does not use a container, but the env var is needed for logging
|
||||
export PIP_PACKAGES="--break-system-packages zmq"
|
||||
export GOAL="install deploy"
|
||||
export GOAL="install"
|
||||
export CMAKE_GENERATOR="Ninja"
|
||||
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
|
||||
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
export BITCOIN_CMD="bitcoin -m" # Used in functional tests
|
||||
|
||||
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME="ci_mac_native_fuzz" # macos does not use a container, but the env var is needed for logging
|
||||
export CMAKE_GENERATOR="Ninja"
|
||||
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
|
||||
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
|
||||
@@ -20,18 +20,16 @@ fi
|
||||
|
||||
export CONTAINER_NAME=ci_native_asan
|
||||
export APT_LLVM_V="21"
|
||||
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto python3-pip"
|
||||
export PIP_PACKAGES="--break-system-packages pycapnp"
|
||||
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
|
||||
export NO_DEPENDS=1
|
||||
export GOAL="install"
|
||||
export CI_LIMIT_STACK_SIZE=1
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \
|
||||
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
|
||||
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern -Wno-error=deprecated-declarations' \
|
||||
-DAPPEND_CXXFLAGS='-std=c++23' \
|
||||
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
|
||||
"
|
||||
|
||||
@@ -8,14 +8,8 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME=ci_native_centos
|
||||
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
|
||||
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make ninja-build git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
|
||||
export PIP_PACKAGES="pyzmq pycapnp"
|
||||
export DEP_OPTS="DEBUG=1"
|
||||
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
|
||||
export PIP_PACKAGES="pyzmq"
|
||||
export DEP_OPTS="DEBUG=1" # Temporarily enable a DEBUG=1 build to check for GCC-bug-117966 regressions. This can be removed once the minimum GCC version is bumped to 12 in the previous releases task, see https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON \
|
||||
-DBUILD_GUI=ON \
|
||||
-DREDUCE_EXPORTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
"
|
||||
export BITCOIN_CMD="bitcoin -m" # Used in functional tests
|
||||
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DCMAKE_BUILD_TYPE=Debug"
|
||||
|
||||
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz
|
||||
export APT_LLVM_V="21"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev libcapnp-dev capnproto"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
||||
@@ -15,8 +15,9 @@ LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${L
|
||||
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
|
||||
|
||||
export CONTAINER_NAME="ci_native_fuzz_msan"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
|
||||
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
# BDB generates false-positives and will be removed in future
|
||||
export PACKAGES="ninja-build clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
|
||||
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="all"
|
||||
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
|
||||
# _FORTIFY_SOURCE is not compatible with MSAN.
|
||||
|
||||
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz_valgrind
|
||||
export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto"
|
||||
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
|
||||
@@ -17,5 +17,8 @@ export FUZZ_TESTS_CONFIG="--valgrind"
|
||||
export GOAL="all"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DBUILD_FOR_FUZZING=ON \
|
||||
-DCMAKE_CXX_FLAGS='-Wno-error=array-bounds' \
|
||||
-DSANITIZERS=fuzzer \
|
||||
-DCMAKE_C_COMPILER=clang-16 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-16 \
|
||||
"
|
||||
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-16"
|
||||
|
||||
@@ -14,11 +14,10 @@ LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${L
|
||||
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
|
||||
|
||||
export CONTAINER_NAME="ci_native_msan"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-pip"
|
||||
export PIP_PACKAGES="--break-system-packages pycapnp"
|
||||
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev 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"
|
||||
export CI_LIMIT_STACK_SIZE=1
|
||||
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
|
||||
# _FORTIFY_SOURCE is not compatible with MSAN.
|
||||
export BITCOIN_CONFIG="\
|
||||
|
||||
@@ -9,8 +9,7 @@ export LC_ALL=C.UTF-8
|
||||
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:bookworm"
|
||||
# Use minimum supported python3.10 (or best-effort 3.11) and clang-16, see doc/dependencies.md
|
||||
export PACKAGES="python3-zmq python3-pip clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
|
||||
export PIP_PACKAGES="--break-system-packages pycapnp"
|
||||
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 BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON"
|
||||
|
||||
@@ -10,17 +10,18 @@ export CONTAINER_NAME=ci_native_previous_releases
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:22.04"
|
||||
# Use minimum supported python3.10 and gcc-11, see doc/dependencies.md
|
||||
export PACKAGES="gcc-11 g++-11 python3-zmq"
|
||||
export DEP_OPTS="CC=gcc-11 CXX=g++-11"
|
||||
export DEP_OPTS="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 CI_LIMIT_STACK_SIZE=1
|
||||
export DOWNLOAD_PREVIOUS_RELEASES="true"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_C_FLAGS='-funsigned-char' \
|
||||
-DCMAKE_C_FLAGS_DEBUG='-g2 -O2' \
|
||||
-DCMAKE_C_FLAGS_DEBUG='-g0 -O2' \
|
||||
-DCMAKE_CXX_FLAGS='-funsigned-char' \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG='-g2 -O2' \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG='-g0 -O2' \
|
||||
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
|
||||
"
|
||||
|
||||
@@ -8,9 +8,9 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export CONTAINER_NAME=ci_native_tidy
|
||||
export TIDY_LLVM_V="20"
|
||||
export TIDY_LLVM_V="19"
|
||||
export APT_LLVM_V="${TIDY_LLVM_V}"
|
||||
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 libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
|
||||
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 libevent-dev libboost-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
|
||||
@@ -19,7 +19,8 @@ export RUN_CHECK_DEPS=true
|
||||
export RUN_TIDY=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON \
|
||||
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \
|
||||
-DENABLE_HARDENING=OFF \
|
||||
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
|
||||
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \
|
||||
|
||||
@@ -11,11 +11,9 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export APT_LLVM_V="21"
|
||||
LIBCXX_DIR="/cxx_build/"
|
||||
LIBCXX_FLAGS="-fsanitize=thread -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 PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq python3-pip"
|
||||
export PIP_PACKAGES="--break-system-packages pycapnp"
|
||||
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq ninja-build"
|
||||
export DEP_OPTS="CC=clang CXX=clang++ CXXFLAGS='${LIBCXX_FLAGS}' NO_QT=1"
|
||||
export GOAL="install"
|
||||
export CI_LIMIT_STACK_SIZE=1
|
||||
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \
|
||||
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'"
|
||||
export USE_INSTRUMENTED_LIBCPP="Thread"
|
||||
|
||||
@@ -8,14 +8,14 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||
export CONTAINER_NAME=ci_native_valgrind
|
||||
export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip"
|
||||
export PIP_PACKAGES="--break-system-packages pycapnp"
|
||||
export PACKAGES="valgrind clang-16 llvm-16 libclang-rt-16-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev"
|
||||
export USE_VALGRIND=1
|
||||
export NO_DEPENDS=1
|
||||
# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra"
|
||||
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"
|
||||
# TODO enable GUI
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON -DBUILD_GUI=OFF \
|
||||
-DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \
|
||||
-DCMAKE_C_COMPILER=clang-16 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-16 \
|
||||
"
|
||||
|
||||
@@ -7,11 +7,15 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME=ci_win64
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-mingw-w64-x86-64-posix (version 13.x, similar to guix) can cross-compile
|
||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that g++-mingw-w64-x86-64-posix (version 13.2, similar to guix) can cross-compile
|
||||
export CI_IMAGE_PLATFORM="linux/amd64"
|
||||
export HOST=x86_64-w64-mingw32
|
||||
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
|
||||
export RUN_UNIT_TESTS=false
|
||||
export DPKG_ADD_ARCH="i386"
|
||||
export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
|
||||
# Install wine, but do not run unit tests, as they surface frequent
|
||||
# false-positives.
|
||||
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-false}
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF \
|
||||
-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized'"
|
||||
-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized -Wno-error=array-bounds'"
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
set -o errexit -o pipefail -o xtrace
|
||||
set -ex
|
||||
|
||||
CFG_DONE="${BASE_ROOT_DIR}/ci.base-install-done" # Use a global setting to remember whether this script ran to avoid running it twice
|
||||
CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
|
||||
|
||||
if [ "$( cat "${CFG_DONE}" || true )" == "done" ]; then
|
||||
if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
|
||||
echo "Skip base install"
|
||||
exit 0
|
||||
fi
|
||||
@@ -34,8 +34,7 @@ fi
|
||||
|
||||
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
|
||||
bash -c "dnf -y install epel-release"
|
||||
# The ninja-build package is available in the CRB repository.
|
||||
bash -c "dnf -y --allowerasing --enablerepo crb install $CI_BASE_PACKAGES $PACKAGES"
|
||||
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
|
||||
@@ -89,7 +88,7 @@ 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"
|
||||
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"
|
||||
@@ -97,4 +96,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
|
||||
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
|
||||
fi
|
||||
|
||||
echo -n "done" > "${CFG_DONE}"
|
||||
git config --global ${CFG_DONE} "true"
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def run(cmd, **kwargs):
|
||||
print("+ " + shlex.join(cmd), flush=True)
|
||||
try:
|
||||
return subprocess.run(cmd, check=True, **kwargs)
|
||||
except Exception as e:
|
||||
sys.exit(e)
|
||||
|
||||
|
||||
def main():
|
||||
print("Export only allowed settings:")
|
||||
settings = run(
|
||||
["bash", "-c", "grep export ./ci/test/00_setup_env*.sh"],
|
||||
stdout=subprocess.PIPE,
|
||||
text=True,
|
||||
encoding="utf8",
|
||||
).stdout.splitlines()
|
||||
settings = set(l.split("=")[0].split("export ")[1] for l in settings)
|
||||
# Add "hidden" settings, which are never exported, manually. Otherwise,
|
||||
# they will not be passed on.
|
||||
settings.update([
|
||||
"BASE_BUILD_DIR",
|
||||
"CI_FAILFAST_TEST_LEAVE_DANGLING",
|
||||
])
|
||||
|
||||
# Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME
|
||||
# to allow support starting multiple runs simultaneously by the same user.
|
||||
env_file = "/tmp/env-{u}-{c}".format(
|
||||
u=os.getenv("USER"),
|
||||
c=os.getenv("CONTAINER_NAME"),
|
||||
)
|
||||
with open(env_file, "w", encoding="utf8") as file:
|
||||
for k, v in os.environ.items():
|
||||
if k in settings:
|
||||
file.write(f"{k}={v}\n")
|
||||
run(["cat", env_file])
|
||||
|
||||
run(["./ci/test/02_run_container.sh"]) # run the remainder
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -10,6 +10,10 @@ export CI_IMAGE_LABEL="bitcoin-ci-test"
|
||||
set -o errexit -o pipefail -o xtrace
|
||||
|
||||
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"
|
||||
|
||||
# Env vars during the build can not be changed. For example, a modified
|
||||
# $MAKEJOBS is ignored in the build process. Use --cpuset-cpus as an
|
||||
# approximation to respect $MAKEJOBS somewhat, if cpuset is available.
|
||||
@@ -61,11 +65,16 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
fi
|
||||
|
||||
if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then
|
||||
# Temporary exclusion for https://github.com/bitcoin/bitcoin/issues/31108
|
||||
# to allow CI configs and envs generated in the past to work for a bit longer.
|
||||
# Can be removed in March 2025.
|
||||
if [ "${CCACHE_DIR}" != "/tmp/ccache_dir" ]; then
|
||||
if [ ! -d "${CCACHE_DIR}" ]; then
|
||||
echo "Error: Directory '${CCACHE_DIR}' must be created in advance."
|
||||
exit 1
|
||||
fi
|
||||
CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=${CCACHE_DIR}"
|
||||
fi # End temporary exclusion
|
||||
fi
|
||||
|
||||
docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true
|
||||
@@ -85,6 +94,8 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
# 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" \
|
||||
@@ -118,9 +129,13 @@ CI_EXEC () {
|
||||
export -f CI_EXEC
|
||||
|
||||
# Normalize all folders to BASE_ROOT_DIR
|
||||
CI_EXEC rsync --recursive --perms --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_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"
|
||||
|
||||
@@ -74,7 +74,7 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
echo "Using qa-assets repo from commit ..."
|
||||
git log -1
|
||||
)
|
||||
elif [ "$RUN_UNIT_TESTS" = "true" ]; then
|
||||
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"
|
||||
@@ -107,7 +107,7 @@ if [ -z "$NO_DEPENDS" ]; then
|
||||
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 --target-dir "$PREVIOUS_RELEASES_DIR"
|
||||
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON"
|
||||
@@ -123,27 +123,18 @@ PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
|
||||
|
||||
# Folder where the build is done.
|
||||
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
||||
mkdir -p "${BASE_BUILD_DIR}"
|
||||
cd "${BASE_BUILD_DIR}"
|
||||
|
||||
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
|
||||
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DENABLE_EXTERNAL_SIGNER=ON -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
fi
|
||||
|
||||
bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || (
|
||||
cd "${BASE_BUILD_DIR}"
|
||||
# shellcheck disable=SC2046
|
||||
cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")
|
||||
false
|
||||
)
|
||||
bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target all $GOAL || (
|
||||
echo "Build failure. Verbose build follows."
|
||||
# shellcheck disable=SC2086
|
||||
cmake --build "${BASE_BUILD_DIR}" -j1 --target all $GOAL --verbose
|
||||
false
|
||||
)
|
||||
bash -c "cmake --build . $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false )
|
||||
|
||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
||||
if [ "$CI" = "true" ]; then
|
||||
@@ -155,8 +146,8 @@ fi
|
||||
du -sh "${DEPENDS_DIR}"/*/
|
||||
du -sh "${PREVIOUS_RELEASES_DIR}"
|
||||
|
||||
if [ -n "${CI_LIMIT_STACK_SIZE}" ]; then
|
||||
ulimit -s 512
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
"${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
|
||||
fi
|
||||
|
||||
if [ -n "$USE_VALGRIND" ]; then
|
||||
@@ -164,32 +155,21 @@ if [ -n "$USE_VALGRIND" ]; then
|
||||
fi
|
||||
|
||||
if [ "$RUN_CHECK_DEPS" = "true" ]; then
|
||||
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" "${BASE_BUILD_DIR}"
|
||||
"${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" .
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" \
|
||||
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
||||
CTEST_OUTPUT_ON_FAILURE=ON \
|
||||
ctest --test-dir "${BASE_BUILD_DIR}" \
|
||||
--stop-on-failure \
|
||||
"${MAKEJOBS}" \
|
||||
--timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest --stop-on-failure "${MAKEJOBS}" --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
|
||||
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
|
||||
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
|
||||
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
|
||||
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
||||
"${BASE_BUILD_DIR}/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
|
||||
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
|
||||
@@ -223,11 +203,5 @@ fi
|
||||
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
|
||||
"${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \
|
||||
${FUZZ_TESTS_CONFIG} \
|
||||
"${MAKEJOBS}" \
|
||||
-l DEBUG \
|
||||
"${DIR_FUZZ_IN}" \
|
||||
--empty_min_time=60
|
||||
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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-present The Bitcoin Core developers
|
||||
# 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.
|
||||
|
||||
@@ -12,7 +12,7 @@ for b_name in "${BASE_OUTDIR}/bin"/*; do
|
||||
echo "Wrap $b ..."
|
||||
mv "$b" "${b}_orig"
|
||||
echo '#!/usr/bin/env bash' > "$b"
|
||||
echo "exec valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$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
|
||||
|
||||
20
ci/test/wrap-wine.sh
Executable file
20
ci/test/wrap-wine.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/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/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 "( wine \"${b}_orig\" \"\$@\" ) || ( sleep 1 && wine \"${b}_orig\" \"\$@\" )" >> "$b"
|
||||
chmod +x "$b"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -8,4 +8,4 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
set -o errexit; source ./ci/test/00_setup_env.sh
|
||||
set -o errexit
|
||||
"./ci/test/02_run_container.py"
|
||||
"./ci/test/02_run_container.sh"
|
||||
|
||||
@@ -29,9 +29,18 @@
|
||||
/* Copyright year */
|
||||
#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@
|
||||
|
||||
/* Define this symbol to build code that uses ARMv8 SHA-NI intrinsics */
|
||||
#cmakedefine ENABLE_ARM_SHANI 1
|
||||
|
||||
/* Define this symbol to build code that uses AVX2 intrinsics */
|
||||
#cmakedefine ENABLE_AVX2 1
|
||||
|
||||
/* Define if external signer support is enabled */
|
||||
#cmakedefine ENABLE_EXTERNAL_SIGNER 1
|
||||
|
||||
/* Define this symbol to build code that uses SSE4.1 intrinsics */
|
||||
#cmakedefine ENABLE_SSE41 1
|
||||
|
||||
/* Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing
|
||||
*/
|
||||
#cmakedefine ENABLE_TRACING 1
|
||||
@@ -39,12 +48,20 @@
|
||||
/* Define to 1 to enable wallet functions. */
|
||||
#cmakedefine ENABLE_WALLET 1
|
||||
|
||||
/* Define this symbol to build code that uses x86 SHA-NI intrinsics */
|
||||
#cmakedefine ENABLE_X86_SHANI 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
|
||||
*/
|
||||
#cmakedefine01 HAVE_DECL_FORK
|
||||
|
||||
/* Define to 1 if '*ifaddrs' are available. */
|
||||
#cmakedefine HAVE_IFADDRS 1
|
||||
/* Define to 1 if you have the declaration of `freeifaddrs', and to 0 if you
|
||||
don't. */
|
||||
#cmakedefine01 HAVE_DECL_FREEIFADDRS
|
||||
|
||||
/* Define to 1 if you have the declaration of `getifaddrs', and to 0 if you
|
||||
don't. */
|
||||
#cmakedefine01 HAVE_DECL_GETIFADDRS
|
||||
|
||||
/* Define to 1 if you have the declaration of `pipe2', and to 0 if you don't.
|
||||
*/
|
||||
@@ -91,6 +108,18 @@
|
||||
/* Define to 1 if std::system or ::wsystem is available. */
|
||||
#cmakedefine HAVE_SYSTEM 1
|
||||
|
||||
/* Define to 1 if you have the <sys/prctl.h> header file. */
|
||||
#cmakedefine HAVE_SYS_PRCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/resources.h> header file. */
|
||||
#cmakedefine HAVE_SYS_RESOURCES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/vmmeter.h> header file. */
|
||||
#cmakedefine HAVE_SYS_VMMETER_H 1
|
||||
|
||||
/* Define to 1 if you have the <vm/vm_param.h> header file. */
|
||||
#cmakedefine HAVE_VM_VM_PARAM_H 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define CLIENT_BUGREPORT "@CLIENT_BUGREPORT@"
|
||||
|
||||
@@ -106,10 +135,16 @@
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#cmakedefine STRERROR_R_CHAR_P 1
|
||||
|
||||
/* Define if BDB support should be compiled in */
|
||||
#cmakedefine USE_BDB 1
|
||||
|
||||
/* Define if dbus support should be compiled in */
|
||||
#cmakedefine USE_DBUS 1
|
||||
|
||||
/* Define if QR support should be compiled in */
|
||||
#cmakedefine USE_QRCODE 1
|
||||
|
||||
/* Define if sqlite support should be compiled in */
|
||||
#cmakedefine USE_SQLITE 1
|
||||
|
||||
#endif //BITCOIN_CONFIG_H
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(CheckCXXSymbolExists)
|
||||
include(CheckIncludeFileCXX)
|
||||
|
||||
# The following HAVE_{HEADER}_H variables go to the bitcoin-build-config.h header.
|
||||
check_include_file_cxx(sys/prctl.h HAVE_SYS_PRCTL_H)
|
||||
check_include_file_cxx(sys/resources.h HAVE_SYS_RESOURCES_H)
|
||||
check_include_file_cxx(sys/vmmeter.h HAVE_SYS_VMMETER_H)
|
||||
check_include_file_cxx(vm/vm_param.h HAVE_VM_VM_PARAM_H)
|
||||
|
||||
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
|
||||
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
|
||||
@@ -11,7 +18,9 @@ check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
|
||||
check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
|
||||
check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
|
||||
|
||||
if(NOT WIN32)
|
||||
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file_cxx(ifaddrs.h HAVE_IFADDRS_H)
|
||||
if(HAVE_SYS_TYPES_H AND HAVE_IFADDRS_H)
|
||||
include(TestAppendRequiredLibraries)
|
||||
test_append_socket_library(core_interface)
|
||||
endif()
|
||||
@@ -19,8 +28,6 @@ endif()
|
||||
include(TestAppendRequiredLibraries)
|
||||
test_append_atomic_library(core_interface)
|
||||
|
||||
# Even though ::system is part of the standard library, we still check
|
||||
# for it, to support building targets that don't have it, such as iOS.
|
||||
check_cxx_symbol_exists(std::system "cstdlib" HAVE_STD_SYSTEM)
|
||||
check_cxx_symbol_exists(::_wsystem "stdlib.h" HAVE__WSYSTEM)
|
||||
if(HAVE_STD_SYSTEM OR HAVE__WSYSTEM)
|
||||
@@ -55,6 +62,13 @@ check_cxx_source_compiles("
|
||||
|
||||
# Check for posix_fallocate().
|
||||
check_cxx_source_compiles("
|
||||
// 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 <fcntl.h>
|
||||
|
||||
int main()
|
||||
@@ -163,6 +177,7 @@ if(NOT MSVC)
|
||||
" HAVE_SSE41
|
||||
CXXFLAGS ${SSE41_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_SSE41 ${HAVE_SSE41})
|
||||
|
||||
# Check for AVX2 intrinsics.
|
||||
set(AVX2_CXXFLAGS -mavx -mavx2)
|
||||
@@ -177,6 +192,7 @@ if(NOT MSVC)
|
||||
" HAVE_AVX2
|
||||
CXXFLAGS ${AVX2_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_AVX2 ${HAVE_AVX2})
|
||||
|
||||
# Check for x86 SHA-NI intrinsics.
|
||||
set(X86_SHANI_CXXFLAGS -msse4 -msha)
|
||||
@@ -193,6 +209,7 @@ if(NOT MSVC)
|
||||
" HAVE_X86_SHANI
|
||||
CXXFLAGS ${X86_SHANI_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_X86_SHANI ${HAVE_X86_SHANI})
|
||||
|
||||
# Check for ARMv8 SHA-NI intrinsics.
|
||||
set(ARM_SHANI_CXXFLAGS -march=armv8-a+crypto)
|
||||
@@ -210,4 +227,5 @@ if(NOT MSVC)
|
||||
" HAVE_ARM_SHANI
|
||||
CXXFLAGS ${ARM_SHANI_CXXFLAGS}
|
||||
)
|
||||
set(ENABLE_ARM_SHANI ${HAVE_ARM_SHANI})
|
||||
endif()
|
||||
|
||||
@@ -90,6 +90,9 @@ else()
|
||||
try_append_cxx_flags("-Wconditional-uninitialized" TARGET nowarn_leveldb_interface SKIP_LINK
|
||||
IF_CHECK_PASSED "-Wno-conditional-uninitialized"
|
||||
)
|
||||
try_append_cxx_flags("-Wsuggest-override" TARGET nowarn_leveldb_interface SKIP_LINK
|
||||
IF_CHECK_PASSED "-Wno-suggest-override"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(leveldb PRIVATE
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Copyright (c) 2025 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
function(add_libmultiprocess subdir)
|
||||
# Set BUILD_TESTING to match BUILD_TESTS. BUILD_TESTING is a standard cmake
|
||||
# option that controls whether enable_testing() is called, but in the bitcoin
|
||||
# build a BUILD_TESTS option is used instead.
|
||||
set(BUILD_TESTING "${BUILD_TESTS}")
|
||||
add_subdirectory(${subdir} EXCLUDE_FROM_ALL)
|
||||
# Apply core_interface compile options to libmultiprocess runtime library.
|
||||
target_link_libraries(multiprocess PUBLIC $<BUILD_INTERFACE:core_interface>)
|
||||
target_link_libraries(mputil PUBLIC $<BUILD_INTERFACE:core_interface>)
|
||||
target_link_libraries(mpgen PUBLIC $<BUILD_INTERFACE:core_interface>)
|
||||
# Mark capproto options as advanced to hide by default from cmake UI
|
||||
mark_as_advanced(CapnProto_DIR)
|
||||
mark_as_advanced(CapnProto_capnpc_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_capnp_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_capnp-json_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_capnp-rpc_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_capnp-websocket_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj-async_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj-gzip_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj-http_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION)
|
||||
mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION)
|
||||
if(BUILD_TESTS)
|
||||
# Add tests to "all" target so ctest can run them
|
||||
set_target_properties(mptests PROPERTIES EXCLUDE_FROM_ALL OFF)
|
||||
endif()
|
||||
# Exclude examples from compilation database, because the examples are not
|
||||
# built by default, and they contain generated c++ code. Without this
|
||||
# exclusion, tools like clang-tidy and IWYU that make use of compilation
|
||||
# database would complain that the generated c++ source files do not exist. An
|
||||
# alternate fix could build "mpexamples" by default like "mptests" above.
|
||||
set_target_properties(mpcalculator mpprinter mpexample PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
|
||||
endfunction()
|
||||
@@ -29,17 +29,17 @@ function(add_boost_if_needed)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(Boost 1.74.0 REQUIRED CONFIG)
|
||||
mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR)
|
||||
# Workaround for a bug in NetBSD pkgsrc.
|
||||
# See: https://github.com/NetBSD/pkgsrc/issues/167.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
||||
get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE)
|
||||
set_target_properties(Boost::headers PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir}
|
||||
)
|
||||
unset(_boost_include_dir)
|
||||
# We cannot rely on find_package(Boost ...) to work properly without
|
||||
# Boost_NO_BOOST_CMAKE set until we require a more recent Boost because
|
||||
# upstream did not ship proper CMake files until 1.82.0.
|
||||
# Until then, we rely on CMake's FindBoost module.
|
||||
# See: https://cmake.org/cmake/help/latest/policy/CMP0167.html
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 OLD)
|
||||
endif()
|
||||
set(Boost_NO_BOOST_CMAKE ON)
|
||||
find_package(Boost 1.73.0 REQUIRED)
|
||||
mark_as_advanced(Boost_INCLUDE_DIR)
|
||||
set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
target_compile_definitions(Boost::headers INTERFACE
|
||||
# We don't use multi_index serialization.
|
||||
@@ -57,24 +57,34 @@ function(add_boost_if_needed)
|
||||
# older than 1.80.
|
||||
# See: https://github.com/boostorg/config/pull/430.
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -DBOOST_NO_CXX98_FUNCTION_BASE)
|
||||
get_target_property(CMAKE_REQUIRED_INCLUDES Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})
|
||||
include(CMakePushCheckState)
|
||||
cmake_push_check_state()
|
||||
include(TryAppendCXXFlags)
|
||||
set(CMAKE_REQUIRED_FLAGS ${working_compiler_werror_flag})
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("
|
||||
#include <boost/config.hpp>
|
||||
" NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
|
||||
)
|
||||
cmake_pop_check_state()
|
||||
if(NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE)
|
||||
target_compile_definitions(Boost::headers INTERFACE
|
||||
BOOST_NO_CXX98_FUNCTION_BASE
|
||||
)
|
||||
else()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
# Some package managers, such as vcpkg, vendor Boost.Test separately
|
||||
# from the rest of the headers, so we have to check for it individually.
|
||||
if(BUILD_TESTS AND DEFINED VCPKG_TARGET_TRIPLET)
|
||||
find_package(boost_included_unit_test_framework ${Boost_VERSION} EXACT REQUIRED CONFIG)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DBOOST_TEST_NO_MAIN)
|
||||
include(CheckIncludeFileCXX)
|
||||
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
|
||||
if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H)
|
||||
message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -4,21 +4,11 @@
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
function(add_windows_resources target rc_file)
|
||||
macro(add_windows_resources target rc_file)
|
||||
if(WIN32)
|
||||
target_sources(${target} PRIVATE ${rc_file})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Add a fusion manifest to Windows executables.
|
||||
# See: https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests
|
||||
function(add_windows_application_manifest target)
|
||||
if(WIN32)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/windows-app.manifest.in ${target}.manifest USE_SOURCE_PERMISSIONS)
|
||||
file(CONFIGURE
|
||||
OUTPUT ${target}-manifest.rc
|
||||
CONTENT "1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ \"${target}.manifest\""
|
||||
set_property(SOURCE ${rc_file}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
|
||||
)
|
||||
add_windows_resources(${target} ${CMAKE_CURRENT_BINARY_DIR}/${target}-manifest.rc)
|
||||
endif()
|
||||
endfunction()
|
||||
endmacro()
|
||||
|
||||
133
cmake/module/FindBerkeleyDB.cmake
Normal file
133
cmake/module/FindBerkeleyDB.cmake
Normal file
@@ -0,0 +1,133 @@
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
#[=======================================================================[
|
||||
FindBerkeleyDB
|
||||
--------------
|
||||
|
||||
Finds the Berkeley DB headers and library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module provides imported target ``BerkeleyDB::BerkeleyDB``, if
|
||||
Berkeley DB has been found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
``BerkeleyDB_FOUND``
|
||||
"True" if Berkeley DB found.
|
||||
|
||||
``BerkeleyDB_VERSION``
|
||||
The MAJOR.MINOR version of Berkeley DB found.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
set(_BerkeleyDB_homebrew_prefix)
|
||||
if(CMAKE_HOST_APPLE)
|
||||
find_program(HOMEBREW_EXECUTABLE brew)
|
||||
if(HOMEBREW_EXECUTABLE)
|
||||
# The Homebrew package manager installs the berkeley-db* packages as
|
||||
# "keg-only", which means they are not symlinked into the default prefix.
|
||||
# To find such a package, the find_path() and find_library() commands
|
||||
# need additional path hints that are computed by Homebrew itself.
|
||||
execute_process(
|
||||
COMMAND ${HOMEBREW_EXECUTABLE} --prefix berkeley-db@4
|
||||
OUTPUT_VARIABLE _BerkeleyDB_homebrew_prefix
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_path(BerkeleyDB_INCLUDE_DIR
|
||||
NAMES db_cxx.h
|
||||
HINTS ${_BerkeleyDB_homebrew_prefix}/include
|
||||
PATH_SUFFIXES 4.8 48 db4.8 4 db4 5.3 db5.3 5 db5
|
||||
)
|
||||
mark_as_advanced(BerkeleyDB_INCLUDE_DIR)
|
||||
unset(_BerkeleyDB_homebrew_prefix)
|
||||
|
||||
if(NOT BerkeleyDB_LIBRARY)
|
||||
if(VCPKG_TARGET_TRIPLET)
|
||||
# The vcpkg package manager installs the berkeleydb package with the same name
|
||||
# of release and debug libraries. Therefore, the default search paths set by
|
||||
# vcpkg's toolchain file cannot be used to search libraries as the debug one
|
||||
# will always be found.
|
||||
set(CMAKE_FIND_USE_CMAKE_PATH FALSE)
|
||||
endif()
|
||||
|
||||
get_filename_component(_BerkeleyDB_lib_hint "${BerkeleyDB_INCLUDE_DIR}" DIRECTORY)
|
||||
|
||||
find_library(BerkeleyDB_LIBRARY_RELEASE
|
||||
NAMES db_cxx-4.8 db4_cxx db48 db_cxx-5.3 db_cxx-5 db_cxx libdb48
|
||||
NAMES_PER_DIR
|
||||
HINTS ${_BerkeleyDB_lib_hint}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
mark_as_advanced(BerkeleyDB_LIBRARY_RELEASE)
|
||||
|
||||
find_library(BerkeleyDB_LIBRARY_DEBUG
|
||||
NAMES db_cxx-4.8 db4_cxx db48 db_cxx-5.3 db_cxx-5 db_cxx libdb48
|
||||
NAMES_PER_DIR
|
||||
HINTS ${_BerkeleyDB_lib_hint}
|
||||
PATH_SUFFIXES debug/lib
|
||||
)
|
||||
mark_as_advanced(BerkeleyDB_LIBRARY_DEBUG)
|
||||
|
||||
unset(_BerkeleyDB_lib_hint)
|
||||
unset(CMAKE_FIND_USE_CMAKE_PATH)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(BerkeleyDB)
|
||||
# The select_library_configurations() command sets BerkeleyDB_FOUND, but we
|
||||
# want the one from the find_package_handle_standard_args() command below.
|
||||
unset(BerkeleyDB_FOUND)
|
||||
endif()
|
||||
|
||||
if(BerkeleyDB_INCLUDE_DIR)
|
||||
file(STRINGS "${BerkeleyDB_INCLUDE_DIR}/db.h" _BerkeleyDB_version_strings REGEX "^#define[\t ]+DB_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+.*")
|
||||
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_major "${_BerkeleyDB_version_strings}")
|
||||
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_minor "${_BerkeleyDB_version_strings}")
|
||||
string(REGEX REPLACE ".*#define[\t ]+DB_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" _BerkeleyDB_version_patch "${_BerkeleyDB_version_strings}")
|
||||
unset(_BerkeleyDB_version_strings)
|
||||
# The MAJOR.MINOR.PATCH version will be logged in the following find_package_handle_standard_args() command.
|
||||
set(_BerkeleyDB_full_version ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor}.${_BerkeleyDB_version_patch})
|
||||
set(BerkeleyDB_VERSION ${_BerkeleyDB_version_major}.${_BerkeleyDB_version_minor})
|
||||
unset(_BerkeleyDB_version_major)
|
||||
unset(_BerkeleyDB_version_minor)
|
||||
unset(_BerkeleyDB_version_patch)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BerkeleyDB
|
||||
REQUIRED_VARS BerkeleyDB_LIBRARY BerkeleyDB_INCLUDE_DIR
|
||||
VERSION_VAR _BerkeleyDB_full_version
|
||||
)
|
||||
unset(_BerkeleyDB_full_version)
|
||||
|
||||
if(BerkeleyDB_FOUND AND NOT TARGET BerkeleyDB::BerkeleyDB)
|
||||
add_library(BerkeleyDB::BerkeleyDB UNKNOWN IMPORTED)
|
||||
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${BerkeleyDB_INCLUDE_DIR}"
|
||||
)
|
||||
if(BerkeleyDB_LIBRARY_RELEASE)
|
||||
set_property(TARGET BerkeleyDB::BerkeleyDB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE
|
||||
)
|
||||
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${BerkeleyDB_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
if(BerkeleyDB_LIBRARY_DEBUG)
|
||||
set_property(TARGET BerkeleyDB::BerkeleyDB APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(BerkeleyDB::BerkeleyDB PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${BerkeleyDB_LIBRARY_DEBUG}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -27,6 +27,19 @@ if(CMAKE_HOST_APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Save CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
|
||||
unset(_qt_find_root_path_mode_library_saved)
|
||||
if(DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
|
||||
set(_qt_find_root_path_mode_library_saved ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
|
||||
endif()
|
||||
|
||||
# The Qt config files internally use find_library() calls for all
|
||||
# dependencies to ensure their availability. In turn, the find_library()
|
||||
# inspects the well-known locations on the file system; therefore, it must
|
||||
# be able to find platform-specific system libraries, for example:
|
||||
# /usr/x86_64-w64-mingw32/lib/libm.a or /usr/arm-linux-gnueabihf/lib/libm.a.
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
|
||||
find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
|
||||
COMPONENTS ${Qt_FIND_COMPONENTS}
|
||||
HINTS ${_qt_homebrew_prefix}
|
||||
@@ -34,6 +47,14 @@ find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION}
|
||||
)
|
||||
unset(_qt_homebrew_prefix)
|
||||
|
||||
# Restore CMAKE_FIND_ROOT_PATH_MODE_LIBRARY state.
|
||||
if(DEFINED _qt_find_root_path_mode_library_saved)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${_qt_find_root_path_mode_library_saved})
|
||||
unset(_qt_find_root_path_mode_library_saved)
|
||||
else()
|
||||
unset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Qt
|
||||
REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR
|
||||
|
||||
@@ -7,7 +7,6 @@ function(generate_setup_nsi)
|
||||
set(abs_top_builddir ${PROJECT_BINARY_DIR})
|
||||
set(CLIENT_URL ${PROJECT_HOMEPAGE_URL})
|
||||
set(CLIENT_TARNAME "bitcoin")
|
||||
set(BITCOIN_WRAPPER_NAME "bitcoin")
|
||||
set(BITCOIN_GUI_NAME "bitcoin-qt")
|
||||
set(BITCOIN_DAEMON_NAME "bitcoind")
|
||||
set(BITCOIN_CLI_NAME "bitcoin-cli")
|
||||
|
||||
@@ -7,19 +7,14 @@ include(GNUInstallDirs)
|
||||
|
||||
function(install_binary_component component)
|
||||
cmake_parse_arguments(PARSE_ARGV 1
|
||||
IC # prefix
|
||||
"HAS_MANPAGE;INTERNAL" # options
|
||||
"" # one_value_keywords
|
||||
"" # multi_value_keywords
|
||||
IC # prefix
|
||||
"HAS_MANPAGE" # options
|
||||
"" # one_value_keywords
|
||||
"" # multi_value_keywords
|
||||
)
|
||||
set(target_name ${component})
|
||||
if(IC_INTERNAL)
|
||||
set(runtime_dest ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
else()
|
||||
set(runtime_dest ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
install(TARGETS ${target_name}
|
||||
RUNTIME DESTINATION ${runtime_dest}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT ${component}
|
||||
)
|
||||
if(INSTALL_MAN AND IC_HAS_MANPAGE)
|
||||
|
||||
@@ -19,11 +19,11 @@ function(setup_split_debug_script)
|
||||
endfunction()
|
||||
|
||||
function(add_maintenance_targets)
|
||||
if(NOT TARGET Python3::Interpreter)
|
||||
if(NOT PYTHON_COMMAND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
foreach(target IN ITEMS bitcoin bitcoind bitcoin-node bitcoin-qt bitcoin-gui bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin)
|
||||
foreach(target IN ITEMS bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin)
|
||||
if(TARGET ${target})
|
||||
list(APPEND executables $<TARGET_FILE:${target}>)
|
||||
endif()
|
||||
@@ -31,27 +31,19 @@ function(add_maintenance_targets)
|
||||
|
||||
add_custom_target(check-symbols
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..."
|
||||
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
|
||||
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/symbol-check.py ${executables}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(check-security
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
|
||||
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
|
||||
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/security-check.py ${executables}
|
||||
VERBATIM
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(add_windows_deploy_target)
|
||||
if(MINGW AND TARGET bitcoin AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
|
||||
find_program(MAKENSIS_EXECUTABLE makensis)
|
||||
if(NOT MAKENSIS_EXECUTABLE)
|
||||
add_custom_target(deploy
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Error: NSIS not found"
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(MINGW AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
|
||||
# TODO: Consider replacing this code with the CPack NSIS Generator.
|
||||
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
|
||||
include(GenerateSetupNsi)
|
||||
@@ -59,7 +51,6 @@ function(add_windows_deploy_target)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/release
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin>
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-qt> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-qt>
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoind> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoind>
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-cli> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-cli>
|
||||
@@ -67,7 +58,7 @@ function(add_windows_deploy_target)
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
|
||||
COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
|
||||
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(deploy DEPENDS ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe)
|
||||
@@ -100,7 +91,7 @@ function(add_macos_deploy_target)
|
||||
if(CMAKE_HOST_APPLE)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip
|
||||
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
|
||||
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
|
||||
VERBATIM
|
||||
)
|
||||
@@ -113,7 +104,7 @@ function(add_macos_deploy_target)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
|
||||
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
|
||||
COMMAND OBJDUMP=${CMAKE_OBJDUMP} ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
|
||||
VERBATIM
|
||||
)
|
||||
@@ -121,22 +112,16 @@ function(add_macos_deploy_target)
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
|
||||
)
|
||||
|
||||
find_program(ZIP_EXECUTABLE zip)
|
||||
if(NOT ZIP_EXECUTABLE)
|
||||
add_custom_target(deploy
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Error: ZIP not found"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
|
||||
WORKING_DIRECTORY dist
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(deploy
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
|
||||
)
|
||||
endif()
|
||||
find_program(ZIP_COMMAND zip REQUIRED)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
|
||||
WORKING_DIRECTORY dist
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_COMMAND} ${osx_volname}.zip
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(deploy
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
|
||||
)
|
||||
endif()
|
||||
add_dependencies(deploydir bitcoin-qt)
|
||||
add_dependencies(deploy deploydir)
|
||||
|
||||
@@ -38,7 +38,8 @@ function(test_append_socket_library target)
|
||||
message(FATAL_ERROR "Cannot figure out how to use getifaddrs/freeifaddrs.")
|
||||
endif()
|
||||
endif()
|
||||
set(HAVE_IFADDRS TRUE PARENT_SCOPE)
|
||||
set(HAVE_DECL_GETIFADDRS TRUE PARENT_SCOPE)
|
||||
set(HAVE_DECL_FREEIFADDRS TRUE PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Clang, when building for 32-bit,
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
enable_language(C)
|
||||
|
||||
function(add_secp256k1 subdir)
|
||||
message("")
|
||||
message("Configuring secp256k1 subtree...")
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
|
||||
set(SECP256K1_ENABLE_MODULE_ECDH OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_ENABLE_MODULE_MUSIG ON CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
|
||||
if(NOT BUILD_TESTS)
|
||||
# Always skip the ctime tests, if we are building no other tests.
|
||||
# Otherwise, they are built if Valgrind is available. See SECP256K1_VALGRIND.
|
||||
set(SECP256K1_BUILD_CTIME_TESTS ${BUILD_TESTS} CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
include(GetTargetInterface)
|
||||
# -fsanitize and related flags apply to both C++ and C,
|
||||
# so we can pass them down to libsecp256k1 as CFLAGS and LDFLAGS.
|
||||
get_target_interface(SECP256K1_APPEND_CFLAGS "" sanitize_interface COMPILE_OPTIONS)
|
||||
string(STRIP "${SECP256K1_APPEND_CFLAGS} ${APPEND_CPPFLAGS}" SECP256K1_APPEND_CFLAGS)
|
||||
string(STRIP "${SECP256K1_APPEND_CFLAGS} ${APPEND_CFLAGS}" SECP256K1_APPEND_CFLAGS)
|
||||
set(SECP256K1_APPEND_CFLAGS ${SECP256K1_APPEND_CFLAGS} CACHE STRING "" FORCE)
|
||||
get_target_interface(SECP256K1_APPEND_LDFLAGS "" sanitize_interface LINK_OPTIONS)
|
||||
string(STRIP "${SECP256K1_APPEND_LDFLAGS} ${APPEND_LDFLAGS}" SECP256K1_APPEND_LDFLAGS)
|
||||
set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE)
|
||||
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
|
||||
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
|
||||
if(config STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
string(TOUPPER "${config}" config)
|
||||
set(CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
endforeach()
|
||||
# If the CFLAGS environment variable is defined during building depends
|
||||
# and configuring this build system, its content might be duplicated.
|
||||
if(DEFINED ENV{CFLAGS})
|
||||
deduplicate_flags(CMAKE_C_FLAGS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${subdir})
|
||||
set_target_properties(secp256k1 PROPERTIES
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
endfunction()
|
||||
15
cmake/tests.cmake
Normal file
15
cmake/tests.cmake
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
|
||||
add_test(NAME util_test_runner
|
||||
COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PYTHON_COMMAND)
|
||||
add_test(NAME util_rpcauth_test
|
||||
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
|
||||
)
|
||||
endif()
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="org.bitcoincore.${target}"
|
||||
version="${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD}.0"
|
||||
/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
@@ -9,75 +9,4 @@ 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
|
||||
python3 asmap-tool.py diff_addrs /path/to/first.file /path/to/second.file addrs.file
|
||||
```
|
||||
These commands may take a few minutes to run with `python3`,
|
||||
depending on the amount of data involved and your machine specs.
|
||||
Consider using `pypy3` for a faster run time.
|
||||
|
||||
### Encoding and Decoding
|
||||
|
||||
ASmap files are somewhat large in text form, and need to be encoded
|
||||
to binary before being used with Bitcoin Core.
|
||||
|
||||
The `encode` command takes an ASmap and an output file.
|
||||
|
||||
The `--fill`/`-f` flag further reduces the size of the output file
|
||||
by assuming an AS assignment for an unmapped network if an adjacent network is assigned.
|
||||
This procedure is lossy, in the sense that it loses information
|
||||
about which ranges were unassigned.
|
||||
However, if the input ASmap is incomplete,
|
||||
this procedure will also reassign ranges that should have an AS assignment,
|
||||
resulting in an ASmap that may diverge from reality significantly.
|
||||
Finally, another consequence is that the resulting encoded file
|
||||
will no longer be meaningful for diffs.
|
||||
Therefore only use `--fill` if
|
||||
you want to optimise space, you have a reasonably complete ASmap,
|
||||
and do not intend to diff the file at a later time.
|
||||
|
||||
The `decode` command takes an encoded ASmap and an output file.
|
||||
As with `encode`, the `--fill`/`-f` flag reduces the output file size
|
||||
by reassigning subnets. Conversely, the `--non-overlapping`/`-n` flag
|
||||
increases output size by outputting strictly non-overlapping network ranges.
|
||||
|
||||
### Comparing ASmaps
|
||||
|
||||
AS control of IP networks changes frequently, therefore it can be useful to get
|
||||
the changes between two ASmaps via the `diff` and `diff_addrs` commands.
|
||||
|
||||
`diff` takes two ASmap files, and returns a file detailing the changes
|
||||
in the state of a network's AS assignment between the first and the second file.
|
||||
This command may take a few minutes to run, depending on your machine.
|
||||
|
||||
The example below shows the three possible output states:
|
||||
- reassigned to a new AS (`AS26496 # was AS20738`),
|
||||
- present in the first but not the second (`# 220.157.65.0/24 was AS9723`),
|
||||
- or present in the second but not the first (`# was unassigned`).
|
||||
|
||||
```
|
||||
217.199.160.0/19 AS26496 # was AS20738
|
||||
# 220.157.65.0/24 was AS9723
|
||||
216.151.172.0/23 AS400080 # was unassigned
|
||||
2001:470:49::/48 AS20205 # was AS6939
|
||||
# 2001:678:bd0::/48 was AS207631
|
||||
2001:67c:308::/48 AS26496 # was unassigned
|
||||
```
|
||||
`diff` accepts a `--ignore-unassigned`/`-i` flag
|
||||
which ignores networks present in the second but not the first.
|
||||
|
||||
`diff_addrs` is intended to provide changes between two ASmaps and
|
||||
a node's known peers.
|
||||
The command takes two ASmap files, and a file of IP addresses as output by
|
||||
the `bitcoin-cli getnodeaddresses` command.
|
||||
It returns the changes between the two ASmaps for the peer IPs provided in
|
||||
the `getnodeaddresses` output.
|
||||
The resulting file is in the same format as the `diff` command shown above.
|
||||
|
||||
You can output address data to a file:
|
||||
```
|
||||
bitcoin-cli getnodeaddresses 0 > addrs.json
|
||||
```
|
||||
and pass in the address file as the third argument:
|
||||
```
|
||||
python3 asmap-tool.py diff_addrs path/to/first.file path/to/second.file addrs.json
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ _bitcoin_cli() {
|
||||
|
||||
if ((cword > 4)); then
|
||||
case ${words[cword-4]} in
|
||||
listtransactions|setban)
|
||||
importaddress|listtransactions|setban)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
@@ -52,7 +52,10 @@ _bitcoin_cli() {
|
||||
|
||||
if ((cword > 3)); then
|
||||
case ${words[cword-3]} in
|
||||
getbalance|gettxout|listreceivedbyaddress|listsinceblock)
|
||||
addmultisigaddress)
|
||||
return 0
|
||||
;;
|
||||
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
|
||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
@@ -77,7 +80,7 @@ _bitcoin_cli() {
|
||||
fi
|
||||
|
||||
case "$prev" in
|
||||
backupwallet)
|
||||
backupwallet|dumpwallet|importwallet)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
|
||||
@@ -5,7 +5,7 @@ Upstream-Contact: Satoshi Nakamoto <satoshin@gmx.com>
|
||||
Source: https://github.com/bitcoin/bitcoin
|
||||
|
||||
Files: *
|
||||
Copyright: 2009-2026, Bitcoin Core Developers
|
||||
Copyright: 2009-2025, 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.
|
||||
@@ -121,6 +121,17 @@ Comment:
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
License: public-domain
|
||||
This work is in the public domain.
|
||||
|
||||
|
||||
@@ -8,42 +8,18 @@ deterministic-fuzz-coverage
|
||||
A tool to check for non-determinism in fuzz coverage. To get the help, run:
|
||||
|
||||
```
|
||||
cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- --help
|
||||
RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- --help
|
||||
```
|
||||
|
||||
To execute the tool, compilation has to be done with the build options:
|
||||
To execute the tool, compilation has to be done with the build options
|
||||
`-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++'
|
||||
-DBUILD_FOR_FUZZING=ON -DCMAKE_CXX_FLAGS='-fPIC -fprofile-instr-generate
|
||||
-fcoverage-mapping'`. Both llvm-profdata and llvm-cov must be installed. Also,
|
||||
the qa-assets repository must have been cloned. Finally, a fuzz target has to
|
||||
be picked before running the tool:
|
||||
|
||||
```
|
||||
-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DBUILD_FOR_FUZZING=ON -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping'
|
||||
```
|
||||
|
||||
Both llvm-profdata and llvm-cov must be installed. Also, the qa-assets
|
||||
repository must have been cloned. Finally, a fuzz target has to be picked
|
||||
before running the tool:
|
||||
|
||||
```
|
||||
cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/build_dir $PWD/qa-assets/fuzz_corpora fuzz_target_name
|
||||
```
|
||||
|
||||
deterministic-unittest-coverage
|
||||
===========================
|
||||
|
||||
A tool to check for non-determinism in unit-test coverage. To get the help, run:
|
||||
|
||||
```
|
||||
cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- --help
|
||||
```
|
||||
|
||||
To execute the tool, compilation has to be done with the build options:
|
||||
|
||||
```
|
||||
-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping'
|
||||
```
|
||||
|
||||
Both llvm-profdata and llvm-cov must be installed.
|
||||
|
||||
```
|
||||
cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- $PWD/build_dir <boost unittest filter>
|
||||
RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/build_dir $PWD/qa-assets/corpora-dir fuzz_target_name
|
||||
```
|
||||
|
||||
clang-format-diff.py
|
||||
@@ -159,6 +135,35 @@ For example:
|
||||
BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh
|
||||
```
|
||||
|
||||
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_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
|
||||
.../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
|
||||
.../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
|
||||
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
|
||||
|
||||
circular-dependencies.py
|
||||
========================
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@ ALLOWED_DEPENDENCIES+=(
|
||||
|
||||
# Declare list of known errors that should be suppressed.
|
||||
declare -A SUPPRESS
|
||||
# init.cpp file currently calls Berkeley DB sanity check function on startup, so
|
||||
# there is an undocumented dependency of the node library on the wallet library.
|
||||
SUPPRESS["init.cpp.o bdb.cpp.o _ZN6wallet27BerkeleyDatabaseSanityCheckEv"]=1
|
||||
# init/common.cpp file calls InitError and InitWarning from interface_ui which
|
||||
# is currently part of the node library. interface_ui should just be part of the
|
||||
# common library instead, and is moved in
|
||||
|
||||
@@ -22,6 +22,7 @@ EXCLUDE = [
|
||||
'src/test/fuzz/FuzzedDataProvider.h',
|
||||
'src/tinyformat.h',
|
||||
'src/bench/nanobench.h',
|
||||
'test/functional/test_framework/bignum.py',
|
||||
# python init:
|
||||
'*__init__.py',
|
||||
]
|
||||
@@ -93,6 +94,7 @@ 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",
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "deterministic-fuzz-coverage"
|
||||
version = "0.1.0"
|
||||
@@ -2,102 +2,89 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::env;
|
||||
use std::fs::{read_dir, DirEntry, File};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Command, ExitCode};
|
||||
use std::fs::{read_dir, File};
|
||||
use std::path::Path;
|
||||
use std::process::{exit, Command, Stdio};
|
||||
use std::str;
|
||||
use std::thread;
|
||||
|
||||
/// A type for a complete and readable error message.
|
||||
type AppError = String;
|
||||
type AppResult = Result<(), AppError>;
|
||||
|
||||
const LLVM_PROFDATA: &str = "llvm-profdata";
|
||||
const LLVM_COV: &str = "llvm-cov";
|
||||
const GIT: &str = "git";
|
||||
const DIFF: &str = "diff";
|
||||
|
||||
const DEFAULT_PAR: usize = 1;
|
||||
|
||||
fn exit_help(err: &str) -> AppError {
|
||||
format!(
|
||||
r#"
|
||||
Error: {err}
|
||||
|
||||
Usage: program ./build_dir ./qa-assets/fuzz_corpora fuzz_target_name [parallelism={DEFAULT_PAR}]
|
||||
|
||||
Refer to the devtools/README.md for more details."#
|
||||
)
|
||||
fn exit_help(err: &str) -> ! {
|
||||
eprintln!("Error: {}", err);
|
||||
eprintln!();
|
||||
eprintln!("Usage: program ./build_dir ./qa-assets-corpora-dir fuzz_target");
|
||||
eprintln!();
|
||||
eprintln!("Refer to the devtools/README.md for more details.");
|
||||
exit(1)
|
||||
}
|
||||
|
||||
fn sanity_check(corpora_dir: &Path, fuzz_exe: &Path) -> AppResult {
|
||||
for tool in [LLVM_PROFDATA, LLVM_COV, GIT] {
|
||||
let output = Command::new(tool).arg("--help").output();
|
||||
fn sanity_check(corpora_dir: &Path, fuzz_exe: &Path) {
|
||||
for tool in [LLVM_PROFDATA, LLVM_COV, DIFF] {
|
||||
let output = Command::new(tool).arg("--version").output();
|
||||
match output {
|
||||
Ok(output) if output.status.success() => {}
|
||||
_ => Err(exit_help(&format!("The tool {} is not installed", tool)))?,
|
||||
_ => {
|
||||
exit_help(&format!("The tool {} is not installed", tool));
|
||||
}
|
||||
}
|
||||
}
|
||||
if !corpora_dir.is_dir() {
|
||||
Err(exit_help(&format!(
|
||||
exit_help(&format!(
|
||||
"Fuzz corpora path ({}) must be a directory",
|
||||
corpora_dir.display()
|
||||
)))?;
|
||||
));
|
||||
}
|
||||
if !fuzz_exe.exists() {
|
||||
Err(exit_help(&format!(
|
||||
exit_help(&format!(
|
||||
"Fuzz executable ({}) not found",
|
||||
fuzz_exe.display()
|
||||
)))?;
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn app() -> AppResult {
|
||||
fn main() {
|
||||
// Parse args
|
||||
let args = env::args().collect::<Vec<_>>();
|
||||
let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?;
|
||||
let build_dir = args
|
||||
.get(1)
|
||||
.unwrap_or_else(|| exit_help("Must set build dir"));
|
||||
if build_dir == "--help" {
|
||||
Err(exit_help("--help requested"))?;
|
||||
exit_help("--help requested")
|
||||
}
|
||||
let corpora_dir = args.get(2).ok_or(exit_help("Must set fuzz corpora dir"))?;
|
||||
let corpora_dir = args
|
||||
.get(2)
|
||||
.unwrap_or_else(|| exit_help("Must set fuzz corpora dir"));
|
||||
let fuzz_target = args
|
||||
.get(3)
|
||||
// Require fuzz target for now. In the future it could be optional and the tool could
|
||||
// iterate over all compiled fuzz targets
|
||||
.ok_or(exit_help("Must set fuzz target"))?;
|
||||
let par = match args.get(4) {
|
||||
Some(s) => s
|
||||
.parse::<usize>()
|
||||
.map_err(|e| exit_help(&format!("Could not parse parallelism as usize ({s}): {e}")))?,
|
||||
None => DEFAULT_PAR,
|
||||
}
|
||||
.max(1);
|
||||
if args.get(5).is_some() {
|
||||
Err(exit_help("Too many args"))?;
|
||||
.unwrap_or_else(|| exit_help("Must set fuzz target"));
|
||||
if args.get(4).is_some() {
|
||||
exit_help("Too many args")
|
||||
}
|
||||
|
||||
let build_dir = Path::new(build_dir);
|
||||
let corpora_dir = Path::new(corpora_dir);
|
||||
let fuzz_exe = build_dir.join("bin/fuzz");
|
||||
let fuzz_exe = build_dir.join("src/test/fuzz/fuzz");
|
||||
|
||||
sanity_check(corpora_dir, &fuzz_exe)?;
|
||||
sanity_check(corpora_dir, &fuzz_exe);
|
||||
|
||||
deterministic_coverage(build_dir, corpora_dir, &fuzz_exe, fuzz_target, par)
|
||||
deterministic_coverage(build_dir, corpora_dir, &fuzz_exe, fuzz_target);
|
||||
}
|
||||
|
||||
fn using_libfuzzer(fuzz_exe: &Path) -> Result<bool, AppError> {
|
||||
fn using_libfuzzer(fuzz_exe: &Path) -> bool {
|
||||
println!("Check if using libFuzzer ...");
|
||||
let stderr = Command::new(fuzz_exe)
|
||||
.arg("-help=1") // Will be interpreted as option (libfuzzer) or as input file
|
||||
.env("FUZZ", "addition_overflow") // Any valid target
|
||||
.output()
|
||||
.map_err(|e| format!("fuzz failed with {e}"))?
|
||||
.expect("fuzz failed")
|
||||
.stderr;
|
||||
let help_output = str::from_utf8(&stderr)
|
||||
.map_err(|e| format!("The libFuzzer -help=1 output must be valid text ({e})"))?;
|
||||
Ok(help_output.contains("libFuzzer"))
|
||||
let help_output = str::from_utf8(&stderr).expect("The -help=1 output must be valid text");
|
||||
help_output.contains("libFuzzer")
|
||||
}
|
||||
|
||||
fn deterministic_coverage(
|
||||
@@ -105,177 +92,115 @@ fn deterministic_coverage(
|
||||
corpora_dir: &Path,
|
||||
fuzz_exe: &Path,
|
||||
fuzz_target: &str,
|
||||
par: usize,
|
||||
) -> AppResult {
|
||||
let using_libfuzzer = using_libfuzzer(fuzz_exe)?;
|
||||
if using_libfuzzer {
|
||||
println!("Warning: The fuzz executable was compiled with libFuzzer as sanitizer.");
|
||||
println!("This tool may be tripped by libFuzzer misbehavior.");
|
||||
println!("It is recommended to compile without libFuzzer.");
|
||||
}
|
||||
) {
|
||||
let using_libfuzzer = using_libfuzzer(fuzz_exe);
|
||||
let profraw_file = build_dir.join("fuzz_det_cov.profraw");
|
||||
let profdata_file = build_dir.join("fuzz_det_cov.profdata");
|
||||
let corpus_dir = corpora_dir.join(fuzz_target);
|
||||
let mut entries = read_dir(&corpus_dir)
|
||||
.map_err(|err| {
|
||||
.unwrap_or_else(|err| {
|
||||
exit_help(&format!(
|
||||
"The fuzz target's input directory must exist! ({}; {})",
|
||||
corpus_dir.display(),
|
||||
err
|
||||
))
|
||||
})?
|
||||
})
|
||||
.map(|entry| entry.expect("IO error"))
|
||||
.collect::<Vec<_>>();
|
||||
entries.sort_by_key(|entry| entry.file_name());
|
||||
let run_single = |run_id: char, entry: &Path, thread_id: usize| -> Result<PathBuf, AppError> {
|
||||
let cov_txt_path = build_dir.join(format!("fuzz_det_cov.show.t{thread_id}.{run_id}.txt"));
|
||||
let profraw_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profraw"));
|
||||
let profdata_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profdata"));
|
||||
{
|
||||
let output = {
|
||||
let run_single = |run_id: u8, entry: &Path| {
|
||||
let cov_txt_path = build_dir.join(format!("fuzz_det_cov.show.{run_id}.txt"));
|
||||
assert!({
|
||||
{
|
||||
let mut cmd = Command::new(fuzz_exe);
|
||||
if using_libfuzzer {
|
||||
cmd.args(["-runs=1", "-shuffle=1", "-prefer_small=0"]);
|
||||
cmd.arg("-runs=1");
|
||||
}
|
||||
cmd
|
||||
}
|
||||
.env("LLVM_PROFILE_FILE", &profraw_file)
|
||||
.env("FUZZ", fuzz_target)
|
||||
.arg(entry)
|
||||
.output()
|
||||
.map_err(|e| format!("fuzz failed: {e}"))?;
|
||||
if !output.status.success() {
|
||||
Err(format!(
|
||||
"fuzz failed!\nstdout:\n{}\nstderr:\n{}\n",
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
))?;
|
||||
}
|
||||
}
|
||||
if !Command::new(LLVM_PROFDATA)
|
||||
.status()
|
||||
.expect("fuzz failed")
|
||||
.success()
|
||||
});
|
||||
assert!(Command::new(LLVM_PROFDATA)
|
||||
.arg("merge")
|
||||
.arg("--sparse")
|
||||
.arg(&profraw_file)
|
||||
.arg("-o")
|
||||
.arg(&profdata_file)
|
||||
.status()
|
||||
.map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))?
|
||||
.success()
|
||||
{
|
||||
Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?;
|
||||
}
|
||||
let cov_file = File::create(&cov_txt_path)
|
||||
.map_err(|e| format!("Failed to create coverage txt file ({e})"))?;
|
||||
if !Command::new(LLVM_COV)
|
||||
.expect("merge failed")
|
||||
.success());
|
||||
let cov_file = File::create(&cov_txt_path).expect("Failed to create coverage txt file");
|
||||
let passed = Command::new(LLVM_COV)
|
||||
.args([
|
||||
"show",
|
||||
"--show-line-counts-or-regions",
|
||||
"--show-branches=count",
|
||||
"--show-expansions",
|
||||
"--show-instantiation-summary",
|
||||
"-Xdemangler=llvm-cxxfilt",
|
||||
&format!("--instr-profile={}", profdata_file.display()),
|
||||
])
|
||||
.arg(fuzz_exe)
|
||||
.stdout(cov_file)
|
||||
.stdout(Stdio::from(cov_file))
|
||||
.spawn()
|
||||
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
|
||||
.expect("Failed to execute llvm-cov")
|
||||
.wait()
|
||||
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
|
||||
.success()
|
||||
{
|
||||
Err(format!("{LLVM_COV} show failed"))?;
|
||||
};
|
||||
Ok(cov_txt_path)
|
||||
.expect("Failed to execute llvm-cov")
|
||||
.success();
|
||||
if !passed {
|
||||
panic!("Failed to execute llvm-profdata")
|
||||
}
|
||||
cov_txt_path
|
||||
};
|
||||
let check_diff = |a: &Path, b: &Path, err: &str| -> AppResult {
|
||||
let same = Command::new(GIT)
|
||||
.args(["--no-pager", "diff", "--no-index"])
|
||||
let check_diff = |a: &Path, b: &Path, err: &str| {
|
||||
let same = Command::new(DIFF)
|
||||
.arg("--unified")
|
||||
.arg(a)
|
||||
.arg(b)
|
||||
.status()
|
||||
.map_err(|e| format!("{GIT} diff failed with {e}"))?
|
||||
.expect("Failed to execute diff command")
|
||||
.success();
|
||||
if !same {
|
||||
Err(format!(
|
||||
r#"
|
||||
The coverage was not deterministic between runs.
|
||||
{err}"#
|
||||
))?;
|
||||
eprintln!();
|
||||
eprintln!("The coverage was not determinstic between runs.");
|
||||
eprintln!("{}", err);
|
||||
eprintln!("Exiting.");
|
||||
exit(1);
|
||||
}
|
||||
Ok(())
|
||||
};
|
||||
// First, check that each fuzz input is deterministic running by itself in a process.
|
||||
// First, check that each fuzz input is determinisic running by itself in a process.
|
||||
//
|
||||
// This can catch issues and isolate where a single fuzz input triggers non-determinism, but
|
||||
// all other fuzz inputs are deterministic.
|
||||
//
|
||||
// Also, This can catch issues where several fuzz inputs are non-deterministic, but the sum of
|
||||
// their overall coverage trace remains the same across runs and thus remains undetected.
|
||||
println!(
|
||||
"Check each fuzz input individually ... ({} inputs with parallelism {par})",
|
||||
entries.len()
|
||||
);
|
||||
let check_individual = |entry: &DirEntry, thread_id: usize| -> AppResult {
|
||||
for entry in entries {
|
||||
let entry = entry.path();
|
||||
if !entry.is_file() {
|
||||
Err(format!("{} should be a file", entry.display()))?;
|
||||
}
|
||||
let cov_txt_base = run_single('a', &entry, thread_id)?;
|
||||
let cov_txt_repeat = run_single('b', &entry, thread_id)?;
|
||||
assert!(entry.is_file());
|
||||
let cov_txt_base = run_single(0, &entry);
|
||||
let cov_txt_repeat = run_single(1, &entry);
|
||||
check_diff(
|
||||
&cov_txt_base,
|
||||
&cov_txt_repeat,
|
||||
&format!("The fuzz target input was {}.", entry.display()),
|
||||
)?;
|
||||
Ok(())
|
||||
};
|
||||
thread::scope(|s| -> AppResult {
|
||||
let mut handles = VecDeque::with_capacity(par);
|
||||
let mut res = Ok(());
|
||||
for (i, entry) in entries.iter().enumerate() {
|
||||
println!("[{}/{}]", i + 1, entries.len());
|
||||
handles.push_back(s.spawn(move || check_individual(entry, i % par)));
|
||||
while handles.len() >= par || i == (entries.len() - 1) || res.is_err() {
|
||||
if let Some(th) = handles.pop_front() {
|
||||
let thread_result = match th.join() {
|
||||
Err(_e) => Err("A scoped thread panicked".to_string()),
|
||||
Ok(r) => r,
|
||||
};
|
||||
if thread_result.is_err() {
|
||||
res = thread_result;
|
||||
}
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
res
|
||||
})?;
|
||||
);
|
||||
}
|
||||
// Finally, check that running over all fuzz inputs in one process is deterministic as well.
|
||||
// This can catch issues where mutable global state is leaked from one fuzz input execution to
|
||||
// the next.
|
||||
println!("Check all fuzz inputs in one go ...");
|
||||
{
|
||||
if !corpus_dir.is_dir() {
|
||||
Err(format!("{} should be a folder", corpus_dir.display()))?;
|
||||
}
|
||||
let cov_txt_base = run_single('a', &corpus_dir, 0)?;
|
||||
let cov_txt_repeat = run_single('b', &corpus_dir, 0)?;
|
||||
assert!(corpus_dir.is_dir());
|
||||
let cov_txt_base = run_single(0, &corpus_dir);
|
||||
let cov_txt_repeat = run_single(1, &corpus_dir);
|
||||
check_diff(
|
||||
&cov_txt_base,
|
||||
&cov_txt_repeat,
|
||||
&format!("All fuzz inputs in {} were used.", corpus_dir.display()),
|
||||
)?;
|
||||
}
|
||||
println!("✨ Coverage test passed for {fuzz_target}. ✨");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> ExitCode {
|
||||
match app() {
|
||||
Ok(()) => ExitCode::SUCCESS,
|
||||
Err(err) => {
|
||||
eprintln!("⚠️\n{}", err);
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
);
|
||||
}
|
||||
println!("Coverage test passed for {fuzz_target}.");
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "deterministic-unittest-coverage"
|
||||
version = "0.1.0"
|
||||
@@ -1,6 +0,0 @@
|
||||
[package]
|
||||
name = "deterministic-unittest-coverage"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@@ -1,149 +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/.
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Command, ExitCode};
|
||||
use std::str;
|
||||
|
||||
/// A type for a complete and readable error message.
|
||||
type AppError = String;
|
||||
type AppResult = Result<(), AppError>;
|
||||
|
||||
const LLVM_PROFDATA: &str = "llvm-profdata";
|
||||
const LLVM_COV: &str = "llvm-cov";
|
||||
const GIT: &str = "git";
|
||||
|
||||
fn exit_help(err: &str) -> AppError {
|
||||
format!(
|
||||
r#"
|
||||
Error: {err}
|
||||
|
||||
Usage: program ./build_dir boost_unittest_filter
|
||||
|
||||
Refer to the devtools/README.md for more details."#
|
||||
)
|
||||
}
|
||||
|
||||
fn sanity_check(test_exe: &Path) -> AppResult {
|
||||
for tool in [LLVM_PROFDATA, LLVM_COV, GIT] {
|
||||
let output = Command::new(tool).arg("--help").output();
|
||||
match output {
|
||||
Ok(output) if output.status.success() => {}
|
||||
_ => Err(exit_help(&format!("The tool {} is not installed", tool)))?,
|
||||
}
|
||||
}
|
||||
if !test_exe.exists() {
|
||||
Err(exit_help(&format!(
|
||||
"Test executable ({}) not found",
|
||||
test_exe.display()
|
||||
)))?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn app() -> AppResult {
|
||||
// Parse args
|
||||
let args = env::args().collect::<Vec<_>>();
|
||||
let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?;
|
||||
if build_dir == "--help" {
|
||||
Err(exit_help("--help requested"))?;
|
||||
}
|
||||
let filter = args
|
||||
.get(2)
|
||||
// Require filter for now. In the future it could be optional and the tool could provide a
|
||||
// default filter.
|
||||
.ok_or(exit_help("Must set boost test filter"))?;
|
||||
if args.get(3).is_some() {
|
||||
Err(exit_help("Too many args"))?;
|
||||
}
|
||||
|
||||
let build_dir = Path::new(build_dir);
|
||||
let test_exe = build_dir.join("bin/test_bitcoin");
|
||||
|
||||
sanity_check(&test_exe)?;
|
||||
|
||||
deterministic_coverage(build_dir, &test_exe, filter)
|
||||
}
|
||||
|
||||
fn deterministic_coverage(build_dir: &Path, test_exe: &Path, filter: &str) -> AppResult {
|
||||
let profraw_file = build_dir.join("test_det_cov.profraw");
|
||||
let profdata_file = build_dir.join("test_det_cov.profdata");
|
||||
let run_single = |run_id: char| -> Result<PathBuf, AppError> {
|
||||
println!("Run with id {run_id}");
|
||||
let cov_txt_path = build_dir.join(format!("test_det_cov.show.{run_id}.txt"));
|
||||
if !Command::new(test_exe)
|
||||
.env("LLVM_PROFILE_FILE", &profraw_file)
|
||||
.env("BOOST_TEST_RUN_FILTERS", filter)
|
||||
.env("RANDOM_CTX_SEED", "21")
|
||||
.status()
|
||||
.map_err(|e| format!("test failed with {e}"))?
|
||||
.success()
|
||||
{
|
||||
Err("test failed".to_string())?;
|
||||
}
|
||||
if !Command::new(LLVM_PROFDATA)
|
||||
.arg("merge")
|
||||
.arg("--sparse")
|
||||
.arg(&profraw_file)
|
||||
.arg("-o")
|
||||
.arg(&profdata_file)
|
||||
.status()
|
||||
.map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))?
|
||||
.success()
|
||||
{
|
||||
Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?;
|
||||
}
|
||||
let cov_file = File::create(&cov_txt_path)
|
||||
.map_err(|e| format!("Failed to create coverage txt file ({e})"))?;
|
||||
if !Command::new(LLVM_COV)
|
||||
.args([
|
||||
"show",
|
||||
"--show-line-counts-or-regions",
|
||||
"--show-branches=count",
|
||||
"--show-expansions",
|
||||
"--show-instantiation-summary",
|
||||
"-Xdemangler=llvm-cxxfilt",
|
||||
&format!("--instr-profile={}", profdata_file.display()),
|
||||
])
|
||||
.arg(test_exe)
|
||||
.stdout(cov_file)
|
||||
.status()
|
||||
.map_err(|e| format!("{LLVM_COV} show failed with {e}"))?
|
||||
.success()
|
||||
{
|
||||
Err(format!("{LLVM_COV} show failed"))?;
|
||||
}
|
||||
Ok(cov_txt_path)
|
||||
};
|
||||
let check_diff = |a: &Path, b: &Path| -> AppResult {
|
||||
let same = Command::new(GIT)
|
||||
.args(["--no-pager", "diff", "--no-index"])
|
||||
.arg(a)
|
||||
.arg(b)
|
||||
.status()
|
||||
.map_err(|e| format!("{GIT} diff failed with {e}"))?
|
||||
.success();
|
||||
if !same {
|
||||
Err("The coverage was not deterministic between runs.".to_string())?;
|
||||
}
|
||||
Ok(())
|
||||
};
|
||||
let r0 = run_single('a')?;
|
||||
let r1 = run_single('b')?;
|
||||
check_diff(&r0, &r1)?;
|
||||
println!("✨ The coverage was deterministic across two runs. ✨");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> ExitCode {
|
||||
match app() {
|
||||
Ok(()) => ExitCode::SUCCESS,
|
||||
Err(err) => {
|
||||
eprintln!("⚠️\n{}", err);
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,12 @@
|
||||
# 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 subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import argparse
|
||||
|
||||
BINARIES = [
|
||||
'bin/bitcoin',
|
||||
'bin/bitcoind',
|
||||
'bin/bitcoin-cli',
|
||||
'bin/bitcoin-tx',
|
||||
@@ -60,11 +58,10 @@ for relpath in BINARIES:
|
||||
print(f'{abspath} not found or not an executable', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
# take first line (which must contain version)
|
||||
output = r.stdout.splitlines()[0]
|
||||
# find the version e.g. v30.99.0-ce771726f3e7
|
||||
search = re.search(r"v[0-9]\S+", output)
|
||||
assert search
|
||||
verstr = search.group(0)
|
||||
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)')
|
||||
|
||||
@@ -12,13 +12,13 @@ import random
|
||||
# Parameters:
|
||||
|
||||
# Aim for still working fine at some point in the future. [datetime]
|
||||
TIME = datetime(2028, 4, 2)
|
||||
TIME = datetime(2027, 10, 6)
|
||||
|
||||
# Expected block interval. [timedelta]
|
||||
BLOCK_INTERVAL = timedelta(seconds=600)
|
||||
|
||||
# The number of headers corresponding to the minchainwork parameter. [headers]
|
||||
MINCHAINWORK_HEADERS = 912683
|
||||
MINCHAINWORK_HEADERS = 886157
|
||||
|
||||
# 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
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
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.
|
||||
|
||||
Example usage:
|
||||
|
||||
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/security-check.py
|
||||
'''
|
||||
import re
|
||||
import sys
|
||||
@@ -30,13 +26,13 @@ def check_ELF_RELRO(binary) -> bool:
|
||||
# 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.TYPE.GNU_RELRO:
|
||||
if segment.type == lief.ELF.SEGMENT_TYPES.GNU_RELRO:
|
||||
have_gnu_relro = True
|
||||
|
||||
have_bindnow = False
|
||||
try:
|
||||
flags = binary.get(lief.ELF.DynamicEntry.TAG.FLAGS)
|
||||
if flags.has(lief.ELF.DynamicEntryFlags.FLAG.BIND_NOW):
|
||||
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
|
||||
@@ -55,9 +51,9 @@ def check_ELF_SEPARATE_CODE(binary):
|
||||
based on their permissions. This checks for missing -Wl,-z,separate-code
|
||||
and potentially other problems.
|
||||
'''
|
||||
R = lief.ELF.Segment.FLAGS.R
|
||||
W = lief.ELF.Segment.FLAGS.W
|
||||
E = lief.ELF.Segment.FLAGS.X
|
||||
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,
|
||||
@@ -99,7 +95,7 @@ def check_ELF_SEPARATE_CODE(binary):
|
||||
# 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.TYPE.LOAD:
|
||||
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
|
||||
@@ -123,8 +119,8 @@ def check_ELF_CONTROL_FLOW(binary) -> bool:
|
||||
|
||||
def check_ELF_FORTIFY(binary) -> bool:
|
||||
|
||||
# bitcoin wrapper does not currently contain any fortified functions
|
||||
if '--monolithic' in binary.strings:
|
||||
# bitcoin-util does not currently contain any fortified functions
|
||||
if 'Bitcoin Core bitcoin-util utility version ' in binary.strings:
|
||||
return True
|
||||
|
||||
chk_funcs = set()
|
||||
@@ -134,20 +130,21 @@ def check_ELF_FORTIFY(binary) -> bool:
|
||||
if match:
|
||||
chk_funcs.add(match.group(0))
|
||||
|
||||
# ignore stack-protector
|
||||
# ignore stack-protector and bdb
|
||||
chk_funcs.discard('__stack_chk')
|
||||
chk_funcs.discard('__db_chk')
|
||||
|
||||
return len(chk_funcs) >= 1
|
||||
|
||||
def check_PE_DYNAMIC_BASE(binary) -> bool:
|
||||
'''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
|
||||
return lief.PE.OptionalHeader.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists
|
||||
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.OptionalHeader.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists
|
||||
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.'''
|
||||
@@ -178,7 +175,7 @@ def check_MACHO_NOUNDEFS(binary) -> bool:
|
||||
'''
|
||||
Check for no undefined references.
|
||||
'''
|
||||
return binary.header.has(lief.MachO.Header.FLAGS.NOUNDEFS)
|
||||
return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS)
|
||||
|
||||
def check_MACHO_FIXUP_CHAINS(binary) -> bool:
|
||||
'''
|
||||
@@ -203,13 +200,7 @@ def check_NX(binary) -> bool:
|
||||
'''
|
||||
Check for no stack execution
|
||||
'''
|
||||
|
||||
# binary.has_nx checks are only for the stack, but MachO binaries might
|
||||
# have executable heaps.
|
||||
if binary.format == lief.Binary.FORMATS.MACHO:
|
||||
return binary.concrete.has_nx_stack and binary.concrete.has_nx_heap
|
||||
else:
|
||||
return binary.has_nx
|
||||
return binary.has_nx
|
||||
|
||||
def check_MACHO_CONTROL_FLOW(binary) -> bool:
|
||||
'''
|
||||
@@ -232,7 +223,6 @@ def check_MACHO_BRANCH_PROTECTION(binary) -> bool:
|
||||
return False
|
||||
|
||||
BASE_ELF = [
|
||||
('FORTIFY', check_ELF_FORTIFY),
|
||||
('PIE', check_PIE),
|
||||
('NX', check_NX),
|
||||
('RELRO', check_ELF_RELRO),
|
||||
@@ -257,21 +247,21 @@ BASE_MACHO = [
|
||||
]
|
||||
|
||||
CHECKS = {
|
||||
lief.Binary.FORMATS.ELF: {
|
||||
lief.Header.ARCHITECTURES.X86_64: BASE_ELF + [('CONTROL_FLOW', check_ELF_CONTROL_FLOW)],
|
||||
lief.Header.ARCHITECTURES.ARM: BASE_ELF,
|
||||
lief.Header.ARCHITECTURES.ARM64: BASE_ELF,
|
||||
lief.Header.ARCHITECTURES.PPC64: BASE_ELF,
|
||||
lief.Header.ARCHITECTURES.RISCV: BASE_ELF,
|
||||
lief.EXE_FORMATS.ELF: {
|
||||
lief.ARCHITECTURES.X86: BASE_ELF + [('CONTROL_FLOW', check_ELF_CONTROL_FLOW), ('FORTIFY', check_ELF_FORTIFY)],
|
||||
lief.ARCHITECTURES.ARM: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
|
||||
lief.ARCHITECTURES.ARM64: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
|
||||
lief.ARCHITECTURES.PPC: BASE_ELF + [('FORTIFY', check_ELF_FORTIFY)],
|
||||
lief.ARCHITECTURES.RISCV: BASE_ELF, # Skip FORTIFY. See https://github.com/lief-project/LIEF/issues/1082.
|
||||
},
|
||||
lief.Binary.FORMATS.PE: {
|
||||
lief.Header.ARCHITECTURES.X86_64: BASE_PE,
|
||||
lief.EXE_FORMATS.PE: {
|
||||
lief.ARCHITECTURES.X86: BASE_PE,
|
||||
},
|
||||
lief.Binary.FORMATS.MACHO: {
|
||||
lief.Header.ARCHITECTURES.X86_64: BASE_MACHO + [('PIE', check_PIE),
|
||||
lief.EXE_FORMATS.MACHO: {
|
||||
lief.ARCHITECTURES.X86: BASE_MACHO + [('PIE', check_PIE),
|
||||
('NX', check_NX),
|
||||
('CONTROL_FLOW', check_MACHO_CONTROL_FLOW)],
|
||||
lief.Header.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_BRANCH_PROTECTION)],
|
||||
lief.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_BRANCH_PROTECTION)],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,9 +269,9 @@ if __name__ == '__main__':
|
||||
retval: int = 0
|
||||
for filename in sys.argv[1:]:
|
||||
binary = lief.parse(filename)
|
||||
|
||||
etype = binary.format
|
||||
arch = binary.abstract.header.architecture
|
||||
binary.concrete
|
||||
|
||||
failed: list[str] = []
|
||||
for (name, func) in CHECKS[etype][arch]:
|
||||
@@ -8,7 +8,7 @@ and are only linked against allowed libraries.
|
||||
|
||||
Example usage:
|
||||
|
||||
find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/symbol-check.py
|
||||
find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py
|
||||
'''
|
||||
import sys
|
||||
|
||||
@@ -32,9 +32,9 @@ import lief
|
||||
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
|
||||
|
||||
MAX_VERSIONS = {
|
||||
'GCC': (7,0,0),
|
||||
'GCC': (4,3,0),
|
||||
'GLIBC': {
|
||||
lief.ELF.ARCH.X86_64: (2,31),
|
||||
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),
|
||||
@@ -46,46 +46,47 @@ MAX_VERSIONS = {
|
||||
|
||||
# Ignore symbols that are exported as part of every executable
|
||||
IGNORE_EXPORTS = {
|
||||
'stdin', 'stdout', 'stderr',
|
||||
'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.Header.ENDIANNESS, str]] = {
|
||||
lief.ELF.ARCH.X86_64: {
|
||||
lief.Header.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2",
|
||||
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.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3",
|
||||
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3",
|
||||
},
|
||||
lief.ELF.ARCH.AARCH64: {
|
||||
lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1",
|
||||
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1",
|
||||
},
|
||||
lief.ELF.ARCH.PPC64: {
|
||||
lief.Header.ENDIANNESS.BIG: "/lib64/ld64.so.1",
|
||||
lief.Header.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
|
||||
lief.ENDIANNESS.BIG: "/lib64/ld64.so.1",
|
||||
lief.ENDIANNESS.LITTLE: "/lib64/ld64.so.2",
|
||||
},
|
||||
lief.ELF.ARCH.RISCV: {
|
||||
lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
|
||||
lief.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1",
|
||||
},
|
||||
}
|
||||
|
||||
ELF_ABIS: dict[lief.ELF.ARCH, dict[lief.Header.ENDIANNESS, list[int]]] = {
|
||||
lief.ELF.ARCH.X86_64: {
|
||||
lief.Header.ENDIANNESS.LITTLE: [3,2,0],
|
||||
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.Header.ENDIANNESS.LITTLE: [3,2,0],
|
||||
lief.ENDIANNESS.LITTLE: [3,2,0],
|
||||
},
|
||||
lief.ELF.ARCH.AARCH64: {
|
||||
lief.Header.ENDIANNESS.LITTLE: [3,7,0],
|
||||
lief.ENDIANNESS.LITTLE: [3,7,0],
|
||||
},
|
||||
lief.ELF.ARCH.PPC64: {
|
||||
lief.Header.ENDIANNESS.LITTLE: [3,10,0],
|
||||
lief.Header.ENDIANNESS.BIG: [3,2,0],
|
||||
lief.ENDIANNESS.LITTLE: [3,10,0],
|
||||
lief.ENDIANNESS.BIG: [3,2,0],
|
||||
},
|
||||
lief.ELF.ARCH.RISCV: {
|
||||
lief.Header.ENDIANNESS.LITTLE: [4,15,0],
|
||||
lief.ENDIANNESS.LITTLE: [4,15,0],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -121,6 +122,7 @@ ELF_ALLOWED_LIBRARIES = {
|
||||
'libxcb-shape.so.0',
|
||||
'libxcb-sync.so.1',
|
||||
'libxcb-xfixes.so.0',
|
||||
'libxcb-xinerama.so.0',
|
||||
'libxcb-xkb.so.1',
|
||||
}
|
||||
|
||||
@@ -144,31 +146,19 @@ MACHO_ALLOWED_LIBRARIES = {
|
||||
'IOSurface', # cross process image/drawing buffers
|
||||
'libobjc.A.dylib', # Objective-C runtime library
|
||||
'Metal', # 3D graphics
|
||||
'QuartzCore', # animation
|
||||
'Security', # access control and authentication
|
||||
'UniformTypeIdentifiers', # collection of types that map to MIME and file types
|
||||
'QuartzCore', # animation
|
||||
}
|
||||
|
||||
PE_ALLOWED_LIBRARIES = {
|
||||
'ADVAPI32.dll', # legacy security & registry
|
||||
'bcrypt.dll', # newer security and identity API
|
||||
'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
|
||||
'api-ms-win-core-synch-l1-2-0.dll', # Synchronization Primitives API
|
||||
'api-ms-win-core-winrt-l1-1-0.dll', # Windows Runtime API
|
||||
'api-ms-win-core-winrt-string-l1-1-0.dll', # WinRT String API
|
||||
'AUTHZ.dll', # Windows Authorization Framework
|
||||
'comdlg32.dll', # Common Dialog Box Library
|
||||
'd3d11.dll', # Direct3D 11 API
|
||||
'd3d12.dll', # Direct3D 12 API
|
||||
'd3d9.dll', # Direct3D 9 API
|
||||
'dwmapi.dll', # desktop window manager
|
||||
'DWrite.dll', # DirectX Typography Services
|
||||
'dxgi.dll', # DirectX Graphics Infrastructure
|
||||
'GDI32.dll', # graphics device interface
|
||||
'IMM32.dll', # input method editor
|
||||
'NETAPI32.dll', # network management
|
||||
@@ -181,8 +171,6 @@ PE_ALLOWED_LIBRARIES = {
|
||||
'VERSION.dll', # version checking
|
||||
'WINMM.dll', # WinMM audio API
|
||||
'WTSAPI32.dll', # Remote Desktop
|
||||
'SETUPAPI.dll', # Windows Setup API
|
||||
'SHCORE.dll', # Stream Handler Core
|
||||
}
|
||||
|
||||
def check_version(max_versions, version, arch) -> bool:
|
||||
@@ -220,13 +208,13 @@ def check_exported_symbols(binary) -> bool:
|
||||
name = symbol.name
|
||||
if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS:
|
||||
continue
|
||||
print(f'{filename}: export of symbol {name} not allowed!')
|
||||
print(f'{binary.name}: export of symbol {name} not allowed!')
|
||||
ok = False
|
||||
return ok
|
||||
|
||||
def check_RUNPATH(binary) -> bool:
|
||||
assert binary.get(lief.ELF.DynamicEntry.TAG.RUNPATH) is None
|
||||
assert binary.get(lief.ELF.DynamicEntry.TAG.RPATH) is None
|
||||
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:
|
||||
@@ -276,14 +264,6 @@ def check_PE_subsystem_version(binary) -> bool:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_PE_application_manifest(binary) -> bool:
|
||||
if not binary.has_resources:
|
||||
# No resources at all.
|
||||
return False
|
||||
|
||||
rm = binary.resources_manager
|
||||
return rm.has_manifest
|
||||
|
||||
def check_ELF_interpreter(binary) -> bool:
|
||||
expected_interpreter = ELF_INTERPRETER_NAMES[binary.header.machine_type][binary.abstract.header.endianness]
|
||||
|
||||
@@ -291,12 +271,12 @@ def check_ELF_interpreter(binary) -> bool:
|
||||
|
||||
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.TYPE.GNU_ABI_TAG)
|
||||
assert note.abi == lief.ELF.NoteAbi.ABI.LINUX
|
||||
return note.version == expected_abi
|
||||
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.Binary.FORMATS.ELF: [
|
||||
lief.EXE_FORMATS.ELF: [
|
||||
('IMPORTED_SYMBOLS', check_imported_symbols),
|
||||
('EXPORTED_SYMBOLS', check_exported_symbols),
|
||||
('LIBRARY_DEPENDENCIES', check_ELF_libraries),
|
||||
@@ -304,16 +284,15 @@ lief.Binary.FORMATS.ELF: [
|
||||
('ABI', check_ELF_ABI),
|
||||
('RUNPATH', check_RUNPATH),
|
||||
],
|
||||
lief.Binary.FORMATS.MACHO: [
|
||||
lief.EXE_FORMATS.MACHO: [
|
||||
('DYNAMIC_LIBRARIES', check_MACHO_libraries),
|
||||
('MIN_OS', check_MACHO_min_os),
|
||||
('SDK', check_MACHO_sdk),
|
||||
('LLD', check_MACHO_lld),
|
||||
],
|
||||
lief.Binary.FORMATS.PE: [
|
||||
lief.EXE_FORMATS.PE: [
|
||||
('DYNAMIC_LIBRARIES', check_PE_libraries),
|
||||
('SUBSYSTEM_VERSION', check_PE_subsystem_version),
|
||||
('APPLICATION_MANIFEST', check_PE_application_manifest),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -321,7 +300,6 @@ if __name__ == '__main__':
|
||||
retval: int = 0
|
||||
for filename in sys.argv[1:]:
|
||||
binary = lief.parse(filename)
|
||||
|
||||
etype = binary.format
|
||||
|
||||
failed: list[str] = []
|
||||
151
contrib/devtools/test_deterministic_coverage.sh
Executable file
151
contrib/devtools/test_deterministic_coverage.sh
Executable file
@@ -0,0 +1,151 @@
|
||||
#!/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_BITCOIN_BINARY="src/test/test_bitcoin"
|
||||
|
||||
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_BITCOIN_BINARY} ]]; then
|
||||
echo "Error: Executable ${TEST_BITCOIN_BINARY} not found. Run \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" 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 \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" 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_BITCOIN_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 \"cmake -B build -DCMAKE_BUILD_TYPE=Coverage\" 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
|
||||
@@ -18,10 +18,10 @@ Otherwise, you may choose from one of the following options to install Guix:
|
||||
- Works on nearly all Linux distributions
|
||||
- Installs any release
|
||||
- Binary installation only, requires high level of trust
|
||||
3. Using fanquake's **container image** [↗︎ external instructions][install-fanquake-container]
|
||||
3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker]
|
||||
- Maintained by fanquake
|
||||
- Easy (automatically performs *some* setup)
|
||||
- Works wherever container images work (Docker/Podman)
|
||||
- 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]
|
||||
@@ -57,7 +57,7 @@ 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 container image
|
||||
## Option 3: Using fanquake's Docker image
|
||||
|
||||
Please refer to fanquake's instructions
|
||||
[here](https://github.com/fanquake/core-review/tree/master/guix).
|
||||
@@ -415,7 +415,7 @@ make it "what Guix intended", then read the next few subsections.
|
||||
|
||||
This section definitely does not apply to you if you installed Guix using:
|
||||
1. The shell installer script
|
||||
2. fanquake's container image
|
||||
2. fanquake's Docker image
|
||||
3. Debian's `guix` package
|
||||
|
||||
#### Background
|
||||
@@ -766,7 +766,7 @@ Please see the following links for more details:
|
||||
|
||||
[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-container]: #option-3-using-fanquakes-container-image
|
||||
[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
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ 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-<foo>-<bar>-extracted-SDK-with-libcxx-headers
|
||||
tar -C /path/to/parent/dir/of/extracted/SDK -xaf /path/to/Xcode-<foo>-<bar>-extracted-SDK-with-libcxx-headers.tar
|
||||
tar -C /path/to/parent/dir/of/extracted/SDK -xaf /path/to/Xcode-<foo>-<bar>-extracted-SDK-with-libcxx-headers.tar.gz
|
||||
|
||||
# Indicate where to locate the SDK tarball
|
||||
export SDK_PATH=/path/to/parent/dir/of/extracted/SDK
|
||||
@@ -365,6 +365,12 @@ Where `<PREFIX>` is likely:
|
||||
- `/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
|
||||
@@ -376,28 +382,28 @@ 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 a substitute server after having [authorized
|
||||
its signing key](#step-1-authorize-the-signing-keys).
|
||||
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 <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
|
||||
guix-daemon <cmd> --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 <cmd> --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
|
||||
guix <cmd> --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://bordeaux.guix.gnu.org https://ci.guix.gnu.org'
|
||||
export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org'
|
||||
```
|
||||
|
||||
## Option 2: Disabling substitutes on an ad-hoc basis
|
||||
|
||||
@@ -69,12 +69,11 @@ unset CPLUS_INCLUDE_PATH
|
||||
unset OBJC_INCLUDE_PATH
|
||||
unset OBJCPLUS_INCLUDE_PATH
|
||||
|
||||
# Set native toolchain
|
||||
build_CC="${NATIVE_GCC}/bin/gcc -isystem ${NATIVE_GCC}/include"
|
||||
build_CXX="${NATIVE_GCC}/bin/g++ -isystem ${NATIVE_GCC}/include/c++ -isystem ${NATIVE_GCC}/include"
|
||||
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
|
||||
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
||||
|
||||
case "$HOST" in
|
||||
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for native packages
|
||||
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for qt/qmake
|
||||
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
|
||||
*)
|
||||
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
|
||||
@@ -137,7 +136,8 @@ export GUIX_LD_WRAPPER_DISABLE_RPATH=yes
|
||||
# Make /usr/bin if it doesn't exist
|
||||
[ -e /usr/bin ] || mkdir -p /usr/bin
|
||||
|
||||
# Symlink env to a conventional path
|
||||
# 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
|
||||
@@ -171,8 +171,6 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
|
||||
${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
|
||||
${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
|
||||
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
|
||||
${build_CC+build_CC="$build_CC"} \
|
||||
${build_CXX+build_CXX="$build_CXX"} \
|
||||
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 \
|
||||
@@ -183,6 +181,8 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
|
||||
case "$HOST" in
|
||||
*darwin*)
|
||||
# Unset now that Qt is built
|
||||
unset C_INCLUDE_PATH
|
||||
unset CPLUS_INCLUDE_PATH
|
||||
unset LIBRARY_PATH
|
||||
;;
|
||||
esac
|
||||
@@ -242,7 +242,6 @@ mkdir -p "$DISTSRC"
|
||||
cmake -S . -B build \
|
||||
--toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \
|
||||
-DWITH_CCACHE=OFF \
|
||||
-Werror=dev \
|
||||
${CONFIGFLAGS}
|
||||
|
||||
# Build Bitcoin Core
|
||||
@@ -290,7 +289,7 @@ mkdir -p "$DISTSRC"
|
||||
*)
|
||||
# Split binaries from their debug symbols
|
||||
{
|
||||
find "${DISTNAME}/bin" "${DISTNAME}/libexec" -type f -executable -print0
|
||||
find "${DISTNAME}/bin" -type f -executable -print0
|
||||
} | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/build/split-debug.sh" {} {} {}.dbg
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -110,7 +110,7 @@ mkdir -p "$DISTSRC"
|
||||
|
||||
# Apply detached codesignatures (in-place)
|
||||
signapple apply dist/Bitcoin-Qt.app codesignatures/osx/"${HOST}"/dist/Bitcoin-Qt.app
|
||||
find "${DISTNAME}" \( -wholename "*/bin/*" -o -wholename "*/libexec/*" \) -type f | while read -r bin
|
||||
find "${DISTNAME}" -wholename "*/bin/*" -type f | while read -r bin
|
||||
do
|
||||
signapple apply "${bin}" "codesignatures/osx/${HOST}/${bin}.${ARCH}sign"
|
||||
done
|
||||
|
||||
@@ -2,24 +2,21 @@
|
||||
((gnu packages bash) #:select (bash-minimal))
|
||||
(gnu packages bison)
|
||||
((gnu packages certs) #:select (nss-certs))
|
||||
((gnu packages check) #:select (libfaketime))
|
||||
((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))
|
||||
(gnu packages llvm)
|
||||
(gnu packages mingw)
|
||||
(gnu packages ninja)
|
||||
(gnu packages pkg-config)
|
||||
((gnu packages python) #:select (python-minimal))
|
||||
((gnu packages python-build) #:select (python-poetry-core))
|
||||
((gnu packages python-build) #:select (python-tomli python-poetry-core))
|
||||
((gnu packages python-crypto) #:select (python-asn1crypto))
|
||||
((gnu packages python-science) #:select (python-scikit-build-core))
|
||||
((gnu packages python-xyz) #:select (python-pydantic-2 python-pydantic-core))
|
||||
((gnu packages tls) #:select (openssl))
|
||||
((gnu packages version-control) #:select (git-minimal))
|
||||
(guix build-system cmake)
|
||||
@@ -161,35 +158,37 @@ chain for " target " development."))
|
||||
(define-public python-lief
|
||||
(package
|
||||
(name "python-lief")
|
||||
(version "0.16.6")
|
||||
(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
|
||||
"1pq9nagrnkl1x943bqnpiyxmkd9vk99znfxiwqp6vf012b50bz2a"))
|
||||
(patches (search-our-patches "lief-scikit-0-9.patch"))))
|
||||
(build-system pyproject-build-system)
|
||||
(native-inputs (list cmake-minimal
|
||||
ninja
|
||||
python-scikit-build-core
|
||||
python-pydantic-core
|
||||
python-pydantic-2))
|
||||
"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 'set-pythonpath
|
||||
(add-before 'build 'change-directory
|
||||
(lambda _
|
||||
(setenv "PYTHONPATH"
|
||||
(string-append (string-append (getcwd) "/api/python/backend")
|
||||
":" (or (getenv "PYTHONPATH") "")))))
|
||||
(add-after 'set-pythonpath 'change-directory
|
||||
(chdir "api/python")))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(chdir "api/python"))))))
|
||||
(invoke "python" "setup.py" "build"))))))
|
||||
(home-page "https://github.com/lief-project/LIEF")
|
||||
(synopsis "Library to instrument executable formats")
|
||||
(description
|
||||
@@ -210,17 +209,7 @@ and abstract ELF, PE and MachO formats.")
|
||||
(base32
|
||||
"1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz"))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(if tests?
|
||||
(invoke "faketime" "-f" "@2025-01-01 00:00:00" ;; Tests fail after 2025.
|
||||
"ctest" "--output-on-failure" "--no-tests=error")
|
||||
(format #t "test suite not run~%")))))))
|
||||
(inputs (list libfaketime openssl))
|
||||
(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
|
||||
@@ -541,6 +530,7 @@ inspecting signatures in Mach-O binaries.")
|
||||
which
|
||||
coreutils-minimal
|
||||
;; File(system) inspection
|
||||
file
|
||||
grep
|
||||
diffutils
|
||||
findutils
|
||||
@@ -557,7 +547,6 @@ inspecting signatures in Mach-O binaries.")
|
||||
gcc-toolchain-13
|
||||
cmake-minimal
|
||||
gnu-make
|
||||
ninja
|
||||
;; Scripting
|
||||
python-minimal ;; (3.10)
|
||||
;; Git
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Partially revert f23ced2f4ffc170d0a6f40ff4a1bee575e3447cf
|
||||
|
||||
Restore compat with python-scikit-build-core 0.9.x
|
||||
Can be dropped when using python-scikit-build-core >= 0.10.x
|
||||
|
||||
--- a/api/python/backend/setup.py
|
||||
+++ b/api/python/backend/setup.py
|
||||
@@ -101,12 +101,12 @@ def _get_hooked_config(is_editable: bool) -> Optional[dict[str, Union[str, List[
|
||||
config_settings = {
|
||||
"logging.level": "DEBUG",
|
||||
"build-dir": config.build_dir,
|
||||
- "build.targets": config.build.targets,
|
||||
"install.strip": config.strip,
|
||||
"backport.find-python": "0",
|
||||
"wheel.py-api": config.build.py_api,
|
||||
"cmake.source-dir": SRC_DIR.as_posix(),
|
||||
"cmake.build-type": config.build.build_type,
|
||||
+ "cmake.targets": config.build.targets,
|
||||
"cmake.args": [
|
||||
*config.cmake_generator,
|
||||
*config.get_cmake_args(is_editable),
|
||||
@@ -25,7 +25,8 @@ ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
|
||||
-shutdownnotify='systemd-notify --stopping'
|
||||
|
||||
# Make sure the config directory is readable by the service user
|
||||
ExecStartPre=!/bin/chgrp bitcoin /etc/bitcoin
|
||||
PermissionsStartOnly=true
|
||||
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
|
||||
|
||||
# Process management
|
||||
####################
|
||||
@@ -43,6 +44,7 @@ TimeoutStopSec=600
|
||||
|
||||
# Run as bitcoin:bitcoin
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
|
||||
# /run/bitcoind
|
||||
RuntimeDirectory=bitcoind
|
||||
|
||||
@@ -44,15 +44,15 @@ xip -x Xcode_15.xip
|
||||
|
||||
### Step 2: Generating the SDK tarball from `Xcode.app`
|
||||
|
||||
To generate the SDK, run the script [`gen-sdk.py`](./gen-sdk.py) with the
|
||||
To generate the SDK, run the script [`gen-sdk`](./gen-sdk) with the
|
||||
path to `Xcode.app` (extracted in the previous stage) as the first argument.
|
||||
|
||||
```bash
|
||||
./contrib/macdeploy/gen-sdk.py '/path/to/Xcode.app'
|
||||
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app'
|
||||
```
|
||||
|
||||
The generated archive should be: `Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar`.
|
||||
The `sha256sum` should be `95b00dc41fa090747dc0a7907a5031a2fcb2d7f95c9584ba6bccdb99b6e3d498`.
|
||||
The generated archive should be: `Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz`.
|
||||
The `sha256sum` should be `c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c282aa6892f55d`.
|
||||
|
||||
## Deterministic macOS App Notes
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ ${SIGNAPPLE} apply "${UNSIGNED_BUNDLE}" "${OUTROOT}/${BUNDLE_ROOT}/${BUNDLE_NAME
|
||||
${SIGNAPPLE} notarize --detach "${OUTROOT}/${BUNDLE_ROOT}" --passphrase "${api_key_pass}" "$2" "$3" "${UNSIGNED_BUNDLE}"
|
||||
|
||||
# Sign each binary
|
||||
find . -maxdepth 3 \( -wholename "*/bin/*" -o -wholename "*/libexec/*" \) -type f -exec realpath --relative-to=. {} \; | while read -r bin
|
||||
find . -maxdepth 3 -wholename "*/bin/*" -type f -exec realpath --relative-to=. {} \; | while read -r bin
|
||||
do
|
||||
bin_dir=$(dirname "${bin}")
|
||||
bin_name=$(basename "${bin}")
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
import argparse
|
||||
import plistlib
|
||||
import pathlib
|
||||
import sys
|
||||
import tarfile
|
||||
import gzip
|
||||
import os
|
||||
import contextlib
|
||||
|
||||
@@ -20,12 +22,12 @@ def run():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
|
||||
|
||||
parser.add_argument('xcode_app', metavar='XCODEAPP', type=pathlib.Path)
|
||||
parser.add_argument("-o", metavar='OUTSDKTAR', dest='out_sdkt', type=pathlib.Path, required=False)
|
||||
parser.add_argument('xcode_app', metavar='XCODEAPP', nargs=1)
|
||||
parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdktgz', required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
xcode_app = args.xcode_app.resolve()
|
||||
xcode_app = pathlib.Path(args.xcode_app[0]).resolve()
|
||||
assert xcode_app.is_dir(), "The supplied Xcode.app path '{}' either does not exist or is not a directory".format(xcode_app)
|
||||
|
||||
xcode_app_plist = xcode_app.joinpath("Contents/version.plist")
|
||||
@@ -45,10 +47,14 @@ def run():
|
||||
|
||||
out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
|
||||
|
||||
out_sdkt_path = args.out_sdkt or pathlib.Path("./{}.tar".format(out_name))
|
||||
if args.out_sdktgz:
|
||||
out_sdktgz_path = pathlib.Path(args.out_sdktgz_path)
|
||||
else:
|
||||
# Construct our own out_sdktgz if not specified on the command line
|
||||
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
|
||||
|
||||
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
|
||||
"""Add all files in dir_to_add to tarfp, but prepend alt_base_dir to the files'
|
||||
"""Add all files in dir_to_add to tarfp, but prepent alt_base_dir to the files'
|
||||
names
|
||||
|
||||
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:
|
||||
@@ -62,8 +68,6 @@ def run():
|
||||
|
||||
"""
|
||||
def change_tarinfo_base(tarinfo):
|
||||
if tarinfo.name and tarinfo.name.endswith((".swiftmodule", ".modulemap")):
|
||||
return None
|
||||
if tarinfo.name and tarinfo.name.startswith("./"):
|
||||
tarinfo.name = str(pathlib.Path(alt_base_dir, tarinfo.name))
|
||||
if tarinfo.linkname and tarinfo.linkname.startswith("./"):
|
||||
@@ -77,17 +81,16 @@ def run():
|
||||
return tarinfo
|
||||
with cd(dir_to_add):
|
||||
# recursion already adds entries in sorted order
|
||||
tarfp.add("./usr/include", recursive=True, filter=change_tarinfo_base)
|
||||
tarfp.add("./usr/lib", recursive=True, filter=change_tarinfo_base)
|
||||
tarfp.add("./System/Library/Frameworks", recursive=True, filter=change_tarinfo_base)
|
||||
tarfp.add(".", recursive=True, filter=change_tarinfo_base)
|
||||
|
||||
print("Creating output .tar file...")
|
||||
with out_sdkt_path.open("wb") as fp:
|
||||
with tarfile.open(mode="w", fileobj=fp, format=tarfile.PAX_FORMAT) as tarfp:
|
||||
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
||||
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
||||
print("Done! Find the resulting tarball at:")
|
||||
print(out_sdkt_path.resolve())
|
||||
print("Creating output .tar.gz file...")
|
||||
with out_sdktgz_path.open("wb") as fp:
|
||||
with gzip.GzipFile(fileobj=fp, mode='wb', compresslevel=9, mtime=0) as gzf:
|
||||
with tarfile.open(mode="w", fileobj=gzf, format=tarfile.GNU_FORMAT) as tarfp:
|
||||
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
||||
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
||||
print("Done! Find the resulting gzipped tarball at:")
|
||||
print(out_sdktgz_path.resolve())
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
@@ -157,19 +157,20 @@ class DeploymentInfo(object):
|
||||
self.qtPath = None
|
||||
self.pluginPath = None
|
||||
self.deployedFrameworks = []
|
||||
|
||||
|
||||
def detectQtPath(self, frameworkDirectory: str):
|
||||
parentDir = os.path.dirname(frameworkDirectory)
|
||||
if os.path.exists(os.path.join(parentDir, "share", "qt", "translations")):
|
||||
if os.path.exists(os.path.join(parentDir, "translations")):
|
||||
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x"
|
||||
self.qtPath = parentDir
|
||||
else:
|
||||
self.qtPath = os.getenv("QTDIR", None)
|
||||
|
||||
if self.qtPath is not None:
|
||||
pluginPath = os.path.join(self.qtPath, "share", "qt", "plugins")
|
||||
pluginPath = os.path.join(self.qtPath, "plugins")
|
||||
if os.path.exists(pluginPath):
|
||||
self.pluginPath = pluginPath
|
||||
|
||||
|
||||
def usesFramework(self, name: str) -> bool:
|
||||
for framework in self.deployedFrameworks:
|
||||
if framework.endswith(".framework"):
|
||||
@@ -180,7 +181,7 @@ class DeploymentInfo(object):
|
||||
return True
|
||||
return False
|
||||
|
||||
def getFrameworks(binaryPath: str, verbose: int, rpath: str = '') -> list[FrameworkInfo]:
|
||||
def getFrameworks(binaryPath: str, verbose: int) -> list[FrameworkInfo]:
|
||||
objdump = os.getenv("OBJDUMP", "objdump")
|
||||
if verbose:
|
||||
print(f"Inspecting with {objdump}: {binaryPath}")
|
||||
@@ -194,19 +195,17 @@ def getFrameworks(binaryPath: str, verbose: int, rpath: str = '') -> list[Framew
|
||||
lines.pop(0) # First line is the inspected binary
|
||||
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
|
||||
lines.pop(0) # Frameworks and dylibs list themselves as a dependency.
|
||||
|
||||
|
||||
libraries = []
|
||||
for line in lines:
|
||||
line = line.replace("@loader_path", os.path.dirname(binaryPath))
|
||||
if rpath:
|
||||
line = line.replace("@rpath", rpath)
|
||||
info = FrameworkInfo.fromLibraryLine(line.strip())
|
||||
if info is not None:
|
||||
if verbose:
|
||||
print("Found framework:")
|
||||
print(info)
|
||||
libraries.append(info)
|
||||
|
||||
|
||||
return libraries
|
||||
|
||||
def runInstallNameTool(action: str, *args):
|
||||
@@ -319,7 +318,7 @@ def deployFrameworks(frameworks: list[FrameworkInfo], bundlePath: str, binaryPat
|
||||
# install_name_tool it a new id.
|
||||
changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose)
|
||||
# Check for framework dependencies
|
||||
dependencies = getFrameworks(deployedBinaryPath, verbose, rpath=framework.frameworkDirectory)
|
||||
dependencies = getFrameworks(deployedBinaryPath, verbose)
|
||||
|
||||
for dependency in dependencies:
|
||||
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose)
|
||||
|
||||
@@ -10,21 +10,22 @@ to addrman with).
|
||||
|
||||
Update `MIN_BLOCKS` in `makeseeds.py` and the `-m`/`--minblocks` arguments below, as needed.
|
||||
|
||||
The seeds compiled into the release are created from sipa's and achow101's
|
||||
The seeds compiled into the release are created from sipa's, achow101's and luke-jr's
|
||||
DNS seed, virtu's crawler, and asmap community AS map data. Run the following commands
|
||||
from the `/contrib/seeds` directory:
|
||||
|
||||
```
|
||||
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
|
||||
curl https://21.ninja/seeds.txt.gz | gzip -dc >> seeds_main.txt
|
||||
curl https://luke.dashjr.org/programs/bitcoin/files/charts/seeds.txt >> seeds_main.txt
|
||||
curl https://mainnet.achownodes.xyz/seeds.txt.gz | gzip -dc >> seeds_main.txt
|
||||
curl https://signet.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_signet.txt
|
||||
curl https://testnet.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_test.txt
|
||||
curl https://testnet4.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_testnet4.txt
|
||||
curl https://raw.githubusercontent.com/asmap/asmap-data/main/latest_asmap.dat > asmap-filled.dat
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_signet.txt -m 266000 > nodes_signet.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_test.txt -m 4650000 > nodes_test.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_testnet4.txt -m 100000 > nodes_testnet4.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_signet.txt -m 237800 > nodes_signet.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_test.txt > nodes_test.txt
|
||||
python3 makeseeds.py -a asmap-filled.dat -s seeds_testnet4.txt -m 72600 > nodes_testnet4.txt
|
||||
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
|
||||
```
|
||||
|
||||
@@ -26,7 +26,7 @@ MAX_SEEDS_PER_ASN = {
|
||||
'ipv6': 10,
|
||||
}
|
||||
|
||||
MIN_BLOCKS = 910000
|
||||
MIN_BLOCKS = 868000
|
||||
|
||||
PATTERN_IPV4 = re.compile(r"^(([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})):(\d{1,5})$")
|
||||
PATTERN_IPV6 = re.compile(r"^\[([\da-f:]+)]:(\d{1,5})$", re.IGNORECASE)
|
||||
@@ -48,8 +48,7 @@ PATTERN_AGENT = re.compile(
|
||||
r"|25\.(0|1|2|99)\.0"
|
||||
r"|26\.(0|1|2|99)\.0"
|
||||
r"|27\.(0|1|2|99)\.0"
|
||||
r"|28\.(0|1|2|99)\.0"
|
||||
r"|29\.(0|99)\.0"
|
||||
r"|28\.(0|1|99)\.0"
|
||||
r")")
|
||||
|
||||
def parseline(line: str) -> Union[dict, None]:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,113 +1,130 @@
|
||||
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:38333
|
||||
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:38333
|
||||
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:38333
|
||||
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:38333
|
||||
3cxteqanevzjd5iufktxxh3l5abj6fs6udqg3bomphzofqjl4aqa.b32.i2p:0
|
||||
kmmq64ijxhaalfpatq7q6yyrf3rdfvjk3tsb5xc2rrmkgdqf3vwq.b32.i2p:0
|
||||
nmmoytmmcwq4aclmtrxk3askrv7mgy6l27uw67ozvyolwca2dr6a.b32.i2p:0
|
||||
qhlt7irano6s2pjfn2v4qrtynjj4peo7tfsnv2x6bm4e4vowptaq.b32.i2p:0
|
||||
qn7uwi6nx6tuakxvzhjnjeuxwpcq6wcv4diecrv63ugain2tdopa.b32.i2p:0
|
||||
regl2o33xgkhnuu5ywr7tw72dio46j6tylz7zpdl6pfaqsktboea.b32.i2p:0
|
||||
18.142.242.1:38333 # AS16509
|
||||
34.171.112.142:38333 # AS396982
|
||||
35.217.13.118:38333 # AS15169
|
||||
38.247.82.124:38333 # AS174
|
||||
45.94.168.5:38333 # AS400810
|
||||
51.210.144.135:38333 # AS16276
|
||||
54.151.174.170:38333 # AS16509
|
||||
66.254.43.122:38333 # AS1403
|
||||
72.48.253.168:38333 # AS7459
|
||||
81.17.97.236:38333 # AS51167
|
||||
91.134.73.14:38333 # AS16276
|
||||
95.141.35.117:38333 # AS31034
|
||||
129.226.149.150:38333 # AS132203
|
||||
rkf5lugxqdjrxva2n5wl43okxrqmm6prlf7arci4bgg4md55oo2a.b32.i2p:0
|
||||
5.189.136.209:38333 # AS51167
|
||||
15.235.55.158:38333 # AS16276
|
||||
18.141.143.94:38333 # AS16509
|
||||
18.216.1.71:38333 # AS8987
|
||||
23.137.57.100:38333 # AS1002
|
||||
23.226.164.192:38333 # AS3801
|
||||
34.16.103.64:38333 # AS396982
|
||||
35.217.29.66:38333 # AS15169
|
||||
37.27.45.224:38333 # AS24940
|
||||
38.88.125.238:38333 # AS394256
|
||||
44.210.109.64:38333 # AS14618
|
||||
45.32.127.199:38333 # AS20473
|
||||
51.79.29.216:38333 # AS16276
|
||||
54.255.186.152:38333 # AS16509
|
||||
63.34.82.20:38333 # AS8987
|
||||
65.109.54.101:38333 # AS24940
|
||||
67.209.52.138:38333 # AS20326
|
||||
85.190.242.80:38333 # AS51167
|
||||
89.155.238.72:38333 # AS2860
|
||||
103.16.128.63:38333 # AS133159
|
||||
104.248.42.204:38333 # AS14061
|
||||
116.163.20.113:38333 # AS4837
|
||||
121.78.241.71:38333 # AS9286
|
||||
124.156.198.249:38333 # AS132203
|
||||
131.153.11.131:38333 # AS20454
|
||||
135.180.99.74:38333 # AS1299
|
||||
136.144.237.250:38333 # AS20857
|
||||
143.42.65.56:38333 # AS63949
|
||||
144.24.238.157:38333 # AS31898
|
||||
144.24.241.206:38333 # AS31898
|
||||
144.76.2.169:38333 # AS24940
|
||||
147.182.229.68:38333 # AS14061
|
||||
152.53.52.229:38333 # AS214996
|
||||
148.51.196.40:38333 # AS12025
|
||||
152.53.3.192:38333 # AS47147
|
||||
153.126.143.201:38333 # AS7684
|
||||
159.223.59.213:38333 # AS14061
|
||||
170.75.172.6:38333 # AS174
|
||||
159.203.133.144:38333 # AS14061
|
||||
172.105.179.233:38333 # AS63949
|
||||
174.50.212.60:38333 # AS22909
|
||||
175.110.114.74:38333 # AS49981
|
||||
178.250.189.42:38333 # AS203394
|
||||
188.213.140.180:38333 # AS197922
|
||||
194.163.134.64:38333 # AS51167
|
||||
195.201.164.54:38333 # AS24940
|
||||
202.61.205.162:38333 # AS197540
|
||||
206.162.217.86:38333 # AS7871
|
||||
178.250.189.42:38333 # AS214379
|
||||
185.148.37.170:38333 # AS48347
|
||||
202.182.105.108:38333 # AS20473
|
||||
205.209.114.30:38333 # AS19318
|
||||
208.68.4.71:38333 # AS397444
|
||||
209.141.62.48:38333 # AS53667
|
||||
213.22.195.68:38333 # AS2860
|
||||
[2001:19f0:4400:63c7:5400:4ff:fecc:fc1e]:38333 # AS20473
|
||||
[2001:19f0:7001:48b2:5400:4ff:fecf:6e5]:38333 # AS20473
|
||||
[2001:41d0:304:400::d0a]:38333 # AS16276
|
||||
[2001:41d0:306:4505::]:38333 # AS16276
|
||||
[2001:41d0:347:e00::]:38333 # AS16276
|
||||
[2001:41d0:403:4ecb::]:38333 # AS16276
|
||||
[2001:41d0:800:330f::]:38333 # AS16276
|
||||
[2001:5a8:4164:7a00::1f8]:38333 # AS1299
|
||||
[2001:5a8:4164:7a00::506]:38333 # AS7065
|
||||
[2400:8907::f03c:92ff:fe6f:ee2b]:38333 # AS63949
|
||||
[2401:2500:102:3007:153:126:143:201]:38333 # AS7684
|
||||
[2604:a880:4:1d0::352:6000]:38333 # AS14061
|
||||
[2604:a880:800:14::3880:3000]:38333 # AS14061
|
||||
[2605:3380:422e:1::50]:38333 # AS397444
|
||||
[2607:5300:203:7467::]:38333 # AS16276
|
||||
[2607:5300:203:a29e::]:38333 # AS16276
|
||||
[2607:5300:205:300::1b0]:38333 # AS16276
|
||||
[2607:fdc0:1c1:5:632:1ff:fe54:ba56]:38333 # AS20326
|
||||
[2620:6e:a0a0:1::71]:38333 # AS397444
|
||||
[2a01:4f8:121:4072::2]:38333 # AS24940
|
||||
[2a01:4f8:13a:c56::2]:38333 # AS24940
|
||||
[2a01:4f8:190:72a4::2]:38333 # AS24940
|
||||
[2a01:4f8:2190:29b0::2]:38333 # AS24940
|
||||
[2a01:4f8:2190:1692::2]:38333 # AS24940
|
||||
[2a01:4f8:2220:1a70::2]:38333 # AS24940
|
||||
[2a01:4f8:231:3d6f::2]:38333 # AS24940
|
||||
[2a01:4f8:242:4246::2]:38333 # AS24940
|
||||
[2a01:4f8:c17:bff8::1]:38333 # AS24940
|
||||
[2a01:4f9:1a:aa95::2]:38333 # AS24940
|
||||
[2a01:4f9:3080:3496::2]:38333 # AS24940
|
||||
[2a01:4f9:3a:2496::2]:38333 # AS24940
|
||||
[2a01:4f9:4b:470d::2]:38333 # AS24940
|
||||
[2a01:4f9:6b:301a::2]:38333 # AS24940
|
||||
[2a01:4f9:6b:47ce::2]:38333 # AS24940
|
||||
[2a01:7c8:d008:e9::3]:38333 # AS20857
|
||||
[2a02:29e0:1:420::64]:38333 # AS49367
|
||||
[2a0c:b641:6f1:6::2]:38333 # AS214379
|
||||
2ycyu2aba3xsqjr35beqporp5f64ntqs2sau2amn5ztq4j5q76amhqyd.onion:38333
|
||||
3qeedpzgciv65tdy2tsdmjxswhyep4aj65jtboznf5nnwcyo2lbmiyqd.onion:38333
|
||||
3xvum5nnvcchvfxwlbc2it7nbfxhml6ovt7xehjw2potempk2om4eoqd.onion:38333
|
||||
43nk7wpojel47fmc2il4sunwkpj4d2sh5rpeconlymplvuf7mwvnidqd.onion:38333
|
||||
4lrtpspzigxrso22dy4ux23ad5gxrs7z562azclspfhil5w55jxpnhyd.onion:38333
|
||||
4n2rlrrnxcpnfrft4ivlsvsjiahk5ffxizcyfr5amjcqfwt4biitjpid.onion:38333
|
||||
5ofovtlx424wnxyoohnsxqjktwqd4i2kiqawox3srsdttsp2pdrx6yyd.onion:38333
|
||||
6fy45vxzgc6siecr7en4k6oft4k4ix47jvkxqyzopalzwyphqc3hv2ad.onion:38333
|
||||
75ucqkuqndevjaqjnyfgyhzdfgcnknr6ki3skvkqjlxnrcfqc6wxqbad.onion:38333
|
||||
6ivh4quupqu3w3glr2puyi5bitjapbbl6ehvbjsvleopyy2yzjgp4oqd.onion:38333
|
||||
7mgfpo4urwysuafbo6sb3u6vh5f7pkvgddrqohcobhbkblqrrozhn7ad.onion:38333
|
||||
a7mvea5xgpknsqaifyvfstdn2utjvph564i6ti3nbdr2cksby5jhykid.onion:38333
|
||||
b3sbqhjstq34ae7lsrw3syhxcjdu2ssuf3f3kvbnyrvbp7cvuuopmbqd.onion:38333
|
||||
b6lyxzxr2xmzmdy7543renqfe2btqopjptilw4wxgzoyftazzspwq5id.onion:38333
|
||||
b6x3qw2ibiycnj67jww3sjvkokq4ssxdvj7vetq7s64fhet75zat5cad.onion:38333
|
||||
ba3rwqombmuji3wxpmydrk7vcxfpq7pnn5bfw74wvvqyo6rrhwqrt6id.onion:38333
|
||||
bxctkglm5qyt2ubhu4je35irvvcnjrjydl2p6ywfelo7fnjw2exoehyd.onion:38333
|
||||
bodh6zsjtn6kvdk36ukx6fns5hqiiw3zhkqmcmj54nrtkz5tdtb6yayd.onion:38333
|
||||
bux5jwkwzccba57zthctdgsuwp5mi3wocxndtuf6jg2qqab3vpnqnqqd.onion:38333
|
||||
ckbugjazj2iotosxah7odbxfozxivuk6zu5npf3iwfphvoh5brdjfqad.onion:38333
|
||||
cq3td34eu5xjymlxl7aq4rsskxjt4ag267i6mzhdqhdpfzcqctus6aid.onion:38333
|
||||
d27tvdmi6wjjlffjyhm5mogwsw3433jxkaiwhti32eagvljdzseilqqd.onion:38333
|
||||
dpzlvj7kmbifhbttfe7vwl6fgpy5os62iiznel6eocsaarssudtdzoyd.onion:38333
|
||||
e6xhvtrt2ppjfxckbinu7a4jxmy7usjnvjx6st2cipmvlnnhxg7krbid.onion:38333
|
||||
ecx2z3x4nwbzjh6dh6vyccljkhnxya2o2o2tz3pzvetxfjjmujxhctid.onion:38333
|
||||
ehnxcigc6t34smlk5lftfyb7rntcsbwhlu3pe7ltft76gl6y262ekdqd.onion:38333
|
||||
ejgeimjypsfuijpxzy5xpwmmjmkr4izwze6od5pw74csjglflib6nsid.onion:38333
|
||||
eqhrqtvxkyjcggbkmzgocynaskblynl2bqeuel4lqs4w3f3rgpfpnkad.onion:38333
|
||||
f7xfq5hijqptsdak6qjx3komxrff2hw3xa46d7cs3d7igvm5tylotbid.onion:38333
|
||||
fo7cekwzd3ibyoxuo53mfqoxffgfaupg5ydxbl3rofvwxtzbvgy3ciqd.onion:38333
|
||||
fqyzt7wikf6g6yxu6i2yar3lkqxbf6fu3c3pjnbg2oibt57usfmq42id.onion:38333
|
||||
gd4gyokpcnnqqodklhltjimcrhhmqj7otwlzrolw76aag4leqsyolxad.onion:38333
|
||||
hm7i5k5o37ffzytt5eym2muzlj7r3xw6sisafnb6s2lhvraqbma2azqd.onion:38333
|
||||
hztyx76iaz4h3emavmzbuizqfg3q37ehfwr2k3afadtcmcepjsxhmeqd.onion:38333
|
||||
immdwqfyz2hhcmxmyypstz7syq2cygaklr43mqjmqefnmtcyuspwkbad.onion:38333
|
||||
jahtu4veqnvjldtbyxjiibdrltqiiighauai7hmvknwxhptsb4xat4qd.onion:38333
|
||||
jgn75dy52o2lt5wr5qkf4z2cg7gupz4jc4z5az53srhxxyvkipqqqpid.onion:38333
|
||||
jw6d7rlkcz252f6wv6cirzzrknzuu7xwxnzirab4c5x7wfzl2uzvezad.onion:38333
|
||||
k4d6h4eyeqjn35b3x46f4s3g3eykn4bms52paxuxenkre6nmhfvy6bqd.onion:38333
|
||||
k6z3aojwz2jngg5bumtf7qphcwvvve3idqol27s7slg2p3tp3yrbqsqd.onion:38333
|
||||
kklfzzodnlinc3toltn7dlft4vzjf2ckmdw2n3dn4lx3pzw5di2womyd.onion:38333
|
||||
lbfzxmkog5ntvcmo7ncsp7ye62onxprf3a42hdzxkjw4inulizd4ccid.onion:38333
|
||||
litqgemqmpesu6gi2ctd4ubrpxdn4mcm2t6p7xhkfxnkk7lzpdx75vyd.onion:38333
|
||||
lkgnafoa5nfd34pzyxpz5gnmpwkbdk5a5h6h7hk3rs53soh6nkb3snqd.onion:38333
|
||||
lwiqghlmljzlarwn4gwdrvskd3nibtw63o5ok7ugx4nwuvh7b422ifad.onion:38333
|
||||
lxied2447sbmnoi64xbrdtcekdfyneoo3xb3m6vscj452orvdi2cjsqd.onion:38333
|
||||
n6tf5dfz25i4pprczevdkyo5bkpgfa3xigenn6skpjqqynbxpxzilfid.onion:38333
|
||||
nhpn5jnzl64wuhke22bl3avgm7liycl2h2fqh5a5tjtejez6upze4tid.onion:38333
|
||||
o2fumu43ugk6xayo2nvadn7ohqlxharakt4flqh3hjgxdbwzrwignmyd.onion:38333
|
||||
oowqbk36g76cs37sk7myfoq62e7ly42etcfugol3p7haw6ewyn5qhiqd.onion:38333
|
||||
ouohm2bcplkfvzgg4f5ltvtqt2obzyvaadb3jep7bb4gasdusqkkupad.onion:38333
|
||||
oz5puzgtybzjisyw5kimddtmsnc32zwflkj5r43clfddawunk7wtsiad.onion:38333
|
||||
pkpiv6cqqba3mb5cpccdvz5v5p3u5acrjv2zj2u4auzznceqculjrkid.onion:38333
|
||||
pmjm644pzkp2khwixyis2c7mnfbte33bnmwxdx5lk6t6owvtmapdbhqd.onion:38333
|
||||
q3z526imdoo2pdujkfp5vslshni2niewlbxfokejfkddkezxutagezyd.onion:38333
|
||||
qbjhndk6zjpzxfetanqjud3u6kiuspnjfapinw2r5cou6o5ae5mxdzid.onion:38333
|
||||
qpgnrxuwxc6474hvy3j5uk2hbm3ry4ikwrenoit6zjeqqqythsvjdvid.onion:38333
|
||||
qzf5vm2exowrli5ksuowrhshtnef43exhtha76qdxz357hdqfq65zhid.onion:38333
|
||||
r4y5pqyvdzq3bzg2fqu46ql4a32fadkftwejtxzckeyohd7wvqnnwtqd.onion:38333
|
||||
sver4nn4i5i7klvvayqopjbk5eyu7lcrrhcchxmrouom224hrnarl6qd.onion:38333
|
||||
tev7cdwka3av6ektydsjfpofmcam3r6qcw7sxbpkohckjvihtzp7hgyd.onion:38333
|
||||
tgqpfwoxjidlwd5rgpj5zfuhctxrevsfueqndih4vx5hgxpmyg34jqyd.onion:38333
|
||||
tsq7clffbfe636zfszymheqgy6tyzbsjogad2qet7qeijua5c53ye6ad.onion:38333
|
||||
@@ -116,8 +133,8 @@ wevmujl2p6mckcwaxnmtusweros7bu3bxf2g3lzutnfdkjl5gwbu36yd.onion:38333
|
||||
ww4jycomjwnf7jtrrrngeahokqkcl32iufmjzvvk272svieavabjyiqd.onion:38333
|
||||
xbulvl2bb4wvnlafmq3j3fzrjhsmnfz7ubyvl6yy3syeded4tqiubkad.onion:38333
|
||||
xm4kxluodmeolmaugmaxnexnefrg3vsxnqo2ezu7rqmdct7i7xevcxad.onion:38333
|
||||
xtmr2yizi5zibbapqdqedeu5whn2oy5cpy2zz7ea5adpcdo2nz4qyzad.onion:38333
|
||||
y5f4rtma4uneqrkzkoghoiec2sy3mee44xs466hhsi74w5roccqxlzqd.onion:38333
|
||||
yjhagyj65xcxu6b5yktu6ntkwsyd5rhjlrsb7sexq5lzchatdqmoqnqd.onion:38333
|
||||
ykeyrl6bidrfexbjicdzgnx6lh5efwhe4sj5inpgiufwa5cdhjpgugid.onion:38333
|
||||
ypi6qgnmabcqlmjfkcnqzpjdjihwmebxkd32tjwt6mrhgm2strfml6ad.onion:38333
|
||||
yrzulzu5xxcd2vio34ciyj5h7bpnevikslbunm6yb4tjkty62fxl7uid.onion:38333
|
||||
zgkvv542e4ewviremw3qp4bi52f2sxt4g4mrjrbwonbnfb5oujd44lid.onion:38333
|
||||
|
||||
@@ -1,179 +1,219 @@
|
||||
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:18333
|
||||
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:18333
|
||||
[fc2b:f62e:6a76:cdb5:dceb:2fdd:a0f8:3d88]:18333
|
||||
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:18333
|
||||
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:18333
|
||||
66lkz2cfzyrz3tde6gflrty63jqr4knyy6uv4dvldrsecpnfx4dq.b32.i2p:0
|
||||
ica24vnstxip7gkr3c6dlmqgw4opmfrvv3dppjds7a3uddurpmxa.b32.i2p:0
|
||||
hedmbfis4h4inqrwo2uzmku5xu6xaq74tg7sofnetqikdvndtvja.b32.i2p:0
|
||||
i7vrfdmgolc6dqfmsak5fvwgmn46y4ghtan44uhn2aw66cbk5nfa.b32.i2p:0
|
||||
nhla3xzibmhvav7meemluh2d2jxdrlwicq636a2sohwqhrfgqi4a.b32.i2p:0
|
||||
o6j3b33bv26vthoqzjy3h7a3qsuqbtbe3ulajmjzsl43vaqyieyq.b32.i2p:0
|
||||
ocqipbbxx4paopgkkbnj234ie7opzrtca5gtiwr6oda3h32rzgsa.b32.i2p:0
|
||||
xgctj4seo3ofstiymoyeuzq74bvddrbr6jtia6erodlf5va3cz5a.b32.i2p:0
|
||||
xy6ytjxel5ku4naqumj4f6hn4agrzh3w44gqcs6xkkzwm5s3jdgq.b32.i2p:0
|
||||
zklt7hncdrl2hupfwnlbt3qaayhjayjhvwvj2m3fok3z36tlnxhq.b32.i2p:0
|
||||
2.59.133.20:18333 # AS58212
|
||||
3.126.103.252:18333 # AS16509
|
||||
2.86.50.136:18333 # AS6799
|
||||
4.246.195.240:18333 # AS8075
|
||||
5.39.218.162:18333 # AS57043
|
||||
5.255.97.91:18333 # AS60404
|
||||
5.255.97.92:18333 # AS60404
|
||||
5.255.99.130:18333 # AS60404
|
||||
20.238.17.253:18333 # AS8075
|
||||
8.217.160.32:18333 # AS45102
|
||||
18.168.119.254:18333 # AS8987
|
||||
18.209.9.240:18333 # AS8987
|
||||
23.227.223.209:18333 # AS44486
|
||||
34.57.91.248:18333 # AS396982
|
||||
34.136.139.120:18333 # AS396982
|
||||
35.89.140.96:18333 # AS16509
|
||||
27.148.206.140:18333 # AS133774
|
||||
34.65.45.157:18333 # AS396982
|
||||
34.69.221.24:18333 # AS396982
|
||||
34.254.97.244:18333 # AS16509
|
||||
43.133.47.138:18333 # AS132203
|
||||
43.247.184.50:18333 # AS23724
|
||||
44.208.161.158:18333 # AS14618
|
||||
45.77.25.14:18333 # AS20473
|
||||
54.87.140.128:18333 # AS14618
|
||||
57.129.97.56:18333 # AS16276
|
||||
51.79.82.75:18333 # AS16276
|
||||
52.193.79.181:18333 # AS16509
|
||||
54.236.59.55:18333 # AS14618
|
||||
59.186.7.131:18333 # AS3786
|
||||
62.210.207.63:18333 # AS12876
|
||||
65.21.205.60:18333 # AS24940
|
||||
66.94.114.229:18333 # AS40021
|
||||
67.4.82.9:18333 # AS209
|
||||
69.61.32.242:18333 # AS141518
|
||||
69.197.185.106:18333 # AS32097
|
||||
72.48.253.168:18333 # AS7459
|
||||
74.48.195.218:18333 # AS35916
|
||||
70.114.196.140:18333 # AS11427
|
||||
72.211.1.222:18333 # AS22773
|
||||
73.22.9.231:18333 # AS33491
|
||||
74.118.136.46:18333 # AS20326
|
||||
75.119.158.18:18333 # AS51167
|
||||
77.163.221.171:18333 # AS1136
|
||||
82.121.197.91:18333 # AS3215
|
||||
82.181.221.241:18333 # AS16086
|
||||
85.203.53.149:18333 # AS39351
|
||||
85.208.69.12:18333 # AS42275
|
||||
85.208.69.13:18333 # AS42275
|
||||
89.58.9.219:18333 # AS197540
|
||||
89.169.131.69:18333 # AS200350
|
||||
90.38.214.224:18333 # AS3215
|
||||
89.155.238.72:18333 # AS2860
|
||||
90.79.184.226:18333 # AS3215
|
||||
91.109.204.214:18333 # AS199669
|
||||
91.123.182.164:18333 # AS51648
|
||||
92.115.99.159:18333 # AS8926
|
||||
95.141.35.117:18333 # AS31034
|
||||
104.243.38.96:18333 # AS23470
|
||||
122.208.117.197:18333 # AS17506
|
||||
124.236.16.91:18333 # AS134760
|
||||
129.153.149.46:18333 # AS31898
|
||||
129.213.114.91:18333 # AS31898
|
||||
129.226.198.211:18333 # AS132203
|
||||
132.145.129.60:18333 # AS31898
|
||||
134.195.89.130:18333 # AS63473
|
||||
135.180.99.74:18333 # AS1299
|
||||
137.184.2.124:18333 # AS14061
|
||||
142.234.33.228:18333 # AS7979
|
||||
148.113.218.157:18333 # AS16276
|
||||
152.67.82.60:18333 # AS31898
|
||||
157.90.95.170:18333 # AS24940
|
||||
160.80.11.66:18333 # AS137
|
||||
169.155.170.211:18333 # AS44486
|
||||
172.173.81.233:18333 # AS8075
|
||||
173.231.40.170:18333 # AS18450
|
||||
178.162.218.121:18333 # AS28753
|
||||
141.98.219.199:18333 # AS20326
|
||||
147.182.251.92:18333 # AS14061
|
||||
148.51.196.40:18333 # AS12025
|
||||
148.251.4.19:18333 # AS24940
|
||||
149.202.79.199:18333 # AS16276
|
||||
161.97.119.128:18333 # AS51167
|
||||
162.55.243.11:18333 # AS24940
|
||||
169.155.171.252:18333 # AS44486
|
||||
176.108.193.97:18333 # AS47914
|
||||
185.28.96.16:18333 # AS59845
|
||||
185.44.206.111:18333 # AS44051
|
||||
185.107.68.135:18333 # AS43350
|
||||
185.130.224.146:18333 # AS57043
|
||||
185.186.208.124:18333 # AS206428
|
||||
185.210.125.33:18333 # AS205671
|
||||
185.232.70.226:18333 # AS197540
|
||||
186.154.207.228:18333 # AS19429
|
||||
188.42.129.156:18333 # AS7979
|
||||
188.72.109.51:18333 # AS208677
|
||||
188.117.132.82:18333 # AS31242
|
||||
188.213.90.149:18333 # AS206238
|
||||
193.30.123.70:18333 # AS197540
|
||||
194.9.6.11:18333 # AS58212
|
||||
194.95.66.129:18333 # AS680
|
||||
194.110.169.133:18333 # AS203576
|
||||
194.145.201.243:18333 # AS29028
|
||||
195.66.213.33:18333 # AS43641
|
||||
195.154.241.13:18333 # AS12876
|
||||
200.143.224.99:18333 # AS1916
|
||||
203.132.94.196:18333 # AS38195
|
||||
205.209.120.167:18333 # AS19318
|
||||
206.204.104.7:18333 # AS212947
|
||||
208.68.4.71:18333 # AS397444
|
||||
208.91.104.61:18333 # AS20326
|
||||
209.38.135.43:18333 # AS14061
|
||||
213.199.42.73:18333 # AS51167
|
||||
216.219.91.82:18333 # AS19318
|
||||
219.117.221.162:18333 # AS2514
|
||||
[2001:41d0:303:146e::]:18333 # AS16276
|
||||
[2001:41d0:306:4505::]:18333 # AS16276
|
||||
[2001:41d0:306:a3a::]:18333 # AS16276
|
||||
[2001:41d0:340:c000::]:18333 # AS16276
|
||||
[2001:41d0:72a:3100::]:18333 # AS16276
|
||||
[2001:41d0:72a:3800::]:18333 # AS16276
|
||||
[2001:41d0:700:544c::]:18333 # AS16276
|
||||
[2001:41d0:800:1d55::]:18333 # AS16276
|
||||
[2001:41d0:800:3e7f::]:18333 # AS16276
|
||||
[2001:470:1f05:4e5::2020]:18333 # AS6939
|
||||
[2001:5a8:4164:7a00::1f8]:18333 # AS1299
|
||||
[2001:b07:6469:3491:56be:f7ff:fe26:21bb]:18333 # AS12874
|
||||
[2001:5a8:4164:7a00::506]:18333 # AS7065
|
||||
[2401:c080:1000:4cb2:3eec:efff:feb9:8604]:18333 # AS20473
|
||||
[2401:d002:3902:700:8708:37c4:e231:d3d8]:18333 # AS38195
|
||||
[2402:1f00:800a:1800::]:18333 # AS16276
|
||||
[2402:1f00:800a:1c00::]:18333 # AS16276
|
||||
[2402:1f00:8101:713::]:18333 # AS16276
|
||||
[2604:1380:4531:1700::5]:18333 # AS54825
|
||||
[2604:a00:50:58:216:3eff:fe2c:8371]:18333 # AS19318
|
||||
[2605:3380:422e:1::50]:18333 # AS397444
|
||||
[2605:4840:3:2c23::1]:18333 # AS63473
|
||||
[2607:5300:216:a600::]:18333 # AS16276
|
||||
[2607:5300:21b:9d00::]:18333 # AS16276
|
||||
[2605:a141:2239:7674::1]:18333 # AS51167
|
||||
[2607:5300:205:300::1b0]:18333 # AS16276
|
||||
[2607:5300:60:85a9::]:18333 # AS16276
|
||||
[2607:5300:60:8702::]:18333 # AS16276
|
||||
[2620:6e:a000:1:43:43:43:43]:18333 # AS397444
|
||||
[2620:6e:a0a0:1::71]:18333 # AS397444
|
||||
[2804:431:e038:cd01:aaa1:59ff:fe0d:44b8]:18333 # AS27699
|
||||
[2a01:4f8:121:4072::2]:18333 # AS24940
|
||||
[2a01:4f8:160:1083::2]:18333 # AS24940
|
||||
[2a01:4f8:173:1ed8::2]:18333 # AS24940
|
||||
[2a01:4f8:173:230a::2]:18333 # AS24940
|
||||
[2a01:4f8:190:4026::2]:18333 # AS24940
|
||||
[2a01:4f8:201:508f::2]:18333 # AS24940
|
||||
[2a01:4f9:2a:2510::2]:18333 # AS24940
|
||||
[2a01:4f9:2a:309d::2]:18333 # AS24940
|
||||
[2a01:4f9:3070:26e2::2]:18333 # AS24940
|
||||
[2a01:4f9:6a:13c3::2]:18333 # AS24940
|
||||
[2a01:4f9:6a:4891::2]:18333 # AS24940
|
||||
[2a01:4f9:3071:2154::2]:18333 # AS24940
|
||||
[2a01:4f9:3071:219d::2]:18333 # AS24940
|
||||
[2a01:4f9:6b:2768::2]:18333 # AS24940
|
||||
[2a01:e0a:98e:7450:be24:11ff:fe4a:7bc2]:18333 # AS12322
|
||||
[2a02:29e0:1:420::64]:18333 # AS49367
|
||||
[2a02:c206:2075:3352::1]:18333 # AS51167
|
||||
[2a02:c202:2238:2255::1]:18333 # AS51167
|
||||
[2a02:c206:2239:7671::1]:18333 # AS51167
|
||||
[2a02:c206:2240:1506::1]:18333 # AS51167
|
||||
[2a03:4000:2a:514::]:18333 # AS197540
|
||||
[2a04:52c0:102:2219::1]:18333 # AS60404
|
||||
[2a04:52c0:102:49af::1]:18333 # AS60404
|
||||
[2a04:52c0:104:160c::1]:18333 # AS60404
|
||||
2lsncqdflwk272dhydrxf7ikfy23ppnmm54dnynyxiym6lqf3wowrmqd.onion:18333
|
||||
2mvycpm7ni6ix2pr4lkkfkqlivgo77mt4jx3s3dmhdlg3ogq46s6qbyd.onion:18333
|
||||
36fwktckggarkclbpu2pumsdpck46ahe6cwpozd2gm6q7kgdqljclmad.onion:18333
|
||||
3dt6kgfrilc3nwliwy5wbmc6oa2b5y3t33nkxlrxrkunr2hoaj56kgyd.onion:18333
|
||||
3rfphqncnepbm7tvnaqjetkaqvauj566nw3ys27fert6zx3q75zetoid.onion:18333
|
||||
3vnbi5o3hyzk4cm3hhnyo3h7tclr6pybmhmqwkbyclslfhqtg72pq2id.onion:18333
|
||||
44sgcv5dvpplt32enlneddyl4gd4z3tbezl2scedwccndyzrrp6lcgyd.onion:18333
|
||||
4w3f2mxe4ftodocermsazs3qlpo37igkdgne6ka2p6wnnrgwpzqw65yd.onion:18333
|
||||
5axx4qyub7qtgssrvbbqudu6uqjbuknbvbld2wdscv5p6kh2hsfzjxqd.onion:18333
|
||||
5qdgulsryjejkjinocpvknazwtnbqtuf4f4pui2at4jpedwwpg427qyd.onion:18333
|
||||
67l6l2k7mqbl2btyvo5h5lki3kxcrgbunlk7brcloyaoaftbs5mnsuad.onion:18333
|
||||
6bhop3n32rreiynu35epznhc2exxkhuleromdhnida2hgmu2bhczgmqd.onion:18333
|
||||
6fdbuqf2kgeweeoeikmwfezauys657lzezzus4nxmekkumouptg5ezad.onion:18333
|
||||
6yuphwecg6apx3nrf6kyabqohh544l25xodxxowa74yr2tg5ulkzeead.onion:18333
|
||||
6rnqpqqcpllqhjoa4gwrtq5yi6fdch6uqzapdee2gq67gxgsl73v4uqd.onion:18333
|
||||
7ph7mrc24te57mvppajfkfj4mk7zuz4teukymt3wgpdpw6vpndeivtyd.onion:18333
|
||||
7poqajl6svz4vr3aqi7vdtar2t56crbrtj6yi75ydrt3ighyx7q6qvyd.onion:18333
|
||||
7zlqrihb5do5ebbmjwgspxigqfdmkfslkqtg2ngdc6ypsunzb4iootqd.onion:18333
|
||||
aesy6tfufadkut6flu2bsqgnw2422ur2ynjalguxlzuzuktg3zehttqd.onion:18333
|
||||
axaaplqtf4z22xfj2j2xn6fhtj6ksv74bs7vae6rfw67qofdnqoacbid.onion:18333
|
||||
ayx35r2mhwydczzoqu7b6dl3sup4oht74sgnlrjkxybzh2hmfnaix3qd.onion:18333
|
||||
bizdwmm7naqq5pehkbfggznqtena5eodz3kprvsbj4nkkax4fvxx53id.onion:18333
|
||||
bjqttlyt5kxcn7sitpiavf2cuhdf6rlwigericlh7um7gzkqyyefqnqd.onion:18333
|
||||
bkzo7mpxuar7rhsbiwdaxqcymixarcbdmb3sdaqtv6yb2svqttz2s6ad.onion:18333
|
||||
d63vf45ta4chrewnruyvypm7ybfxtut327crtq6qfyrvcwx434rli5qd.onion:18333
|
||||
devwork6shguhs6miygeq7qpyszu2lizeyop33sbrey7hk53jw26hnad.onion:18333
|
||||
bzn63lsmsuvzlg4uqadyylxaggdcrzkb56muw2b43ft5qkynvzfopbyd.onion:18333
|
||||
c7zrq2yqt6rtn5dxkczp5bv62k2jncv3mscoo24c24rljbplr2dvhsid.onion:18333
|
||||
dskf46hfkefyr6nio5gtqp7em7rh6aqwrugdegfooaoxcux5ym6bkuqd.onion:18333
|
||||
e7sseh62snwmipkyuv4mrhdbc5ew7ysyzv34fhjjgxuc6rdvj57vgnid.onion:18333
|
||||
euvmh5f637qwqgktjs5zwauvayybfdkiopnflnh5yjt7ouqat3427pqd.onion:18333
|
||||
f472j4pynbgltb63mr2lhyvhecfqdjdcfmr2s2id4rreemyn32xtjuid.onion:18333
|
||||
fbimesnyhzubbzqc3uaufzkbyfmnkxvypoxaveaub7rzpzh2foxrn2yd.onion:18333
|
||||
gggan3nuzxpd655lafnsunqfxgy56bvsxuuzucgmaowyvq3d7a7o7jad.onion:18333
|
||||
gsw6sn27quwf6u3swgra6o7lrp5qau6kt3ymuyoxgkth6wntzm2bjwyd.onion:18333
|
||||
guudgx24aokistytvm3hj7u5cbvdkr2b643r5t33pa536ekfn2lfykid.onion:18333
|
||||
gwtx5qluopwaxjhedlifnr6pptw2eihojzhq3stnv2gfbvqbgqdhi5qd.onion:18333
|
||||
gy6nih4pmp5esyvvnhlj6qvk7zkbjuoswkxffyiip3dbkvsfxwz5zcqd.onion:18333
|
||||
hj2txlxajdlh7jsfwqxtp3cltlptsr33ctjkbxhbzbyirkmcpfhsnyad.onion:18333
|
||||
hjwzovgwou3py6ncemgmzpvcihay5cuzuxvqdn74axndmll25p4mwjqd.onion:18333
|
||||
hqkdgpzzsv2qvafhdkdocszquj7o2ittxfmm5fc2arxqw7ikottozoid.onion:18333
|
||||
htkiqaqoql7pjstenmw6v4blm6l57d6hl6mewxkmfi3qumozflx3gzyd.onion:18333
|
||||
hvbmmzvqrpgps2x5u4ip4ksf3e5m2fneac754gtnhjn2rsevni6cz3ad.onion:18333
|
||||
hvtxymvdb55u7lhdw6775akqy46inunl3uup27gnsxm2bqmv55wbacqd.onion:18333
|
||||
i5fjp7ggx62zlfkibzn7s6glpjp3h2ypfom3lmqixig7qbdgej35wfyd.onion:18333
|
||||
i5gphw2d224tniqkjebxdwz5ygbbo5gcushoyevv7x7o454b6qlrzeid.onion:18333
|
||||
iysx2dl4tpojiclh32iyhel6z7h227c7o7buzk5wuqw6qhuytvsu66yd.onion:18333
|
||||
j53y5paeb7xcrptntut7epccjglduquldjlzjlho4lj2msabnygrljqd.onion:18333
|
||||
jqos4drrg27j553syd4dfunajednqgz3w7y3cq2morckhc6ht7jm7aad.onion:18333
|
||||
jsc4frvvnl2d3bhzyofsc72xpztgm23nl4fnb4dwkzsxr6fhij2q5iyd.onion:18333
|
||||
jtvqgaccxbtzshtulk5xlsb4wkoil3psmpn5avqyp2i5vm4hqh5cicyd.onion:18333
|
||||
jun6gdmbgasr57bhr4zs3dfhc6pzpaw27nqb4dadbai7yrbq55zskeid.onion:18333
|
||||
lh3wfz2n7xe2muwdjrz5vgnjwjx7lc6iifojhr2rh53ojkwo5dr66uyd.onion:18333
|
||||
kamanho5clcpn5l3sc6ih3vb4skmfhgxw3h2mgs7e5idfezu5dw5oxyd.onion:18333
|
||||
kwjxlauwjtecjfsiwopbl5pvn5n6z5rz76uk6osmlurd3uyuymcw7aid.onion:18333
|
||||
lka74booetkbmat2q64haawcytbwx7mnctvo63ww4jgi4yuqnl6p3kad.onion:18333
|
||||
lwfecq35ocqjfbdq4h2qmcwl3cfcyiyycxtvrz36ihdbuczehi3bmrad.onion:18333
|
||||
n23anw4zb7f3paroac626oc2sqy3yn5kjfpcqvb3lvdyx7dzzpovd3id.onion:18333
|
||||
n4e6fp6xoyo2glsafjwbaq3wirhldpjw4mskn5lzkm4o5lhh5n5k7uqd.onion:18333
|
||||
nmazvezejolohnbza4rmqrwvjcprhi7w22fqvlbxp5sw3c25xy3dunqd.onion:18333
|
||||
nyrekcbm2ici6wv2umogtmwg7o2ivu4vm7bpcge5fayos5l377zldlqd.onion:18333
|
||||
o3zwhskjvuzbti3su3kfspgmvwoiq5iqw4drgo6jv6ehv2zfoyyy5nqd.onion:18333
|
||||
o4fnldblck6fmycg55lh77owlw7wihb7qltjibantj45ijhow73otdad.onion:18333
|
||||
o4zdqfdoe4jfvn35twqtjkzmptmk3bsg45sp46wuxanceg3euqtwdjqd.onion:18333
|
||||
pcbipn5yyvhsedfjjywrcep4b5z43px7duemxvs7e6tvanxgw46ux7ad.onion:18333
|
||||
pj2rxq2sfbwtsqqcbnfnwkg36d72yce56qmp2sjjmb7hvzpzai3ndead.onion:18333
|
||||
ohqcfz5kk6ufouxmhtq7nxyo2lyui4vjlhr2kftvra2ewgzxu3hsrxad.onion:18333
|
||||
oobwtn5csi4auevb2ns2b5rrjnxmhlzdmay4zxtzvkj7tayrgwfddiqd.onion:18333
|
||||
ppe2pepzphox3swftj5lbyi7ckigspbih5qnyuhrb3r6bn3g7k7bp4qd.onion:18333
|
||||
pqkhkpkvqmjcql5jccyxg5nahow6vixnjrvtsc6clnk7dab4weknvpqd.onion:18333
|
||||
q5qox756id5nfdu6ht4dghc35jezls4bgjcdnrds3pwndvdx32zmwlad.onion:18333
|
||||
qiep4hvuovedbbc36hl7nwslwi6ah6uw4nnseyjdtc73cc5rfdauvnad.onion:18333
|
||||
qzx5f2ig2rk2ssrbopz2zlljq5mkeh3izhhx3t3cepse5qnhvpo2tzid.onion:18333
|
||||
rfi2hdpjhhknalltbwdvyuhskh5yjs66rqzpy6ley7xtu4kvbeob6fqd.onion:18333
|
||||
rw6reu6rdetz6rnpzoyn2hfy7sxpbja4v5ktmaicqqgszi2eata5lhqd.onion:18333
|
||||
s3bxrurro4bmvsmntw74qf4vw3xl25xtnvqegayvlwj3b6t7d76kkwid.onion:18333
|
||||
slpigm5ep4zan3a65bybne67phjiyesbuk5s3bodefuhnx2cfdtit6qd.onion:18333
|
||||
sxm6kwrdp6f2ggaozhrl47xuy3es3sgm3ivppmh4xm3hfmetvwbyrcad.onion:18333
|
||||
syzdz6dzc5grlcnhbsbhye27i7dllgozqm3ocpyr6g3ynfrcf4ngzdqd.onion:18333
|
||||
t6hfkkujktjyzpepmphskoaivflu6fieyuxrshxfzwriwvoa2uccvvqd.onion:18333
|
||||
ueyykmnyqk2bnmbgvmqrb4jfbjvpgeew6cuq4gaqe7v2oiyxaubkx4qd.onion:18333
|
||||
urhagmjceyqbzhjitpa7j7mygivxw3wlwqzkibw6zezrxeantkikgcyd.onion:18333
|
||||
vctlwaqgmu53eutz2hewuakcipfgtyljsd7czut4dd62xr3rp6fqezad.onion:18333
|
||||
vi3z4khdvopuiljdjdhpetnxztuzsct2aacuzcm5ba27h4j3cfwsvjad.onion:18333
|
||||
vqnkdmpmecc5kondj32jwbemmruhmd5gkmfngkscetibzozryp4elkad.onion:18333
|
||||
wgc4wp25gtnb54vd7x5h2xtetzrdoiizeyyh6fv3vxzp3bbalejbd3ad.onion:18333
|
||||
wpsahjbejxehpz772kzxonj777pejol2akcicduqov2r7ktm2b6l5pid.onion:18333
|
||||
wqx56diehvnwca6mndqw3omsufbiem3o6lwivauiilxfx5iqsv7emfad.onion:18333
|
||||
wui5m2y5b7cms36ai6shzyqsg6qteejwmxsf26nyms6vcykxbvmh4uad.onion:18333
|
||||
xlx7k5qzawdld5xcfd5lhhasp5tiklc2z326lamcnkmoru56jv6os6ad.onion:18333
|
||||
xafcyh6mxwebvcsgw4wcbuw7n4v7vbqhcznhwqcpqcu6dww2mjuw4nad.onion:18333
|
||||
y5h652jz6sgmb4bkcfnfxnj24gnczqf7lhd5lqbvdhf5mpll4gye5kid.onion:18333
|
||||
ya6s7ov7myixz3ql23u45hty7moxo3r4d26qainw55z656vtau676xid.onion:18333
|
||||
yda7kwpii33j2qpq32ftf6lp22znknswipjwaccvsqj7l337jvfesnid.onion:18333
|
||||
zcsn3j6aswnrf56xj2n5jn4tlwmyoq4benjn5ujcgz46co2y5tm642id.onion:18333
|
||||
zefnna2a3ga4ez2nutvypma7my35prw3ycinbqwva7v4pf3aurqhjcyd.onion:18333
|
||||
zhiju2obxifqpjbcm6xtlgjdbof7jhoctvw3x57vhiftstb5hi3gmsqd.onion:18333
|
||||
zkqddzui5pkrqvjj2zwsf5kln7stlbmw5pmn6ut46fobvzyv2sn2ryid.onion:18333
|
||||
zmvizz7fd5hdue6wt3lwqumd6qwt4ijymmmotfzh75curq3mzjm53hyd.onion:18333
|
||||
zmxlrzoxg4fmso6l2xuq5tdxmlyakdqellzujh3a23iuzg4zlatnogqd.onion:18333
|
||||
zsmxmusdzrcqusk5h6syfq6a3ph6lwx3wpiltun4dmkrt3pa2fp7qaid.onion:18333
|
||||
|
||||
@@ -1,62 +1,59 @@
|
||||
[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:48333
|
||||
[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:48333
|
||||
[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:48333
|
||||
[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:48333
|
||||
7rn2pojst5aurdaes2qcwiigis55ewzjjhxfbxnua5calwuigxdq.b32.i2p:0
|
||||
a7jpzmbtvn5qgvnxez2zc4nvabso4xmllbrqmuoavxz537ttbdtq.b32.i2p:0
|
||||
augssnqnvo2w66vbrfzctc5rnhaxe3io7wnkvr5xp6wwkxmrggra.b32.i2p:0
|
||||
axxwcwzqlw42hjbpzupvffvdsjvniyt5apyt53sdxijqy6y6pdha.b32.i2p:0
|
||||
czbg4pgsrf2ejx2mid6ena24llz5oroofjgn5u4a622msvjjz4ha.b32.i2p:0
|
||||
indhyuh2tatbvv4zxs3qnyrs6vtf7ddh46y5iciu2ypqsvmwoioa.b32.i2p:0
|
||||
twpez6qpht47bclczgwkumtjcxfaa35alqutrck36ajs6zwewgpq.b32.i2p:0
|
||||
nl2qej33ywfqllz3exxce5jxmz35cnovhh6qobwvfc7igm2vdz2q.b32.i2p:0
|
||||
q376dmbdqpt4qgwf6za2ai7c4fs3va5tdmtb3ag6awk6wnv4mqcq.b32.i2p:0
|
||||
rdpe5wgl565yvgeialkhlf53akawdm7npy6bl7asl2ncntoyn7la.b32.i2p:0
|
||||
2.59.134.244:48333 # AS58212
|
||||
3.235.188.91:48333 # AS14618
|
||||
3.250.145.197:48333 # AS16509
|
||||
5.182.4.106:48333 # AS49505
|
||||
18.189.156.102:48333 # AS16509
|
||||
31.57.46.104:48333 # AS56971
|
||||
35.201.167.154:48333 # AS396982
|
||||
38.102.86.40:48333 # AS26832
|
||||
38.111.111.224:48333 # AS399275
|
||||
38.121.43.211:48333 # AS63023
|
||||
45.41.204.15:48333 # AS32181
|
||||
45.41.204.28:48333 # AS32181
|
||||
18.175.220.215:48333 # AS8987
|
||||
18.189.156.102:48333 # AS8987
|
||||
34.232.31.111:48333 # AS14618
|
||||
38.242.219.220:48333 # AS51167
|
||||
45.94.168.5:48333 # AS400810
|
||||
50.19.171.211:48333 # AS16509
|
||||
51.158.61.33:48333 # AS12876
|
||||
62.164.218.78:48333 # AS51167
|
||||
69.26.129.172:48333 # AS23316
|
||||
74.48.195.218:48333 # AS35916
|
||||
74.133.9.162:48333 # AS10796
|
||||
80.253.94.252:48333 # AS13030
|
||||
45.142.17.140:48333 # AS206238
|
||||
50.126.96.22:48333 # AS27017
|
||||
51.79.29.216:48333 # AS16276
|
||||
51.81.245.218:48333 # AS16276
|
||||
54.78.90.72:48333 # AS16509
|
||||
65.108.39.171:48333 # AS24940
|
||||
66.94.123.141:48333 # AS40021
|
||||
77.247.127.71:48333 # AS62240
|
||||
78.24.181.215:48333 # AS49505
|
||||
82.67.102.15:48333 # AS12322
|
||||
89.166.29.73:48333 # AS16086
|
||||
94.183.188.204:48333 # AS56971
|
||||
95.141.35.117:48333 # AS31034
|
||||
89.117.152.94:48333 # AS46475
|
||||
103.99.168.207:48333 # AS54415
|
||||
103.99.171.212:48333 # AS54415
|
||||
103.165.192.207:48333 # AS142052
|
||||
103.165.192.208:48333 # AS142052
|
||||
103.232.248.31:48333 # AS9507
|
||||
104.194.153.147:48333 # AS14956
|
||||
104.237.131.138:48333 # AS63949
|
||||
107.189.25.136:48333 # AS14956
|
||||
108.171.193.104:48333 # AS18450
|
||||
109.123.236.96:48333 # AS141995
|
||||
103.99.168.211:48333 # AS54415
|
||||
103.165.192.203:48333 # AS142052
|
||||
103.165.192.206:48333 # AS142052
|
||||
134.195.88.56:48333 # AS63473
|
||||
135.180.99.74:48333 # AS1299
|
||||
144.76.2.169:48333 # AS24940
|
||||
138.197.188.212:48333 # AS14061
|
||||
148.51.196.40:48333 # AS12025
|
||||
158.220.90.103:48333 # AS51167
|
||||
165.227.226.132:48333 # AS14061
|
||||
168.119.11.220:48333 # AS24940
|
||||
172.86.95.71:48333 # AS30823
|
||||
172.93.167.68:48333 # AS32489
|
||||
172.93.167.89:48333 # AS32489
|
||||
181.174.164.74:48333 # AS52469
|
||||
168.119.150.247:48333 # AS24940
|
||||
172.234.197.251:48333 # AS63949
|
||||
175.45.182.145:48333 # AS133159
|
||||
185.232.70.226:48333 # AS197540
|
||||
185.254.97.76:48333 # AS58212
|
||||
192.145.44.30:48333 # AS197540
|
||||
192.241.131.95:48333 # AS14061
|
||||
193.107.109.220:48333 # AS214379
|
||||
199.119.138.36:48333 # AS216382
|
||||
199.195.248.11:48333 # AS53667
|
||||
203.132.94.196:48333 # AS38195
|
||||
208.68.4.71:48333 # AS397444
|
||||
217.31.57.128:48333 # AS29134
|
||||
222.66.94.2:48333 # AS4812
|
||||
[2001:1ab0:7e1e:d150:be24:11ff:fe03:6b30]:48333 # AS29134
|
||||
[2001:5a8:4164:7a00::1f8]:48333 # AS1299
|
||||
[2001:bc8:1201:409:1618:77ff:fe5f:b12]:48333 # AS12876
|
||||
209.146.51.202:48333 # AS174
|
||||
209.146.51.203:48333 # AS174
|
||||
[2001:41d0:a:555c::1]:48333 # AS16276
|
||||
[2001:5a8:4164:7a00::506]:48333 # AS7065
|
||||
[2001:df6:7280::92:202]:48333 # AS142052
|
||||
[2001:df6:7280::92:203]:48333 # AS142052
|
||||
[2001:df6:7280::92:204]:48333 # AS142052
|
||||
@@ -67,98 +64,88 @@ twpez6qpht47bclczgwkumtjcxfaa35alqutrck36ajs6zwewgpq.b32.i2p:0
|
||||
[2001:df6:7280::92:210]:48333 # AS142052
|
||||
[2001:df6:7280::92:211]:48333 # AS142052
|
||||
[2001:df6:7280::92:212]:48333 # AS142052
|
||||
[2401:b140:2::92:207]:48333 # AS54415
|
||||
[2401:b140:2::92:208]:48333 # AS54415
|
||||
[2401:b140:2::92:211]:48333 # AS54415
|
||||
[2401:b140:2::92:212]:48333 # AS54415
|
||||
[2401:b140:4::92:203]:48333 # AS54415
|
||||
[2401:b140:4::92:202]:48333 # AS54415
|
||||
[2401:b140:4::92:204]:48333 # AS54415
|
||||
[2401:b140:4::92:205]:48333 # AS54415
|
||||
[2401:b140:4::92:206]:48333 # AS54415
|
||||
[2401:b140:4::92:207]:48333 # AS54415
|
||||
[2401:b140:4::92:208]:48333 # AS54415
|
||||
[2401:b140:4::92:209]:48333 # AS54415
|
||||
[2401:b140:4::92:210]:48333 # AS54415
|
||||
[2401:b140:4::92:211]:48333 # AS54415
|
||||
[2401:b140:4::92:212]:48333 # AS54415
|
||||
[2401:b140::92:201]:48333 # AS54415
|
||||
[2401:b140::92:204]:48333 # AS54415
|
||||
[2401:d002:3902:700:a038:c772:884b:8a70]:48333 # AS38195
|
||||
[2405:e480:2:1a::2]:48333 # AS9507
|
||||
[2408:8214:a00:455:20c:29ff:fe72:37e1]:48333 # AS4837
|
||||
[2405:1204:c235:9700:605f:5035:d51b:b05b]:48333 # AS9824
|
||||
[2405:1204:c235:9700:9141:402c:de91:81c0]:48333 # AS9824
|
||||
[2405:1204:c235:9700::6c]:48333 # AS9824
|
||||
[2600:3c00::f03c:91ff:fe5b:4cf3]:48333 # AS63949
|
||||
[2602:fa59:5:663::1]:48333 # AS14956
|
||||
[2602:fa59:7:263::1]:48333 # AS14956
|
||||
[2602:fa59:8:347::1]:48333 # AS14956
|
||||
[2602:fea7:e0d:1004:8a7e:c3ed:b5eb:1]:48333 # AS32181
|
||||
[2602:fea7:e0d:1004:ecee:b8fa:c275:1]:48333 # AS32181
|
||||
[2606:6080:2001:1042::a]:48333 # AS32489
|
||||
[2606:6080:2001:1052::a]:48333 # AS32489
|
||||
[2607:f2d8:6065:1060::a]:48333 # AS18450
|
||||
[2602:ffb6:4:8185:f816:3eff:fe4a:acbf]:48333 # AS174
|
||||
[2602:ffb6:4:8185:f816:3eff:fe4d:6dae]:48333 # AS174
|
||||
[2602:ffb6:4:8185:f816:3eff:fe50:b078]:48333 # AS174
|
||||
[2602:ffb6:4:8185:f816:3eff:fe8a:3155]:48333 # AS174
|
||||
[2604:2dc0:200:13da::]:48333 # AS16276
|
||||
[2605:3380:422e:1::50]:48333 # AS397444
|
||||
[2605:a141:2240:4224::1]:48333 # AS51167
|
||||
[2607:5300:205:300::1b0]:48333 # AS16276
|
||||
[2607:5300:60:7f72::1]:48333 # AS16276
|
||||
[2620:6e:a0a0:1::71]:48333 # AS397444
|
||||
[2a01:4f8:13a:684::2]:48333 # AS24940
|
||||
[2a01:4f8:172:33c1::2]:48333 # AS24940
|
||||
[2a01:4f8:190:72a4::2]:48333 # AS24940
|
||||
[2a01:4f8:2190:1692::2]:48333 # AS24940
|
||||
[2a01:4f8:242:4246::2]:48333 # AS24940
|
||||
[2a01:4f8:262:139f::2]:48333 # AS24940
|
||||
[2a01:4f9:3080:3496::2]:48333 # AS24940
|
||||
[2a01:e0a:e6e:6bb0:2e0:4cff:fe68:232]:48333 # AS12322
|
||||
[2a02:29e0:1:420::64]:48333 # AS49367
|
||||
[2a02:c202:2234:7688::1]:48333 # AS51167
|
||||
[2a13:7c00:5:28:f816:3eff:feea:ca56]:48333 # AS56971
|
||||
[2a13:7c00:6:39:f816:3eff:fed7:c364]:48333 # AS56971
|
||||
[2a13:7c00:7:1:f816:3eff:fe41:7b9a]:48333 # AS56971
|
||||
2iud7iei7uzcp33dlchzmdtvpgmkhxtimshvg7hyzgzdkcxuakvutlyd.onion:48333
|
||||
[2a03:4000:42:22f:816:bbff:fe4c:d4a1]:48333 # AS197540
|
||||
[2a0a:8dc0:a000:40::2]:48333 # AS62240
|
||||
[2a0a:8dc0:a041::a]:48333 # AS62240
|
||||
[2a0c:b641:6f1:8c::2]:48333 # AS214379
|
||||
2sltzrq7ts5t4il5nimp75og2jksbwdjmgbdykz5ljeoqrxemzlakeyd.onion:48333
|
||||
33ffm6iijgivx7xyg75isr5cd2thsqsx7c5hwab5pu3u774uwuipsdqd.onion:48333
|
||||
3y5hxpsoe5aywwhghzvim5xsmi7nfnd6ui3x4dzveeaci4xvlo4jdiid.onion:48333
|
||||
4uzerod2wrqtjuaea6vr43uddq2sg3cgfuk4khqotqsqdsxpwdmcphqd.onion:48333
|
||||
57k43lgf2ciorl7gfz6qu3yo27zdkojd7lbzrwzcbksq3uujts5h6uid.onion:48333
|
||||
5fkz5ijh76cgfwvxz4pyl4br4hekqflijz7d467ldey3xme2trqrgjad.onion:48333
|
||||
5p6eqvrins6vj7q3tpdljhtomu6nqameilbuz5sjnu2i333ve2zpnhqd.onion:48333
|
||||
5rh3ln6ypycmn57qlmke3dliffg2id3ziz4dhsujng4tk34oklnbqtyd.onion:48333
|
||||
5sdzs2qu3ygb44jwo45y2kmbnqc6ijzpndaqn43zgngsiwq7mx6b7yyd.onion:48333
|
||||
5wpcussznj2dg5222zrtfdsx5ttco6xlv7447azzaaywu2t5xukqcaqd.onion:48333
|
||||
6g6dwtby74ic2ggnzkbfqy7saslopho7or6z4uad737c2tq24fj3ltyd.onion:48333
|
||||
6po3e27t4nxgls3mwnostpy47crhtc3ae6fcsn4yyfh5dfcaq3q3q3yd.onion:48333
|
||||
7gcsfynynr26cya4uf2u74bx47jmzaidikh6lqo7nu5uwy7bra3roqyd.onion:48333
|
||||
7jd422hqevrz334ax3fh77wzww7clnr4kpyos25oe64nifg623bjqfqd.onion:48333
|
||||
7kwh7rg3a4e5lgjvybesixzhwzxvf6dqo3gc4h7k5vilwmdjvtzidtid.onion:48333
|
||||
7m3tui2fffodjzc3ivgziwuj6d6eyhnufec5b7xat2ynom62i6slapid.onion:48333
|
||||
a3aej552sklp5nhrosr5wv7qylgkmnu5u7zh7se56vtllvhgctzkbjqd.onion:48333
|
||||
7slxjz7hmpu6rpybl62egedth5c4zo6mwzm4sdbvqtwc5zikvx4e53id.onion:48333
|
||||
7xr2k6gg47calskl3emvqav42jf6l4dtgiwevy2vx7gej6d2osh4oiyd.onion:48333
|
||||
a6yijgwn4vtmmhl7uybtbuyvtl7mtj7arld5f4csqsx4syeii4gt3vqd.onion:48333
|
||||
aqabn424rm7qq5faw2ecckkzxfdw57oncivjrurrrn5wgjdqjqxvxjad.onion:48333
|
||||
azccjliswzu5aycse7g7zu2bw3mqicd2mhszczitp332scjgltehrjqd.onion:48333
|
||||
cldn5rnbnfzngcww4ugqihh5pwkd4c2iawlvi5jhkw6jx3c6zauolgqd.onion:48333
|
||||
c2u7kz2pv7vyufovwndoureyqijbd7kwpy7anulf4fxt3d3buf2yk2yd.onion:48333
|
||||
clqr2to2r6fn4jo6f7xy3dppxgn4ewvnmwbxsdrrhnesyacmw5noaeqd.onion:48333
|
||||
d7ukdifqls72zy543axxf56nx3p7xhgisjquc2glfx45zvf6n7rprnid.onion:48333
|
||||
dnshzxr6osjf2l5gjsbattjtoefgkzmd3p3fdyatr5ltz243zspsilyd.onion:48333
|
||||
ebhtfcmjhilcqtuls437pxu65dznqkpt5qv3yeq6zipnqd7ichz5htyd.onion:48333
|
||||
ek6idnf43vwzcjlsgd544cd6up3qqquoycd3itos2lgytkn5woqh62ad.onion:48333
|
||||
ej4ozb3o5pzvvtvgaars5obzwvhrfs3chkmvb5pxmedykd4bgh6cpgyd.onion:48333
|
||||
ezbq3ydfxmgvgbbn7mrx5jzyig6tz2zjkaqdtkx7avnijrt5riv4j5yd.onion:48333
|
||||
fsijrllgzgeg4pa5ebq4qy3swmplxkzvuvji5swt36quy42dznq3t3ad.onion:48333
|
||||
fvbppnodd4dlxulzlvhikg2ijtnxemcjjpfhcg2rropun45aqhp5noid.onion:48333
|
||||
fwsrcrhnggi3qy5rsfiad3cwep3bf7uovcupgockbntjcfvoqxzr75id.onion:48333
|
||||
gc66muikqqzxwj2tdvvap6gpcbitthjvscawgkclim4vgmajrccjtmqd.onion:48333
|
||||
gujxforhwszry5falvnarfcyajjxxsuvqevx6gk6meou5ordrxw3mdad.onion:48333
|
||||
havkohvjhg5tglbdecf4ufhz5es3f33ctj3b6loebj4pi6qrtjemfbyd.onion:48333
|
||||
htqyij4cmtpxxmynxxarhvtt22zcj3xcmit6iop4inj267yh7nousyyd.onion:48333
|
||||
hb44egze5hjbi3n2rc6w4pwahr6zltc4ilfzin3kkdi2rmozvxlo65qd.onion:48333
|
||||
i22efh4itlcfthvaavcz2rvigu4x6jqvlwuksz44bukslhg76bsgrxqd.onion:48333
|
||||
i63l2yfy5e4kvm5c6la67qxpq6zn4xbdx6cdm474milv4dameu3z35qd.onion:48333
|
||||
irwyrdkcrcdgwtsltcrqexqylwc3ezjhhra7u4i3gkwktezcut36buqd.onion:48333
|
||||
jfyjcgithmk6fmndgg5kljttu5ctlokcvqjvsrxrxvnevhwx57xhpsqd.onion:48333
|
||||
jspxdo33gyrh3tewi55mn2fo5spczzgipq6ao7fa5qu6fj2ezr7bizid.onion:48333
|
||||
kf6q2wza2ebo7cxln5ejcjjwvrew4vb2hf4vd5wo4nyzbnjv3yccduqd.onion:48333
|
||||
ko55e2ityiaqeckthmnnbcv6bbwll7rtdiv527muoqdpg4hye2it2pyd.onion:48333
|
||||
mavvwxts5f3axuz4cyjqpz75veijkdkdueavekb5hia67zk257eg7tqd.onion:48333
|
||||
mdiwdijucocysdvx5dk2iyo5wsav3ehyiggegzfk3ezfcce6nstp4nid.onion:48333
|
||||
nbq63hx63psrcqv26uadmcxkeap76un2xaombe4ivojkt3ysbgountid.onion:48333
|
||||
ns56enpcbigc2dovrj3agdbgudebmwtg43d27wtpvm5nwomectn2kmad.onion:48333
|
||||
ol5rcztxxugtup5mswhkt6hdf4pvcidimy3du6owufnja5lr3czk2zyd.onion:48333
|
||||
prilx36yi6wiz4ll77tapskzwzh5onphrnn6w5d56zrzdat4kjo3q3yd.onion:48333
|
||||
qhzfac4qvomln4ikp6xgfwgb2koxdgjsbeut3iplvsu5o33yf4ewf2ad.onion:48333
|
||||
qmd5qvyhnanqj6wyf4klrvfqoypuz6xjajhx2n272vr5il7nlwyoosqd.onion:48333
|
||||
qmw73e4zh2i6pvmlgx5642vwtynibghgvjdoox574hjxxv7fvd2oxyid.onion:48333
|
||||
rb2ekvp77t4hhhipt7dfuriwges4efybffrb5qurk3xrokgo5or5z2yd.onion:48333
|
||||
rah46hr3opyfbikrkub6g23idrml2ugmealjt4bcxlj6nonoxdqp4jqd.onion:48333
|
||||
riyvgzynuzj2vx2az6a7kvca5bythmj6rgb4asrecdw6vfmvt33uxqid.onion:48333
|
||||
rv7l5gtjqr5n5nlersakfuzwhfflyfizv5cmtiizlsn544qumvuekwqd.onion:48333
|
||||
vfqxysj7olxstghkohezoembjnsyvpp2ph7kc4jaatvszyx2ajz627ad.onion:48333
|
||||
vizb74h32bx3u6zksgsi6seq6hcqdhok5pd4z2x5yj3ll72tu7pcu7id.onion:48333
|
||||
we5rsalvz6fhp3345jydracg6wytxw5smsxzgusljvgcojadyfv2bzyd.onion:48333
|
||||
wkvaxtftpwmmvrptqavx6mwhrcwiecbodtshuenvot3cjgxsycuurcid.onion:48333
|
||||
x66at4pel4ody42wujl4upr2tbulbpn54nzvrk7gomzv4dwkhazfjdqd.onion:48333
|
||||
yiolb6ahgjry66g3vt4dtlnybhdgy4udakakbjxuekj33ligd57mdlqd.onion:48333
|
||||
zdh7vrzykdv7474yioe5jiv3kgajky727t5phxsbt47lefjseo3ypaqd.onion:48333
|
||||
zjttaesjhj7ail437ag4emdufr775h5rtgoohlbca5rwc4re6dr5k7ad.onion:48333
|
||||
zmd4eq6svwn3qgm56dyodktagzi3xo4smxebgjdk2jbjkbmvn7gjm5qd.onion:48333
|
||||
zu3gjmendiuoogirxm6udfpympmchh2lxl3aeifzu7ahyuas3pzkgzid.onion:48333
|
||||
|
||||
@@ -80,4 +80,3 @@ These steps can instead be done explicitly:
|
||||
|
||||
This is intended to allow you to replace part of the pipeline for further experimentation (eg, to sign the block with a hardware wallet).
|
||||
|
||||
For custom signets with a trivial challenge such as `OP_TRUE` and `OP_2` the walletprocesspsbt step can be skipped.
|
||||
|
||||
@@ -152,7 +152,7 @@ if res:
|
||||
elif res.status_code == 404:
|
||||
print('The specified faucet URL does not exist. Please check for any server issues/typo.')
|
||||
elif res.status_code == 429:
|
||||
print('The script does not allow for repeated transactions as the global faucet is rate-limited to 1 request/IP/day. You can access the faucet website to get more coins manually')
|
||||
print('The script does not allow for repeated transactions as the global faucet is rate-limitied to 1 request/IP/day. You can access the faucet website to get more coins manually')
|
||||
else:
|
||||
print(f'Returned Error Code {res.status_code}\n{res.text}\n')
|
||||
print('Please check the provided arguments for their validity and/or any possible typo.')
|
||||
|
||||
@@ -9,7 +9,7 @@ import logging
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
import subprocess
|
||||
@@ -18,8 +18,8 @@ PATH_BASE_CONTRIB_SIGNET = os.path.abspath(os.path.dirname(os.path.realpath(__fi
|
||||
PATH_BASE_TEST_FUNCTIONAL = os.path.abspath(os.path.join(PATH_BASE_CONTRIB_SIGNET, "..", "..", "test", "functional"))
|
||||
sys.path.insert(0, PATH_BASE_TEST_FUNCTIONAL)
|
||||
|
||||
from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height, SIGNET_HEADER # noqa: E402
|
||||
from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex, MAX_SEQUENCE_NONFINAL # noqa: E402
|
||||
from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height # noqa: E402
|
||||
from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex # noqa: E402
|
||||
from test_framework.psbt import PSBT, PSBTMap, PSBT_GLOBAL_UNSIGNED_TX, PSBT_IN_FINAL_SCRIPTSIG, PSBT_IN_FINAL_SCRIPTWITNESS, PSBT_IN_NON_WITNESS_UTXO, PSBT_IN_SIGHASH_TYPE # noqa: E402
|
||||
from test_framework.script import CScript, CScriptOp # noqa: E402
|
||||
|
||||
@@ -28,6 +28,7 @@ logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
datefmt='%Y-%m-%d %H:%M:%S')
|
||||
|
||||
SIGNET_HEADER = b"\xec\xc7\xda\xa2"
|
||||
PSBT_SIGNET_BLOCK = b"\xfc\x06signetb" # proprietary PSBT global field holding the block being signed
|
||||
RE_MULTIMINER = re.compile(r"^(\d+)(-(\d+))?/(\d+)$")
|
||||
|
||||
@@ -40,7 +41,8 @@ def signet_txs(block, challenge):
|
||||
txs[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER)
|
||||
hashes = []
|
||||
for tx in txs:
|
||||
hashes.append(ser_uint256(tx.txid_int))
|
||||
tx.rehash()
|
||||
hashes.append(ser_uint256(tx.sha256))
|
||||
mroot = block.get_merkle_root(hashes)
|
||||
|
||||
sd = b""
|
||||
@@ -54,59 +56,56 @@ def signet_txs(block, challenge):
|
||||
to_spend.nLockTime = 0
|
||||
to_spend.vin = [CTxIn(COutPoint(0, 0xFFFFFFFF), b"\x00" + CScriptOp.encode_op_pushdata(sd), 0)]
|
||||
to_spend.vout = [CTxOut(0, challenge)]
|
||||
to_spend.rehash()
|
||||
|
||||
spend = CTransaction()
|
||||
spend.version = 0
|
||||
spend.nLockTime = 0
|
||||
spend.vin = [CTxIn(COutPoint(to_spend.txid_int, 0), b"", 0)]
|
||||
spend.vin = [CTxIn(COutPoint(to_spend.sha256, 0), b"", 0)]
|
||||
spend.vout = [CTxOut(0, b"\x6a")]
|
||||
|
||||
return spend, to_spend
|
||||
|
||||
def decode_challenge_psbt(b64psbt):
|
||||
def decode_psbt(b64psbt):
|
||||
psbt = PSBT.from_base64(b64psbt)
|
||||
|
||||
assert len(psbt.tx.vin) == 1
|
||||
assert len(psbt.tx.vout) == 1
|
||||
assert PSBT_SIGNET_BLOCK in psbt.g.map
|
||||
return psbt
|
||||
|
||||
def get_block_from_psbt(psbt):
|
||||
return from_binary(CBlock, psbt.g.map[PSBT_SIGNET_BLOCK])
|
||||
|
||||
def get_solution_from_psbt(psbt, emptyok=False):
|
||||
scriptSig = psbt.i[0].map.get(PSBT_IN_FINAL_SCRIPTSIG, b"")
|
||||
scriptWitness = psbt.i[0].map.get(PSBT_IN_FINAL_SCRIPTWITNESS, b"\x00")
|
||||
if emptyok and len(scriptSig) == 0 and scriptWitness == b"\x00":
|
||||
return None
|
||||
return ser_string(scriptSig) + scriptWitness
|
||||
|
||||
return from_binary(CBlock, psbt.g.map[PSBT_SIGNET_BLOCK]), ser_string(scriptSig) + scriptWitness
|
||||
|
||||
def finish_block(block, signet_solution, grind_cmd):
|
||||
if signet_solution is None:
|
||||
pass # Don't need to add a signet commitment if there's no signet signature needed
|
||||
else:
|
||||
block.vtx[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER + signet_solution)
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
block.vtx[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER + signet_solution)
|
||||
block.vtx[0].rehash()
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
if grind_cmd is None:
|
||||
block.solve()
|
||||
else:
|
||||
headhex = CBlockHeader.serialize(block).hex()
|
||||
cmd = shlex.split(grind_cmd) + [headhex]
|
||||
cmd = grind_cmd.split(" ") + [headhex]
|
||||
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
|
||||
newhead = from_hex(CBlockHeader(), newheadhex.decode('utf8'))
|
||||
block.nNonce = newhead.nNonce
|
||||
block.rehash()
|
||||
return block
|
||||
|
||||
def new_block(tmpl, reward_spk, *, blocktime=None, poolid=None):
|
||||
def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None):
|
||||
signet_spk = tmpl["signet_challenge"]
|
||||
signet_spk_bin = bytes.fromhex(signet_spk)
|
||||
|
||||
scriptSig = script_BIP34_coinbase_height(tmpl["height"])
|
||||
if poolid is not None:
|
||||
scriptSig = CScript(b"" + scriptSig + CScriptOp.encode_op_pushdata(poolid))
|
||||
|
||||
cbtx = CTransaction()
|
||||
cbtx.nLockTime = tmpl["height"] - 1
|
||||
cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), scriptSig, MAX_SEQUENCE_NONFINAL)]
|
||||
cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), scriptSig, 0xffffffff)]
|
||||
cbtx.vout = [CTxOut(tmpl["coinbasevalue"], reward_spk)]
|
||||
cbtx.vin[0].nSequence = 2**32-2
|
||||
cbtx.rehash()
|
||||
|
||||
block = CBlock()
|
||||
block.nVersion = tmpl["version"]
|
||||
@@ -125,13 +124,8 @@ def new_block(tmpl, reward_spk, *, blocktime=None, poolid=None):
|
||||
block.vtx[0].wit.vtxinwit = [cbwit]
|
||||
block.vtx[0].vout.append(CTxOut(0, bytes(get_witness_script(witroot, witnonce))))
|
||||
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
|
||||
return block
|
||||
|
||||
def generate_psbt(block, signet_spk):
|
||||
signet_spk_bin = bytes.fromhex(signet_spk)
|
||||
signme, spendme = signet_txs(block, signet_spk_bin)
|
||||
|
||||
psbt = PSBT()
|
||||
psbt.g = PSBTMap( {PSBT_GLOBAL_UNSIGNED_TX: signme.serialize(),
|
||||
PSBT_SIGNET_BLOCK: block.serialize()
|
||||
@@ -180,16 +174,12 @@ def get_reward_addr_spk(args, height):
|
||||
def do_genpsbt(args):
|
||||
poolid = get_poolid(args)
|
||||
tmpl = json.load(sys.stdin)
|
||||
signet_spk = tmpl["signet_challenge"]
|
||||
_, reward_spk = get_reward_addr_spk(args, tmpl["height"])
|
||||
block = new_block(tmpl, reward_spk, poolid=poolid)
|
||||
psbt = generate_psbt(block, signet_spk)
|
||||
psbt = generate_psbt(tmpl, reward_spk, poolid=poolid)
|
||||
print(psbt)
|
||||
|
||||
def do_solvepsbt(args):
|
||||
psbt = decode_challenge_psbt(sys.stdin.read())
|
||||
block = get_block_from_psbt(psbt)
|
||||
signet_solution = get_solution_from_psbt(psbt, emptyok=True)
|
||||
block, signet_solution = decode_psbt(sys.stdin.read())
|
||||
block = finish_block(block, signet_solution, args.grind_cmd)
|
||||
print(block.serialize().hex())
|
||||
|
||||
@@ -232,21 +222,6 @@ def seconds_to_hms(s):
|
||||
out = "-" + out
|
||||
return out
|
||||
|
||||
def trivial_challenge(spkhex):
|
||||
"""
|
||||
BIP325 allows omitting the signet commitment when scriptSig and
|
||||
scriptWitness are both empty. This is the case for trivial
|
||||
challenges such as OP_TRUE or a single data push.
|
||||
"""
|
||||
spk = bytes.fromhex(spkhex)
|
||||
if len(spk) == 1 and 0x51 <= spk[0] <= 0x60:
|
||||
# OP_TRUE/OP_1...OP_16
|
||||
return True
|
||||
elif 2 <= len(spk) <= 76 and spk[0] + 1 == len(spk):
|
||||
# Single fixed push of 1-75 bytes
|
||||
return True
|
||||
return False
|
||||
|
||||
class Generate:
|
||||
INTERVAL = 600.0*2016/2015 # 10 minutes, adjusted for the off-by-one bug
|
||||
|
||||
@@ -347,22 +322,14 @@ class Generate:
|
||||
return tmpl
|
||||
|
||||
def mine(self, bcli, grind_cmd, tmpl, reward_spk):
|
||||
block = new_block(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid)
|
||||
|
||||
signet_spk = tmpl["signet_challenge"]
|
||||
if trivial_challenge(signet_spk):
|
||||
signet_solution = None
|
||||
else:
|
||||
psbt = generate_psbt(block, signet_spk)
|
||||
input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8')
|
||||
psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream))
|
||||
if not psbt_signed.get("complete",False):
|
||||
logging.debug("Generated PSBT: %s" % (psbt,))
|
||||
sys.stderr.write("PSBT signing failed\n")
|
||||
return None
|
||||
psbt = decode_challenge_psbt(psbt_signed["psbt"])
|
||||
signet_solution = get_solution_from_psbt(psbt)
|
||||
|
||||
psbt = generate_psbt(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid)
|
||||
input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8')
|
||||
psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream))
|
||||
if not psbt_signed.get("complete",False):
|
||||
logging.debug("Generated PSBT: %s" % (psbt,))
|
||||
sys.stderr.write("PSBT signing failed\n")
|
||||
return None
|
||||
block, signet_solution = decode_psbt(psbt_signed["psbt"])
|
||||
return finish_block(block, signet_solution, grind_cmd)
|
||||
|
||||
def do_generate(args):
|
||||
@@ -481,15 +448,15 @@ def do_generate(args):
|
||||
# report
|
||||
bstr = "block" if gen.is_mine else "backup block"
|
||||
|
||||
next_delta = gen.next_block_delta(block.nBits, block.hash_hex)
|
||||
next_delta = gen.next_block_delta(block.nBits, block.hash)
|
||||
next_delta += block.nTime - time.time()
|
||||
next_is_mine = gen.next_block_is_mine(block.hash_hex)
|
||||
next_is_mine = gen.next_block_is_mine(block.hash)
|
||||
|
||||
logging.debug("Block hash %s payout to %s", block.hash_hex, reward_addr)
|
||||
logging.debug("Block hash %s payout to %s", block.hash, reward_addr)
|
||||
logging.info("Mined %s at height %d; next in %s (%s)", bstr, tmpl["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup"))
|
||||
if r != "":
|
||||
logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash_hex)
|
||||
lastheader = block.hash_hex
|
||||
logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash)
|
||||
lastheader = block.hash
|
||||
|
||||
def do_calibrate(args):
|
||||
if args.nbits is not None and args.seconds is not None:
|
||||
@@ -512,7 +479,7 @@ def do_calibrate(args):
|
||||
header.nTime = i
|
||||
header.nNonce = 0
|
||||
headhex = header.serialize().hex()
|
||||
cmd = shlex.split(args.grind_cmd) + [headhex]
|
||||
cmd = args.grind_cmd.split(" ") + [headhex]
|
||||
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
|
||||
|
||||
avg = (time.time() - start) * 1.0 / TRIALS
|
||||
@@ -582,7 +549,7 @@ def main():
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(shlex.split(args.cli), list(a), input=input, **kwargs)
|
||||
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(args.cli.split(" "), list(a), input=input, **kwargs)
|
||||
|
||||
if hasattr(args, "address") and hasattr(args, "descriptor"):
|
||||
args.derived_addresses = {}
|
||||
|
||||
@@ -17,9 +17,9 @@ from bcc import BPF, USDT
|
||||
PROGRAM = """
|
||||
# include <uapi/linux/ptrace.h>
|
||||
|
||||
// The longest rejection reason is 114 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
|
||||
// strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))
|
||||
#define MAX_REJECT_REASON_LENGTH 114
|
||||
// The longest rejection reason is 118 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by
|
||||
// strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))
|
||||
#define MAX_REJECT_REASON_LENGTH 118
|
||||
// The longest string returned by RemovalReasonToString() is 'sizelimit'
|
||||
#define MAX_REMOVAL_REASON_LENGTH 9
|
||||
#define HASH_LENGTH 32
|
||||
|
||||
@@ -179,7 +179,7 @@ def loop(screen, bpf, peers):
|
||||
info_panel = panel.new_panel(win)
|
||||
info_panel.hide()
|
||||
|
||||
ROWS_AVAILABLE_FOR_LIST = curses.LINES - 5
|
||||
ROWS_AVALIABLE_FOR_LIST = curses.LINES - 5
|
||||
scroll = 0
|
||||
|
||||
while True:
|
||||
@@ -191,7 +191,7 @@ def loop(screen, bpf, peers):
|
||||
if (ch == curses.KEY_DOWN or ch == ord("j")) and cur_list_pos < len(
|
||||
peers.keys()) -1 and info_panel.hidden():
|
||||
cur_list_pos += 1
|
||||
if cur_list_pos >= ROWS_AVAILABLE_FOR_LIST:
|
||||
if cur_list_pos >= ROWS_AVALIABLE_FOR_LIST:
|
||||
scroll += 1
|
||||
if (ch == curses.KEY_UP or ch == ord("k")) and cur_list_pos > 0 and info_panel.hidden():
|
||||
cur_list_pos -= 1
|
||||
@@ -203,14 +203,14 @@ def loop(screen, bpf, peers):
|
||||
else:
|
||||
info_panel.hide()
|
||||
screen.erase()
|
||||
render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel)
|
||||
render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel)
|
||||
curses.panel.update_panels()
|
||||
screen.refresh()
|
||||
except KeyboardInterrupt:
|
||||
exit()
|
||||
|
||||
|
||||
def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel):
|
||||
def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel):
|
||||
""" renders the list of peers and details panel
|
||||
|
||||
This code is unrelated to USDT, BCC and BPF.
|
||||
@@ -223,7 +223,7 @@ def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_pa
|
||||
1, 0, (" Navigate with UP/DOWN or J/K and select a peer with ENTER or SPACE to see individual P2P messages"), curses.A_NORMAL)
|
||||
screen.addstr(3, 0,
|
||||
header_format % ("PEER", "OUTBOUND", "INBOUND", "TYPE", "ADDR"), curses.A_BOLD | curses.A_UNDERLINE)
|
||||
peer_list = sorted(peers.keys())[scroll:ROWS_AVAILABLE_FOR_LIST+scroll]
|
||||
peer_list = sorted(peers.keys())[scroll:ROWS_AVALIABLE_FOR_LIST+scroll]
|
||||
for i, peer_id in enumerate(peer_list):
|
||||
peer = peers[peer_id]
|
||||
screen.addstr(i + 4, 0,
|
||||
|
||||
@@ -12,14 +12,47 @@
|
||||
# --error-limit=no build/bin/test_bitcoin
|
||||
#
|
||||
# Note that suppressions may depend on OS and/or library versions.
|
||||
# Tested on aarch64 and x86_64 with Ubuntu Noble system libs, using clang-16
|
||||
# and GCC, without gui.
|
||||
# Tested on:
|
||||
# * aarch64 (Ubuntu Noble system libs, clang, without gui)
|
||||
# * x86_64 (Ubuntu Noble system libs, clang, without gui)
|
||||
{
|
||||
Suppress libdb warning - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662917
|
||||
Memcheck:Cond
|
||||
obj:*/libdb_cxx-*.so
|
||||
fun:__log_put
|
||||
}
|
||||
{
|
||||
Suppress libdb warning
|
||||
Memcheck:Param
|
||||
pwrite64(buf)
|
||||
fun:pwrite
|
||||
fun:__os_io
|
||||
}
|
||||
{
|
||||
Suppress libdb warning
|
||||
Memcheck:Cond
|
||||
fun:__log_putr.isra.1
|
||||
}
|
||||
{
|
||||
Suppress libdb warning
|
||||
Memcheck:Param
|
||||
pwrite64(buf)
|
||||
...
|
||||
obj:*/libdb_cxx-*.so
|
||||
}
|
||||
{
|
||||
Suppress uninitialized bytes warning in compat code
|
||||
Memcheck:Param
|
||||
ioctl(TCSET{S,SW,SF})
|
||||
fun:tcsetattr
|
||||
}
|
||||
{
|
||||
Suppress libdb warning
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
obj:*/libdb_cxx-*.so
|
||||
}
|
||||
{
|
||||
Suppress leaks on shutdown
|
||||
Memcheck:Leak
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
ZMQ example using python3's asyncio
|
||||
|
||||
Bitcoin should be started with the command line arguments:
|
||||
bitcoind -testnet4 -daemon \
|
||||
bitcoind -testnet -daemon \
|
||||
-zmqpubrawtx=tcp://127.0.0.1:28332 \
|
||||
-zmqpubrawblock=tcp://127.0.0.1:28332 \
|
||||
-zmqpubhashtx=tcp://127.0.0.1:28332 \
|
||||
|
||||
@@ -36,12 +36,14 @@ NO_BOOST ?=
|
||||
NO_LIBEVENT ?=
|
||||
NO_QT ?=
|
||||
NO_QR ?=
|
||||
NO_BDB ?=
|
||||
NO_SQLITE ?=
|
||||
NO_WALLET ?=
|
||||
NO_ZMQ ?=
|
||||
NO_USDT ?=
|
||||
# Default NO_IPC value is 1 on Windows
|
||||
NO_IPC ?= $(if $(findstring mingw32,$(HOST)),1,)
|
||||
MULTIPROCESS ?=
|
||||
LTO ?=
|
||||
NO_HARDEN ?=
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
||||
|
||||
C_STANDARD ?= c11
|
||||
@@ -141,13 +143,13 @@ include packages/packages.mk
|
||||
#
|
||||
build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
|
||||
AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
|
||||
DEBUG='$(DEBUG)' \
|
||||
DEBUG='$(DEBUG)' NO_HARDEN='$(NO_HARDEN)' \
|
||||
./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
|
||||
|
||||
$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \
|
||||
CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' \
|
||||
AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' \
|
||||
DEBUG='$(DEBUG)' LTO='$(LTO)' \
|
||||
DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' \
|
||||
./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
|
||||
|
||||
boost_packages_$(NO_BOOST) = $(boost_packages)
|
||||
@@ -157,23 +159,24 @@ libevent_packages_$(NO_LIBEVENT) = $(libevent_packages)
|
||||
qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
|
||||
|
||||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
|
||||
qt_native_packages_$(NO_QT) = $(qt_native_packages)
|
||||
|
||||
wallet_packages_$(NO_WALLET) = $(sqlite_packages)
|
||||
bdb_packages_$(NO_BDB) = $(bdb_packages)
|
||||
sqlite_packages_$(NO_SQLITE) = $(sqlite_packages)
|
||||
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_)
|
||||
|
||||
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
|
||||
ipc_packages_$(NO_IPC) = $(ipc_packages)
|
||||
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
|
||||
usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages)
|
||||
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||
|
||||
ifneq ($(zmq_packages_),)
|
||||
packages += $(zmq_packages)
|
||||
endif
|
||||
|
||||
ifneq ($(ipc_packages_),)
|
||||
packages += $(ipc_packages)
|
||||
ifeq ($(multiprocess_packages_),)
|
||||
packages += $(multiprocess_packages)
|
||||
native_packages += $(multiprocess_native_packages)
|
||||
endif
|
||||
|
||||
@@ -231,8 +234,11 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
|
||||
-e 's|@qrencode_packages@|$(qrencode_packages_)|' \
|
||||
-e 's|@zmq_packages@|$(zmq_packages_)|' \
|
||||
-e 's|@wallet_packages@|$(wallet_packages_)|' \
|
||||
-e 's|@bdb_packages@|$(bdb_packages_)|' \
|
||||
-e 's|@sqlite_packages@|$(sqlite_packages_)|' \
|
||||
-e 's|@usdt_packages@|$(usdt_packages_)|' \
|
||||
-e 's|@ipc_packages@|$(ipc_packages_)|' \
|
||||
-e 's|@no_harden@|$(NO_HARDEN)|' \
|
||||
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
|
||||
$< > $@
|
||||
touch $@
|
||||
|
||||
|
||||
@@ -1,115 +1,9 @@
|
||||
# Depends build
|
||||
|
||||
This is a system of building and caching dependencies necessary for building
|
||||
Bitcoin Core. It supports cross-compilation. For more details see [description.md](description.md),
|
||||
as well as [packages.md](packages.md) for how to add packages.
|
||||
|
||||
## Usage
|
||||
|
||||
### Ubuntu & Debian
|
||||
|
||||
apt install cmake curl make patch
|
||||
|
||||
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
|
||||
|
||||
apt install bison g++ ninja-build pkgconf python3 xz-utils
|
||||
### Usage
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
make
|
||||
|
||||
### macOS
|
||||
|
||||
Install Xcode Command Line Tools and Homebrew Package Manager,
|
||||
see [build-osx.md](../doc/build-osx.md).
|
||||
|
||||
brew install cmake make ninja
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
gmake
|
||||
|
||||
### FreeBSD
|
||||
|
||||
pkg install bash cmake curl gmake
|
||||
|
||||
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
|
||||
|
||||
pkg install bison ninja pkgconf python3
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
gmake
|
||||
|
||||
### NetBSD
|
||||
|
||||
pkgin install bash cmake curl gmake perl
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
gmake
|
||||
|
||||
### OpenBSD
|
||||
|
||||
pkg_add bash cmake curl gmake gtar
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
gmake
|
||||
|
||||
### Alpine
|
||||
|
||||
apk add bash build-base cmake curl make patch
|
||||
|
||||
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
|
||||
|
||||
apk add bison linux-headers samurai pkgconf python3
|
||||
|
||||
To build dependencies for the current arch+OS:
|
||||
|
||||
make
|
||||
|
||||
## Configuring Bitcoin Core
|
||||
|
||||
**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In
|
||||
order for it to pick up libraries, tools, and settings from the depends build,
|
||||
you must specify the toolchain file.
|
||||
In the above example for Ubuntu, a file named `depends/x86_64-pc-linux-gnu/toolchain.cmake` will be
|
||||
created. To use it during configuring Bitcoin Core:
|
||||
|
||||
cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake
|
||||
|
||||
## Dependency Options
|
||||
|
||||
The following can be set when running make: `make FOO=bar`
|
||||
|
||||
- `SOURCES_PATH`: Downloaded sources will be placed here
|
||||
- `BASE_CACHE`: Built packages will be placed here
|
||||
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
|
||||
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
|
||||
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
|
||||
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`.
|
||||
- `NO_BOOST`: Don't download/build/cache Boost
|
||||
- `NO_LIBEVENT`: Don't download/build/cache Libevent
|
||||
- `NO_QT`: Don't download/build/cache Qt and its dependencies
|
||||
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
|
||||
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
|
||||
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite)
|
||||
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
|
||||
- `NO_IPC`: Don't build Cap’n Proto and libmultiprocess packages. Default on Windows.
|
||||
- `DEBUG`: Disable some optimizations and enable more runtime checking
|
||||
- `HOST_ID_SALT`: Optional salt to use when generating host package ids
|
||||
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
|
||||
- `LOG`: Use file-based logging for individual packages. During a package build its log file
|
||||
resides in the `depends` directory, and the log file is printed out automatically in case
|
||||
of build error. After successful build log files are moved along with package archives
|
||||
- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
|
||||
|
||||
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
|
||||
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
|
||||
|
||||
## Cross compilation
|
||||
|
||||
To build for another arch/OS:
|
||||
|
||||
make HOST=host-platform-triplet
|
||||
@@ -118,6 +12,14 @@ For example:
|
||||
|
||||
make HOST=x86_64-w64-mingw32 -j4
|
||||
|
||||
**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In
|
||||
order for it to pick up libraries, tools, and settings from the depends build,
|
||||
you must specify the toolchain file.
|
||||
In the above example, a file named `depends/x86_64-w64-mingw32/toolchain.cmake` will be
|
||||
created. To use it during configuring Bitcoin Core:
|
||||
|
||||
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
|
||||
|
||||
Common `host-platform-triplet`s for cross compilation are:
|
||||
|
||||
- `i686-pc-linux-gnu` for Linux x86 32 bit
|
||||
@@ -135,6 +37,18 @@ Common `host-platform-triplet`s for cross compilation are:
|
||||
|
||||
The paths are automatically configured and no other options are needed.
|
||||
|
||||
### Install the required dependencies: Ubuntu & Debian
|
||||
|
||||
#### Common
|
||||
|
||||
apt install cmake curl make patch
|
||||
|
||||
#### GUI
|
||||
|
||||
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
|
||||
|
||||
apt install bison g++ pkgconf python3 xz-utils
|
||||
|
||||
#### For macOS cross compilation
|
||||
|
||||
apt install clang lld llvm zip
|
||||
@@ -174,9 +88,59 @@ For linux S390X cross compilation:
|
||||
|
||||
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
|
||||
|
||||
### Install the required dependencies: FreeBSD
|
||||
|
||||
pkg install bash cmake curl gmake
|
||||
|
||||
### Install the required dependencies: NetBSD
|
||||
|
||||
pkgin install bash cmake curl gmake perl
|
||||
|
||||
### Install the required dependencies: OpenBSD
|
||||
|
||||
pkg_add bash cmake curl gmake gtar
|
||||
|
||||
### Dependency Options
|
||||
|
||||
The following can be set when running make: `make FOO=bar`
|
||||
|
||||
- `SOURCES_PATH`: Downloaded sources will be placed here
|
||||
- `BASE_CACHE`: Built packages will be placed here
|
||||
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
|
||||
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
|
||||
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
|
||||
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`.
|
||||
- `NO_BOOST`: Don't download/build/cache Boost
|
||||
- `NO_LIBEVENT`: Don't download/build/cache Libevent
|
||||
- `NO_QT`: Don't download/build/cache Qt and its dependencies
|
||||
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
|
||||
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
|
||||
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet
|
||||
- `NO_BDB`: Don't download/build/cache BerkeleyDB
|
||||
- `NO_SQLITE`: Don't download/build/cache SQLite
|
||||
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
|
||||
- `MULTIPROCESS`: Build libmultiprocess (experimental)
|
||||
- `DEBUG`: Disable some optimizations and enable more runtime checking
|
||||
- `HOST_ID_SALT`: Optional salt to use when generating host package ids
|
||||
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
|
||||
- `LOG`: Use file-based logging for individual packages. During a package build its log file
|
||||
resides in the `depends` directory, and the log file is printed out automatically in case
|
||||
of build error. After successful build log files are moved along with package archives
|
||||
- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS.
|
||||
- `NO_HARDEN=1`: Don't use hardening options when building packages
|
||||
|
||||
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
|
||||
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
|
||||
|
||||
### Additional targets
|
||||
|
||||
download: run 'make download' to fetch all sources without building them
|
||||
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
|
||||
download-win: run 'make download-win' to fetch all sources needed for win builds
|
||||
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
|
||||
|
||||
|
||||
### Other documentation
|
||||
|
||||
- [description.md](description.md): General description of the depends system
|
||||
- [packages.md](packages.md): Steps for adding packages
|
||||
|
||||
20
depends/config.guess
vendored
20
depends/config.guess
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2024-07-27'
|
||||
timestamp='2023-08-22'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -60,7 +60,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -123,7 +123,7 @@ set_cc_for_build() {
|
||||
dummy=$tmp/dummy
|
||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||
,,) echo "int x;" > "$dummy.c"
|
||||
for driver in cc gcc c17 c99 c89 ; do
|
||||
for driver in cc gcc c89 c99 ; do
|
||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD=$driver
|
||||
break
|
||||
@@ -165,8 +165,6 @@ Linux|GNU|GNU/*)
|
||||
LIBC=dietlibc
|
||||
#elif defined(__GLIBC__)
|
||||
LIBC=gnu
|
||||
#elif defined(__LLVM_LIBC__)
|
||||
LIBC=llvm
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
/* First heuristic to detect musl libc. */
|
||||
@@ -634,8 +632,7 @@ EOF
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
@@ -719,8 +716,7 @@ EOF
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
@@ -1597,9 +1593,6 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do we have a guess based on uname results?
|
||||
@@ -1623,7 +1616,6 @@ cat > "$dummy.c" <<EOF
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
|
||||
752
depends/config.sub
vendored
752
depends/config.sub
vendored
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user