Skip to content

Commit 3bc8463

Browse files
committed
Squashed 'libbitcoinkernel-sys/bitcoin/' content from commit 8777c555fc
git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 8777c555fc2da3fab14e7031f80681d9f2e193c6
0 parents  commit 3bc8463

File tree

2,709 files changed

+875612
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,709 files changed

+875612
-0
lines changed

.cirrus.yml

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
env: # Global defaults
2+
CIRRUS_CLONE_DEPTH: 1
3+
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
4+
MAKEJOBS: "-j10"
5+
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
6+
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error
7+
CCACHE_MAXSIZE: "200M"
8+
CCACHE_DIR: "/tmp/ccache_dir"
9+
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
10+
11+
# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with
12+
# multiple users to run tasks in parallel. No sudo permission is required.
13+
#
14+
# https://cirrus-ci.org/guide/persistent-workers/
15+
#
16+
# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
17+
#
18+
# The following specific types should exist, with the following requirements:
19+
# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
20+
# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
21+
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
22+
#
23+
# CI jobs for the latter configuration can be run on x86_64 hardware
24+
# by installing qemu-user-static, which works out of the box with
25+
# podman or docker. Background: https://stackoverflow.com/a/72890225/313633
26+
#
27+
# The above machine types are matched to each task by their label. Refer to the
28+
# Cirrus CI docs for more details.
29+
#
30+
# When a contributor maintains a fork of the repo, any pull request they make
31+
# to their own fork, or to the main repository, will trigger two CI runs:
32+
# one for the branch push and one for the pull request.
33+
# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
34+
# in Cirrus repository settings, accessible from
35+
# https://cirrus-ci.com/github/my-organization/my-repository
36+
#
37+
# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1
38+
# ensures that previous containers and artifacts are cleared before each run.
39+
# This requires installing Podman instead of Docker.
40+
#
41+
# Futhermore:
42+
# - apt-get is required due to PACKAGE_MANAGER_INSTALL
43+
# - podman-docker-4.1+ is required due to the bugfix in 4.1
44+
# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
45+
# - The ./ci/ dependencies (with cirrus-cli) should be installed. One-liner example
46+
# for a single user setup with sudo permission:
47+
#
48+
# ```
49+
# apt update && apt install git screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
50+
# ```
51+
#
52+
# - There are no strict requirements on the hardware. Having fewer CPU threads
53+
# than recommended merely causes the CI script to run slower.
54+
# To avoid rare and intermittent OOM due to short memory usage spikes,
55+
# it is recommended to add (and persist) swap:
56+
#
57+
# ```
58+
# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab )
59+
# ```
60+
#
61+
# - To register the persistent worker, open a `screen` session and run:
62+
#
63+
# ```
64+
# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
65+
# ```
66+
67+
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
68+
filter_template: &FILTER_TEMPLATE
69+
# Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed,
70+
# but still run CI when a PR is created.
71+
# https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
72+
skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == ""
73+
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
74+
75+
base_template: &BASE_TEMPLATE
76+
<< : *FILTER_TEMPLATE
77+
merge_base_script:
78+
# Unconditionally install git (used in fingerprint_script).
79+
- git --version || bash -c "$PACKAGE_MANAGER_INSTALL git"
80+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
81+
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
82+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
83+
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
84+
85+
main_template: &MAIN_TEMPLATE
86+
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
87+
ci_script:
88+
- ./ci/test_run_all.sh
89+
90+
global_task_template: &GLOBAL_TASK_TEMPLATE
91+
<< : *BASE_TEMPLATE
92+
<< : *MAIN_TEMPLATE
93+
94+
compute_credits_template: &CREDITS_TEMPLATE
95+
# https://cirrus-ci.org/pricing/#compute-credits
96+
# Only use credits for pull requests to the main repo
97+
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
98+
99+
task:
100+
name: 'lint'
101+
<< : *BASE_TEMPLATE
102+
container:
103+
image: debian:bookworm
104+
cpu: 1
105+
memory: 1G
106+
# For faster CI feedback, immediately schedule the linters
107+
<< : *CREDITS_TEMPLATE
108+
test_runner_cache:
109+
folder: "/lint_test_runner"
110+
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:test/lint/test_runner)
111+
python_cache:
112+
folder: "/python_build"
113+
fingerprint_script: cat .python-version /etc/os-release
114+
unshallow_script:
115+
- git fetch --unshallow --no-tags
116+
lint_script:
117+
- ./ci/lint_run_all.sh
118+
119+
task:
120+
name: 'tidy'
121+
<< : *GLOBAL_TASK_TEMPLATE
122+
persistent_worker:
123+
labels:
124+
type: medium
125+
env:
126+
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
127+
128+
task:
129+
name: 'ARM, unit tests, no functional tests'
130+
<< : *GLOBAL_TASK_TEMPLATE
131+
persistent_worker:
132+
labels:
133+
type: arm64 # Use arm64 worker to sidestep qemu and avoid a slow CI: https://github.com/bitcoin/bitcoin/pull/28087#issuecomment-1649399453
134+
env:
135+
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
136+
137+
task:
138+
name: 'Win64, unit tests, no gui tests, no functional tests'
139+
<< : *GLOBAL_TASK_TEMPLATE
140+
persistent_worker:
141+
labels:
142+
type: small
143+
env:
144+
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
145+
146+
task:
147+
name: '32-bit CentOS, dash, gui'
148+
<< : *GLOBAL_TASK_TEMPLATE
149+
persistent_worker:
150+
labels:
151+
type: small
152+
env:
153+
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
154+
155+
task:
156+
name: 'previous releases, depends DEBUG'
157+
<< : *GLOBAL_TASK_TEMPLATE
158+
persistent_worker:
159+
labels:
160+
type: small
161+
env:
162+
FILE_ENV: "./ci/test/00_setup_env_native_previous_releases.sh"
163+
164+
task:
165+
name: 'TSan, depends, gui'
166+
<< : *GLOBAL_TASK_TEMPLATE
167+
persistent_worker:
168+
labels:
169+
type: medium
170+
env:
171+
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
172+
173+
task:
174+
name: 'MSan, depends'
175+
<< : *GLOBAL_TASK_TEMPLATE
176+
persistent_worker:
177+
labels:
178+
type: small
179+
timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done.
180+
env:
181+
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
182+
183+
task:
184+
name: 'fuzzer,address,undefined,integer, no depends'
185+
<< : *GLOBAL_TASK_TEMPLATE
186+
persistent_worker:
187+
labels:
188+
type: medium
189+
env:
190+
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
191+
192+
task:
193+
name: 'multiprocess, i686, DEBUG'
194+
<< : *GLOBAL_TASK_TEMPLATE
195+
persistent_worker:
196+
labels:
197+
type: medium
198+
env:
199+
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
200+
201+
task:
202+
name: 'no wallet, libbitcoinkernel'
203+
<< : *GLOBAL_TASK_TEMPLATE
204+
persistent_worker:
205+
labels:
206+
type: small
207+
env:
208+
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
209+
210+
task:
211+
name: 'macOS-cross, gui, no tests'
212+
<< : *GLOBAL_TASK_TEMPLATE
213+
persistent_worker:
214+
labels:
215+
type: small
216+
env:
217+
FILE_ENV: "./ci/test/00_setup_env_mac_cross.sh"

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is the top-most EditorConfig file.
2+
root = true
3+
4+
# For all files.
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
# Source code files
13+
[*.{h,cpp,rs,py,sh}]
14+
indent_size = 4
15+
16+
# .cirrus.yml, etc.
17+
[*.yml]
18+
indent_size = 2
19+
20+
# Makefiles (only relevant for depends build)
21+
[Makefile]
22+
indent_style = tab
23+
24+
# CMake files
25+
[{CMakeLists.txt,*.cmake,*.cmake.in}]
26+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/clientversion.cpp export-subst

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Bug report
2+
description: Submit a new bug report.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## This issue tracker is only for technical issues related to Bitcoin Core.
9+
10+
* General bitcoin questions and/or support requests should use Bitcoin StackExchange at https://bitcoin.stackexchange.com.
11+
* For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
12+
* If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running `memtest` and observe CPU temperature with a load-test tool such as `linpack` before creating an issue.
13+
14+
----
15+
- type: checkboxes
16+
attributes:
17+
label: Is there an existing issue for this?
18+
description: Please search to see if an issue already exists for the bug you encountered.
19+
options:
20+
- label: I have searched the existing issues
21+
required: true
22+
- type: textarea
23+
id: current-behaviour
24+
attributes:
25+
label: Current behaviour
26+
description: Tell us what went wrong
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected-behaviour
31+
attributes:
32+
label: Expected behaviour
33+
description: Tell us what you expected to happen
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: reproduction-steps
38+
attributes:
39+
label: Steps to reproduce
40+
description: |
41+
Tell us how to reproduce your bug. Please attach related screenshots if necessary.
42+
* Run-time or compile-time configuration options
43+
* Actions taken
44+
validations:
45+
required: true
46+
- type: textarea
47+
id: logs
48+
attributes:
49+
label: Relevant log output
50+
description: |
51+
Please copy and paste any relevant log output or attach a debug log file.
52+
53+
You can find the debug.log in your [data dir.](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location)
54+
55+
Please be aware that the debug log might contain personally identifying information.
56+
validations:
57+
required: false
58+
- type: dropdown
59+
attributes:
60+
label: How did you obtain Bitcoin Core
61+
multiple: false
62+
options:
63+
- Compiled from source
64+
- Pre-built binaries
65+
- Package manager
66+
- Other
67+
validations:
68+
required: true
69+
- type: input
70+
id: core-version
71+
attributes:
72+
label: What version of Bitcoin Core are you using?
73+
description: Run `bitcoind --version` or in Bitcoin-QT use `Help > About Bitcoin Core`
74+
placeholder: e.g. v24.0.1 or master@e1bf547
75+
validations:
76+
required: true
77+
- type: input
78+
id: os
79+
attributes:
80+
label: Operating system and version
81+
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
82+
validations:
83+
required: true
84+
- type: textarea
85+
id: machine-specs
86+
attributes:
87+
label: Machine specifications
88+
description: |
89+
What are the specifications of the host machine?
90+
e.g. OS/CPU and disk type, network connectivity
91+
validations:
92+
required: false
93+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Bitcoin Core Security Policy
4+
url: https://github.com/bitcoin/bitcoin/blob/master/SECURITY.md
5+
about: View security policy
6+
- name: Bitcoin Core Developers
7+
url: https://bitcoincore.org
8+
about: Bitcoin Core homepage
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project.
3+
labels: [Feature]
4+
body:
5+
- type: textarea
6+
id: feature
7+
attributes:
8+
label: Please describe the feature you'd like to see added.
9+
description: Attach screenshots or logs if applicable.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: related-problem
14+
attributes:
15+
label: Is your feature related to a problem, if so please describe it.
16+
description: Attach screenshots or logs if applicable.
17+
validations:
18+
required: false
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Describe the solution you'd like
23+
validations:
24+
required: false
25+
- type: textarea
26+
id: alternatives
27+
attributes:
28+
label: Describe any alternatives you've considered
29+
validations:
30+
required: false
31+
- type: textarea
32+
id: additional-context
33+
attributes:
34+
label: Please leave any additional context
35+
validations:
36+
required: false

0 commit comments

Comments
 (0)