d987707208 rpc: Fix invalid bech32 handling (MarcoFalke)
Pull request description:
Backports https://github.com/bitcoin/bitcoin/pull/27727 to 23.x. Not a clean cherry-pick. Same commit as #27755.
ACKs for top commit:
achow101:
ACK d987707208
stickies-v:
ACK d987707208
Tree-SHA512: a471e3770474ba936114c89bf1c3f1a5a9948053bdc016b26d035ac791df8be1a02c568165b427140a5d15813a761811cd6a51438a58f35464087cbb2fef9ee1
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
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
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
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
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
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
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
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
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
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
8a16391c91 doc: update release notes for 23.1 (fanquake)
58478261de doc: update manual pages for 23.1 (fanquake)
93713654ef build: bump version to 23.1 final (fanquake)
Pull request description:
Bump version to v23.1.
Regenerate manpages.
Finalize release notes.
ACKs for top commit:
hebasto:
ACK 8a16391c91, I have reviewed the changes and they look OK.
Tree-SHA512: d9100f5507f6e8d7b5a1192c981dbc6d97283def895e9181f738321fe9521c398e73686ddc48e27d1c863da19d75339069771f980d38af479eaf56ac3fc0881b
87c2ff80e4 doc: add release notes for 23.1rc2 (fanquake)
5b2c99e24c doc: Update manual pages for 23.1rc2 (fanquake)
a02ae0745b build: Bump version to 23.1rc2 (fanquake)
a1fcd565ff doc: add 23.0 relase notes (fanquake)
Pull request description:
Bump the version to 23.1rc2.
Regenerate the man pages.
Add historical 23.0 release notes.
Add WIP 23.1 release notes.
Changes since rc1:
* https://github.com/bitcoin/bitcoin/pull/26474
* https://github.com/bitcoin/bitcoin/pull/26522
ACKs for top commit:
hebasto:
ACK 87c2ff80e4, I have reviewed the code and it looks OK, I agree it can be merged.
jarolrod:
ACK 87c2ff80e4
Tree-SHA512: f185c33bfe2bf26f9df48f8d1e95ab784fef055bc7465282e2418960d348bd8b35f8fc57808b47250f8536a9def3be2d1dbe8ae309f052a81220925c425108f1
MacOS 13 sends a window focus change notification after the main
window has been destroyed but before the QTApplication has been
destroyed. This results in the menu bar receiving a notification
despite it no longer existing. The solution is to pass the main
window as context when subscribing to the notifications. Qt
automatically unsubscribes to notifications if the sender OR
context is destroyed.
Github-Pull: bitcoin-core/gui#680
Rebased-From: 8a5014cd8a
0f4583e5c1 guix: use --build={arch}-guix-linux-gnu in cross toolchain (fanquake)
Pull request description:
This backports https://github.com/bitcoin/bitcoin/pull/25861 to the 23.x branch, which fixes Guix building for `aarch64-linux-gnu` on aarch64 hardware. Fixing Guix building for this `HOST`, for the current release branch, seems like a worthwhile change, especially given more Guix builders are using aarch64 hardware. I thought I'd already backported this; noticed while building [sigs for 23.1rc1](https://github.com/bitcoin-core/guix.sigs/pull/380), which I started doing on aarch64.
Guix Build (aarch64, no `x86_64-apple-darwin` or `arm64-apple-darwin`):
```bash
9fd4601412738e9135e2732cfc8af911c54af8a1349c2af568b4748dd1907c3d guix-build-0f4583e5c114/output/aarch64-linux-gnu/SHA256SUMS.part
36df2797cd7845ccb4f416b52f9dbd4cc7dd0242782c3143206d0c15239e8b02 guix-build-0f4583e5c114/output/aarch64-linux-gnu/bitcoin-0f4583e5c114-aarch64-linux-gnu-debug.tar.gz
6aa022173b23827ec2690823178b9d2d06108e159a9074e1a54a7d1a74b6c5db guix-build-0f4583e5c114/output/aarch64-linux-gnu/bitcoin-0f4583e5c114-aarch64-linux-gnu.tar.gz
1e98b6b5e2b58387106eb8f46367c4a42d03d6a881307ed115e7b6bfa1b2785a guix-build-0f4583e5c114/output/arm-linux-gnueabihf/SHA256SUMS.part
b9ecbfbec1ee941acb7f19fb2ba02bfa24ef5feb0e072a9a8c39263f2cdfb172 guix-build-0f4583e5c114/output/arm-linux-gnueabihf/bitcoin-0f4583e5c114-arm-linux-gnueabihf-debug.tar.gz
2834aa08f19c03e88e22009e3f860b470fe5942c42ae08041b8e79e28673154b guix-build-0f4583e5c114/output/arm-linux-gnueabihf/bitcoin-0f4583e5c114-arm-linux-gnueabihf.tar.gz
9c787047070b1fe8c2beead22093dc73481e7c921993d95fb0e4ce8739f8e515 guix-build-0f4583e5c114/output/dist-archive/bitcoin-0f4583e5c114.tar.gz
1a82b19a5d07bccdead69b5d9fe9559e01a263b458ea48ff0a701ee9adf55a3c guix-build-0f4583e5c114/output/powerpc64-linux-gnu/SHA256SUMS.part
3482de0ff01839aa98ca61b3c8a18de4773dd70e2b306f094b210a6c83839289 guix-build-0f4583e5c114/output/powerpc64-linux-gnu/bitcoin-0f4583e5c114-powerpc64-linux-gnu-debug.tar.gz
5bb8b7ab8740d6c4a49e8fe700f0305bcc7318eaffc0e3c967492f218774f371 guix-build-0f4583e5c114/output/powerpc64-linux-gnu/bitcoin-0f4583e5c114-powerpc64-linux-gnu.tar.gz
5442e495049b386b8ec5bc50c06feb401fb263e25f0807aa58e7e8c091c42be7 guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/SHA256SUMS.part
d685b1449379a3a1be139f243917d9987169cbc9901c7658a12044d27ce2762d guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/bitcoin-0f4583e5c114-powerpc64le-linux-gnu-debug.tar.gz
14edbaf4c93346460ecff72ca22285c433c7dea5f9ccaccb4b49730f95d2d264 guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/bitcoin-0f4583e5c114-powerpc64le-linux-gnu.tar.gz
dec22e0f59513c3697de3c6906deb355010af36836285ab306de1ea8e4b88ff3 guix-build-0f4583e5c114/output/riscv64-linux-gnu/SHA256SUMS.part
d70b6b6d1a2950292e820898af8a79d850b415829bbb94db97b742f3ab7cc7d3 guix-build-0f4583e5c114/output/riscv64-linux-gnu/bitcoin-0f4583e5c114-riscv64-linux-gnu-debug.tar.gz
b5fd33257a81efacc61946b544e5af1582c9729fa57641ff3625d34f0e785cfd guix-build-0f4583e5c114/output/riscv64-linux-gnu/bitcoin-0f4583e5c114-riscv64-linux-gnu.tar.gz
30b6668d9e84503d2e2113a87051d3c5baeae8ad6b3fa3df7509d447c8d5f341 guix-build-0f4583e5c114/output/x86_64-linux-gnu/SHA256SUMS.part
33a6c5072328281872678fc0d709629f934fac05bdfb2e41cccf2ddd5724925b guix-build-0f4583e5c114/output/x86_64-linux-gnu/bitcoin-0f4583e5c114-x86_64-linux-gnu-debug.tar.gz
c1c2ec074a88c6f0202ab067bd126c217573d028b3b1eb538db100eb0e316b53 guix-build-0f4583e5c114/output/x86_64-linux-gnu/bitcoin-0f4583e5c114-x86_64-linux-gnu.tar.gz
2689a7cce5d1fc6decbb5dfd1361db21adc1c485ee4c644cdebf403b1d533be6 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/SHA256SUMS.part
9d6259432febdc1be728db0088a0464fa844dc4ad20e7b752be6de312588a695 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-debug.zip
e3e7cd45b6ed6e8a589efe2436e151120af0c1146772ce295c06300289e0b758 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-setup-unsigned.exe
1da1569b0140ad917b938ce8b087d3d8990331df3042d62a36d1366d9e5f0f42 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-unsigned.tar.gz
cbd74726e5704f6007e2344422197a25b9872a3a5f525a1a0b5774c833fc7e78 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64.zip
```
ACKs for top commit:
hebasto:
ACK 0f4583e5c1, tested on `arm64`:
jarolrod:
ACK 0f4583e5c1
Tree-SHA512: 2ddb1ebaa75c26cc0bd8abd81e565a7ffa99bd9af08ad329f1141c35c784fb7cb4ccf0777096410929cb3e0bc72acaf3dbe0684bbe57b6d6a7070bff1fa51a0e