8cc07f7fff doc: update release notes for 22.1 (fanquake)
45355ec10b doc: update manual pages for 22.1 (fanquake)
99e0ccc742 build: bump version to 22.1 final (fanquake)
Pull request description:
Bump version to v22.1.
Regenerate manpages.
Add the only change since rc2 (https://github.com/bitcoin/bitcoin/pull/26633) to the release notes. That change does not require another rc.
ACKs for top commit:
hebasto:
ACK 8cc07f7fff, I have reviewed the changes and they look OK.
Tree-SHA512: 1d75235e41ac64f80d3b209934460cec05af1f4ddcd426bf941316374de7dc7d909de2e3dffe9716559b9422262c39724ff330cdbb3774b856e4e6bb8a10248f
28fc72f781 depends: update qt 5.12 url to archive location (BlackcoinDev)
Pull request description:
QT 5.12 cannot be downloaded from https://download.qt.io/official_releases/qt/ It can be access from https://download.qt.io/archive/qt/
ACKs for top commit:
hebasto:
ACK 28fc72f781, verified a new link.
jarolrod:
ACK 28fc72f781
Tree-SHA512: 8aeb34d0e0f2fc8713306ee81a4520da4149552c068102a36aaaf2575544322b43c977797aba169b57333013219fa683e651225e087696dec2d835270d4dc9b5
d9bd628ac9 doc: add release notes for 22.1rc2 (fanquake)
6523107698 doc: Update manual pages for 22.1rc2 (fanquake)
6af7af61c9 build: Bump version to 22.1rc2 (fanquake)
Pull request description:
Bump the version to 22.1rc2.
Regenerate the man pages.
Add WIP 22.1 release notes.
Changes since rc1:
- https://github.com/bitcoin-core/gui/pull/631
- https://github.com/bitcoin-core/gui/pull/680
ACKs for top commit:
stickies-v:
ACK [d9bd628](d9bd628ac9)
jarolrod:
ACK d9bd628ac9
Tree-SHA512: 70b1723fd5f77a93763ffc153b18c5d6c11c8294828406bd5e93daf9e8aac5e62306280ef6601508b4d22e1cce5136687afc826be6d159816071549849c40f91
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
Watchonly wallets do not have any private keys to encrypt. It does not
make sense to encrypt such wallets, so disable the option to encrypt
them.
This avoids an assertion that can be hit when encrypting watchonly descriptor
wallets.
Github-Pull: bitcoin-core/gui#631
Rebased-From: 4c495413e1
3343ec5a4f doc: update version number in bips.md to v22.1 (fanquake)
54e89eed9e doc: Update manual pages for 22.1.0rc1 (fanquake)
b63309c58a build: Bump version to 22.1.0rc1 (fanquake)
Pull request description:
Bump the version to 22.1rc1
Generate the man pages.
Update the version number in bips.md.
ACKs for top commit:
MarcoFalke:
Thanks, Concept ACK 3343ec5a4f
Tree-SHA512: fcfd7df493d316789072333396d6bceb77ae471e2a9ed06266d6128aa3746ac3184dcd9e9c20aecaf5c8906f82edee39a135fad9ae5c7f4c11b686e385aa3ed2
403de22119 rpc: add non-regression test about deriveaddresses crash when index is 2147483647 (muxator)
db20d278e2 rpc: fix crash in deriveaddresses when derivation index is 2147483647 (muxator)
d174db0f3d Adjust `.tx/config` for new Transifex CLI (Hennadii Stepanov)
Pull request description:
Currently backports:
* https://github.com/bitcoin/bitcoin/pull/26275
* https://github.com/bitcoin/bitcoin/pull/26321
Will leave open to collect backports for 22.1,
ACKs for top commit:
MarcoFalke:
cherry-pick ACK 403de22119 🏔
Tree-SHA512: f9095a5cad52ecb9580fcaf173a05148dce382ac773a6116e2aed47009402bdfa6cbce62e488fe96120f7a0a81a623eb3e0e4539fa88670adb8c14cf5e334fa5
This test would cause a crash in bitcoind (see #26274) if the fix given in the
previous commit was not applied.
Github-Pull: #26275
Rebased-From: 9153ff3e27
2147483647 is the maximum positive value of a signed int32, and - currently -
the maximum value that the deriveaddresses bitcoin RPC call accepts as
derivation index due to its input validation routines.
Before this change, when the derivation index (and thus range_end) reached
std::numeric_limits<int_32_t>::max(), the "i" variable in the for cycle (which
is declared as int, and as such 32 bits in size on most platforms) would be
incremented at the end of the first iteration and then warp back to
-2147483648. This caused SIGABRT in bitcoind and a core dump.
This change assigns "i" an explicit size of 64 bits on every platform,
sidestepping the problem.
Fixes#26274.
Github-Pull: #26275
Rebased-From: addf9d6502
2c6c628ab9 Prevent data race for `pathHandlers` (Hennadii Stepanov)
Pull request description:
Backport of https://github.com/bitcoin/bitcoin/pull/25983 to the 22.x branch.
ACKs for top commit:
dergoegge:
ACK 2c6c628ab9
Tree-SHA512: 9b172f73407fdd5a79e67ed1b2b3b7c6e7989ea1de6757c839ee7040d62ebbd87d10770c6fcb39709a07d52345dc9b7b244ef2b490c9ad8a656ff8ad4d618a01
63d2ee9a50 doc: remove brew install sqlite from macOS docs (fanquake)
bf42d7de56 Revert "build: Use Homebrew's sqlite package if it is available" (fanquake)
Pull request description:
Backport of https://github.com/bitcoin/bitcoin/pull/25985 to the 22.x branch.
ACKs for top commit:
hebasto:
ACK 63d2ee9a50, I have reviewed the code and it looks OK, I agree it can be merged.
stickies-v:
re-ACK [63d2ee9](63d2ee9a50)
Tree-SHA512: 66738fc67df86db536a500fe253257976208b31773b891d6b6865b795ba4c933345febcc81773db159d3e1078810dbc8053fe63a7e9acad25b28d02dbf2687e8
This reverts ee7b84e63c from #20527.
This change was made without any rationale, maybe other than a brew
installed version might be newer, and that's "better". However when
building from source on macOS, it just results in drastically worse
perofrmance, and results in issues / confusions like #25724.
Resolves the "build from source" portion of #25724. Building from
depends is still not ideal, however I have some other changes that might
help improve things in that case.
The difference in performance can be observed using the example from
https://github.com/bitcoin/bitcoin/issues/25724#issuecomment-1213554922,
but minified to only 10 descriptors. i.e:
```bash
time src/bitcoin-cli createwallet speedy true
time src/bitcoin-cli importdescriptors '[
{"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"},
{"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"},
{"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"},
{"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"},
{"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"},
{"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"},
{"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"},
{"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"},
{"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"},
{"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"}
]'
```
Running master, when building from souce and using brew installed
sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s.
Github-Pull: #25985
Rebased-From: d216d714aa
ea3e028bcc Swap out hashlib.ripemd160 for own implementation (Pieter Wuille)
52036915fa Add pure Python RIPEMD-160 (Pieter Wuille)
Pull request description:
Needed to unbreak the tsan CI task, which runs the test on Ubuntu Jammy, which has ripemd160 removed from openssl.
ACKs for top commit:
fanquake:
ACK ea3e028bcc - backport looks correct. tsan job has [timed out](https://github.com/bitcoin/bitcoin/pull/25250/checks?check_run_id=6657882409).
Tree-SHA512: 1117567c5de8287d6c4ada5cdc5990116808da9349f5aa3633c01b7aa12ea0ae6208418c7082e46dfde584b43807dce5ade5e8850cc392e1e0d42d9897a70017
7fcac96597 rpc: Capture potentially large UniValue by ref for rpcdoccheck (Martin Zumsande)
Pull request description:
ACKs for top commit:
fanquake:
ACK 7fcac96597
Tree-SHA512: e1e321ce49f5696d1b08d4a9cf77bdc90bdeedbe776d19fe13443d898b966c046593d20758376db4edb5baf17cb925a2ff21201889af977456c18cc43094a683
344537cf04 qt: Avoid crash on startup if int specified in settings.json (Ryan Ofsky)
Pull request description:
Backport of #24498 to 22.x branch
This was already backported to the 23.x branch in #24511, but vasild discovered the issue can affect 22.x as well https://github.com/bitcoin/bitcoin/pull/15936#issuecomment-1115992866:
> While testing this, 22.x crashes if `settings.json` contains `"prune": 1234` due to #24498 which was fixed in 23.0. So, if this PR is included in 24.x and a user upgrades to 24.x and then downgrades to 22.x his 22.x would crash at startup.
It's not very important to backport this to 22.x because I can work around the issue other ways, but I do see 22.x is listed as an active branch https://github.com/bitcoin/bitcoin/branches, so if there is another 22.x release, it would be nice to have this fix and not have a wonky uncaught univalue exception waiting to be hit
ACKs for top commit:
laanwj:
ACK 344537cf04
Tree-SHA512: 479f7fb4b4b73ec85f28e97af9b21d54245b8ab4d246e50134b37f1726fe3c57cf388fe4973f8ccf1b9efa7663166d1fbeb631758b39d4490b5eab82d0c83d77
Fix GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 that happens if
settings.json contains an integer value for any of the configuration
options which GUI settings can currently clash with (-dbcache, -par,
-spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy,
-proxy, -onion, -onion, -lang, and -prune).
Fix is a one-line change in ArgsManager::GetArg.
Github-Pull: bitcoin/bitcoin#24498
Rebased-From: 5b1aae12ca
021c3d892f fs: Make compatible with boost 1.78 (Andrew Chow)
Pull request description:
Backports #24104 to the `22.x` branch to fix the build with Boost 1.78.0.
ACKs for top commit:
achow101:
ACK 021c3d892f
gruve-p:
ACK 021c3d892f
hebasto:
ACK 021c3d892f
Tree-SHA512: 439c463c36b15a8507d58c3d9c6a02f6dfb209bcc85a8ed39a9cc3fe023530f9f74cc3fd545710b0bb15b4ff6afae802471c6819db7cd851dddd537938e0eef5
It returns an incorrect result when called with a Decimal,
for which the "//" operator works differently.
Also drop unnecessary call to satoshi_round.
Github-Pull: #24239
Rebased-From: d1fab9d5d2
Because of floating point precision issues, not all of the rounding done
is always correct. To fix this, the fee calculation for
assert_fee_amount is changed to better reflect how CFeeRate::GetFee does
it.
First the feerate is converted to an int representing sat/kvb. Then this
is multiplied by the transaction size, divivided by 1000, and rounded up
to the nearest sat. The result is then converted back to BTC (divided by
1e8) and then rounded down to the nearest sat to avoid precision errors.
Github-Pull: #22949
Rebased-From: 80dc829be7
When calculating a txs absolute fee, if the fee is rounded down to the
nearest satoshi, it is possible for the coin selection algorithms to
undercalculate the fee needed. This can lead to an assertion error in
some situations. One such scenario is added to
rpc_fundrawtransaction.py.
Github-Pull: #22949
Rebased-From: ce2cc44afd
When calculating the fee for a given tx size from a fee rate, we should
always round up to the next satoshi. Otherwise, if we round down (via
truncation), the calculated fee may result in a fee with a feerate
slightly less than targeted.
This is particularly important for coin selection as a slightly lower
feerate than expected can result in a variety of issues.
Github-Pull: #22949
Rebased-From: 0fbaef9676
In the method `CWallet::LoadActiveScriptPubKeyMan`, the map
`external_spk_managers` (or `internal_spk_managers`, if parameter
`internal` is false) is accessed via std::map::operator[], which means
that a default-ctored entry is created with a null-pointer as value, if
the key doesn't exist. As soon as this value is dereferenced, a
segmentation fault occurs, e.g. in `CWallet::KeypoolCountExternalKeys`.
The bevaviour can be reproduced by the following steps (starting with empty regtest datadir):
$ ./src/bitcoind -regtest -daemon
$ ./src/bitcoin-cli -regtest -named createwallet_name=wallet descriptors=true blank=true
$ cat regtest-descriptors.txt
[
{
"desc": "tr([e4445899/49'/1'/0']tprv8ZgxMBicQKsPd8jCeBWsYLEoWxbVgzJDatJ7XkwQ6G3uF4FsHuaziHQ5JZAW4K515nj6kVVwPaNWZSMEcR7aFCwL4tQqTcaoprMKTTtm6Zg/1/*)#mr3llm7f",
"timestamp": 1634652324,
"active": true,
"internal": true,
"range": [
0,
999
],
"next": 0
}
]
$ ./src/bitcoin-cli -regtest importdescriptors "$(cat regtest-descriptors.txt)"
[
{
"success": true
}
]
$ ./src/bitcoin-cli -regtest getwalletinfo
error: timeout on transient error: Could not connect to the server 127.0.0.1:18443 (error code 1 - "EOF reached")
Bug reported by Josef Vondrlik (josef-v).
Github-Pull: #23333
Rebased-From: 6911ab95f1
But in case of no keys or a blank hd wallet the iterator would be skipped
and not set to false but true, since the loop would be not entered.
That had resulted in a wrong return and subsequent false HD and watch-only
icon display in gui when reloading a wallet after closing.
Update src/wallet/wallet.cpp
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Github-Pull: #22781
Rebased-From: 8733a8e84c