Commit Graph

39224 Commits

Author SHA1 Message Date
furszy 903b4623d3
test: add coverage for BnB-SFFO restriction
Verify the transaction creation process does not produce
a BnB solution when SFFO is enabled.
This is currently problematic because it could require a
change output. And BnB is specialized on changeless solutions.

Co-authored-by: Andrew Chow <achow101@gmail.com>
Co-authored-by: Murch <murch@murch.one>

Github-Pull: #28994
Rebased-From: 05e5ff194c
2024-01-04 16:21:36 +00:00
furszy 05d0576d3c
wallet: create tx, log resulting coin selection info
Useful for understanding what is going on internally
when the software is running. Debug issues, and provide
more accurate feedback to users.

Github-Pull: #28994
Rebased-From: 0c5755761c
2024-01-04 16:21:36 +00:00
Murch 5493ebbe74
wallet: skip BnB when SFFO is active
Co-authored-by: furszy <matiasfurszyfer@protonmail.com>

Github-Pull: #28994
Rebased-From: 5cea25ba79
2024-01-04 16:21:36 +00:00
Martin Zumsande b15e2e2cec
test: add regression test for the getrawtransaction segfault
This fails on master without the previous commit.

Github-Pull: #29003
Rebased-From: 9075a44646
2024-01-04 16:21:36 +00:00
Martin Zumsande 5097bb3389
rpc: fix getrawtransaction segfault
The crash would happen when querying a mempool transaction with verbosity=2, while pruning.

Github-Pull: #29003
Rebased-From: 494a926d05
2024-01-04 16:21:36 +00:00
MarcoFalke 81e744a9a6
ci: Use Ubuntu 24.04 Noble for asan
Github-Pull: #28992
Rebased-From: fad2392c58
2024-01-04 16:21:36 +00:00
MarcoFalke 69e53d1e47
ci: Use Ubuntu 24.04 Noble for tsan,tidy,fuzz
Github-Pull: #28992
Rebased-From: fa83b65ef8
2024-01-04 16:21:22 +00:00
fanquake d2c80b6f52
doc: Missing additions to 26.0 release notes
Github-Pull: #29023
Rebased-From: ca5937553b
2023-12-08 09:18:28 +00:00
fanquake 8dc2c753ff
doc: add historical release notes for 26.0
Github-Pull: #29023
Rebased-From: 7d4e47d184
2023-12-08 09:18:24 +00:00
fanquake 44d8b13c81
Merge bitcoin/bitcoin#28959: [26.0] Finalize or rc4
b1d350c78b doc: update release notes for 26.0 (fanquake)
b0546bc907 doc: update manual pages for 26.0 (fanquake)
9ce1766d20 build: bump version to v26.0 final (fanquake)

Pull request description:

  Final changes for 26.0. Assuming no further backports. rc3 was done in #28872.

ACKs for top commit:
  achow101:
    ACK b1d350c78b
  hebasto:
    ACK b1d350c78b, I have reviewed the code and it looks OK.

Tree-SHA512: 8b1bfa9e9d6c5ccf8305335eba503c02a76043b2752e2302da84cb574078889ddb761b9efd14ef97f68bbae154b00ac54f531e2e33eba6baf8d703aa98ef5175
2023-12-04 10:45:21 +00:00
fanquake b1d350c78b
doc: update release notes for 26.0 2023-11-28 16:13:36 +00:00
fanquake b0546bc907
doc: update manual pages for 26.0 2023-11-28 16:12:43 +00:00
fanquake 9ce1766d20
build: bump version to v26.0 final 2023-11-28 16:09:47 +00:00
fanquake e4fef4ae65
Merge bitcoin/bitcoin#28872: [26.x] Changes for rc3
2f86d30533 doc: update release notes for v26.0rc3 (fanquake)
3b6c7f240c doc: update manual pages for v26.0rc3 (fanquake)
3db4d1cff2 build: bump version to v26.0rc3 (fanquake)
6045f38dc8 build: Fix regression in "ARMv8 CRC32 intrinsics" test (Hennadii Stepanov)
5eaa179f27 ci: Avoid toolset ambiguity that MSVC can't handle (Hennadii Stepanov)
55af112565 p2p: do not make automatic outbound connections to addnode peers (Jon Atack)
5e0bcc1977 ci: Switch from `apt` to `apt-get` (Hennadii Stepanov)
437a5316e5 ci: Update apt cache (Hennadii Stepanov)
1488648104 pool: change memusage_test to use int64_t, add allocation check (Martin Leitner-Ankerl)
bcc183ccce pool: make sure PoolAllocator uses the correct alignment (Martin Leitner-Ankerl)
7dda4991a8 doc: regenerate example bitcoin.conf (fanquake)
5845331a6c doc: rewrite explanation for -par= (fanquake)

