Compare commits

..

27 Commits
v23.1 ... v23.2

Author SHA1 Message Date
fanquake
4d2f2fae97 Merge bitcoin/bitcoin#27663: [23.2] Final Changes
7ae937326a doc: update release notes for 23.2 (fanquake)
6c5781e3cb doc: update manual pages for 23.2 (fanquake)
5fbb86e155 build: bump version to 23.2 final (fanquake)

Pull request description:

  Final changes for v23.2. I don't expect any futher backports, or the need to prolong the rc, as the changes here are fairly minimal.

  PR for bitcoincore.org is here: https://github.com/bitcoin-core/bitcoincore.org/pull/969

ACKs for top commit:
  josibake:
    ACK 7ae937326a
  stickies-v:
    ACK 7ae937326a

Tree-SHA512: 88e8138c17f9211a81dbdff5d8ec8869c5121f15d144022f84f4abbbb001df58713469e1ff766b60d80e2ebb4c481605282c685967d02316338345747a8cfbd4
2023-05-16 15:32:44 +01:00
fanquake
7ae937326a doc: update release notes for 23.2 2023-05-15 14:34:52 +01:00
fanquake
6c5781e3cb doc: update manual pages for 23.2 2023-05-15 14:33:19 +01:00
fanquake
5fbb86e155 build: bump version to 23.2 final 2023-05-15 14:31:06 +01:00
fanquake
2e9fc2e353 Merge bitcoin/bitcoin#27624: [23.2] Backports for rc1
a26ff204f0 doc: add initial release notes for v23.2 (fanquake)
60edfd57f1 doc: update manual pages for v23.2rc1 (fanquake)
b93814b234 doc: update version in bips.md to v23.2 (fanquake)
67bbe6d371 build: bump version to v23.2rc1 (fanquake)
06731d19bc net_processing: Boost inv trickle rate (Anthony Towns)
d0a2c87214 txmempool: have CompareDepthAndScore sort missing txs first (Anthony Towns)
ce8f812b0a p2p: Avoid prematurely clearing download state for other peers (Suhas Daftuar)

Pull request description:

  Final backports for `rc1`. Currently:
  * https://github.com/bitcoin/bitcoin/pull/27608 (not a clean cherry-pick)
  * https://github.com/bitcoin/bitcoin/pull/27610 (second commit is not clean)

ACKs for top commit:
  achow101:
    ACK a26ff204f0
  dergoegge:
    ACK a26ff204f0
  ajtowns:
    utACK a26ff204f0

Tree-SHA512: 59e43ec4d5004b3543d5c0366c9dc8c5f8a6a777b147628ebc0c03aeb0846312a7780376ebf40f389e3403e4501ba2b70bb97925479670bee13c89e5b6925137
2023-05-12 10:07:58 +01:00
fanquake
a26ff204f0 doc: add initial release notes for v23.2
Move historical 23.1 to doc/release-notes.
2023-05-11 17:41:59 +01:00
fanquake
60edfd57f1 doc: update manual pages for v23.2rc1 2023-05-11 17:29:50 +01:00
fanquake
b93814b234 doc: update version in bips.md to v23.2 2023-05-11 17:24:59 +01:00
fanquake
67bbe6d371 build: bump version to v23.2rc1 2023-05-11 17:24:26 +01:00
Anthony Towns
06731d19bc net_processing: Boost inv trickle rate
If transactions are being added to the mempool at a rate faster than 7tx/s
(INVENTORY_BROADCAST_PER_SECOND) then peers' inventory_to_send queue can
become relatively large. If this happens, increase the number of txids
we include in an INV message (normally capped at 35) by 5 for each 1000
txids in the queue.

This will tend to clear a temporary excess out reasonably quickly; an
excess of 4000 invs to send will be cleared down to 1000 in about 30
minutes, while an excess of 20000 invs would be cleared down to 1000 in
about 60 minutes.

Github-Pull: #27610
Rebased-From: 5b3406094f
2023-05-11 17:20:38 +01:00
Anthony Towns
d0a2c87214 txmempool: have CompareDepthAndScore sort missing txs first
We use CompareDepthAndScore to choose an order of txs to inv. Rather
than sorting txs that have been evicted from the mempool at the end
of the list, sort them at the beginning so they are removed from
the queue immediately.

