Compare commits

...

25 Commits

Author SHA1 Message Date
merge-script
f490f5562d Merge bitcoin/bitcoin#32252: [29.x] doc: minor rel notes changes
87e53781f7 doc: minor rel notes changes (fanquake)

Pull request description:

  Remove two unused headers.
  Remove the empty-template, as point releases will modify `release-notes.md`.

ACKs for top commit:
  jonatack:
    LGTM ACK 87e53781f7
  janb84:
    ACK [87e5378](87e53781f7)

Tree-SHA512: 69ff0d7863c1598ab2b4daf2a7f9ca3edae513a7d5ebb85aa1b468150cfd17da2f503ac0a41dc77fe04c3670cb7d58df46b00837d08aad624f024756f575fca1
2025-04-11 16:20:13 +01:00
fanquake
87e53781f7 doc: minor rel notes changes
Remove two unused headers.
Remove the empty-template, as point releases will modify release-notes.md.
2025-04-11 16:00:42 +01:00
merge-script
56ed476a29 Merge bitcoin/bitcoin#32241: [29.x] 29.0 final changes
977db54233 [doc] update man pages for 29.0 (glozow)
190e718e83 [build] bump to 29.0 final (glozow)
50108104d7 [doc] copy over Release Notes draft from wiki (glozow)

Pull request description:

  There weren't any reports from rc2 and rc3 binaries have been up since April 2 (1 week ago).

ACKs for top commit:
  hebasto:
    ACK 977db54233.
  janb84:
    ACK [977db54](977db54233)
  laanwj:
    ACK 977db54233

Tree-SHA512: f0dee957c56a7b24cc361b0450efeaaad5ead6401ba649f8af6cf5cb464fea4357e1eaedaaa80accdeb18d47321a604979c43be57e14aa3ae5603d083e7df250
2025-04-11 15:55:48 +01:00
glozow
977db54233 [doc] update man pages for 29.0 2025-04-09 11:34:37 -04:00
glozow
190e718e83 [build] bump to 29.0 final 2025-04-09 11:34:37 -04:00
glozow
50108104d7 [doc] copy over Release Notes draft from wiki 2025-04-09 11:34:37 -04:00
merge-script
1344d3bd0f Merge bitcoin/bitcoin#32136: [29.x] backports and 29.0rc3
f80ab9a5d8 [doc] update man pages for 29.0rc3 (glozow)
7c05ef5673 [build] bump to 29.0rc3 (glozow)
c0756b758f depends: set CMAKE_*_COMPILER_TARGET in toolchain (fanquake)
477345207b cmake: Add `NO_CACHE_IF_FAILED` option for checking linker flags (Hennadii Stepanov)
7bc7af9951 fuzz: extract unsequenced operations with side-effects (Lőrinc)
288163ea0f fuzz: Fix off-by-one in package_rbf target (MarcoFalke)
a3060483fa test: avoid disk space warning for non-regtest (Sjors Provoost)

Pull request description:

  Backports + final changes for 29.0rc3.

  Backports:
  - #32057
  - #32122
  - #32141
  - #32027
  - #31849

ACKs for top commit:
  hebasto:
    ACK f80ab9a5d8, I've verified back-ports locally and reviewed release related changes.
  fanquake:
    ACK f80ab9a5d8

Tree-SHA512: 15c882eac98825c41859859af1621e63a5b9d98f3b492c451c14f2d2232220dfa8d1ef933adae773918e188c6ade085f254f2853ff078bf1f99b8cd77facb182
2025-04-01 19:59:46 +08:00
glozow
f80ab9a5d8 [doc] update man pages for 29.0rc3 2025-03-28 14:56:29 -04:00
glozow
7c05ef5673 [build] bump to 29.0rc3 2025-03-28 14:37:09 -04:00
fanquake
c0756b758f depends: set CMAKE_*_COMPILER_TARGET in toolchain
According to the CMake docs, this is the correct way to setup a
toolchain file for cross-compilation using Clang. See
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-using-clang

Internally it looks like CMake will only take this variable into account
if it detects the compiler to be Clang, so this shouldn't effect other
builds, but in the case of our Apple cross builds, we'd end up with a
duplicated `--target=arm64-apple-darwin` on the compiler line, given we
are already setting `--target` for Darwin builds.

Would fix #31748.

Github-Pull: #31849
Rebased-From: 963355037f
2025-03-28 14:24:37 -04:00
Hennadii Stepanov
477345207b cmake: Add NO_CACHE_IF_FAILED option for checking linker flags
Use it for checking `-fsanitize`.

This change improves the user experience when the configuration step
fails due to a missing library. Now, there is no need to manually clean
the CMake cache after installing the required library.

Github-Pull: #32027
Rebased-From: 52ac17757e
2025-03-28 14:24:09 -04:00
Lőrinc
7bc7af9951 fuzz: extract unsequenced operations with side-effects
https://github.com/bitcoin/bitcoin/pull/30746#discussion_r1817851827 introduced an unsequenced operations with side-effects - which is undefined behavior, i.e. the right hand side can be evaluated before the left hand side, which happens to mutate it.

Tried:
```
clang++ --analyze -std=c++20 -I./src -I./src/test -I./src/test/fuzz src/test/fuzz/base_encode_decode.cpp src/psbt.cpp
```
but it didn't warn about UB.