Pull request description:

  Currently backports:
  * https://github.com/bitcoin/bitcoin/pull/28858
  * https://github.com/bitcoin/bitcoin/pull/28895 (partial)
  * https://github.com/bitcoin/bitcoin/pull/28913
  * https://github.com/bitcoin/bitcoin/pull/28905
  * https://github.com/bitcoin/bitcoin/pull/28919
  * https://github.com/bitcoin/bitcoin/pull/28925

  Also includes changes for rc3, and reintegrating the release-notes.

ACKs for top commit:
  hebasto:
    re-ACK 2f86d30533, only https://github.com/bitcoin/bitcoin/pull/28919 backported since my [recent](https://github.com/bitcoin/bitcoin/pull/28872#pullrequestreview-1744950215) review.
  TheCharlatan:
    ACK 2f86d30533

Tree-SHA512: 43c91b344d37f582081ac184ac59cf76c741317b2b69a24fcd4287eefa8333e20c545e150798f4057d6f4ac8e70ed9cba1c8dd9777b11c1cf8992cce09108727
2023-11-22 18:25:34 +00:00
fanquake 2f86d30533
doc: update release notes for v26.0rc3
Few further changes are expected, so reintegrate the release-notes.
2023-11-22 17:22:06 +00:00
fanquake 3b6c7f240c
doc: update manual pages for v26.0rc3 2023-11-22 17:22:06 +00:00
fanquake 3db4d1cff2
build: bump version to v26.0rc3 2023-11-22 17:22:06 +00:00
Hennadii Stepanov 6045f38dc8
build: Fix regression in "ARMv8 CRC32 intrinsics" test
The `vmull_p64` is a part of the Crypto extensions from the ACLE. They
are optional extensions, so they get enabled with a `+crypto` for
architecture flags.

Github-Pull: #28919
Rebased-From: 228d6a2969
2023-11-22 17:22:05 +00:00
Hennadii Stepanov 5eaa179f27
ci: Avoid toolset ambiguity that MSVC can't handle
This change is required to work with the new windows-2022 image version
20231115 properly.

Github-Pull: #28905
Rebased-From: 91d5bd8ac9
2023-11-22 12:01:34 +00:00
Jon Atack 55af112565
p2p: do not make automatic outbound connections to addnode peers
to allocate our limited outbound slots correctly, and to ensure addnode
connections benefit from their intended protections.

Our addnode logic usually connects the addnode peers before the automatic
outbound logic does, but not always, as a connection race can occur.  If an
addnode peer disconnects us and if it was the only one from its network, there
can be a race between reconnecting to it with the addnode thread, and it being
picked as automatic network-specific outbound peer.  Or our internet connection
or router, or the addnode peer, could be temporarily offline, and then return
online during the automatic outbound thread.  Or we could add a new manual peer
using the addnode RPC at that time.

The race can be more apparent when our node doesn't know many peers, or with
networks like cjdns that currently have few bitcoin peers.

