Skip to content

Commit

Permalink
Merge #87: Vendor Bitcoin Core v24.2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tcharding committed Feb 5, 2024
2 parents d44e624 + 6730e46 commit b6d07db
Show file tree
Hide file tree
Showing 1,155 changed files with 137,790 additions and 37,113 deletions.
13 changes: 5 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,17 @@ fn main() {
// **Secp256k1**
if !cfg!(feature = "external-secp") {
secp_config
.include("depend/bitcoin/src/secp256k1")
.include("depend/bitcoin/src/secp256k1/include")
.include("depend/bitcoin/src/secp256k1/src")
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
// Bitcoin core defines libsecp to *not* use libgmp.
.define("USE_NUM_NONE", "1")
.define("USE_FIELD_INV_BUILTIN", "1")
.define("USE_SCALAR_INV_BUILTIN", "1")
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
.define("ENABLE_MODULE_RECOVERY", "1")
.define("ECMULT_WINDOW_SIZE", "15")
.define("ECMULT_GEN_PREC_BITS", "4")
.define("ENABLE_MODULE_SCHNORRSIG", "1")
.define("ENABLE_MODULE_EXTRAKEYS", "1")
// The actual libsecp256k1 C code.
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
.define("ENABLE_MODULE_RECOVERY", "1")
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult_gen.c")
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult.c")
.file("depend/bitcoin/src/secp256k1/src/secp256k1.c");

if is_big_endian {
Expand Down
2 changes: 1 addition & 1 deletion depend/bitcoin-HEAD-revision.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file was automatically created by vendor-bitcoin-core.sh
4d2f2fae9782a4736c2e271f5d6107b677f2e14d
d3a352256064d62a3e2e2d054ffa0faecb49dd71
117 changes: 61 additions & 56 deletions depend/bitcoin/.cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ env: # Global defaults
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
MAKEJOBS: "-j10"
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
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
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
Expand All @@ -23,14 +24,11 @@ filter_template: &FILTER_TEMPLATE
base_template: &BASE_TEMPLATE
<< : *FILTER_TEMPLATE
merge_base_script:
# Unconditionally install git (used in fingerprint_script) and set the
# default git author name (used in verify-commits.py)
# Unconditionally install git (used in fingerprint_script).
- bash -c "$PACKAGE_MANAGER_INSTALL git"
- git config --global user.email "ci@ci.ci"
- git config --global user.name "ci"
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts

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

task:
name: "Win64 native [msvc]"
name: 'tidy [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:jammy
cpu: 2
memory: 5G
# For faster CI feedback, immediately schedule the linters
<< : *CREDITS_TEMPLATE
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"

task:
name: "Win64 native [vs2022]"
<< : *FILTER_TEMPLATE
windows_container:
cpu: 4
memory: 8G
image: cirrusci/windowsservercore:visualstudio2019
cpu: 6
memory: 12G
image: cirrusci/windowsservercore:visualstudio2022
timeout_in: 120m
env:
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
PYTHONUTF8: 1
CI_VCPKG_TAG: '2021.05.12'
CI_VCPKG_TAG: '2022.06.16.1'
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3'
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip'
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.5.zip'
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.5'
QTBASEDIR: 'C:\Qt_static'
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
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'
IgnoreWarnIntDirInTempDetected: 'true'
merge_script:
- git config --global user.email "ci@ci.ci"
- git config --global user.name "ci"
# Windows filesystem loses the executable bit, and all of the executable
# files are considered "modified" now. It will break the following `git merge`
# command. The next two commands make git ignore this issue.
- git config core.filemode false
- git reset --hard
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
- 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; }
msvc_qt_built_cache:
folder: "%QTBASEDIR%"
reupload_on_changes: false
fingerprint_script:
- echo %QT_DOWNLOAD_URL%
- echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND%
- msbuild -version
populate_script:
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
Expand All @@ -124,7 +131,7 @@ task:
- cd %QT_SOURCE_DIR%
- mkdir build
- cd build
- ..\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%
- '%QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%'
- jom
- jom install
vcpkg_tools_cache:
Expand All @@ -138,12 +145,17 @@ task:
reupload_on_changes: true
fingerprint_script:
- echo %CI_VCPKG_TAG%
- type build_msvc\vcpkg.json
- msbuild -version
populate_script:
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
install_python_script:
ccache_cache:
folder: '%CCACHE_DIR%'
install_tools_script:
- choco install --yes --no-progress ccache --version=4.6.1
- choco install --yes --no-progress python3 --version=3.9.6
- pip install zmq
- ccache --version
- python -VV
install_vcpkg_script:
- cd ..
Expand All @@ -155,9 +167,12 @@ task:
- .\vcpkg integrate install
- .\vcpkg version
build_script:
- '%x64_NATIVE_TOOLS%'
- cd %CIRRUS_WORKING_DIR%
- ccache --zero-stats --max-size=%CCACHE_SIZE%
- python build_msvc\msvc-autogen.py
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- ccache --show-stats
unit_tests_script:
- src\test_bitcoin.exe -l test_suite
- src\bench_bitcoin.exe > NUL
Expand All @@ -174,14 +189,12 @@ task:
task:
name: 'ARM [unit tests, no functional tests] [bullseye]'
<< : *GLOBAL_TASK_TEMPLATE
arm_container:
image: debian:bullseye
cpu: 2
memory: 8G
container:
docker_arguments:
CI_IMAGE_NAME_TAG: debian:bullseye
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
QEMU_USER_CMD: "" # Disable qemu and run the test natively

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

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

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

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

task:
name: '[no wallet] [bionic]'
name: '[no wallet, libbitcoinkernel] [bionic]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:bionic
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

task:
name: 'macOS 10.15 [gui, no tests] [focal]'
Expand All @@ -299,19 +320,3 @@ task:
CI_USE_APT_INSTALL: "no"
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh"

task:
name: 'ARM64 Android APK [focal]'
<< : *BASE_TEMPLATE
android_sdk_cache:
folder: "depends/SDKs/android"
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.1.7779620"
depends_sources_cache:
folder: "depends/sources"
fingerprint_script: git rev-list -1 HEAD ./depends
<< : *MAIN_TEMPLATE
container:
image: ubuntu:focal
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_android.sh"
6 changes: 3 additions & 3 deletions depend/bitcoin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ src/bitcoin-gui
src/bitcoin-node
src/bitcoin-tx
src/bitcoin-util
src/bitcoin-chainstate
src/bitcoin-wallet
src/test/fuzz/fuzz
src/test/test_bitcoin
Expand Down Expand Up @@ -43,8 +44,6 @@ src/obj
share/setup.nsi
share/qt/Info.plist

src/univalue/gen

src/qt/*.moc
src/qt/moc_*.cpp
src/qt/forms/ui_*.h
Expand Down Expand Up @@ -76,7 +75,6 @@ src/qt/bitcoin-qt.includes
*.log
*.trs
*.dmg
*.iso

*.json.h
*.raw.h
Expand Down Expand Up @@ -150,3 +148,5 @@ osx_volname
dist/

/guix-build-*

/ci/scratch/
2 changes: 1 addition & 1 deletion depend/bitcoin/.tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[o:bitcoin:p:bitcoin:r:qt-translation-023x]
[o:bitcoin:p:bitcoin:r:qt-translation-024x]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en
22 changes: 12 additions & 10 deletions depend/bitcoin/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ First, in terms of structure, there is no particular concept of "Bitcoin Core
developers" in the sense of privileged people. Open source often naturally
revolves around a meritocracy where contributors earn trust from the developer
community over time. Nevertheless, some hierarchy is necessary for practical
purposes. As such, there are repository "maintainers" who are responsible for
merging pull requests, as well as a "lead maintainer" who is responsible for the
[release cycle](/doc/release-process.md) as well as overall merging, moderation
and appointment of maintainers.
purposes. As such, there are repository maintainers who are responsible for
merging pull requests, the [release cycle](/doc/release-process.md), and
moderation.

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

Examples:

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

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

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

When a pull request conflicts with the target branch, you may be asked to rebase it on top of the current target branch.
The `git rebase` command will take care of rebuilding your commits on top of the new base.

git fetch https://github.com/bitcoin/bitcoin # Fetch the latest upstream commit
git rebase FETCH_HEAD # Rebuild commits on top of the new base

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

Whether a pull request is merged into Bitcoin Core rests with the project merge
maintainers and ultimately the project lead.
maintainers.

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

0 comments on commit b6d07db

Please sign in to comment.