Grepped for similar ones, but could find any other one in the codebase:
> grep -rnE --include='*.cpp' --include='*.h' '\b(\w+)\(([^)]*\b(\w+)\b[^)]*)\)\s*==\s*\3\.' .
```
./src/test/arith_uint256_tests.cpp:373:    BOOST_CHECK(R1L.GetHex() == R1L.ToString());
./src/test/arith_uint256_tests.cpp:374:    BOOST_CHECK(R2L.GetHex() == R2L.ToString());
./src/test/arith_uint256_tests.cpp:375:    BOOST_CHECK(OneL.GetHex() == OneL.ToString());
./src/test/arith_uint256_tests.cpp:376:    BOOST_CHECK(MaxL.GetHex() == MaxL.ToString());
./src/test/fuzz/cluster_linearize.cpp:565:        assert(depgraph.FeeRate(best_anc.transactions) == best_anc.feerate);
./src/test/fuzz/cluster_linearize.cpp:646:        assert(depgraph.FeeRate(found.transactions) == found.feerate);
./src/test/fuzz/cluster_linearize.cpp:765:            assert(depgraph.FeeRate(chunk_info.transactions) == chunk_info.feerate);
./src/test/fuzz/base_encode_decode.cpp:95:    assert(DecodeBase64PSBT(psbt, random_string, error) == error.empty());
./src/test/fuzz/key.cpp:102:        assert(pubkey.data() == pubkey.begin());
./src/test/skiplist_tests.cpp:42:        BOOST_CHECK(vIndex[from].GetAncestor(0) == vIndex.data());
./src/script/signingprovider.cpp:535:                   ComputeTapbranchHash(node.sub[1]->hash, node.sub[1]->hash) == node.hash) {
./src/pubkey.h:78:      return vch.size() > 0 && GetLen(vch[0]) == vch.size();
./src/cluster_linearize.h:881:            Assume(elem.inc.feerate.IsEmpty() == elem.pot_feerate.IsEmpty());
```

Hodlinator deduced the UB on Windows in https://github.com/bitcoin/bitcoin/issues/32135#issuecomment-2751723855

Github-Pull: #32141
Rebased-From: b1de59e896

Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
2025-03-28 14:23:42 -04:00
MarcoFalke
288163ea0f fuzz: Fix off-by-one in package_rbf target
Github-Pull: #32122
Rebased-From: fa5674c264
2025-03-25 16:58:12 -04:00
Sjors Provoost
a3060483fa test: avoid disk space warning for non-regtest
feature_config_args.py incorrectly assumed that its testnet4 node
would not log a disk space warning.

0683b8ebf3 increased m_assumed_blockchain_size
on testnet4 from 1 to 11 GiB which triggers this bug on more
systems, e.g. a RAM disk.

Prevent the warning by setting -prune for these nodes.

Fix the same issue in feature_signet.py

Github-Pull: #32057
Rebased-From: 20fe41e9e8
2025-03-25 10:31:08 -04:00
merge-script
d6db87165c Merge bitcoin/bitcoin#32062: [29.x] backports and rc2
74df31cb0b [doc] update example bitcoin.conf with missing options (glozow)
8082f88d1a [doc] update man pages for 29.0rc2 (glozow)
472d582bfe [build] bump to 29.0rc2 (glozow)
a4c30bd00a qt: doc: adapt outdated binary paths to CMake changes (Sebastian Falbesoner)
4e438d326e build: use make < 3.82 syntax for define directive (Sjors Provoost)
7ff0b02161 build: Remove manpages when making MacOS app (Ava Chow)
5ebcb59fdb test: fix intermittent failure in p2p_orphan_handling.py (Martin Zumsande)
458655bca8 fuzz: make sure DecodeBase58(Check) is called with valid values more often (Lőrinc)
15ecae31a8 fuzz: Always restrict base conversion input lengths (Lőrinc)
80c5d57bd1 contrib: Fix `gen-bitcoin-conf.sh`. (David Gumberg)

Pull request description:

  backports:
  - #32049
  - #32063
  - #32064
  - #32070
  - #31917

ACKs for top commit:
  Sjors:
    ACK 74df31cb0b
  hebasto:
    ACK 74df31cb0b, I have reviewed the code and it looks OK.
  ismaelsadeeq:
    Code review ACK 74df31cb0b

Tree-SHA512: df4ef832a03c9c3f89d30d3f65d81b7c7e4793d2cad8a269f1ff221454a4b0b05e06109f4556926c1c4f7fcbd2537052b4d58b4b3911dfcfc35726c600b587d9
2025-03-18 08:38:18 +08:00
glozow
74df31cb0b [doc] update example bitcoin.conf with missing options 2025-03-17 06:16:22 -04:00
glozow
8082f88d1a [doc] update man pages for 29.0rc2 2025-03-17 06:16:22 -04:00
glozow
472d582bfe [build] bump to 29.0rc2 2025-03-17 06:16:22 -04:00
Sebastian Falbesoner
a4c30bd00a qt: doc: adapt outdated binary paths to CMake changes
Github-Pull: bitcoin-core/gui#858
Rebased-From: 7ebc458a8c
2025-03-17 06:16:03 -04:00
Sjors Provoost
4e438d326e 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

Github-Pull: #32070
Rebased-From: 9157d9e449

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2025-03-16 22:07:20 -04:00
Ava Chow
7ff0b02161 build: Remove manpages when making MacOS app
Github-Pull: #32064
Rebased-From: 80b5e7f2cb
2025-03-16 22:07:20 -04:00
Martin Zumsande
5ebcb59fdb test: fix intermittent failure in p2p_orphan_handling.py
If we bump the mocktime before the node has successfully disconnected
the peer, the requests for both parents could be spread over
two GETDATAS, which would make the test fail.

Github-Pull: #32063
Rebased-From: 02942056fd
2025-03-16 22:07:20 -04:00
Lőrinc
458655bca8 fuzz: make sure DecodeBase58(Check) is called with valid values more often
In Base58 fuzz the two roundtrips are merged now, the new `decode_input` switches between a completely random input and a valid encoded one, to make sure the decoding passes more often.
The `max_ret_len` can also exceed the original length now and is being validated more thoroughly.

Github-Pull: #31917
Rebased-From: d5537c18a9

Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
Co-authored-by: marcofleon <marleo23@proton.me>
2025-03-16 22:07:20 -04:00
Lőrinc
15ecae31a8 fuzz: Always restrict base conversion input lengths
They seem to cause timeouts:
> Issue 397734700: bitcoin-core:base58check_encode_decode: Timeout in base58check_encode_decode

The `encoded_string.empty()` check was corrected here to `decoded.empty()` to make sure the `(0, decoded.size() - 1)` range is always valid.

