Skip to content

Commit 21fdb15

Browse files
authored
Merge pull request #327 from DigiByte-Core/feature/bitcoin-v26.2-merge
Merge Bitcoin Core v26.2 into DigiByte v8.22.2 - DigiByte v8.26.0
2 parents cc52963 + 4bac8d4 commit 21fdb15

7,863 files changed

Lines changed: 1933358 additions & 65219 deletions

File tree

Some content is hidden

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

.cirrus.yml

Lines changed: 123 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,225 +1,206 @@
1-
### Global defaults
2-
3-
env:
1+
env: # Global defaults
2+
CIRRUS_CLONE_DEPTH: 1
43
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
5-
MAKEJOBS: "-j4"
4+
MAKEJOBS: "-j10"
65
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
7-
CCACHE_SIZE: "200M"
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"
88
CCACHE_DIR: "/tmp/ccache_dir"
99
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
1010

11-
cirrus_ephemeral_worker_template_env: &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
12-
DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system
13-
14-
persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV
15-
RESTART_CI_DOCKER_BEFORE_RUN: "1"
16-
17-
persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
18-
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/
11+
# https://cirrus-ci.org/guide/persistent-workers/
12+
#
13+
# It is possible to select a specific persistent worker by label. Refer to the
14+
# Cirrus CI docs for more details.
15+
#
16+
# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
17+
# Specifically,
18+
# - apt-get is required due to PACKAGE_MANAGER_INSTALL
19+
# - podman-docker-4.1+ is required due to the use of `podman` when
20+
# RESTART_CI_DOCKER_BEFORE_RUN is set and 4.1+ due to the bugfix in 4.1
21+
# (https://github.com/digibyte/digibyte/pull/21652#issuecomment-1657098200)
22+
# - The ./ci/ depedencies (with cirrus-cli) should be installed:
23+
#
24+
# ```
25+
# apt update && apt install 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
26+
# ```
27+
#
28+
# - There are no strict requirements on the hardware, because having less CPUs
29+
# runs the same CI script (maybe slower). To avoid rare and intermittent OOM
30+
# due to short memory usage spikes, it is recommended to add (and persist)
31+
# swap:
32+
#
33+
# ```
34+
# 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 )
35+
# ```
36+
#
37+
# - To register the persistent worker, open a `screen` session and run:
38+
#
39+
# ```
40+
# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
41+
# ```
42+
#
43+
# The following specific types should exist, with the following requirements:
44+
# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
45+
# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
46+
# - noble: For a machine running the Linux kernel shipped with exaclty Ubuntu Noble 24.04. The machine is recommended to have 4 CPUs and 16 GB of memory.
47+
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
1948

2049
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
21-
base_template: &BASE_TEMPLATE
50+
filter_template: &FILTER_TEMPLATE
2251
skip: $CIRRUS_REPO_FULL_NAME == "digibyte-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
52+
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
53+
54+
base_template: &BASE_TEMPLATE
55+
<< : *FILTER_TEMPLATE
2356
merge_base_script:
24-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
57+
# Unconditionally install git (used in fingerprint_script).
2558
- bash -c "$PACKAGE_MANAGER_INSTALL git"
26-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
27-
- git config --global user.email "ci@ci.ci"
28-
- git config --global user.name "ci"
29-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30-
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
59+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
60+
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
61+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
62+
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
3163

32-
global_task_template: &GLOBAL_TASK_TEMPLATE
33-
<< : *BASE_TEMPLATE
64+
main_template: &MAIN_TEMPLATE
3465
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
35-
container:
36-
# https://cirrus-ci.org/faq/#are-there-any-limits
37-
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
38-
cpu: 2
39-
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
40-
ccache_cache:
41-
folder: "/tmp/ccache_dir"
42-
depends_built_cache:
43-
folder: "depends/built"
4466
ci_script:
4567
- ./ci/test_run_all.sh
4668

47-
depends_sdk_cache_template: &DEPENDS_SDK_CACHE_TEMPLATE
48-
depends_sdk_cache:
49-
folder: "depends/sdk-sources"
69+
global_task_template: &GLOBAL_TASK_TEMPLATE
70+
<< : *BASE_TEMPLATE
71+
<< : *MAIN_TEMPLATE
5072

5173
compute_credits_template: &CREDITS_TEMPLATE
5274
# https://cirrus-ci.org/pricing/#compute-credits
5375
# Only use credits for pull requests to the main repo
5476
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'digibyte/digibyte' && $CIRRUS_PR != ""
5577

56-
#task:
57-
# name: "Windows"
58-
# windows_container:
59-
# image: cirrusci/windowsservercore:2019
60-
# env:
61-
# CIRRUS_SHELL: powershell
62-
# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%'
63-
# PYTHONUTF8: 1
64-
# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
65-
# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
66-
# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
67-
# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
68-
# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
69-
# install_script:
70-
# - choco install python --version=3.7.7 -y
71-
7278
task:
73-
name: 'lint [bionic]'
79+
name: 'lint'
7480
<< : *BASE_TEMPLATE
7581
container:
76-
image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
82+
image: debian:bookworm
7783
cpu: 1
7884
memory: 1G
7985
# For faster CI feedback, immediately schedule the linters
8086
<< : *CREDITS_TEMPLATE
87+
python_cache:
88+
folder: "/python_build"
89+
fingerprint_script: cat .python-version /etc/os-release
90+
unshallow_script:
91+
- git fetch --unshallow --no-tags
8192
lint_script:
8293
- ./ci/lint_run_all.sh
94+
95+
task:
96+
name: 'tidy'
97+
<< : *GLOBAL_TASK_TEMPLATE
98+
persistent_worker:
99+
labels:
100+
type: medium
83101
env:
84-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
102+
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
85103

86104
task:
87-
name: 'ARM [unit tests, no functional tests] [buster]'
105+
name: 'ARM, unit tests, no functional tests'
88106
<< : *GLOBAL_TASK_TEMPLATE
89-
container:
90-
image: debian:buster
107+
persistent_worker:
108+
labels:
109+
type: arm64 # Use arm64 worker to sidestep qemu and avoid a slow CI: https://github.com/digibyte/digibyte/pull/28087#issuecomment-1649399453
91110
env:
92-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
93111
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
94112

95113
task:
96-
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
114+
name: 'Win64, unit tests, no gui tests, no boost::process, no functional tests'
97115
<< : *GLOBAL_TASK_TEMPLATE
98-
container:
99-
image: ubuntu:focal
116+
persistent_worker:
117+
labels:
118+
type: small
100119
env:
101-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
102120
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
103121

104122
task:
105-
name: '32-bit + dash [gui] [CentOS 8]'
123+
name: '32-bit CentOS, dash, gui'
106124
<< : *GLOBAL_TASK_TEMPLATE
107-
container:
108-
image: centos:8
125+
persistent_worker:
126+
labels:
127+
type: small
109128
env:
110-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
111-
PACKAGE_MANAGER_INSTALL: "yum install -y"
112129
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
113130

114131
task:
115-
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]'
116-
previous_releases_cache:
117-
folder: "releases"
132+
name: 'previous releases, qt5 dev package and depends packages, DEBUG'
118133
<< : *GLOBAL_TASK_TEMPLATE
119-
<< : *PERSISTENT_WORKER_TEMPLATE
134+
persistent_worker:
135+
labels:
136+
type: small
120137
env:
121-
<< : *PERSISTENT_WORKER_TEMPLATE_ENV
122138
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
123139

124140
task:
125-
name: '[depends, sanitizers: thread (TSan), no gui] [jammy]'
141+
name: 'TSan, depends, gui'
126142
<< : *GLOBAL_TASK_TEMPLATE
127-
container:
128-
image: ubuntu:jammy
129-
cpu: 6 # Increase CPU and Memory to avoid timeout
130-
memory: 24G
143+
persistent_worker:
144+
labels:
145+
type: medium
131146
env:
132-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
133-
MAKEJOBS: "-j8"
134147
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
135148

136149
task:
137-
name: '[depends, sanitizers: memory (MSan)] [focal]'
150+
name: 'MSan, depends'
138151
<< : *GLOBAL_TASK_TEMPLATE
139-
container:
140-
image: ubuntu:focal
152+
persistent_worker:
153+
labels:
154+
type: small
155+
timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done.
141156
env:
142-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
143157
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
144158

145159
task:
146-
name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [jammy]'
160+
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
161+
enable_bpfcc_script:
162+
# In the image build step, no external environment variables are available,
163+
# so any settings will need to be written to the settings env file:
164+
- sed -i "s|\${CIRRUS_CI}|true|g" ./ci/test/00_setup_env_native_asan.sh
147165
<< : *GLOBAL_TASK_TEMPLATE
148-
container:
149-
image: ubuntu:jammy
166+
persistent_worker:
167+
labels:
168+
type: noble # Must use this specific worker (needed for USDT functional tests)
150169
env:
151-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
152170
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
153171

154172
task:
155-
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]'
173+
name: 'fuzzer,address,undefined,integer, no depends'
156174
<< : *GLOBAL_TASK_TEMPLATE
157-
container:
158-
image: ubuntu:focal
159-
cpu: 4 # Increase CPU and memory to avoid timeout
160-
memory: 16G
175+
persistent_worker:
176+
labels:
177+
type: medium
161178
env:
162-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
163-
MAKEJOBS: "-j8"
164179
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
165180

166181
task:
167-
name: '[multiprocess, DEBUG] [focal]'
182+
name: 'multiprocess, i686, DEBUG'
168183
<< : *GLOBAL_TASK_TEMPLATE
169-
container:
170-
image: ubuntu:focal
171-
cpu: 4
172-
memory: 16G # The default memory is sometimes just a bit too small, so double everything
184+
persistent_worker:
185+
labels:
186+
type: medium
173187
env:
174-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
175-
MAKEJOBS: "-j8"
176-
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"
188+
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
177189

178190
task:
179-
name: '[no wallet] [bionic]'
191+
name: 'no wallet, libdigibytekernel'
180192
<< : *GLOBAL_TASK_TEMPLATE
181-
container:
182-
image: ubuntu:bionic
193+
persistent_worker:
194+
labels:
195+
type: small
183196
env:
184-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
185-
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
197+
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libdigibytekernel.sh"
186198

187199
task:
188-
name: 'macOS 10.15 [gui, no tests] [focal]'
189-
<< : *BASE_TEMPLATE
190-
macos_sdk_cache:
191-
folder: "depends/SDKs/$MACOS_SDK"
192-
fingerprint_key: "$MACOS_SDK"
193-
<< : *MAIN_TEMPLATE
194-
container:
195-
image: ubuntu:focal
196-
env:
197-
MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
198-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
199-
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
200-
201-
task:
202-
name: 'macOS 12 native [gui, system sqlite only] [no depends]'
203-
brew_install_script:
204-
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
205-
<< : *GLOBAL_TASK_TEMPLATE
206-
osx_instance:
207-
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
208-
image: monterey-xcode-13.2 # https://cirrus-ci.org/guide/macOS
209-
env:
210-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
211-
CI_USE_APT_INSTALL: "no"
212-
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
213-
FILE_ENV: "./ci/test/00_setup_env_mac_host.sh"
214-
215-
task:
216-
name: 'ARM64 Android APK [focal]'
217-
<< : *DEPENDS_SDK_CACHE_TEMPLATE
218-
depends_sources_cache:
219-
folder: "depends/sources"
200+
name: 'macOS-cross 11.0, gui, no tests'
220201
<< : *GLOBAL_TASK_TEMPLATE
221-
container:
222-
image: ubuntu:focal
202+
persistent_worker:
203+
labels:
204+
type: small
223205
env:
224-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
225-
FILE_ENV: "./ci/test/00_setup_env_android.sh"
206+
FILE_ENV: "./ci/test/00_setup_env_mac.sh"

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trim_trailing_whitespace = true
1313
[*.{h,cpp,py,sh}]
1414
indent_size = 4
1515

16-
# .cirrus.yml, .appveyor.yml, .fuzzbuzz.yml, etc.
16+
# .cirrus.yml, .fuzzbuzz.yml, etc.
1717
[*.yml]
1818
indent_size = 2
1919

0 commit comments

Comments
 (0)