Github-Pull: #27610
Rebased-From: 228e9201ef
2023-05-11 17:12:11 +01:00
Suhas Daftuar
ce8f812b0a p2p: Avoid prematurely clearing download state for other peers
Github-Pull: #27608
Rebased-From: 52e52071e0
2023-05-11 10:21:18 +01:00
fanquake
7b7636ead1 Merge bitcoin/bitcoin#27475: [23.x] Additional backports for 23.x
f0919339bf depends: fix compiling bdb with clang-16 on aarch64 (fanquake)
c14f3b3905 bdb: disable Werror for format-security (fanquake)
ec7a8839a2 build: suppress array-bounds errors in libxkbcommon (fanquake)

Pull request description:

  Any further backports for 23.x. Currently:
  * 1bdbbbdc46 from https://github.com/bitcoin/bitcoin/pull/25436 - which fixes building QT in depends with GCC > 12.1
  * https://github.com/bitcoin/bitcoin/pull/25763/
  * https://github.com/bitcoin/bitcoin/pull/27462

ACKs for top commit:
  TheCharlatan:
    ACK f0919339bf

Tree-SHA512: 8432ae37906e347ed30e2adc99a8b51e7f44159d04244fa749c5666c3b27cdd4fa89394c41674f980c09cc6c11367c3ee9c0922a2a8bd65ea471f9fd71a108ad
2023-05-01 14:32:08 +01:00
fanquake
f0919339bf depends: fix compiling bdb with clang-16 on aarch64
Compiling bdb with clang-16 on aarch64 (hardware) currently fails:
```bash
make -C depends/ bdb CC=clang CXX=clang++
...
checking for mutexes... UNIX/fcntl
configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM.
configure: error: Unable to find a mutex implementation
```

Looking at config.log we've got:
```bash
configure:18704: checking for mutexes
configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security    -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT   -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c  -lpthread >&5
conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
main() {
^
int
conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        exit (
        ^
conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 warning and 1 error generated.
```

Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int`
warnings into errors, see:
https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes.

> The -Wimplicit-function-declaration and -Wimplicit-int warnings now
> default to an error in C99, C11, and C17. As of C2x, support for implicit
> function declarations and implicit int has been removed, and the
> warning options will have no effect. Specifying -Wimplicit-int in
> C89 mode will now issue warnings instead of being a noop.

Github-Pull: #27462
Rebased-From: f8b8458276
2023-04-18 09:45:09 +01:00
fanquake
c14f3b3905 bdb: disable Werror for format-security
This is causing build failures in some build environments, like NixOS.
I don't think we are going to patch bdb at this point, and this warning
has existed for as long as we've used bdb.

Fixes #25211.

Tested (in Docker) with:
```bash
docker run -it nixos/nix
nix-shell -p gitMinimal gcc12 libtool pkg-config curl gnumake patch autoconf automake
git clone https://github.com/bitcoin/bitcoin
make -C bitcoin/depends bdb
```

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

Github-Pull: #25763
Rebased-From: b46c6ec52e
2023-04-18 09:43:56 +01:00
fanquake
ec7a8839a2 build: suppress array-bounds errors in libxkbcommon
These occur when building with GCC 12.1.

It might be the case that these would be suppressed by updating the
package, but that would also require installing new build tools (meson),
as well as potentially more dependencies (wayland).

```bash
In function 'ExprCreateBoolean',
    inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
src/xkbcomp/ast-build.c:119:23: error: array subscript 'ExprDef[0]' is partly outside array bounds of 'unsigned char[32]' [-Werror=array-bounds]
  119 |     expr->boolean.set = set;
      |     ~~~~~~~~~~~~~~~~~~^~~~~
In function 'ExprCreate',
    inlined from 'ExprCreateBoolean' at src/xkbcomp/ast-build.c:118:5,
    inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
src/xkbcomp/ast-build.c:75:21: note: object of size 32 allocated by 'malloc'
   75 |     ExprDef *expr = malloc(size);
      |                     ^~~~~~~~~~~~
