Compare commits

...

24 Commits
v27.2 ... 27.x

Author SHA1 Message Date
merge-script
cf3a7e97ee Merge bitcoin/bitcoin#33416: [27.x] Backports
aee53d60d3 doc: update release notes for 27.x (fanquake)
be1a94a740 net: Do not apply whitelist permission to onion inbounds (Martin Zumsande)
640cc72577 depends: fix Qt macOS build with Clang 18 (fanquake)

Pull request description:

  Backports:
  * #30198 (partial)
  * #33395

ACKs for top commit:
  willcl-ark:
    ACK aee53d60d3

Tree-SHA512: 7e1913df148dd1b264a337d7c14de34011a8002fb0950ab00f4c73c60e2df1b3098d3b5aad311d9b33c01416c4e5fa06f23592232d63e9a942eeeb23bd371b3a
2025-10-13 12:21:08 +01:00
fanquake
aee53d60d3 doc: update release notes for 27.x 2025-10-08 16:53:44 +01:00
Martin Zumsande
be1a94a740 net: Do not apply whitelist permission to onion inbounds
Tor inbound connections do not reveal the peer's actual network address.
Therefore do not apply whitelist permissions to them.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #33395
Rebased-From: f563ce9081
2025-10-08 10:41:31 +01:00
fanquake
640cc72577 depends: fix Qt macOS build with Clang 18
Patch Qts internal libpng to resolve the failure.

I would like to have this patched, so we can continue working on the
removal of `FORCE_USE_SYSTEM_CLANG`. Otherwise builds will be broken using
the default clang (18) on the current Ubuntu LTS (24.04).

Github-Pull: #30198
Rebased-From: 0a3631fc35
2025-10-08 10:41:31 +01:00
merge-script
ee048cd32b Merge bitcoin/bitcoin#33564: [27.x] Fix Qt download URLs
9652f4754d doc: update release notes for 27.x (fanquake)
0e8362760b [28.x] ci: Fix Qt 5.15 URL (Hennadii Stepanov)
e93b71d450 build: fix depends Qt download link (fanquake)

Pull request description:

  Backports:
  * #33561
  * #33563

ACKs for top commit:
  willcl-ark:
    utACK 9652f4754d
  hebasto:
    ACK 9652f4754d.

Tree-SHA512: 637a9feb7d14c2ec11381929f7fb9be2246d0985b847094eeeb65be79c97c0e379ddcbe99510a8f9d61cc43f50aad62f277e598d28005a8b25f007b5f52f7734
2025-10-08 09:37:52 +01:00
fanquake
9652f4754d doc: update release notes for 27.x 2025-10-07 14:57:40 +01:00
Hennadii Stepanov
0e8362760b [28.x] ci: Fix Qt 5.15 URL
Github-Pull: #33561
Rebased-From: 2cd432dc6d
2025-10-07 14:56:34 +01:00
fanquake
e93b71d450 build: fix depends Qt download link
Github-Pull: #33563
Rebased-From: abf4a6eeae
2025-10-07 14:56:07 +01:00
merge-script
39b935a8d4 Merge bitcoin/bitcoin#32479: [27.x] Backports
1d8856dddf doc: update release notes for 27.x (fanquake)
aef658601d depends: use "mkdir -p" when installing xproto (fanquake)
a328170e09 guix: accomodate migration to codeberg (fanquake)
e0af7bffff ci: remove --enable-external-signer (fanquake)
882166642c scripted-diff: Use bpf_cflags (MarcoFalke)
1fc7b9d260 test: Add imports for util bpf_cflags (MarcoFalke)
f52ab00f69 build: use make < 3.82 syntax for define directive (Sjors Provoost)
418bee8f9d refactor: Remove spurious virtual from final ~CZMQNotificationInterface (MarcoFalke)
992c7cad46 test: Handle empty string returned by CLI as None in RPC tests (Brandon Odiwuor)