Github-Pull: #31917
Rebased-From: bad1433ef2

Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
Co-authored-by: marcofleon <marleo23@proton.me>
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2025-03-16 22:07:20 -04:00
David Gumberg
80c5d57bd1 contrib: Fix gen-bitcoin-conf.sh.
In #31118, the format of bitcoind's `--help` output changed slightly in
a way that breaks `gen-bitcoin-conf.sh`, modify the script to accomodate
the new format, by starting after the line that says "Options:" and
strip the `-help` option and its description from the output.

Github-Pull: #32049
Rebased-From: a24419f8be
2025-03-13 17:06:10 -04:00
24 changed files with 428 additions and 187 deletions

View File

@@ -26,7 +26,7 @@ set(CLIENT_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 29)
set(CLIENT_VERSION_MINOR 0)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 1)
set(CLIENT_VERSION_RC 0)
set(CLIENT_VERSION_IS_RELEASE "true")
set(COPYRIGHT_YEAR "2025")
@@ -376,6 +376,7 @@ if(SANITIZERS)
int main() { return 0; }
"
RESULT_VAR linker_supports_sanitizers
NO_CACHE_IF_FAILED
)
if(NOT linker_supports_sanitizers)
message(FATAL_ERROR "Linker did not accept requested flags, you are missing required libraries.")

View File

@@ -83,6 +83,7 @@ function(add_macos_deploy_target)
COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $<CONFIG> --component bitcoin-qt --prefix ${macos_app}/Contents/MacOS --strip
COMMAND ${CMAKE_COMMAND} -E rename ${macos_app}/Contents/MacOS/bin/$<TARGET_FILE_NAME:bitcoin-qt> ${macos_app}/Contents/MacOS/Bitcoin-Qt
COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/bin
COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/share
VERBATIM
)

View File

@@ -20,7 +20,7 @@ In configuration output, this function prints a string by the following pattern:
function(try_append_linker_flag flag)
cmake_parse_arguments(PARSE_ARGV 1
TALF # prefix
"" # options
"NO_CACHE_IF_FAILED" # options
"TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords
"IF_CHECK_PASSED" # multi_value_keywords
)
@@ -68,6 +68,10 @@ function(try_append_linker_flag flag)
if(DEFINED TALF_RESULT_VAR)
set(${TALF_RESULT_VAR} "${${result}}" PARENT_SCOPE)
endif()
if(NOT ${result} AND TALF_NO_CACHE_IF_FAILED)
unset(${result} CACHE)
endif()
endfunction()
if(MSVC)

View File

@@ -50,7 +50,8 @@ EOF
# adding newlines is a bit funky to ensure portability for BSD
# see here for more details: https://stackoverflow.com/a/24575385
${BITCOIND} --help \
| sed '1,/Print this help message and exit/d' \
| sed '1,/Options:/d' \
| sed -E '/^[[:space:]]{2}-help/,/^[[:space:]]*$/d' \
| sed -E 's/^[[:space:]]{2}\-/#/' \
| sed -E 's/^[[:space:]]{7}/# /' \
| sed -E '/[=[:space:]]/!s/#.*$/&=1/' \

View File

@@ -206,6 +206,7 @@ endif
$(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
@mkdir -p $(@D)
sed -e 's|@depends_crosscompiling@|$(crosscompiling)|' \
-e 's|@host@|$(host)|' \
-e 's|@host_system_name@|$($(host_os)_cmake_system_name)|' \
-e 's|@host_system_version@|$($(host_os)_cmake_system_version)|' \
-e 's|@host_arch@|$(host_arch)|' \

View File

@@ -5,7 +5,7 @@ $(package)_download_file=$(native_$(package)_download_file)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
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

@@ -8,7 +8,7 @@ ifneq ($(host),$(build))
$(package)_dependencies += native_capnp
endif
define $(package)_set_vars :=
define $(package)_set_vars
ifneq ($(host),$(build))
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"

View File

@@ -13,6 +13,10 @@ if(@depends_crosscompiling@)
set(CMAKE_SYSTEM_NAME @host_system_name@)
set(CMAKE_SYSTEM_VERSION @host_system_version@)
set(CMAKE_SYSTEM_PROCESSOR @host_arch@)
set(CMAKE_C_COMPILER_TARGET @host@)
set(CMAKE_CXX_COMPILER_TARGET @host@)
set(CMAKE_OBJCXX_COMPILER_TARGET @host@)
endif()
if(NOT DEFINED CMAKE_C_FLAGS_INIT)

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-CLI "1" "March 2025" "bitcoin-cli v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIN-CLI "1" "April 2025" "bitcoin-cli v29.0.0" "User Commands"
.SH NAME
bitcoin-cli \- manual page for bitcoin-cli v29.0.0rc1
bitcoin-cli \- manual page for bitcoin-cli v29.0.0
.SH SYNOPSIS
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR]
@@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v29.0.0rc1
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,help <command>\/\fR
.SH DESCRIPTION
Bitcoin Core RPC client version v29.0.0rc1
Bitcoin Core RPC client version v29.0.0
.PP
The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server.
.PP

View File