When an addnode peer is connected as an automatic outbound peer and is the only
connection we have to a network, it can be protected by our new outbound
eviction logic and persist in the "wrong role".

Examples on mainnet using logging added in the same pull request:

2023-08-12T14:51:05.681743Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to i2p peer selected for manual (addnode) connection: [geh...odq.b32.i2p]:0

2023-08-13T03:59:28.050853Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic block-relay-only connection to onion peer
selected for manual (addnode) connection: kpg...aid.onion:8333

2023-08-13T16:21:26.979052Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to cjdns peer selected for manual (addnode) connection: [fcc...8ce]:8333

2023-08-14T20:43:53.401271Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic network-specific outbound-full-relay connection
to cjdns peer selected for manual (addnode) connection: [fc7...59e]:8333

2023-08-15T00:10:01.894147Z [opencon] [net.cpp:1949] [ThreadOpenConnections]
[net:debug] Not making automatic feeler connection to i2p peer selected for
manual (addnode) connection: geh...odq.b32.i2p:8333

Finally, there does not seem to be a reason to make block-relay or short-lived
feeler connections to addnode peers, as the addnode logic will ensure we connect
to them if they are up, within the addnode connection limit.

Fix these issues by checking if the address is an addnode peer in our automatic
outbound connection logic.

Github-Pull: #28895
Rebased-From: cc62716920
2023-11-22 11:53:27 +00:00
Hennadii Stepanov 5e0bcc1977
ci: Switch from `apt` to `apt-get`
Github-Pull: #28925
Rebased-From: 710da28c72
2023-11-22 11:36:55 +00:00
Hennadii Stepanov 437a5316e5
ci: Update apt cache
Github-Pull: #28925
Rebased-From: a6cc059ea5
2023-11-22 11:36:45 +00:00
Martin Leitner-Ankerl 1488648104
pool: change memusage_test to use int64_t, add allocation check
If alignment of the PoolAllocator would be insufficient, then the test would fail. This also catches the issue with ARM 32bit,
where int64_t is aligned to 8 bytes but void* is aligned to 4 bytes. The test adds a check to ensure the pool has allocated
a minimum number of chunks

Github-Pull: #28913
Rebased-From: d5b4c0b69e
2023-11-22 11:33:12 +00:00
Martin Leitner-Ankerl bcc183ccce
pool: make sure PoolAllocator uses the correct alignment
This changes the PoolAllocator to default the alignment to the given type. This makes the code simpler, and most importantly
fixes a bug on ARM 32bit that caused OOM: The class CTxOut has a member CAmount which is an int64_t and on ARM 32bit int64_t
are 8 byte aligned which is larger than the pointer alignment of 4 bytes. So for CCoinsMap to be able to use the pool, we
need to use the alignment of the member instead of just alignof(void*).

Github-Pull: #28913
Rebased-From: ce881bf9fc
2023-11-22 11:33:01 +00:00
fanquake 7dda4991a8
doc: regenerate example bitcoin.conf 2023-11-22 11:21:11 +00:00
fanquake 5845331a6c
doc: rewrite explanation for -par=
The negative bound for script threads comes from the machine which
generates the man pages, so may only be correct for that machine. Any
other placeholder value will also be wrong for some machines. Fix this
be removing the value. This also fixes help2man incorrectly bolding the
value, as if it were a paramater.

Closes #28850.

Github-Pull: #28858
Rebased-From: d799ea26ed
2023-11-14 15:46:10 +00:00
fanquake 67b2512560
Merge bitcoin/bitcoin#28754: [26.x] Backports for rc2
e4e84790f6 doc: update manual pages for v26.0rc2 (fanquake)
0b189a9092 build: bump version to v26.0rc2 (fanquake)
e097d4cb53 gui: fix crash on selecting "Mask values" in transaction view (Sebastian Falbesoner)
05e8874554 guix: update signapple (fanquake)
deccc50631 guix: Zip needs to include all files with time as SOURCE_DATE_EPOCH (Andrew Chow)
fe57abd7e9 test: add coverage for snapshot chainstate not matching AssumeUTXO parameters (pablomartin4btc)
b761a58171 assumeutxo, blockstorage: prevent core dump on invalid hash (pablomartin4btc)
d3ebf6e9fc [test] Test i2p private key constraints (Vasil Dimov)
1f11784aac [net] Check i2p private key constraints (dergoegge)
6544ffa01f bugfix: Mark CNoDestination and PubKeyDestination constructor explicit (MarcoFalke)