Pull request description:

  Backports
  - #32070
  - #32187
  - #32286
  - #32439
  - #32568

ACKs for top commit:
  willcl-ark:
    ACK 1d8856dddf

Tree-SHA512: ca8534c24a806a35528f0d40a201fe0c66aa101a8cbeff9ef18d7599c300e6ca47d33563cd84198f1c15d77da7a141e8fcc0a2bd0a40165da6142dbbf1dcdc6c
2025-06-09 13:52:15 +01:00
fanquake
1d8856dddf doc: update release notes for 27.x 2025-06-04 11:16:54 +02:00
fanquake
aef658601d depends: use "mkdir -p" when installing xproto
It looks like the mkdir detection in xproto is broken on Alpine. Ensure
we always use `mkdir -p`.

Fixes #32494.

Github-Pull: #32568
Rebased-From: df9ebbf659
2025-06-04 11:16:35 +02:00
fanquake
a328170e09 guix: accomodate migration to codeberg
See https://guix.gnu.org/blog/2025/migrating-to-codeberg/.

When interacting with the old repo you may now also see:
```bash
warning: redirecting to https://codeberg.org/guix/guix/
```

Github-Pull: #32439
Rebased-From: d5ca4d4fd713a9f7e17e074a1e37dda99bbb09fc
2025-05-29 16:33:51 +01:00
fanquake
e0af7bffff ci: remove --enable-external-signer
Boost 1.88.0 (installed in the macOS CI) broke compat with Boost Process
V1. As `--enable-external-signer` is set in the CI, this causes the
macOS CI to fail. Remove `--enable-external-signer` from the CI.
2025-05-19 13:55:12 +01:00
MarcoFalke
882166642c scripted-diff: Use bpf_cflags
-BEGIN VERIFY SCRIPT-

 ren() { sed --regexp-extended -i "s/$1/$2/g" $( git grep --extended-regexp -l "$1" ) ; }

 ren 'cflags=\["-Wno-error=implicit-function-declaration"\]' 'cflags=bpf_cflags()'

-END VERIFY SCRIPT-

Github-Pull: #32336
Rebased-From: facb9b327b
2025-05-13 16:05:29 +01:00
MarcoFalke
1fc7b9d260 test: Add imports for util bpf_cflags
This is required for the next commit.

Github-Pull: #32336
Rebased-From: fa0c1baaf8
2025-05-13 16:05:26 +01:00
Sjors Provoost
f52ab00f69 build: use make < 3.82 syntax for define directive
From the GNU make 3.82 release announcement:

* The 'define' make directive now allows a variable assignment operator
  after the variable name, to allow for simple, conditional, or appending
  multi-line variable assignment.

macOS ships with 3.81. This caused the multiprocess config options
to be ignored.

Fixes #32068

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>

Github-Pull: #32070
Rebased-From: 9157d9e449
2025-05-13 14:18:45 +01:00
MarcoFalke
418bee8f9d refactor: Remove spurious virtual from final ~CZMQNotificationInterface
Github-Pull: #32187
Rebased-From: fa69c42fdf
2025-05-13 14:16:25 +01:00
Brandon Odiwuor
992c7cad46 test: Handle empty string returned by CLI as None in RPC tests
Github-Pull: #32286
Rebased-From: a4041c77f0
2025-05-13 14:15:25 +01:00
merge-script
1e7041a9f3 Merge bitcoin/bitcoin#31422: [27.x] More backports
25f150304d doc: update release notes (fanquake)
8588d5bbe0 tracing: Rename the `MIN` macro to `_TRACEPOINT_TEST_MIN` in log_raw_p2p_msgs (0xb10c)
a1db79c31d depends: Fix spacing issue (Hennadii Stepanov)
c70bd786f8 depends: Fix CXXFLAGS on NetBSD (Hennadii Stepanov)
166fea73eb test: fix MIN macro-redefinition (0xb10c)

Pull request description:

  Backports:
  * #31419
  * #31502
  * #31623
  * #31627