@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-QT "1" "March 2025" "bitcoin-qt v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIN-QT "1" "April 2025" "bitcoin-qt v29.0.0" "User Commands"
.SH NAME
bitcoin-qt \- manual page for bitcoin-qt v29.0.0rc1
bitcoin-qt \- manual page for bitcoin-qt v29.0.0
.SH SYNOPSIS
.B bitcoin-qt
[\fI\,options\/\fR] [\fI\,URI\/\fR]
.SH DESCRIPTION
Bitcoin Core version v29.0.0rc1
Bitcoin Core version v29.0.0
.PP
The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core.
.PP

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-TX "1" "March 2025" "bitcoin-tx v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIN-TX "1" "April 2025" "bitcoin-tx v29.0.0" "User Commands"
.SH NAME
bitcoin-tx \- manual page for bitcoin-tx v29.0.0rc1
bitcoin-tx \- manual page for bitcoin-tx v29.0.0
.SH SYNOPSIS
.B bitcoin-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR]
@@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v29.0.0rc1
.B bitcoin-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR]
.SH DESCRIPTION
Bitcoin Core bitcoin\-tx utility version v29.0.0rc1
Bitcoin Core bitcoin\-tx utility version v29.0.0
.PP
The bitcoin\-tx tool is used for creating and modifying bitcoin transactions.
.PP

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-UTIL "1" "March 2025" "bitcoin-util v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIN-UTIL "1" "April 2025" "bitcoin-util v29.0.0" "User Commands"
.SH NAME
bitcoin-util \- manual page for bitcoin-util v29.0.0rc1
bitcoin-util \- manual page for bitcoin-util v29.0.0
.SH SYNOPSIS
.B bitcoin-util
[\fI\,options\/\fR] [\fI\,command\/\fR]
@@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v29.0.0rc1
.B bitcoin-util
[\fI\,options\/\fR] \fI\,grind <hex-block-header>\/\fR
.SH DESCRIPTION
Bitcoin Core bitcoin\-util utility version v29.0.0rc1
Bitcoin Core bitcoin\-util utility version v29.0.0
.PP
The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below.
.SH OPTIONS

View File

@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-WALLET "1" "March 2025" "bitcoin-wallet v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIN-WALLET "1" "April 2025" "bitcoin-wallet v29.0.0" "User Commands"
.SH NAME
bitcoin-wallet \- manual page for bitcoin-wallet v29.0.0rc1
bitcoin-wallet \- manual page for bitcoin-wallet v29.0.0
.SH SYNOPSIS
.B bitcoin-wallet
[\fI\,options\/\fR] \fI\,<command>\/\fR
.SH DESCRIPTION
Bitcoin Core bitcoin\-wallet utility version v29.0.0rc1
Bitcoin Core bitcoin\-wallet utility version v29.0.0
.PP
bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files.
.PP

View File

@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIND "1" "March 2025" "bitcoind v29.0.0rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BITCOIND "1" "April 2025" "bitcoind v29.0.0" "User Commands"
.SH NAME
bitcoind \- manual page for bitcoind v29.0.0rc1
bitcoind \- manual page for bitcoind v29.0.0
.SH SYNOPSIS
.B bitcoind
[\fI\,options\/\fR]
.SH DESCRIPTION
Bitcoin Core daemon version v29.0.0rc1
Bitcoin Core daemon version v29.0.0
.PP
The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses.
.PP

View File