Pull request description:

  Backports for v26.0rc2:
  * #28695
  * #28698
  * #28728
  * #28757
  * #28759
  * https://github.com/bitcoin-core/gui/pull/774

ACKs for top commit:
  josibake:
    ACK e4e84790f6
  hebasto:
    re-ACK e4e84790f6, only a backport of https://github.com/bitcoin-core/gui/pull/774 added since my [recent](https://github.com/bitcoin/bitcoin/pull/28754#pullrequestreview-1707143194) review.
  TheCharlatan:
    Re-ACK e4e84790f6

Tree-SHA512: 4b95afd26b8bf91250cb883423de8b274cefa48dc474734f5900aeb756eee3a6c656116efcfa2caff3c250678c16b70cc6b7a5d840018dc7e2c1e8161622cd61
2023-11-01 10:44:55 +00:00
fanquake e4e84790f6
doc: update manual pages for v26.0rc2 2023-11-01 10:01:05 +00:00
fanquake 0b189a9092
build: bump version to v26.0rc2 2023-11-01 10:01:05 +00:00
Sebastian Falbesoner e097d4cb53
gui: fix crash on selecting "Mask values" in transaction view
This commits fixes a crash bug that can be caused with the following steps:
- change to the "Transactions" view
- right-click on an arbitrary transaction -> "Show transaction details"
- close the transaction detail window again
- select "Settings" -> "Mask values"

The problem is that the list of opened dialogs, tracked in the member
variable `m_opened_dialogs`, is only ever appended with newly opened
transaction detail dialog pointers, but never removed. This leads to
dangling pointers in the list, and if the "Mask values" menu item is
selected, a crash is caused in the course of trying to close the opened
transaction detail dialogs (see `closeOpenedDialogs()` method). Fix this
by removing the pointer from the list if the corresponding widget is
destroyed.

Github-Pull: https://github.com/bitcoin-core/gui/pull/774
Rebased-From: e26e665f9f
2023-11-01 10:01:05 +00:00
fanquake 05e8874554
guix: update signapple
Fixes #28449

Github-Pull: #28759
Rebased-From: 79539fbfbf
2023-10-31 17:10:20 +00:00
Andrew Chow deccc50631
guix: Zip needs to include all files with time as SOURCE_DATE_EPOCH
The zip for codesigned MacOS distribution needs to have all files have
the same timestamp. These files also need to be included in the zip as
zip is not automatically recursive. We use the same pattern for zip as
is done for the other zip files produced by guix.

Github-Pull: #28757
Rebased-From: f6f18eeaa8
2023-10-31 17:07:52 +00:00
pablomartin4btc fe57abd7e9
test: add coverage for snapshot chainstate not matching AssumeUTXO parameters
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>

Github-Pull: #28698
Reabsed-From: 811067ca1c
2023-10-31 17:07:52 +00:00
pablomartin4btc b761a58171
assumeutxo, blockstorage: prevent core dump on invalid hash
Github-Pull: #28698
Rebased-from: 4a5be10b92
2023-10-31 17:07:52 +00:00
Vasil Dimov d3ebf6e9fc
[test] Test i2p private key constraints
Github-Pull: #28695
Rebased-From: 5cf4d266d9
2023-10-31 17:07:52 +00:00
dergoegge 1f11784aac
[net] Check i2p private key constraints
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