ACKs for top commit:
  stickies-v:
    ACK 25f150304d

Tree-SHA512: 331027b176f5fd344a74d7b6d6668db5251ab2fec9f079977601499a37f71fe84cb6dee1cdee40a0570aa92d29839093c578e8eebde92188e4de534f4a6dee65
2025-02-11 13:21:38 +01:00
fanquake
25f150304d doc: update release notes 2025-02-10 11:43:17 +01:00
0xb10c
8588d5bbe0 tracing: Rename the MIN macro to _TRACEPOINT_TEST_MIN in log_raw_p2p_msgs
Inspired by: 00c1dbd26d (#31419)

Github-Pull: #31623
Rebased-From: f93f0c9396
2025-01-10 17:04:27 +00:00
Hennadii Stepanov
a1db79c31d depends: Fix spacing issue
This change resolves an issue where a missing space caused the value of
the `build_AR` variable to be concatenated with the "NM=" string. This
resulted in subsequent calls to `${AR}` and `${NM}` failing.

Github-Pull: #31627
Rebased-From: 8a46286da6
2025-01-10 17:04:22 +00:00
Hennadii Stepanov
c70bd786f8 depends: Fix CXXFLAGS on NetBSD
This change corrects an issue where CXXFLAGS were mistakenly overridden
by CFLAGS.

Github-Pull: #31502
Rebased-From: a10bb400e8
2025-01-06 11:00:47 +00:00
0xb10c
166fea73eb test: fix MIN macro-redefinition
Renames the `MIN` macro to `_TRACEPOINT_TEST_MIN`.

From #31418:

```
stderr:
/virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined]
   70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
      |         ^
include/linux/minmax.h:329:9: note: previous definition is here
  329 | #define MIN(a,b) __cmp(min,a,b)
      |         ^
1 warning generated.
```

fixes: https://github.com/bitcoin/bitcoin/issues/31418

Github-Pull: #31419
Rebased-From: 00c1dbd26d
2024-12-04 17:30:55 +00:00
25 changed files with 145 additions and 82 deletions

View File

@@ -137,7 +137,7 @@ jobs:
CI_CCACHE_VERSION: '4.7.5'
CI_QT_CONF: '-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'
CI_QT_DIR: 'qt-everywhere-src-5.15.11'
CI_QT_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip'
CI_QT_URL: 'https://download.qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip'
PYTHONUTF8: 1
TEST_RUNNER_TIMEOUT_FACTOR: 40

View File

@@ -32,7 +32,7 @@ Qt
---------------------
To build Bitcoin Core with the GUI, a static build of Qt is required.
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.11.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
1. Download a single ZIP archive of Qt source code from https://download.qt.io/archive/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.11.zip`](https://download.qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
> 💡 **Tip:** If you use the default path with "Extract All" for the Qt source code zip file, and end up with something like `C:\dev\qt-everywhere-opensource-src-5.15.11\qt-everywhere-src-5.15.11`, you are likely to encounter a "path too long" error when building. To fix the problem move the source files to a shorter path such as the recommended `C:\dev\qt-source`.

View File

@@ -119,7 +119,7 @@ if [ -n "$ANDROID_TOOLS_URL" ]; then
exit 0
fi
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --prefix=$BASE_OUTDIR"
if [ -n "$CONFIG_SHELL" ]; then
"$CONFIG_SHELL" -c "./autogen.sh"

View File

@@ -319,7 +319,7 @@ Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
Start by cloning Guix:
```
git clone https://git.savannah.gnu.org/git/guix.git
git clone https://codeberg.org/guix/guix.git
cd guix
```
@@ -607,7 +607,7 @@ checklist.
```
Generation 38 Feb 22 2021 16:39:31 (current)
guix f350df4
repository URL: https://git.savannah.gnu.org/git/guix.git
repository URL: https://codeberg.org/guix/guix.git
branch: version-1.2.0
commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7
```
@@ -757,8 +757,8 @@ Please see the following links for more details:
- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5)
- A commit to skip this test in Guix has been merged into the core-updates branch:
[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
- A commit to skip this test is included since Guix 1.4.0:
[codeberg/guix@6ba1058](https://codeberg.org/guix/guix/commit/6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball

View File

@@ -50,7 +50,7 @@ fi
# across time.
time-machine() {
# shellcheck disable=SC2086
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
guix time-machine --url=https://codeberg.org/guix/guix.git \
--commit=d5ca4d4fd713a9f7e17e074a1e37dda99bbb09fc \
--cores="$JOBS" \
--keep-failed \

View File

@@ -41,7 +41,8 @@ from bcc import BPF, USDT
program = """
#include <uapi/linux/ptrace.h>
#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros.
#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
// Maximum possible allocation size
// from include/linux/percpu.h in the Linux kernel
@@ -88,7 +89,7 @@ int trace_inbound_message(struct pt_regs *ctx) {
bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH);
bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH);
bpf_usdt_readarg(5, ctx, &msg->msg_size);
bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH));
bpf_usdt_readarg_p(6, ctx, &msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH));
inbound_messages.perf_submit(ctx, msg, sizeof(*msg));
return 0;
@@ -108,7 +109,7 @@ int trace_outbound_message(struct pt_regs *ctx) {
bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH);
bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH);
bpf_usdt_readarg(5, ctx, &msg->msg_size);
bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH));
bpf_usdt_readarg_p(6, ctx, &msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH));
outbound_messages.perf_submit(ctx, msg, sizeof(*msg));
return 0;

View File

@@ -147,7 +147,7 @@ include packages/packages.mk
# 2. Before including packages/*.mk (excluding packages/packages.mk), since
# they rely on the build_id variables
#
build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR) 'NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
boost_packages_$(NO_BOOST) = $(boost_packages)

View File

@@ -7,8 +7,6 @@ netbsd_NM = $(host_toolchain)gcc-nm
netbsd_RANLIB = $(host_toolchain)gcc-ranlib
endif
netbsd_CXXFLAGS=$(netbsd_CFLAGS)
netbsd_release_CFLAGS=-O2
netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS)

View File

@@ -9,7 +9,7 @@ $(package)_sha256_hash=$(native_$(package)_sha256_hash)
# setting in depends/config.site.in, which also hardcodes "lib".
# Without this setting, cmake by default would use the OS library
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
define $(package)_set_vars :=
define $(package)_set_vars
$(package)_config_opts := -DBUILD_TESTING=OFF
$(package)_config_opts += -DWITH_OPENSSL=OFF
$(package)_config_opts += -DWITH_ZLIB=OFF

View File

@@ -12,7 +12,7 @@ endif
# setting in depends/config.site.in, which also hardcodes "lib".
# Without this setting, cmake by default would use the OS library
# directory, which might be "lib64" or something else, not "lib", on multiarch systems.
define $(package)_set_vars :=
define $(package)_set_vars
$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/
$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
ifneq ($(host),$(build))

View File

@@ -1,6 +1,6 @@
package=qt
$(package)_version=5.15.11
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
$(package)_download_path=https://download.qt.io/archive/qt/5.15/$($(package)_version)/submodules
$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=425ad301acd91ca66c10c0dabee0704e2d0cd2801a6b670115800cbb95f84846
@@ -22,6 +22,7 @@ $(package)_patches += fast_fixed_dtoa_no_optimize.patch
$(package)_patches += guix_cross_lib_path.patch
$(package)_patches += fix-macos-linker.patch
$(package)_patches += memory_resource.patch
$(package)_patches += clang_18_libpng.patch
$(package)_patches += utc_from_string_no_optimize.patch
$(package)_patches += windows_lto.patch
$(package)_patches += zlib-timebits64.patch
@@ -250,6 +251,7 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \

View File

@@ -21,6 +21,8 @@ define $(package)_build_cmds
$(MAKE)
endef
# mkdir detection is broken on Alpine. Set MKDIRPROG to ensure we always
# use "mkdir -p", and avoid parallelism issues during install.
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
$(MAKE) MKDIRPROG="mkdir -p" DESTDIR=$($(package)_staging_dir) install
endef

View File

@@ -0,0 +1,40 @@
fix Qt macOS build with Clang 18
See:
https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24.
In a similar manner as zlib (madler/zlib#895),
libpng contains a header configuration that's no longer valid and
hasn't been exercised for the macOS target.
- The target OS conditional macros are misused. Specifically
`TARGET_OS_MAC` covers all Apple targets, including iOS, and it
should not be checked with `#if defined` as they would always be
defined (to either 1 or 0) on Apple platforms.
- `#include <fp.h>` no longer works for the macOS target and results
in a compilation failure. macOS ships all required functions in
`math.h`, and clients should use `math.h` instead.
--- a/qtbase/src/3rdparty/libpng/pngpriv.h
+++ b/qtbase/src/3rdparty/libpng/pngpriv.h
@@ -514,18 +514,8 @@
*/
# include <float.h>
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
+# include <math.h>
+
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881

View File

@@ -30,7 +30,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
| [Fontconfig](../depends/packages/fontconfig.mk) | [link](https://www.freedesktop.org/wiki/Software/fontconfig/) | [2.12.6](https://github.com/bitcoin/bitcoin/pull/23495) | 2.6 | Yes |
| [FreeType](../depends/packages/freetype.mk) | [link](https://freetype.org) | [2.11.0](https://github.com/bitcoin/bitcoin/commit/01544dd78ccc0b0474571da854e27adef97137fb) | 2.3.0 | Yes |
| [qrencode](../depends/packages/qrencode.mk) | [link](https://fukuchi.org/works/qrencode/) | [4.1.1](https://github.com/bitcoin/bitcoin/pull/27312) | | No |
| [Qt](../depends/packages/qt.mk) | [link](https://download.qt.io/official_releases/qt/) | [5.15.11](https://github.com/bitcoin/bitcoin/pull/28769) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No |
| [Qt](../depends/packages/qt.mk) | [link](https://download.qt.io/archive/qt/) | [5.15.11](https://github.com/bitcoin/bitcoin/pull/28769) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No |
### Networking
| Dependency | Releases | Version used | Minimum required | Runtime |

View File

@@ -1,9 +1,9 @@
27.2 Release Notes
27.x Release Notes
=====================
Bitcoin Core version 27.2 is now available from:
Bitcoin Core version 27.x is now available from:
<https://bitcoincore.org/bin/bitcoin-core-27.2/>
<https://bitcoincore.org/bin/bitcoin-core-27.x/>
This release includes various bug fixes and performance
improvements, as well as updated translations.
@@ -40,53 +40,48 @@ unsupported systems.
Notable changes
===============
External signing is not currently supported when compiling with Boost version 1.88.0 or later.
### P2P
- #30394 net: fix race condition in self-connect detection
### Init
- #30435 init: change shutdown order of load block thread and scheduler
### RPC
- #30357 Fix cases of calls to FillPSBT errantly returning complete=true
### PSBT
- #29855 psbt: Check non witness utxo outpoint early
- #33395 net: Do not apply whitelist permission to onion inbounds
### Test
- #30552 test: fix constructor of msg_tx
### Doc
- #30504 doc: use proper doxygen formatting for CTxMemPool::cs
- #31419 test: fix MIN macro redefinition
- #32286 test: Handle empty string returned by CLI as None in RPC tests
- #32336 test: Suppress upstream -Wduplicate-decl-specifier in bpfcc
### Build
- #30283 upnp: fix build with miniupnpc 2.2.8
- #30633 Fixes for GCC 15 compatibility
- #30198 depends: fix Qt macOS build with Clang 18
- #31502 depends: Fix CXXFLAGS on NetBSD
- #31627 depends: Fix spacing issue
- #32070 build: use make < 3.82 syntax for define directive
- #32439 guix: accomodate migration to codeberg
- #32568 depends: use "mkdir -p" when installing xproto
- #33563 build: fix depends Qt download link
### CI
### Misc
- #31623 tracing: Rename the MIN macro to TRACEPOINT_TEST_MIN in log_raw_p2p_msgs
- #32187 refactor: Remove spurious virtual from final ~CZMQNotificationInterface
- #33561 ci: Fix Qt 5.15 URL
- #30193 ci: move ASan job to GitHub Actions from Cirrus CI
- #30299 ci: remove unused bcc variable from workflow
Credits
=======
Thanks to everyone who directly contributed to this release:
- Ava Chow
- Cory Fields
- 0xb10c
- Brandon Odiwuor
- fanquake
- Hennadii Stepanov
- MarcoFalke
- Martin Zumsande
- Matt Whitlock
- Max Edwards
- Sebastian Falbesoner
- Sjors Provoost
- Vasil Dimov
- willcl-ark
As well as to everyone that helped with translations on
[Transifex](https://www.transifex.com/bitcoin/bitcoin/).

View File

@@ -558,9 +558,9 @@ void CNode::CloseSocketDisconnect()
m_i2p_sam_session.reset();
}
void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNetAddr &addr) const {
void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, std::optional<CNetAddr> addr) const {
for (const auto& subnet : vWhitelistedRange) {
if (subnet.m_subnet.Match(addr)) NetPermissions::AddFlag(flags, subnet.m_flags);
if (addr.has_value() && subnet.m_subnet.Match(addr.value())) NetPermissions::AddFlag(flags, subnet.m_flags);
}
}
@@ -1726,7 +1726,11 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
{
int nInbound = 0;
AddWhitelistPermissionFlags(permission_flags, addr);
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
// Tor inbound connections do not reveal the peer's actual network address.
// Therefore do not apply address-based whitelist permissions to them.
AddWhitelistPermissionFlags(permission_flags, inbound_onion ? std::optional<CNetAddr>{} : addr);
if (NetPermissions::HasFlag(permission_flags, NetPermissionFlags::Implicit)) {
NetPermissions::ClearFlag(permission_flags, NetPermissionFlags::Implicit);
if (gArgs.GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::ForceRelay);
@@ -1793,7 +1797,6 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
nodeServices = static_cast<ServiceFlags>(nodeServices | NODE_BLOOM);
}
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
// The V2Transport transparently falls back to V1 behavior when an incoming V1 connection is
// detected, so use it whenever we signal NODE_P2P_V2.
const bool use_v2transport(nodeServices & NODE_P2P_V2);

View File

@@ -1339,7 +1339,7 @@ private:
bool AttemptToEvictConnection();
CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex);
void AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNetAddr &addr) const;
void AddWhitelistPermissionFlags(NetPermissionFlags& flags, std::optional<CNetAddr> addr) const;
void DeleteNode(CNode* pnode);

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2015-2022 The Bitcoin Core developers
// Copyright (c) 2015-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -21,7 +21,7 @@ struct NewMempoolTransactionInfo;
class CZMQNotificationInterface final : public CValidationInterface
{
public:
virtual ~CZMQNotificationInterface();
~CZMQNotificationInterface();
std::list<const CZMQAbstractNotifier*> GetActiveNotifiers() const;

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Copyright (c) 2022-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,6 +17,7 @@ from test_framework.util import (
assert_equal,
assert_greater_than,
assert_raises_rpc_error,
bpf_cflags,
)
coinselection_tracepoints_program = """
@@ -166,7 +167,7 @@ class CoinSelectionTracepointTest(BitcoinTestFramework):
ctx.enable_probe(probe="coin_selection:normal_create_tx_internal", fn_name="trace_normal_create_tx")
ctx.enable_probe(probe="coin_selection:attempting_aps_create_tx", fn_name="trace_attempt_aps")
ctx.enable_probe(probe="coin_selection:aps_create_tx_internal", fn_name="trace_aps_create_tx")
self.bpf = BPF(text=coinselection_tracepoints_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
self.bpf = BPF(text=coinselection_tracepoints_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
self.log.info("Prepare wallets")
self.generate(self.nodes[0], 101)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Copyright (c) 2022-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,7 +19,10 @@ from test_framework.blocktools import COINBASE_MATURITY
from test_framework.messages import COIN, DEFAULT_MEMPOOL_EXPIRY_HOURS
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
bpf_cflags,
)
from test_framework.wallet import MiniWallet
MEMPOOL_TRACEPOINTS_PROGRAM = """
@@ -144,7 +147,7 @@ class MempoolTracepointTest(BitcoinTestFramework):
node = self.nodes[0]
ctx = USDT(pid=node.process.pid)
ctx.enable_probe(probe="mempool:added", fn_name="trace_added")
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
def handle_added_event(_, data, __):
events.append(bpf["added_events"].event(data))
@@ -181,7 +184,7 @@ class MempoolTracepointTest(BitcoinTestFramework):
node = self.nodes[0]
ctx = USDT(pid=node.process.pid)
ctx.enable_probe(probe="mempool:removed", fn_name="trace_removed")
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
def handle_removed_event(_, data, __):
events.append(bpf["removed_events"].event(data))
@@ -227,7 +230,7 @@ class MempoolTracepointTest(BitcoinTestFramework):
node = self.nodes[0]
ctx = USDT(pid=node.process.pid)
ctx.enable_probe(probe="mempool:replaced", fn_name="trace_replaced")
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
def handle_replaced_event(_, data, __):
events.append(bpf["replaced_events"].event(data))
@@ -278,7 +281,7 @@ class MempoolTracepointTest(BitcoinTestFramework):
self.log.info("Hooking into mempool:rejected tracepoint...")
ctx = USDT(pid=node.process.pid)
ctx.enable_probe(probe="mempool:rejected", fn_name="trace_rejected")
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
def handle_rejected_event(_, data, __):
events.append(bpf["rejected_events"].event(data))

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Copyright (c) 2022-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,7 +17,10 @@ except ImportError:
from test_framework.messages import msg_version
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
bpf_cflags,
)
# Tor v3 addresses are 62 chars + 6 chars for the port (':12345').
MAX_PEER_ADDR_LENGTH = 68
@@ -40,7 +43,8 @@ net_tracepoints_program = """
MAX_MSG_TYPE_LENGTH,
MAX_MSG_DATA_LENGTH
) + """
#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros.
#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
struct p2p_message
{
@@ -60,7 +64,7 @@ int trace_inbound_message(struct pt_regs *ctx) {
bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH);
bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH);
bpf_usdt_readarg(5, ctx, &msg.msg_size);
bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH));
bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH));
inbound_messages.perf_submit(ctx, &msg, sizeof(msg));
return 0;
}
@@ -73,7 +77,7 @@ int trace_outbound_message(struct pt_regs *ctx) {
bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH);
bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH);
bpf_usdt_readarg(5, ctx, &msg.msg_size);
bpf_usdt_readarg_p(6, ctx, &msg.msg, MIN(msg.msg_size, MAX_MSG_DATA_LENGTH));
bpf_usdt_readarg_p(6, ctx, &msg.msg, _TRACEPOINT_TEST_MIN(msg.msg_size, MAX_MSG_DATA_LENGTH));
outbound_messages.perf_submit(ctx, &msg, sizeof(msg));
return 0;
};
@@ -114,7 +118,7 @@ class NetTracepointTest(BitcoinTestFramework):
fn_name="trace_inbound_message")
ctx.enable_probe(probe="net:outbound_message",
fn_name="trace_outbound_message")
bpf = BPF(text=net_tracepoints_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=net_tracepoints_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
EXPECTED_INOUTBOUND_VERSION_MSG = 1
checked_inbound_version_msg = 0

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Copyright (c) 2022-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,10 @@ except ImportError:
pass
from test_framework.messages import COIN
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
bpf_cflags,
)
from test_framework.wallet import MiniWallet
utxocache_changes_program = """
@@ -175,7 +178,7 @@ class UTXOCacheTracepointTest(BitcoinTestFramework):
ctx = USDT(pid=self.nodes[0].process.pid)
ctx.enable_probe(probe="utxocache:uncache",
fn_name="trace_utxocache_uncache")
bpf = BPF(text=utxocache_changes_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=utxocache_changes_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
# The handle_* function is a ctypes callback function called from C. When
# we assert in the handle_* function, the AssertError doesn't propagate
@@ -244,7 +247,7 @@ class UTXOCacheTracepointTest(BitcoinTestFramework):
ctx.enable_probe(probe="utxocache:add", fn_name="trace_utxocache_add")
ctx.enable_probe(probe="utxocache:spent",
fn_name="trace_utxocache_spent")
bpf = BPF(text=utxocache_changes_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=utxocache_changes_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
# The handle_* function is a ctypes callback function called from C. When
# we assert in the handle_* function, the AssertError doesn't propagate
@@ -333,7 +336,7 @@ class UTXOCacheTracepointTest(BitcoinTestFramework):
ctx = USDT(pid=self.nodes[0].process.pid)
ctx.enable_probe(probe="utxocache:flush",
fn_name="trace_utxocache_flush")
bpf = BPF(text=utxocache_flushes_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=utxocache_flushes_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
# The handle_* function is a ctypes callback function called from C. When
# we assert in the handle_* function, the AssertError doesn't propagate
@@ -390,7 +393,7 @@ class UTXOCacheTracepointTest(BitcoinTestFramework):
ctx = USDT(pid=self.nodes[0].process.pid)
ctx.enable_probe(probe="utxocache:flush",
fn_name="trace_utxocache_flush")
bpf = BPF(text=utxocache_flushes_program, usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
bpf = BPF(text=utxocache_flushes_program, usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
bpf["utxocache_flush"].open_perf_buffer(handle_utxocache_flush)
self.log.info(f"prune blockchain to trigger a flush for pruning")

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Copyright (c) 2022-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,8 +17,10 @@ except ImportError:
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
bpf_cflags,
)
validation_blockconnected_program = """
#include <uapi/linux/ptrace.h>
@@ -94,7 +96,7 @@ class ValidationTracepointTest(BitcoinTestFramework):
ctx.enable_probe(probe="validation:block_connected",
fn_name="trace_block_connected")
bpf = BPF(text=validation_blockconnected_program,
usdt_contexts=[ctx], debug=0, cflags=["-Wno-error=implicit-function-declaration"])
usdt_contexts=[ctx], debug=0, cflags=bpf_cflags())
def handle_blockconnected(_, data, __):
event = ctypes.cast(data, ctypes.POINTER(Block)).contents

View File

@@ -887,6 +887,8 @@ class TestNodeCLI():
# Ignore cli_stdout, raise with cli_stderr
raise subprocess.CalledProcessError(returncode, self.binary, output=cli_stderr)
try:
if not cli_stdout.strip():
return None
return json.loads(cli_stdout, parse_float=decimal.Decimal)
except (json.JSONDecodeError, decimal.InvalidOperation):
return cli_stdout.rstrip("\n")

View File

@@ -277,6 +277,13 @@ def wait_until_helper_internal(predicate, *, attempts=float('inf'), timeout=floa
raise RuntimeError('Unreachable')
def bpf_cflags():
return [
"-Wno-error=implicit-function-declaration",
"-Wno-duplicate-decl-specifier", # https://github.com/bitcoin/bitcoin/issues/32322
]
def sha256sum_file(filename):
h = hashlib.sha256()
with open(filename, 'rb') as f: