Skip to content

Commit b6d07db

Browse files
committed
Merge #87: Vendor Bitcoin Core v24.2
6730e46 Remove unused flags (Tobin C. Harding) 4ce54f0 Vendor Bitcoin Core v24.2 (Tobin C. Harding) Pull request description: Run the vendoring script: `./contrib/vendor-bitcoin-core.sh v24.2` Also, patch the `build.rs` file to add: `.include("depend/bitcoin/src/secp256k1/include")` ACKs for top commit: apoelstra: ACK 6730e46 Tree-SHA512: 60f866eb4e696ae6e91b3db20f2c89b0fe5bf9afad25600f7717d2825c2607296b4bb2fd8aa3da0fd3907a9dc9d0972c80a5fb29e23e6dd354854c41af76d6bb
2 parents d44e624 + 6730e46 commit b6d07db

File tree

1,155 files changed

+137790
-37113
lines changed

Some content is hidden

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

1,155 files changed

+137790
-37113
lines changed

build.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,17 @@ fn main() {
3535
// **Secp256k1**
3636
if !cfg!(feature = "external-secp") {
3737
secp_config
38-
.include("depend/bitcoin/src/secp256k1")
38+
.include("depend/bitcoin/src/secp256k1/include")
3939
.include("depend/bitcoin/src/secp256k1/src")
4040
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
41-
// Bitcoin core defines libsecp to *not* use libgmp.
42-
.define("USE_NUM_NONE", "1")
43-
.define("USE_FIELD_INV_BUILTIN", "1")
44-
.define("USE_SCALAR_INV_BUILTIN", "1")
45-
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
46-
.define("ENABLE_MODULE_RECOVERY", "1")
4741
.define("ECMULT_WINDOW_SIZE", "15")
4842
.define("ECMULT_GEN_PREC_BITS", "4")
4943
.define("ENABLE_MODULE_SCHNORRSIG", "1")
5044
.define("ENABLE_MODULE_EXTRAKEYS", "1")
51-
// The actual libsecp256k1 C code.
45+
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
46+
.define("ENABLE_MODULE_RECOVERY", "1")
47+
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult_gen.c")
48+
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult.c")
5249
.file("depend/bitcoin/src/secp256k1/src/secp256k1.c");
5350

5451
if is_big_endian {

depend/bitcoin-HEAD-revision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file was automatically created by vendor-bitcoin-core.sh
2-
4d2f2fae9782a4736c2e271f5d6107b677f2e14d
2+
d3a352256064d62a3e2e2d054ffa0faecb49dd71

depend/bitcoin/.cirrus.yml

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ env: # Global defaults
22
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
33
MAKEJOBS: "-j10"
44
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
5+
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error
56
CCACHE_SIZE: "200M"
67
CCACHE_DIR: "/tmp/ccache_dir"
78
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
@@ -23,14 +24,11 @@ filter_template: &FILTER_TEMPLATE
2324
base_template: &BASE_TEMPLATE
2425
<< : *FILTER_TEMPLATE
2526
merge_base_script:
26-
# Unconditionally install git (used in fingerprint_script) and set the
27-
# default git author name (used in verify-commits.py)
27+
# Unconditionally install git (used in fingerprint_script).
2828
- bash -c "$PACKAGE_MANAGER_INSTALL git"
29-
- git config --global user.email "ci@ci.ci"
30-
- git config --global user.name "ci"
3129
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
32-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
33-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30+
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
31+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
3432

3533
main_template: &MAIN_TEMPLATE
3634
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
@@ -80,39 +78,48 @@ task:
8078
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
8179

8280
task:
83-
name: "Win64 native [msvc]"
81+
name: 'tidy [jammy]'
82+
<< : *GLOBAL_TASK_TEMPLATE
83+
container:
84+
image: ubuntu:jammy
85+
cpu: 2
86+
memory: 5G
87+
# For faster CI feedback, immediately schedule the linters
88+
<< : *CREDITS_TEMPLATE
89+
env:
90+
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
91+
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
92+
93+
task:
94+
name: "Win64 native [vs2022]"
8495
<< : *FILTER_TEMPLATE
8596
windows_container:
86-
cpu: 4
87-
memory: 8G
88-
image: cirrusci/windowsservercore:visualstudio2019
97+
cpu: 6
98+
memory: 12G
99+
image: cirrusci/windowsservercore:visualstudio2022
89100
timeout_in: 120m
90101
env:
91-
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
102+
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
92103
PYTHONUTF8: 1
93-
CI_VCPKG_TAG: '2021.05.12'
104+
CI_VCPKG_TAG: '2022.06.16.1'
94105
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
95106
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
96-
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
97-
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
98-
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3'
107+
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
108+
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
109+
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip'
110+
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.5.zip'
111+
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.5'
99112
QTBASEDIR: 'C:\Qt_static'
100-
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
113+
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
114+
QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
101115
IgnoreWarnIntDirInTempDetected: 'true'
102116
merge_script:
103-
- git config --global user.email "ci@ci.ci"
104-
- git config --global user.name "ci"
105-
# Windows filesystem loses the executable bit, and all of the executable
106-
# files are considered "modified" now. It will break the following `git merge`
107-
# command. The next two commands make git ignore this issue.
108-
- git config core.filemode false
109-
- git reset --hard
110-
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
117+
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git checkout FETCH_HEAD; }
111118
msvc_qt_built_cache:
112119
folder: "%QTBASEDIR%"
113120
reupload_on_changes: false
114121
fingerprint_script:
115-
- echo %QT_DOWNLOAD_URL%
122+
- echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND%
116123
- msbuild -version
117124
populate_script:
118125
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
@@ -124,7 +131,7 @@ task:
124131
- cd %QT_SOURCE_DIR%
125132
- mkdir build
126133
- cd build
127-
- ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix %QTBASEDIR%
134+
- '%QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%'
128135
- jom
129136
- jom install
130137
vcpkg_tools_cache:
@@ -138,12 +145,17 @@ task:
138145
reupload_on_changes: true
139146
fingerprint_script:
140147
- echo %CI_VCPKG_TAG%
148+
- type build_msvc\vcpkg.json
141149
- msbuild -version
142150
populate_script:
143151
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
144-
install_python_script:
152+
ccache_cache:
153+
folder: '%CCACHE_DIR%'
154+
install_tools_script:
155+
- choco install --yes --no-progress ccache --version=4.6.1
145156
- choco install --yes --no-progress python3 --version=3.9.6
146157
- pip install zmq
158+
- ccache --version
147159
- python -VV
148160
install_vcpkg_script:
149161
- cd ..
@@ -155,9 +167,12 @@ task:
155167
- .\vcpkg integrate install
156168
- .\vcpkg version
157169
build_script:
170+
- '%x64_NATIVE_TOOLS%'
158171
- cd %CIRRUS_WORKING_DIR%
172+
- ccache --zero-stats --max-size=%CCACHE_SIZE%
159173
- python build_msvc\msvc-autogen.py
160-
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
174+
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
175+
- ccache --show-stats
161176
unit_tests_script:
162177
- src\test_bitcoin.exe -l test_suite
163178
- src\bench_bitcoin.exe > NUL
@@ -174,14 +189,12 @@ task:
174189
task:
175190
name: 'ARM [unit tests, no functional tests] [bullseye]'
176191
<< : *GLOBAL_TASK_TEMPLATE
177-
arm_container:
178-
image: debian:bullseye
179-
cpu: 2
180-
memory: 8G
192+
container:
193+
docker_arguments:
194+
CI_IMAGE_NAME_TAG: debian:bullseye
195+
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
181196
env:
182197
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
183-
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
184-
QEMU_USER_CMD: "" # Disable qemu and run the test natively
185198

186199
task:
187200
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
@@ -203,7 +216,7 @@ task:
203216
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
204217

205218
task:
206-
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]'
219+
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [buster]'
207220
previous_releases_cache:
208221
folder: "releases"
209222
<< : *GLOBAL_TASK_TEMPLATE
@@ -234,12 +247,20 @@ task:
234247
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
235248

236249
task:
237-
name: '[ASan + LSan + UBSan + integer, no depends] [jammy]'
250+
name: '[ASan + LSan + UBSan + integer, no depends, USDT] [jammy]'
238251
<< : *GLOBAL_TASK_TEMPLATE
239-
container:
240-
image: ubuntu:jammy
252+
# We can't use a 'container' for the USDT interface tests as the CirrusCI
253+
# containers don't have privileges to hook into bitcoind. CirrusCI uses
254+
# Google Compute Engine instances: https://cirrus-ci.org/guide/custom-vms/
255+
# Images can be found here: https://cloud.google.com/compute/docs/images/os-details
256+
compute_engine_instance:
257+
image_project: ubuntu-os-cloud
258+
image: family/ubuntu-2204-lts # when upgrading, check if we can drop "ADD_UNTRUSTED_BPFCC_PPA"
259+
cpu: 4
260+
memory: 12G
241261
env:
242262
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
263+
HOME: /root/ # Only needed for compute_engine_instance
243264
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
244265
MAKEJOBS: "-j4" # Avoid excessive memory use
245266

@@ -266,13 +287,13 @@ task:
266287
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
267288

268289
task:
269-
name: '[no wallet] [bionic]'
290+
name: '[no wallet, libbitcoinkernel] [bionic]'
270291
<< : *GLOBAL_TASK_TEMPLATE
271292
container:
272293
image: ubuntu:bionic
273294
env:
274295
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
275-
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
296+
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
276297

277298
task:
278299
name: 'macOS 10.15 [gui, no tests] [focal]'
@@ -299,19 +320,3 @@ task:
299320
CI_USE_APT_INSTALL: "no"
300321
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
301322
FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh"
302-
303-
task:
304-
name: 'ARM64 Android APK [focal]'
305-
<< : *BASE_TEMPLATE
306-
android_sdk_cache:
307-
folder: "depends/SDKs/android"
308-
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.1.7779620"
309-
depends_sources_cache:
310-
folder: "depends/sources"
311-
fingerprint_script: git rev-list -1 HEAD ./depends
312-
<< : *MAIN_TEMPLATE
313-
container:
314-
image: ubuntu:focal
315-
env:
316-
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
317-
FILE_ENV: "./ci/test/00_setup_env_android.sh"

depend/bitcoin/.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ src/bitcoin-gui
99
src/bitcoin-node
1010
src/bitcoin-tx
1111
src/bitcoin-util
12+
src/bitcoin-chainstate
1213
src/bitcoin-wallet
1314
src/test/fuzz/fuzz
1415
src/test/test_bitcoin
@@ -43,8 +44,6 @@ src/obj
4344
share/setup.nsi
4445
share/qt/Info.plist
4546

46-
src/univalue/gen
47-
4847
src/qt/*.moc
4948
src/qt/moc_*.cpp
5049
src/qt/forms/ui_*.h
@@ -76,7 +75,6 @@ src/qt/bitcoin-qt.includes
7675
*.log
7776
*.trs
7877
*.dmg
79-
*.iso
8078

8179
*.json.h
8280
*.raw.h
@@ -150,3 +148,5 @@ osx_volname
150148
dist/
151149

152150
/guix-build-*
151+
152+
/ci/scratch/

depend/bitcoin/.tx/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[main]
22
host = https://www.transifex.com
33

4-
[o:bitcoin:p:bitcoin:r:qt-translation-023x]
4+
[o:bitcoin:p:bitcoin:r:qt-translation-024x]
55
file_filter = src/qt/locale/bitcoin_<lang>.xlf
66
source_file = src/qt/locale/bitcoin_en.xlf
77
source_lang = en

depend/bitcoin/CONTRIBUTING.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ First, in terms of structure, there is no particular concept of "Bitcoin Core
1010
developers" in the sense of privileged people. Open source often naturally
1111
revolves around a meritocracy where contributors earn trust from the developer
1212
community over time. Nevertheless, some hierarchy is necessary for practical
13-
purposes. As such, there are repository "maintainers" who are responsible for
14-
merging pull requests, as well as a "lead maintainer" who is responsible for the
15-
[release cycle](/doc/release-process.md) as well as overall merging, moderation
16-
and appointment of maintainers.
13+
purposes. As such, there are repository maintainers who are responsible for
14+
merging pull requests, the [release cycle](/doc/release-process.md), and
15+
moderation.
1716

1817
Getting Started
1918
---------------
@@ -153,7 +152,8 @@ the pull request affects. Valid areas as:
153152
- `test`, `qa` or `ci` for changes to the unit tests, QA tests or CI code
154153
- `util` or `lib` for changes to the utils or libraries
155154
- `wallet` for changes to the wallet code
156-
- `build` for changes to the GNU Autotools or reproducible builds
155+
- `build` for changes to the GNU Autotools or MSVC builds
156+
- `guix` for changes to the GUIX reproducible builds
157157

158158
Examples:
159159

@@ -216,9 +216,9 @@ Please update the resulting commit message, if needed. It should read as a
216216
coherent message. In most cases, this means not just listing the interim
217217
commits.
218218

219-
If you have problems with squashing or other git workflows, you can enable
220-
"Allow edits from maintainers" in the right-hand sidebar of the GitHub web
221-
interface and ask for help in the pull request.
219+
If your change contains a merge commit, the above workflow may not work and you
220+
will need to remove the merge commit first. See the next section for details on
221+
how to rebase.
222222

223223
Please refrain from creating several pull requests for the same change.
224224
Use the pull request that is already open (or was created earlier) to amend
@@ -231,7 +231,9 @@ pull request to pull request.
231231
### Rebasing Changes
232232

233233
When a pull request conflicts with the target branch, you may be asked to rebase it on top of the current target branch.
234-
The `git rebase` command will take care of rebuilding your commits on top of the new base.
234+
235+
git fetch https://github.com/bitcoin/bitcoin # Fetch the latest upstream commit
236+
git rebase FETCH_HEAD # Rebuild commits on top of the new base
235237

236238
This project aims to have a clean git history, where code changes are only made in non-merge commits. This simplifies
237239
auditability because merge commits can be assumed to not contain arbitrary code changes. Merge commits should be signed,
@@ -292,7 +294,7 @@ projects such as libsecp256k1), and is not to be confused with overall Bitcoin
292294
Network Protocol consensus changes.
293295

294296
Whether a pull request is merged into Bitcoin Core rests with the project merge
295-
maintainers and ultimately the project lead.
297+
maintainers.
296298

297299
Maintainers will take into consideration if a patch is in line with the general
298300
principles of the project; meets the minimum standards for inclusion; and will

0 commit comments

Comments
 (0)