```

Github-Pull: #25436
Rebased-From: 1bdbbbdc46
2023-04-17 15:47:13 +01:00
fanquake
0567787f5e Merge bitcoin/bitcoin#26921: [23.x] Backports
52376d9217 depends: fix systemtap download URL (fanquake)
af86266165 23.x Add missing includes to fix gcc-13 compile error (fanquake)
398768769f Add missing includes to fix gcc-13 compile error (MarcoFalke)
412cd1a34e addrdb: Only call Serialize() once (Martin Zumsande)
fd94befbc6 hash: add HashedSourceWriter (Martin Zumsande)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/26909
  * https://github.com/bitcoin/bitcoin/pull/26924
  * https://github.com/bitcoin/bitcoin/pull/26944

ACKs for top commit:
  instagibbs:
    ACK 52376d9217

Tree-SHA512: fa6463d5086667107b4ce4d87545e0b3f9b7841a52761a4dc6286377f958ecc026ed6694d1cf1e91cbad686309b5d637608f3991c46a20b02421318a804ffcea
2023-02-16 16:01:41 +00:00
fanquake
52376d9217 depends: fix systemtap download URL
Github-Pull: #26944
Rebased-From: d81ca6619a
2023-01-23 10:06:32 +00:00
fanquake
af86266165 23.x Add missing includes to fix gcc-13 compile error
Additional include fixes are required to make the 23.x branch compile
using GCC 13.
2023-01-20 11:55:29 +00:00
MarcoFalke
398768769f Add missing includes to fix gcc-13 compile error
Github-Pull: #26924
Rebased-From: fadeb6b103
2023-01-20 10:29:35 +00:00
Martin Zumsande
412cd1a34e addrdb: Only call Serialize() once
The previous logic would call it once for serializing into the filestream,
and then again for serializing into the hasher. If AddrMan was changed
in between these calls by another thread, the resulting peers.dat would
be corrupt with non-matching checksum and data.
Fix this by using HashedSourceWriter, which writes the data
to the underlying stream and keeps track of the hash in one go.

Github-Pull: #26909
Rebased-From: 5eabb61b23
2023-01-19 15:13:39 +00:00
Martin Zumsande
fd94befbc6 hash: add HashedSourceWriter
This class is the counterpart to CHashVerifier, in that it
writes data to an underlying source stream,
while keeping a hash of the written data.

Github-Pull: #26909
Rebased-From: da6c7aeca3
2023-01-19 15:13:21 +00:00
MarcoFalke
dd04f2dda5 Merge bitcoin/bitcoin#26879: [23.x] ci: replace Intel macOS CI job
a3db8bd7ca ci: Use `macos-ventura-xcode:14.1` image for "macOS native" task (Hennadii Stepanov)
53fd827883 ci: Make `getopt` path architecture agnostic (Hennadii Stepanov)
6a5bb10da9 ci: Improve naming related to "macOS 12 native x86_64" task (Hennadii Stepanov)
192759eb7b ci, refactor: Add `MACOS_NATIVE_TASK_TEMPLATE` (Hennadii Stepanov)

Pull request description:

  Intel macOS jobs are no-longer available on Cirrus.

Top commit has no ACKs.

Tree-SHA512: dcd6832724ab4ed65d7b617903307e971fd9e27b40a093ec97efb211d352755d80b143985599ba530ff398e87c5bcd308e99aa248d89ffb5c3d1a02dadccd935
2023-01-16 12:07:53 +01:00
Hennadii Stepanov
a3db8bd7ca ci: Use macos-ventura-xcode:14.1 image for "macOS native" task
Github-Pull: #26388
Rebased-From: da16893474
2023-01-16 11:05:15 +00:00
Hennadii Stepanov
53fd827883 ci: Make getopt path architecture agnostic
Github-Pull: #26388
Rebased-From: 702836530f
2023-01-16 11:00:02 +00:00
Hennadii Stepanov
6a5bb10da9 ci: Improve naming related to "macOS 12 native x86_64" task
Github-Pull: #25444
Rebased-From: 0bb7a1f71d
2023-01-16 10:59:41 +00:00
Hennadii Stepanov
192759eb7b ci, refactor: Add MACOS_NATIVE_TASK_TEMPLATE
A native macOS task does not aware of Linux container settings, and it
does not use the `depends_built_cache`.

Github-Pull: #25444
Rebased-From: 8e017f3288
2023-01-13 11:12:00 +00:00
26 changed files with 244 additions and 100 deletions

View File

@@ -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]'

View File

@@ -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"

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)).

View File

@@ -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
\-?

View File

@@ -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

View File

@@ -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
\-?

View File

@@ -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
\-?

View File

@@ -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.

View File

@@ -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

View File

@@ -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/).

View 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/).

View File

@@ -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());
}

View File

@@ -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);

View File

@@ -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)

View File

@@ -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();

View File

@@ -22,6 +22,9 @@
#endif
#include <algorithm>
#include <limits>
#include <stdexcept>
#include <utility>
#ifdef ARENA_DEBUG
#include <iomanip>
#include <iostream>

View File

@@ -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>
/**

View File

@@ -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()

View File

@@ -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) {

View File

@@ -6,6 +6,7 @@
#define BITCOIN_UTIL_BIP32_H
#include <attributes.h>
#include <cstdint>
#include <string>
#include <vector>

View File

@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstring>
#include <locale>
#include <sstream>