GitHub-Pull: #28695
Rebased-From: cf70a8d565
2023-10-31 17:07:52 +00:00
MarcoFalke 6544ffa01f
bugfix: Mark CNoDestination and PubKeyDestination constructor explicit
This should fix the bug reported in
https://github.com/bitcoin/bitcoin/pull/28246#discussion_r1371640502,
which caused the GUI to not detect the destination type of recipients,
thus picking the wrong change destination type.

Also, add missing lifetimebound attribute to a getter method.

GitHub-Pull: #28728
Rebased-From: 1111475b41
2023-10-31 17:07:52 +00:00
fanquake 7d0e5b099c
Merge bitcoin/bitcoin#28763: [26.x] qt: 26.0rc2 translations update
1695c4801c qt: 26.0rc2 translations update (Hennadii Stepanov)

Pull request description:

  This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.

  According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged before `v26.0rc2` tagging.

ACKs for top commit:
  stickies-v:
    ACK 1695c4801c

Tree-SHA512: 778b3ebdcd7567b2ed4bac63ae4abcb25562c502266e597845c436fce7db8829fdb2902d087051f5fac76785d516374d54883045f5025d728fe001476dc73b55
2023-10-31 17:04:20 +00:00
Hennadii Stepanov 1695c4801c
qt: 26.0rc2 translations update 2023-10-31 16:53:32 +00:00
fanquake 11254a34d7
Merge bitcoin/bitcoin#28717: [26.x] Bump version to v26.0rc1
958ee5db63 doc: generate example bitcoin.conf for v26.0rc1 (fanquake)
d1fe90c423 doc: generate manual pages for v26.0rc1 (fanquake)
c4fa45c2c3 build: bump version to v26.0rc1 (fanquake)

Pull request description:

  Bump the version number.
  Generate the man pages.
  Generate example bitcoin.conf.
  Release-notes.md already points to the wiki: https://github.com/bitcoin-core/bitcoin-devwiki/wiki/26.0%E2%80%90Release%E2%80%90Notes%E2%80%90Draft

ACKs for top commit:
  josibake:
    ACK 958ee5db63 🚀
  hebasto:
    ACK 958ee5db63

Tree-SHA512: eb13253dd5dbae2723a1a89a42d832c9c817cd00ecb51414313f15c8a988504dd1940babb42bf65cc97a4e37eb861a1ea6df19e6c763eebe4c8734c1cdf99e07
2023-10-24 16:38:39 +01:00
fanquake 958ee5db63
doc: generate example bitcoin.conf for v26.0rc1 2023-10-24 12:00:42 +01:00
fanquake d1fe90c423
doc: generate manual pages for v26.0rc1 2023-10-24 12:00:42 +01:00
fanquake c4fa45c2c3
build: bump version to v26.0rc1 2023-10-24 12:00:41 +01:00
fanquake f40d7fc180
Merge bitcoin/bitcoin#28715: [26.x] qt: 26.0rc1 translations update
74604662f3 qt: 26.0rc1 translations update (Hennadii Stepanov)

Pull request description:

  This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.

  According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged before `v26.0rc1` tagging.

ACKs for top commit:
  stickies-v:
    ACK 74604662f3

Tree-SHA512: 707a45f7df513352bf5e76d4fb39a74d77ea907921f0b543623e6f723ac0cf65d9bc94c975b3a6e650e4c88a554b13a4701dd9f0009cf4374104cb743ec6c2cc
2023-10-24 11:59:22 +01:00
fanquake df28880ec0
Merge bitcoin/bitcoin#28713: [26.x] doc: consolidate release note fragments
b226e275b3 doc: consolidate release note fragments (fanquake)

Pull request description:

  Consolidate the 26.x release note fragments to the wiki: https://github.com/bitcoin-core/bitcoin-devwiki/wiki/26.0%E2%80%90Release%E2%80%90Notes%E2%80%90Draft.

ACKs for top commit:
  dergoegge:
    ACK b226e275b3

