Skip to content

Commit e9930d9

Browse files
committed
Squashed 'depend/bitcoin/' content from commit d9e030d563
git-subtree-dir: depend/bitcoin git-subtree-split: d9e030d56343bb452d86169f77ddfb64f7160235
0 parents  commit e9930d9

File tree

2,839 files changed

+923868
-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,839 files changed

+923868
-0
lines changed

.cirrus.yml

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