@@ -1,99 +0,0 @@
*The release notes draft is a temporary file that can be added to by anyone. See
[/doc/developer-notes.md#release-notes](/doc/developer-notes.md#release-notes)
for the process.*
*version* Release Notes Draft
===============================
Bitcoin Core version *version* is now available from:
<https://bitcoincore.org/bin/bitcoin-core-*version*/>
This release includes new features, various bug fixes and performance
improvements, as well as updated translations.
Please report bugs using the issue tracker at GitHub:
<https://github.com/bitcoin/bitcoin/issues>
To receive security and update notifications, please subscribe to:
<https://bitcoincore.org/en/list/announcements/join/>
How to Upgrade
==============
If you are running an older version, shut it down. Wait until it has completely
shut down (which might take a few minutes in some cases), then run the
installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS)
or `bitcoind`/`bitcoin-qt` (on Linux).
Upgrading directly from a version of Bitcoin Core that has reached its EOL is
possible, but it might take some time if the data directory needs to be migrated. Old
wallet versions of Bitcoin Core are generally supported.
Compatibility
==============
Bitcoin Core is supported and tested on operating systems using the
Linux Kernel 3.17+, macOS 13+, and Windows 10+. Bitcoin
Core should also work on most other Unix-like systems but is not as
frequently tested on them. It is not recommended to use Bitcoin Core on
unsupported systems.
Notable changes
===============
P2P and network changes
-----------------------
Updated RPCs
------------
Changes to wallet related RPCs can be found in the Wallet section below.
New RPCs
--------
Build System
------------
Updated settings
----------------
Changes to GUI or wallet related settings can be found in the GUI or Wallet section below.
New settings
------------
Tools and Utilities
-------------------
Wallet
------
GUI changes
-----------
Low-level changes
=================
RPC
---
Tests
-----
*version* change log
====================
Credits
=======
Thanks to everyone who directly contributed to this release:
As well as to everyone that helped with translations on
[Transifex](https://www.transifex.com/bitcoin/bitcoin/).

View File

@@ -1 +1,262 @@
See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/29.0-Release-Notes-draft
Bitcoin Core version 29.0 is now available from:
<https://bitcoincore.org/bin/bitcoin-core-29.0/>
This release includes new features, various bug fixes and performance
improvements, as well as updated translations.
Please report bugs using the issue tracker at GitHub:
<https://github.com/bitcoin/bitcoin/issues>
To receive security and update notifications, please subscribe to:
<https://bitcoincore.org/en/list/announcements/join/>
How to Upgrade
==============
If you are running an older version, shut it down. Wait until it has completely
shut down (which might take a few minutes in some cases), then run the
installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS)
or `bitcoind`/`bitcoin-qt` (on Linux).
Upgrading directly from a version of Bitcoin Core that has reached its EOL is
possible, but it might take some time if the data directory needs to be migrated. Old
wallet versions of Bitcoin Core are generally supported.
Compatibility
==============
Bitcoin Core is supported and tested on operating systems using the
Linux Kernel 3.17+, macOS 13+, and Windows 10+. Bitcoin
Core should also work on most other Unix-like systems but is not as
frequently tested on them. It is not recommended to use Bitcoin Core on
unsupported systems.
Notable changes
===============
### P2P and Network Changes
- Support for UPnP was dropped. If you want to open a port automatically, consider using the `-natpmp`
option instead, which uses PCP or NAT-PMP depending on router support. (#31130)
- libnatpmp was replaced with a built-in implementation of PCP and NAT-PMP (still enabled using the `-natpmp` option). This supports automatic IPv4 port forwarding as well as IPv6 pinholing. (#30043)
- When the `-port` configuration option is used, the default onion listening port will now
be derived to be that port + 1 instead of being set to a fixed value (8334 on mainnet).
This re-allows setups with multiple local nodes using different `-port` and not using `-bind`,
which would lead to a startup failure in v28.0 due to a port collision.
Note that a `HiddenServicePort` manually configured in `torrc` may need adjustment if used in
connection with the `-port` option.
For example, if you are using `-port=5555` with a non-standard value and not using `-bind=...=onion`,
previously Bitcoin Core would listen for incoming Tor connections on `127.0.0.1:8334`.
Now it would listen on `127.0.0.1:5556` (`-port` plus one). If you configured the hidden service manually
in torrc now you have to change it from `HiddenServicePort 8333 127.0.0.1:8334` to `HiddenServicePort 8333
127.0.0.1:5556`, or configure bitcoind with `-bind=127.0.0.1:8334=onion` to get the previous behavior.
(#31223)
- Upon receiving an orphan transaction (an unconfirmed transaction that spends unknown inputs), the node will attempt to download missing parents from all peers who announced the orphan. This change may increase bandwidth usage but make orphan-handling more reliable. (#31397)
### Mempool Policy and Mining Changes
- Ephemeral dust is a new concept that allows a single
dust output in a transaction, provided the transaction
is zero fee. In order to spend any unconfirmed outputs
from this transaction, the spender must also spend
this dust in addition to any other desired outputs.
In other words, this type of transaction
should be created in a transaction package where
the dust is both created and spent simultaneously. (#30239)
- Due to a bug, the default block reserved weight (`4,000 WU`) for fixed-size block header, transactions count, and coinbase transaction was reserved twice and could not be lowered. As a result the total reserved weight was always `8,000 WU`, meaning that even when specifying a `-blockmaxweight` higher than the default (even to the max of `4,000,000 WU`), the actual block size will never exceed `3,992,000 WU`.
The fix consolidates the reservation into a single place and introduces a new startup option, `-blockreservedweight` which specifies the reserved weight directly. The default value of `-blockreservedweight` is set to `8,000 WU` to ensure backward compatibility for users who relied on the previous behavior of `-blockmaxweight`.
The minimum value of `-blockreservedweight` is set to `2,000 WU`. Users setting `-blockreservedweight` below the default should ensure that the total weight of their block header, transaction count, and coinbase transaction does not exceed the reduced value or they may risk mining an invalid block. (#31384)
### Updated RPCs
- The RPC `testmempoolaccept` response now includes a `reject-details` field in some cases,
similar to the complete error messages returned by `sendrawtransaction` (#28121)
- Duplicate blocks submitted with `submitblock` will now persist their block data
even if it was previously pruned. If pruning is activated, the data will be
pruned again eventually once the block file it is persisted in is selected for
pruning. This is consistent with the behaviour of `getblockfrompeer` where the
block is persisted as well even when pruning. (#31175)
- `getmininginfo` now returns `nBits` and the current target in the `target` field. It also returns a `next` object which specifies the `height`, `nBits`, `difficulty`, and `target` for the next block. (#31583)
- `getblock` and `getblockheader` now return the current target in the `target` field (#31583)
- `getblockchaininfo` and `getchainstates` now return `nBits` and the current target in the `target` field (#31583)
- the `getblocktemplate` RPC `curtime` (BIP22) and `mintime` (BIP23) fields now
account for the timewarp fix proposed in BIP94 on all networks. This ensures
that, in the event a timewarp fix softfork activates on mainnet, un-upgraded
miners will not accidentally violate the timewarp rule. (#31376, #31600)
As a reminder, it's important that any software which uses the `getblocktemplate`
RPC takes these values into account (either `curtime` or `mintime` is fine).
Relying only on a clock can lead to invalid blocks under some circumstances,
especially once a timewarp fix is deployed. (#31600)
### New RPCs
- `getdescriptoractivity` can be used to find all spend/receive activity relevant to
a given set of descriptors within a set of specified blocks. This call can be used with
`scanblocks` to lessen the need for additional indexing programs. (#30708)
### Updated REST APIs
- `GET /rest/block/<BLOCK-HASH>.json` and `GET /rest/headers/<BLOCK-HASH>.json` now return the current target in the `target` field
### Updated Settings
- The maximum allowed value for the `-dbcache` configuration option has been
dropped due to recent UTXO set growth. Note that before this change, large `-dbcache`
values were automatically reduced to 16 GiB (1 GiB on 32 bit systems). (#28358)
- Handling of negated `-noseednode`, `-nobind`, `-nowhitebind`, `-norpcbind`, `-norpcallowip`, `-norpcwhitelist`, `-notest`, `-noasmap`, `-norpcwallet`, `-noonlynet`, and `-noexternalip` options has changed. Previously negating these options had various confusing and undocumented side effects. Now negating them just resets the settings and restores default behaviors, as if the options were not specified.
- Starting with v28.0, the `-mempoolfullrbf` startup option was set to
default to `1`. With widespread adoption of this policy, users no longer
benefit from disabling it, so the option has been removed, making full
replace-by-fee the standard behavior. (#30592)
- Setting `-upnp` will now log a warning and be interpreted as `-natpmp`. Consider using `-natpmp` directly instead. (#31130, #31916)
- As a safety check, Bitcoin core will **fail to start** when `-blockreservedweight` init parameter value is lower than `2000` weight units. Bitcoin Core will also **fail to start** if the `-blockmaxweight` or `-blockreservedweight` init parameter exceeds consensus limit of `4,000,000 WU`.
- Passing `-debug=0` or `-debug=none` now behaves like `-nodebug`: previously set debug categories will be cleared, but subsequent `-debug` options will still be applied.
- The default for `-rpcthreads` has been changed from 4 to 16, and the default for `-rpcworkqueue` has been changed from 16 to 64. (#31215).
### Build System
The build system has been migrated from Autotools to CMake:
1. The minimum required CMake version is 3.22.
2. In-source builds are not allowed. When using a subdirectory within the root source tree as a build directory, it is recommended that its name includes the substring "build".
3. CMake variables may be used to configure the build system. See [Autotools to CMake Options Mapping](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Autotools-to-CMake-Options-Mapping) for details.
4. For single-configuration generators, the default build configuration (`CMAKE_BUILD_TYPE`) is "RelWithDebInfo". However, for the "Release" configuration, CMake defaults to the compiler optimization flag `-O3`, which has not been extensively tested with Bitcoin Core. Therefore, the build system replaces it with `-O2`.
5. By default, the built executables and libraries are located in the `bin/` and `lib/` subdirectories of the build directory.
6. The build system supports componentbased installation. The names of the installable components coincide with the build target names. For example:
```
cmake -B build
cmake --build build --target bitcoind
cmake --install build --component bitcoind
```
7. If any of the `CPPFLAGS`, `CFLAGS`, `CXXFLAGS` or `LDFLAGS` environment variables were used in your Autotools-based build process, you should instead use the corresponding CMake variables (`APPEND_CPPFLAGS`, `APPEND_CFLAGS`, `APPEND_CXXFLAGS` and `APPEND_LDFLAGS`). Alternatively, if you opt to use the dedicated `CMAKE_<...>_FLAGS` variables, you must ensure that the resulting compiler or linker invocations are as expected.
For more detailed guidance on configuring and using CMake, please refer to the official [CMake documentation](https://cmake.org/cmake/help/latest/) and [CMakes User Interaction Guide](https://cmake.org/cmake/help/latest/guide/user-interaction/index.html). Additionally, consult platform-specific `doc/build-*.md` build guides for instructions tailored to your operating system.
## Low-Level Changes
### Tools and Utilities
- A new tool [`utxo_to_sqlite.py`](/contrib/utxo-tools/utxo_to_sqlite.py)
converts a compact-serialized UTXO snapshot (as created with the
`dumptxoutset` RPC) to a SQLite3 database. Refer to the script's `--help`
output for more details. (#27432)
### Tests
- The BIP94 timewarp attack mitigation (designed for testnet4) is no longer active on the regtest network. (#31156)
### Dependencies
- MiniUPnPc and libnatpmp have been removed as dependencies (#31130, #30043).
Credits
=======
Thanks to everyone who directly contributed to this release:
- 0xb10c
- Adlai Chandrasekhar
- Afanti
- Alfonso Roman Zubeldia
- am-sq
- Andre
- Andre Alves
- Anthony Towns
- Antoine Poinsot
- Ash Manning
- Ava Chow
- Boris Nagaev
- Brandon Odiwuor
- brunoerg
- Chris Stewart
- Cory Fields
- costcould
- Daniel Pfeifer
- Daniela Brozzoni
- David Gumberg
- dergoegge
- epysqyli
- espi3
- Eval EXEC
- Fabian Jahr
- fanquake
- furszy
- Gabriele Bocchi
- glozow
- Greg Sanders
- Gutflo
- Hennadii Stepanov
- Hodlinator
- i-am-yuvi
- ion-
- ismaelsadeeq
- Jadi
- James O'Beirne
- Jeremy Rand
- Jon Atack
- jurraca
- Kay
- kevkevinpal
- l0rinc
- laanwj
- Larry Ruane
- Lőrinc
- Maciej S. Szmigiero
- Mackain
- MarcoFalke
- marcofleon
- Marnix
- Martin Leitner-Ankerl
- Martin Saposnic
- Martin Zumsande
- Matthew Zipkin
- Max Edwards
- Michael Dietz
- naiyoma
- Nicola Leonardo Susca
- omahs
- pablomartin4btc
- Pieter Wuille
- Randall Naar
- RiceChuan
- rkrux
- Roman Zeyde
- Ryan Ofsky
- Sebastian Falbesoner
- secp512k2
- Sergi Delgado Segura
- Simon
- Sjors Provoost
- stickies-v
- Suhas Daftuar
- tdb3
- TheCharlatan
- tianzedavid
- Torkel Rogstad
- Vasil Dimov
- wgyt
- willcl-ark
- yancy
As well as to everyone that helped with translations on
[Transifex](https://www.transifex.com/bitcoin/bitcoin/).

View File

@@ -12,6 +12,82 @@
### Options
# Execute command when an alert is raised (%s in cmd is replaced by
# message)
#alertnotify=<cmd>
# For backwards compatibility, treat an unused bitcoin.conf file in the
# datadir as a warning, not an error.
#allowignoredconf=1
# If this block is in the chain assume that it and its ancestors are valid
# and potentially skip their script verification (0 to verify all,
# default:
# 00000000000000000001b658dd1120e82e66d2790811f89ede9742ada3ed6d77,
# testnet3:
# 00000000000003fc7967410ba2d0a8a8d50daedc318d43e8baf1a9782c236a57,
# testnet4:
# 0000000000003ed4f08dbdf6f7d6b271a6bcffce25675cb40aa9fa43179a89f3,
# signet:
# 000000895a110f46e59eb82bbc5bfb67fa314656009c295509c21b4999f5180a)
#assumevalid=<hex>
# Maintain an index of compact filters by block (default: 0, values:
# basic). If <type> is not supplied or if <type> = 1, indexes for
# all known types are enabled.
#blockfilterindex=<type>
# Execute command when the best block changes (%s in cmd is replaced by
# block hash)
#blocknotify=<cmd>
# Extra transactions to keep in memory for compact block reconstructions
# (default: 100)
#blockreconstructionextratxn=<n>
# Specify directory to hold blocks subdirectory for *.dat files (default:
# <datadir>)
#blocksdir=<dir>
# Whether to reject transactions from network peers. Disables automatic
# broadcast and rebroadcast of transactions, unless the source peer
# has the 'forcerelay' permission. RPC transactions are not
# affected. (default: 0)
#blocksonly=1
# Whether an XOR-key applies to blocksdir *.dat files. The created XOR-key
# will be zeros for an existing blocksdir or when `-blocksxor=0` is
# set, and random for a freshly initialized blocksdir. (default: 1)
#blocksxor=1
# Maintain coinstats index used by the gettxoutsetinfo RPC (default: 0)
#coinstatsindex=1
# Specify path to read-only configuration file. Relative paths will be
# prefixed by datadir location (only useable from command line, not
# configuration file) (default: bitcoin.conf)
#conf=<file>
# Run in the background as a daemon and accept commands (default: 0)
#daemon=1
# Wait for initialization to be finished before exiting. This implies
# -daemon (default: 0)
#daemonwait=1
# Specify data directory
#datadir=<dir>
# Maximum database cache size <n> MiB (minimum 4, default: 450). Make sure
# you have enough RAM. In addition, unused memory allocated to the
# mempool is shared with this cache (see -maxmempool).
#dbcache=<n>
# Specify location of debug log file (default: debug.log). Relative paths
# will be prefixed by a net-specific datadir location. Pass
# -nodebuglogfile to disable writing the log to a file.
#debuglogfile=<file>
# Specify additional configuration file, relative to the -datadir path
# (only useable from configuration file, not command line)
#includeconf=<file>
@@ -428,9 +504,6 @@
# takes priority over "-debug"
#debugexclude=<category>
# Print help message with debugging options and exit
#help-debug=1
# Include IP addresses in debug output (default: 0)
#logips=1

View File

@@ -120,5 +120,5 @@ sudo apt-get install qtcreator
- Under `Debuggers`: select `"GDB"` as debugger
8. While in the `Projects` tab, ensure that you have the `bitcoin-qt` executable specified under `Run`
- If the executable is not specified: click `"Choose..."`, navigate to `src/qt`, and select `bitcoin-qt`
- If the executable is not specified: click `"Choose..."`, navigate to `build/bin`, and select `bitcoin-qt`
9. You're all set! Start developing, building, and debugging the Bitcoin Core GUI

View File

@@ -268,9 +268,9 @@ public:
//
// This also requires overriding the default minimal Qt platform:
//
// QT_QPA_PLATFORM=xcb src/qt/test/test_bitcoin-qt # Linux
// QT_QPA_PLATFORM=windows src/qt/test/test_bitcoin-qt # Windows
// QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt # macOS
// QT_QPA_PLATFORM=xcb build/bin/test_bitcoin-qt # Linux
// QT_QPA_PLATFORM=windows build/bin/test_bitcoin-qt # Windows
// QT_QPA_PLATFORM=cocoa build/bin/test_bitcoin-qt # macOS
void TestGUI(interfaces::Node& node, const std::shared_ptr<CWallet>& wallet)
{
// Create widgets for sending coins and listing transactions.

View File

@@ -6,6 +6,7 @@
#include <base58.h>
#include <psbt.h>
#include <span.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <util/strencodings.h>
#include <util/string.h>
@@ -19,42 +20,40 @@ using util::TrimStringView;
FUZZ_TARGET(base58_encode_decode)
{
FuzzedDataProvider provider(buffer.data(), buffer.size());
const std::string random_string{provider.ConsumeRandomLengthString(1000)};
const int max_ret_len{provider.ConsumeIntegralInRange<int>(-1, 1000)};
FuzzedDataProvider provider{buffer.data(), buffer.size()};
const auto random_string{provider.ConsumeRandomLengthString(100)};
// Decode/Encode roundtrip
std::vector<unsigned char> decoded;
if (DecodeBase58(random_string, decoded, max_ret_len)) {
const auto encoded{EncodeBase58(MakeUCharSpan(random_string))};
const auto decode_input{provider.ConsumeBool() ? random_string : encoded};
const int max_ret_len{provider.ConsumeIntegralInRange<int>(-1, decode_input.size() + 1)};
if (std::vector<unsigned char> decoded; DecodeBase58(decode_input, decoded, max_ret_len)) {
const auto encoded_string{EncodeBase58(decoded)};
assert(encoded_string == TrimStringView(random_string));
assert(encoded_string.empty() || !DecodeBase58(encoded_string, decoded, provider.ConsumeIntegralInRange<int>(0, decoded.size() - 1)));
assert(encoded_string == TrimStringView(decode_input));
if (decoded.size() > 0) {
assert(max_ret_len > 0);
assert(decoded.size() <= static_cast<size_t>(max_ret_len));
assert(!DecodeBase58(encoded_string, decoded, provider.ConsumeIntegralInRange<int>(0, decoded.size() - 1)));
}
}
// Encode/Decode roundtrip
const auto encoded{EncodeBase58(buffer)};
std::vector<unsigned char> roundtrip_decoded;
assert(DecodeBase58(encoded, roundtrip_decoded, buffer.size())
&& std::ranges::equal(roundtrip_decoded, buffer));
}
FUZZ_TARGET(base58check_encode_decode)
{
FuzzedDataProvider provider(buffer.data(), buffer.size());
const std::string random_string{provider.ConsumeRandomLengthString(1000)};
const int max_ret_len{provider.ConsumeIntegralInRange<int>(-1, 1000)};
FuzzedDataProvider provider{buffer.data(), buffer.size()};
const auto random_string{provider.ConsumeRandomLengthString(100)};
// Decode/Encode roundtrip
std::vector<unsigned char> decoded;
if (DecodeBase58Check(random_string, decoded, max_ret_len)) {
const auto encoded{EncodeBase58Check(MakeUCharSpan(random_string))};
const auto decode_input{provider.ConsumeBool() ? random_string : encoded};
const int max_ret_len{provider.ConsumeIntegralInRange<int>(-1, decode_input.size() + 1)};
if (std::vector<unsigned char> decoded; DecodeBase58Check(decode_input, decoded, max_ret_len)) {
const auto encoded_string{EncodeBase58Check(decoded)};
assert(encoded_string == TrimStringView(random_string));
assert(encoded_string.empty() || !DecodeBase58Check(encoded_string, decoded, provider.ConsumeIntegralInRange<int>(0, decoded.size() - 1)));
assert(encoded_string == TrimStringView(decode_input));
if (decoded.size() > 0) {
assert(max_ret_len > 0);
assert(decoded.size() <= static_cast<size_t>(max_ret_len));
assert(!DecodeBase58Check(encoded_string, decoded, provider.ConsumeIntegralInRange<int>(0, decoded.size() - 1)));
}
}
// Encode/Decode roundtrip
const auto encoded{EncodeBase58Check(buffer)};
std::vector<unsigned char> roundtrip_decoded;
assert(DecodeBase58Check(encoded, roundtrip_decoded, buffer.size())
&& std::ranges::equal(roundtrip_decoded, buffer));
}
FUZZ_TARGET(base32_encode_decode)
@@ -93,5 +92,6 @@ FUZZ_TARGET(psbt_base64_decode)
PartiallySignedTransaction psbt;
std::string error;
assert(DecodeBase64PSBT(psbt, random_string, error) == error.empty());
const bool ok{DecodeBase64PSBT(psbt, random_string, error)};
assert(ok == error.empty());
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2020-2022 The Bitcoin Core developers
// Copyright (c) 2020-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.
@@ -108,7 +108,7 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
// Add a bunch of parent-child pairs to the mempool, and remember them.
std::vector<CTransaction> mempool_txs;
size_t iter{0};
uint32_t iter{0};
// Keep track of the total vsize of CTxMemPoolEntry's being added to the mempool to avoid overflow
// Add replacement_vsize since this is added to new diagram during RBF check
@@ -116,9 +116,8 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
if (!replacement_tx) {
return;
}
assert(iter <= g_outpoints.size());
replacement_tx->vin.resize(1);
replacement_tx->vin[0].prevout = g_outpoints[iter++];
replacement_tx->vin[0].prevout = g_outpoints.at(iter++);
CTransaction replacement_tx_final{*replacement_tx};
auto replacement_entry = ConsumeTxMemPoolEntry(fuzzed_data_provider, replacement_tx_final);
int32_t replacement_vsize = replacement_entry.GetTxSize();
@@ -126,13 +125,13 @@ FUZZ_TARGET(package_rbf, .init = initialize_package_rbf)
LOCK2(cs_main, pool.cs);
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), NUM_ITERS)
{
while (fuzzed_data_provider.ConsumeBool()) {
if (iter >= NUM_ITERS) break;
// Make sure txns only have one input, and that a unique input is given to avoid circular references
CMutableTransaction parent;
assert(iter <= g_outpoints.size());
parent.vin.resize(1);
parent.vin[0].prevout = g_outpoints[iter++];
parent.vin[0].prevout = g_outpoints.at(iter++);
parent.vout.emplace_back(0, CScript());
mempool_txs.emplace_back(parent);

View File

@@ -24,6 +24,9 @@ class ConfArgsTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
# Prune to prevent disk space warning on CI systems with limited space,
# when using networks other than regtest.
self.extra_args = [["-prune=550"]]
self.supports_cli = False
self.wallet_names = []
self.disable_autoconnect = False
@@ -471,32 +474,21 @@ class ConfArgsTest(BitcoinTestFramework):
self.log.info("Test testnet3 deprecation warning")
t3_warning_log = "Warning: Support for testnet3 is deprecated and will be removed in an upcoming release. Consider switching to testnet4."
def warning_msg(node, approx_size):
return f'Warning: Disk space for "{node.datadir_path / node.chain / "blocks" }" may not accommodate the block files. Approximately {approx_size} GB of data will be stored in this directory.'
# Testnet3 node will log the warning
self.log.debug("Testnet3 node will log the deprecation warning")
self.nodes[0].chain = 'testnet3'
self.nodes[0].replace_in_config([('regtest=', 'testnet='), ('[regtest]', '[test]')])
with self.nodes[0].assert_debug_log([t3_warning_log]):
self.start_node(0)
# Some CI environments will have limited space and some others won't
# so we need to handle both cases as a valid result.
self.nodes[0].stderr.seek(0)
err = self.nodes[0].stdout.read()
self.nodes[0].stderr.seek(0)
self.nodes[0].stderr.truncate()
if err != b'' and err != warning_msg(self.nodes[0], 42):
raise AssertionError("Unexpected stderr after shutdown of Testnet3 node")
self.stop_node(0)
# Testnet4 node will not log the warning
self.log.debug("Testnet4 node will not log the deprecation warning")
self.nodes[0].chain = 'testnet4'
self.nodes[0].replace_in_config([('testnet=', 'testnet4='), ('[test]', '[testnet4]')])
with self.nodes[0].assert_debug_log([], unexpected_msgs=[t3_warning_log]):
self.start_node(0)
self.stop_node(0)
# Reset to regtest
self.log.debug("Reset to regtest")
self.nodes[0].chain = 'regtest'
self.nodes[0].replace_in_config([('testnet4=', 'regtest='), ('[testnet4]', '[regtest]')])

View File

@@ -26,12 +26,14 @@ signet_blocks = [
class SignetParams:
def __init__(self, challenge=None):
# Prune to prevent disk space warning on CI systems with limited space,
# when using networks other than regtest.
if challenge is None:
self.challenge = SIGNET_DEFAULT_CHALLENGE
self.shared_args = []
self.shared_args = ["-prune=550"]
else:
self.challenge = challenge
self.shared_args = [f"-signetchallenge={challenge}"]
self.shared_args = ["-prune=550", f"-signetchallenge={challenge}"]
class SignetBasicTest(BitcoinTestFramework):
def set_test_params(self):

View File

@@ -788,6 +788,7 @@ class OrphanHandlingTest(BitcoinTestFramework):
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
peer1.peer_disconnect()
self.wait_until(lambda: node.num_test_p2p_connections() == 1)
node.bumpmocktime(TXREQUEST_TIME_SKIP)
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
# Both parents should be requested, now that they are both missing.