Tree-SHA512: 189ccb45ed5cc213dd71cce0366a7086dc688422bcfbf28836f212c2a59628cac4f9379883ea23106585ba6ded4cce9995020b787add4ac7437be7cd868d0210
2023-10-24 11:16:28 +01:00
Hennadii Stepanov 74604662f3
qt: 26.0rc1 translations update 2023-10-24 11:01:03 +01:00
fanquake b226e275b3
doc: consolidate release note fragments 2023-10-24 10:47:42 +01:00
fanquake 96ec3b67a7
Merge bitcoin/bitcoin#28707: doc: add historical release notes for 24.2
3f482ac231 doc: add historical release notes for 24.2 (fanquake)

Pull request description:

  v24.2 has [been tagged](https://github.com/bitcoin/bitcoin/releases/tag/v24.2).

ACKs for top commit:
  stickies-v:
    ACK 3f482ac231

Tree-SHA512: 71773832910ecda7ed34c6545d184ecbc743d9a36aadd8e4bd367ff60ef5b8048d39335b2347878c4a1a076cc691f12f0e36e8db542757c883d7f83d1161625d
2023-10-24 10:33:26 +01:00
fanquake ab61087a7e
Merge bitcoin/bitcoin#28660: test: enable reindex readonly test on *BSD
5a0688a20d test: enable reindex readonly test on *BSD and macOS as root (Matthew Zipkin)

Pull request description:

  see https://github.com/bitcoin/bitcoin/pull/27850#discussion_r1349505585

  OpenBSD and FreeBSD don't have `chattr` but they do have `chflags`, use that method to make the block file immutable for the reindex_readonly test.

  Written and tested on a VPS running FreeBSD:
  ```
  FreeBSD freebsd-13-1 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64
  ```

ACKs for top commit:
  maflcko:
    re-cr-lgtm-ACK 5a0688a20d
  jonatack:
    ACK 5a0688a20d tested on macOS only
  theStack:
    ACK 5a0688a20d

Tree-SHA512: 8c88d282d09c00355d22c4c504b779f60e420327a5e07bcf80fa77b97fefcb04952af9ceaf439d9033a0a2448cb26a02663fe6bddcd4a74792857cfbaf1c5162
2023-10-24 10:32:48 +01:00
Ryan Ofsky d724bb5291
Merge bitcoin/bitcoin#28609: wallet: Reload watchonly and solvables wallets after migration
4814e4063e test: Check tx metadata is migrated to watchonly (Andrew Chow)
d616d30ea5 wallet: Reload watchonly and solvables wallets after migration (Andrew Chow)
118f2d7d70 wallet: Copy all tx metadata to watchonly wallet (Andrew Chow)
9af87cf348 test: Check that a failed wallet migration is cleaned up (Andrew Chow)

Pull request description:

  Some incomplete/incorrect state as a result of migration can be mitigated/cleaned up by simply restarting the migrated wallets. We already do this for a wallet when it is migrated, but we do not for the new watchonly and solvables wallets that may be created. This PR introduces this behavior, in addition to creating those wallets initially without an attached chain.

  While implementing this, I noticed that not all `CWalletTx` metadata was being copied over to the watchonly wallet and so some data, such as time received, was being lost. This PR fixes this as a side effect of not having a chain attached to the watchonly wallet. A test has also been added.

ACKs for top commit:
  ishaanam:
    light code review ACK 4814e4063e
  ryanofsky:
    Code review ACK 4814e4063e. Just implemented the suggested orderpos, copyfrom, and path set comments since last review
  furszy:
    ACK 4814e406

Tree-SHA512: 0b992430df9f452cb252c2212df8e876613f43564fcd1dc00c6c31fa497adb84dfff6b5ef597590f9b288c5f64cb455f108fcc9b6c9d1fe9eb2c39e7f2c12a89
2023-10-23 17:35:36 -04:00