mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 08:09:19 +01:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d2f2fae97 | ||
|
|
7ae937326a | ||
|
|
6c5781e3cb | ||
|
|
5fbb86e155 | ||
|
|
2e9fc2e353 | ||
|
|
a26ff204f0 | ||
|
|
60edfd57f1 | ||
|
|
b93814b234 | ||
|
|
67bbe6d371 | ||
|
|
06731d19bc | ||
|
|
d0a2c87214 | ||
|
|
ce8f812b0a | ||
|
|
7b7636ead1 | ||
|
|
f0919339bf | ||
|
|
c14f3b3905 | ||
|
|
ec7a8839a2 | ||
|
|
0567787f5e | ||
|
|
52376d9217 | ||
|
|
af86266165 | ||
|
|
398768769f | ||
|
|
412cd1a34e | ||
|
|
fd94befbc6 | ||
|
|
dd04f2dda5 | ||
|
|
a3db8bd7ca | ||
|
|
53fd827883 | ||
|
|
6a5bb10da9 | ||
|
|
192759eb7b |
28
.cirrus.yml
28
.cirrus.yml
@@ -34,22 +34,30 @@ base_template: &BASE_TEMPLATE
|
||||
|
||||
main_template: &MAIN_TEMPLATE
|
||||
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
|
||||
ccache_cache:
|
||||
folder: "/tmp/ccache_dir"
|
||||
ci_script:
|
||||
- ./ci/test_run_all.sh
|
||||
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
container:
|
||||
# https://cirrus-ci.org/faq/#are-there-any-limits
|
||||
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
|
||||
cpu: 2
|
||||
greedy: true
|
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
|
||||
ccache_cache:
|
||||
folder: "/tmp/ccache_dir"
|
||||
depends_built_cache:
|
||||
folder: "depends/built"
|
||||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
|
||||
ci_script:
|
||||
- ./ci/test_run_all.sh
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE
|
||||
macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
check_clang_script:
|
||||
- clang --version
|
||||
brew_install_script:
|
||||
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
compute_credits_template: &CREDITS_TEMPLATE
|
||||
@@ -281,18 +289,16 @@ task:
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
|
||||
|
||||
task:
|
||||
name: 'macOS 12 native [gui, system sqlite only] [no depends]'
|
||||
brew_install_script:
|
||||
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]'
|
||||
macos_instance:
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
|
||||
image: monterey-xcode-13.2 # https://cirrus-ci.org/guide/macOS
|
||||
image: ghcr.io/cirruslabs/macos-ventura-xcode:14.1 # https://cirrus-ci.org/guide/macOS
|
||||
<< : *MACOS_NATIVE_TASK_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
CI_USE_APT_INSTALL: "no"
|
||||
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac_host.sh"
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh"
|
||||
|
||||
task:
|
||||
name: 'ARM64 Android APK [focal]'
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-apple-darwin
|
||||
export PIP_PACKAGES="zmq lief"
|
||||
export HOST=arm64-apple-darwin
|
||||
export PIP_PACKAGES="zmq"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
export CCACHE_SIZE=300M
|
||||
export RUN_SECURITY_TESTS="true"
|
||||
@@ -13,7 +13,7 @@ fi
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
sudo -H pip3 install --upgrade pip
|
||||
# shellcheck disable=SC2086
|
||||
IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
|
||||
# Create folders that are mounted into the docker
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
AC_PREREQ([2.69])
|
||||
define(_CLIENT_VERSION_MAJOR, 23)
|
||||
define(_CLIENT_VERSION_MINOR, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 2)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
|
||||
@@ -14,7 +14,7 @@ $(package)_config_opts_freebsd=--with-pic
|
||||
$(package)_config_opts_netbsd=--with-pic
|
||||
$(package)_config_opts_openbsd=--with-pic
|
||||
$(package)_config_opts_android=--with-pic
|
||||
$(package)_cflags+=-Wno-error=implicit-function-declaration
|
||||
$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int
|
||||
$(package)_cxxflags+=-std=c++17
|
||||
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
|
||||
endef
|
||||
|
||||
@@ -5,9 +5,14 @@ $(package)_file_name=$(package)-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
|
||||
$(package)_dependencies=libxcb
|
||||
|
||||
# This package explicitly enables -Werror=array-bounds, which causes build failures
|
||||
# with GCC 12.1+. Work around that by turning errors back into warnings.
|
||||
# This workaround would be dropped if the package was updated, as that would require
|
||||
# a different build system (Meson)
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
|
||||
$(package)_config_opts += --disable-static --disable-docs
|
||||
$(package)_cflags += -Wno-error=array-bounds
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package=systemtap
|
||||
$(package)_version=4.5
|
||||
$(package)_download_path=https://sourceware.org/systemtap/ftp/releases/
|
||||
$(package)_download_path=https://sourceware.org/ftp/systemtap/releases/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=75078ed37e0dd2a769c9d1f9394170b2d9f4d7daa425f43ca80c13bad6cfc925
|
||||
$(package)_patches=remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
BIPs that are implemented by Bitcoin Core (up-to-date up to **v23.1**):
|
||||
BIPs that are implemented by Bitcoin Core (up-to-date up to **v23.2**):
|
||||
|
||||
* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575))
|
||||
* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIN-CLI "1" "December 2022" "bitcoin-cli v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIN-CLI "1" "May 2023" "bitcoin-cli v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-cli \- manual page for bitcoin-cli v23.1.0
|
||||
bitcoin-cli \- manual page for bitcoin-cli v23.2.0
|
||||
.SH SYNOPSIS
|
||||
.B bitcoin-cli
|
||||
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR
|
||||
@@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v23.1.0
|
||||
.B bitcoin-cli
|
||||
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core RPC client version v23.1.0
|
||||
Bitcoin Core RPC client version v23.2.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIN-QT "1" "December 2022" "bitcoin-qt v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIN-QT "1" "May 2023" "bitcoin-qt v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-qt \- manual page for bitcoin-qt v23.1.0
|
||||
bitcoin-qt \- manual page for bitcoin-qt v23.2.0
|
||||
.SH SYNOPSIS
|
||||
.B bitcoin-qt
|
||||
[\fI\,command-line options\/\fR]
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core version v23.1.0
|
||||
Bitcoin Core version v23.2.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
@@ -115,7 +115,7 @@ Do not keep transactions in the mempool longer than <n> hours (default:
|
||||
.HP
|
||||
\fB\-par=\fR<n>
|
||||
.IP
|
||||
Set the number of script verification threads (\fB\-6\fR to 15, 0 = auto, <0 =
|
||||
Set the number of script verification threads (\fB\-10\fR to 15, 0 = auto, <0 =
|
||||
leave that many cores free, default: 0)
|
||||
.HP
|
||||
\fB\-persistmempool\fR
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIN-TX "1" "December 2022" "bitcoin-tx v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIN-TX "1" "May 2023" "bitcoin-tx v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-tx \- manual page for bitcoin-tx v23.1.0
|
||||
bitcoin-tx \- manual page for bitcoin-tx v23.2.0
|
||||
.SH SYNOPSIS
|
||||
.B bitcoin-tx
|
||||
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR
|
||||
@@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v23.1.0
|
||||
.B bitcoin-tx
|
||||
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core bitcoin\-tx utility version v23.1.0
|
||||
Bitcoin Core bitcoin\-tx utility version v23.2.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIN-UTIL "1" "December 2022" "bitcoin-util v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIN-UTIL "1" "May 2023" "bitcoin-util v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-util \- manual page for bitcoin-util v23.1.0
|
||||
bitcoin-util \- manual page for bitcoin-util v23.2.0
|
||||
.SH SYNOPSIS
|
||||
.B bitcoin-util
|
||||
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core bitcoin\-util utility version v23.1.0
|
||||
Bitcoin Core bitcoin\-util utility version v23.2.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIN-WALLET "1" "December 2022" "bitcoin-wallet v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIN-WALLET "1" "May 2023" "bitcoin-wallet v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-wallet \- manual page for bitcoin-wallet v23.1.0
|
||||
bitcoin-wallet \- manual page for bitcoin-wallet v23.2.0
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core bitcoin\-wallet version v23.1.0
|
||||
Bitcoin Core bitcoin\-wallet version v23.2.0
|
||||
.PP
|
||||
bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files.
|
||||
By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH BITCOIND "1" "December 2022" "bitcoind v23.1.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||
.TH BITCOIND "1" "May 2023" "bitcoind v23.2.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoind \- manual page for bitcoind v23.1.0
|
||||
bitcoind \- manual page for bitcoind v23.2.0
|
||||
.SH SYNOPSIS
|
||||
.B bitcoind
|
||||
[\fI\,options\/\fR] \fI\,Start Bitcoin Core\/\fR
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core version v23.1.0
|
||||
Bitcoin Core version v23.2.0
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
@@ -115,7 +115,7 @@ Do not keep transactions in the mempool longer than <n> hours (default:
|
||||
.HP
|
||||
\fB\-par=\fR<n>
|
||||
.IP
|
||||
Set the number of script verification threads (\fB\-6\fR to 15, 0 = auto, <0 =
|
||||
Set the number of script verification threads (\fB\-10\fR to 15, 0 = auto, <0 =
|
||||
leave that many cores free, default: 0)
|
||||
.HP
|
||||
\fB\-persistmempool\fR
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
23.1 Release Notes
|
||||
23.2 Release Notes
|
||||
==================
|
||||
|
||||
Bitcoin Core version 23.1 is now available from:
|
||||
Bitcoin Core version 23.2 is now available from:
|
||||
|
||||
<https://bitcoincore.org/bin/bitcoin-core-23.1/>
|
||||
<https://bitcoincore.org/bin/bitcoin-core-23.2/>
|
||||
|
||||
This release includes new features, various bug fixes and performance
|
||||
This release includes various bug fixes and performance
|
||||
improvements, as well as updated translations.
|
||||
|
||||
Please report bugs using the issue tracker at GitHub:
|
||||
@@ -39,52 +39,34 @@ unsupported systems.
|
||||
|
||||
### P2P
|
||||
|
||||
- #25314 p2p: always set nTime for self-advertisements
|
||||
|
||||
### RPC and other APIs
|
||||
|
||||
- #25220 rpc: fix incorrect warning for address type p2sh-segwit in createmultisig
|
||||
- #25237 rpc: Capture UniValue by ref for rpcdoccheck
|
||||
- #25983 Prevent data race for pathHandlers
|
||||
- #26275 Fix crash on deriveaddresses when index is 2147483647 (2^31-1)
|
||||
- #26909 net: prevent peers.dat corruptions by only serializing once
|
||||
- #27608 p2p: Avoid prematurely clearing download state for other peers
|
||||
- #27610 Improve performance of p2p inv to send queues
|
||||
|
||||
### Build system
|
||||
|
||||
- #25201 windeploy: Renewed windows code signing certificate
|
||||
- #25788 guix: patch NSIS to remove .reloc sections from installer stubs
|
||||
- #25861 guix: use --build={arch}-guix-linux-gnu in cross toolchain
|
||||
- #25985 Revert "build: Use Homebrew's sqlite package if it is available"
|
||||
|
||||
### GUI
|
||||
|
||||
- #24668 build, qt: bump Qt5 version to 5.15.3
|
||||
- gui#631 Disallow encryption of watchonly wallets
|
||||
- gui#680 Fixes MacOS 13 segfault by preventing certain notifications
|
||||
|
||||
### Tests
|
||||
|
||||
- #24454 tests: Fix calculation of external input weights
|
||||
- #25436 build: suppress array-bounds errors in libxkbcommon
|
||||
- #25763 bdb: disable Werror for format-security
|
||||
- #26944 depends: fix systemtap download URL
|
||||
- #27462 depends: fix compiling bdb with clang-16 on aarch64
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- #26321 Adjust .tx/config for new Transifex CLI
|
||||
- #25444 ci: macOS task imrovements
|
||||
- #26388 ci: Use macos-ventura-xcode:14.1 image for "macOS native" task
|
||||
- #26924 refactor: Add missing includes to fix gcc-13 compile error
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Thanks to everyone who directly contributed to this release:
|
||||
|
||||
- Andrew Chow
|
||||
- brunoerg
|
||||
- Anthony Towns
|
||||
- Hennadii Stepanov
|
||||
- John Moffett
|
||||
- MacroFake
|
||||
- Martin Zumsande
|
||||
- Michael Ford
|
||||
- muxator
|
||||
- Pavol Rusnak
|
||||
- Sebastian Falbesoner
|
||||
- W. J. van der Laan
|
||||
- Suhas Daftuar
|
||||
|
||||
As well as to everyone that helped with translations on
|
||||
[Transifex](https://www.transifex.com/bitcoin/bitcoin/).
|
||||
|
||||
90
doc/release-notes/release-notes-23.1.md
Normal file
90
doc/release-notes/release-notes-23.1.md
Normal file
@@ -0,0 +1,90 @@
|
||||
23.1 Release Notes
|
||||
==================
|
||||
|
||||
Bitcoin Core version 23.1 is now available from:
|
||||
|
||||
<https://bitcoincore.org/bin/bitcoin-core-23.1/>
|
||||
|
||||
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 extensively tested on operating systems
|
||||
using the Linux kernel, macOS 10.15+, and Windows 7 and newer. 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.
|
||||
|
||||
### P2P
|
||||
|
||||
- #25314 p2p: always set nTime for self-advertisements
|
||||
|
||||
### RPC and other APIs
|
||||
|
||||
- #25220 rpc: fix incorrect warning for address type p2sh-segwit in createmultisig
|
||||
- #25237 rpc: Capture UniValue by ref for rpcdoccheck
|
||||
- #25983 Prevent data race for pathHandlers
|
||||
- #26275 Fix crash on deriveaddresses when index is 2147483647 (2^31-1)
|
||||
|
||||
### Build system
|
||||
|
||||
- #25201 windeploy: Renewed windows code signing certificate
|
||||
- #25788 guix: patch NSIS to remove .reloc sections from installer stubs
|
||||
- #25861 guix: use --build={arch}-guix-linux-gnu in cross toolchain
|
||||
- #25985 Revert "build: Use Homebrew's sqlite package if it is available"
|
||||
|
||||
### GUI
|
||||
|
||||
- #24668 build, qt: bump Qt5 version to 5.15.3
|
||||
- gui#631 Disallow encryption of watchonly wallets
|
||||
- gui#680 Fixes MacOS 13 segfault by preventing certain notifications
|
||||
|
||||
### Tests
|
||||
|
||||
- #24454 tests: Fix calculation of external input weights
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
- #26321 Adjust .tx/config for new Transifex CLI
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Thanks to everyone who directly contributed to this release:
|
||||
|
||||
- Andrew Chow
|
||||
- brunoerg
|
||||
- Hennadii Stepanov
|
||||
- John Moffett
|
||||
- MacroFake
|
||||
- Martin Zumsande
|
||||
- Michael Ford
|
||||
- muxator
|
||||
- Pavol Rusnak
|
||||
- Sebastian Falbesoner
|
||||
- W. J. van der Laan
|
||||
|
||||
As well as to everyone that helped with translations on
|
||||
[Transifex](https://www.transifex.com/bitcoin/bitcoin/).
|
||||
@@ -33,10 +33,9 @@ bool SerializeDB(Stream& stream, const Data& data)
|
||||
{
|
||||
// Write and commit header, data
|
||||
try {
|
||||
CHashWriter hasher(stream.GetType(), stream.GetVersion());
|
||||
stream << Params().MessageStart() << data;
|
||||
hasher << Params().MessageStart() << data;
|
||||
stream << hasher.GetHash();
|
||||
HashedSourceWriter hashwriter{stream};
|
||||
hashwriter << Params().MessageStart() << data;
|
||||
stream << hashwriter.GetHash();
|
||||
} catch (const std::exception& e) {
|
||||
return error("%s: Serialize or I/O error - %s", __func__, e.what());
|
||||
}
|
||||
|
||||
@@ -1171,8 +1171,7 @@ void AddrMan::Unserialize(Stream& s_)
|
||||
}
|
||||
|
||||
// explicit instantiation
|
||||
template void AddrMan::Serialize(CHashWriter& s) const;
|
||||
template void AddrMan::Serialize(CAutoFile& s) const;
|
||||
template void AddrMan::Serialize(HashedSourceWriter<CAutoFile>& s) const;
|
||||
template void AddrMan::Serialize(CDataStream& s) const;
|
||||
template void AddrMan::Unserialize(CAutoFile& s);
|
||||
template void AddrMan::Unserialize(CHashVerifier<CAutoFile>& s);
|
||||
|
||||
24
src/hash.h
24
src/hash.h
@@ -188,6 +188,30 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** Writes data to an underlying source stream, while hashing the written data. */
|
||||
template <typename Source>
|
||||
class HashedSourceWriter : public CHashWriter
|
||||
{
|
||||
private:
|
||||
Source& m_source;
|
||||
|
||||
public:
|
||||
explicit HashedSourceWriter(Source& source LIFETIMEBOUND) : CHashWriter{source.GetType(), source.GetVersion()}, m_source{source} {}
|
||||
|
||||
void write(Span<const std::byte> src)
|
||||
{
|
||||
m_source.write(src);
|
||||
CHashWriter::write(src);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
HashedSourceWriter& operator<<(const T& obj)
|
||||
{
|
||||
::Serialize(*this, obj);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/** Compute the 256-bit hash of an object's serialization. */
|
||||
template<typename T>
|
||||
uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
|
||||
|
||||
@@ -541,8 +541,11 @@ private:
|
||||
/** Remove this block from our tracked requested blocks. Called if:
|
||||
* - the block has been received from a peer
|
||||
* - the request for the block has timed out
|
||||
* If "from_peer" is specified, then only remove the block if it is in
|
||||
* flight from that peer (to avoid one peer's network traffic from
|
||||
* affecting another's state).
|
||||
*/
|
||||
void RemoveBlockRequest(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
void RemoveBlockRequest(const uint256& hash, std::optional<NodeId> from_peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
/* Mark a block as in flight
|
||||
* Returns false, still setting pit, if the block was already in flight from the same peer
|
||||
@@ -853,7 +856,7 @@ bool PeerManagerImpl::IsBlockRequested(const uint256& hash)
|
||||
return mapBlocksInFlight.find(hash) != mapBlocksInFlight.end();
|
||||
}
|
||||
|
||||
void PeerManagerImpl::RemoveBlockRequest(const uint256& hash)
|
||||
void PeerManagerImpl::RemoveBlockRequest(const uint256& hash, std::optional<NodeId> from_peer)
|
||||
{
|
||||
auto it = mapBlocksInFlight.find(hash);
|
||||
if (it == mapBlocksInFlight.end()) {
|
||||
@@ -862,6 +865,12 @@ void PeerManagerImpl::RemoveBlockRequest(const uint256& hash)
|
||||
}
|
||||
|
||||
auto [node_id, list_it] = it->second;
|
||||
|
||||
if (from_peer && node_id != *from_peer) {
|
||||
// Block was requested by another peer
|
||||
return;
|
||||
}
|
||||
|
||||
CNodeState *state = State(node_id);
|
||||
assert(state != nullptr);
|
||||
|
||||
@@ -897,7 +906,7 @@ bool PeerManagerImpl::BlockRequested(NodeId nodeid, const CBlockIndex& block, st
|
||||
}
|
||||
|
||||
// Make sure it's not listed somewhere already.
|
||||
RemoveBlockRequest(hash);
|
||||
RemoveBlockRequest(hash, std::nullopt);
|
||||
|
||||
std::list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(),
|
||||
{&block, std::unique_ptr<PartiallyDownloadedBlock>(pit ? new PartiallyDownloadedBlock(&m_mempool) : nullptr)});
|
||||
@@ -2545,6 +2554,11 @@ void PeerManagerImpl::ProcessBlock(CNode& node, const std::shared_ptr<const CBlo
|
||||
m_chainman.ProcessNewBlock(m_chainparams, block, force_processing, &new_block);
|
||||
if (new_block) {
|
||||
node.m_last_block_time = GetTime<std::chrono::seconds>();
|
||||
// In case this block came from a different peer than we requested
|
||||
// from, we can erase the block request now anyway (as we just stored
|
||||
// this block to disk).
|
||||
LOCK(cs_main);
|
||||
RemoveBlockRequest(block->GetHash(), std::nullopt);
|
||||
} else {
|
||||
LOCK(cs_main);
|
||||
mapBlockSource.erase(block->GetHash());
|
||||
@@ -3604,7 +3618,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
PartiallyDownloadedBlock& partialBlock = *(*queuedBlockIt)->partialBlock;
|
||||
ReadStatus status = partialBlock.InitData(cmpctblock, vExtraTxnForCompact);
|
||||
if (status == READ_STATUS_INVALID) {
|
||||
RemoveBlockRequest(pindex->GetBlockHash()); // Reset in-flight state in case Misbehaving does not result in a disconnect
|
||||
RemoveBlockRequest(pindex->GetBlockHash(), pfrom.GetId()); // Reset in-flight state in case Misbehaving does not result in a disconnect
|
||||
Misbehaving(pfrom.GetId(), 100, "invalid compact block");
|
||||
return;
|
||||
} else if (status == READ_STATUS_FAILED) {
|
||||
@@ -3699,7 +3713,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// process from some other peer. We do this after calling
|
||||
// ProcessNewBlock so that a malleated cmpctblock announcement
|
||||
// can't be used to interfere with block relay.
|
||||
RemoveBlockRequest(pblock->GetHash());
|
||||
RemoveBlockRequest(pblock->GetHash(), std::nullopt);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -3731,7 +3745,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
PartiallyDownloadedBlock& partialBlock = *it->second.second->partialBlock;
|
||||
ReadStatus status = partialBlock.FillBlock(*pblock, resp.txn);
|
||||
if (status == READ_STATUS_INVALID) {
|
||||
RemoveBlockRequest(resp.blockhash); // Reset in-flight state in case Misbehaving does not result in a disconnect
|
||||
RemoveBlockRequest(resp.blockhash, pfrom.GetId()); // Reset in-flight state in case Misbehaving does not result in a disconnect
|
||||
Misbehaving(pfrom.GetId(), 100, "invalid compact block/non-matching block transactions");
|
||||
return;
|
||||
} else if (status == READ_STATUS_FAILED) {
|
||||
@@ -3757,7 +3771,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// though the block was successfully read, and rely on the
|
||||
// handling in ProcessNewBlock to ensure the block index is
|
||||
// updated, etc.
|
||||
RemoveBlockRequest(resp.blockhash); // it is now an empty pointer
|
||||
RemoveBlockRequest(resp.blockhash, pfrom.GetId()); // it is now an empty pointer
|
||||
fBlockRead = true;
|
||||
// mapBlockSource is used for potentially punishing peers and
|
||||
// updating which peers send us compact blocks, so the race
|
||||
@@ -3825,7 +3839,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// Always process the block if we requested it, since we may
|
||||
// need it even when it's not a candidate for a new best tip.
|
||||
forceProcessing = IsBlockRequested(hash);
|
||||
RemoveBlockRequest(hash);
|
||||
RemoveBlockRequest(hash, pfrom.GetId());
|
||||
// mapBlockSource is only used for punishing peers and setting
|
||||
// which peers send us compact blocks, so the race between here and
|
||||
// cs_main in ProcessNewBlock is fine.
|
||||
@@ -4876,7 +4890,9 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
||||
// especially since we have many peers and some will draw much shorter delays.
|
||||
unsigned int nRelayedTransactions = 0;
|
||||
LOCK(pto->m_tx_relay->cs_filter);
|
||||
while (!vInvTx.empty() && nRelayedTransactions < INVENTORY_BROADCAST_MAX) {
|
||||
size_t broadcast_max{INVENTORY_BROADCAST_MAX + (pto->m_tx_relay->setInventoryTxToSend.size()/1000)*5};
|
||||
broadcast_max = std::min<size_t>(1000, broadcast_max);
|
||||
while (!vInvTx.empty() && nRelayedTransactions < broadcast_max) {
|
||||
// Fetch the top element from the heap
|
||||
std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
|
||||
std::set<uint256>::iterator it = vInvTx.back();
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
#ifdef ARENA_DEBUG
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#ifndef BITCOIN_SUPPORT_LOCKEDPOOL_H
|
||||
#define BITCOIN_SUPPORT_LOCKEDPOOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
|
||||
/**
|
||||
|
||||
@@ -441,4 +441,18 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file_rand)
|
||||
fs::remove(streams_test_filename);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(streams_hashed)
|
||||
{
|
||||
CDataStream stream(SER_NETWORK, INIT_PROTO_VERSION);
|
||||
HashedSourceWriter hash_writer{stream};
|
||||
const std::string data{"bitcoin"};
|
||||
hash_writer << data;
|
||||
|
||||
CHashVerifier hash_verifier{&stream};
|
||||
std::string result;
|
||||
hash_verifier >> result;
|
||||
BOOST_CHECK_EQUAL(data, result);
|
||||
BOOST_CHECK_EQUAL(hash_writer.GetHash(), hash_verifier.GetHash());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
@@ -831,11 +831,16 @@ void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendhei
|
||||
|
||||
bool CTxMemPool::CompareDepthAndScore(const uint256& hasha, const uint256& hashb, bool wtxid)
|
||||
{
|
||||
/* Return `true` if hasha should be considered sooner than hashb. Namely when:
|
||||
* a is not in the mempool, but b is
|
||||
* both are in the mempool and a has fewer ancestors than b
|
||||
* both are in the mempool and a has a higher score than b
|
||||
*/
|
||||
LOCK(cs);
|
||||
indexed_transaction_set::const_iterator i = wtxid ? get_iter_from_wtxid(hasha) : mapTx.find(hasha);
|
||||
if (i == mapTx.end()) return false;
|
||||
indexed_transaction_set::const_iterator j = wtxid ? get_iter_from_wtxid(hashb) : mapTx.find(hashb);
|
||||
if (j == mapTx.end()) return true;
|
||||
if (j == mapTx.end()) return false;
|
||||
indexed_transaction_set::const_iterator i = wtxid ? get_iter_from_wtxid(hasha) : mapTx.find(hasha);
|
||||
if (i == mapTx.end()) return true;
|
||||
uint64_t counta = i->GetCountWithAncestors();
|
||||
uint64_t countb = j->GetCountWithAncestors();
|
||||
if (counta == countb) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define BITCOIN_UTIL_BIP32_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <locale>
|
||||
#include <sstream>
|
||||
|
||||
Reference in New Issue
Block a user