Commit graph

39183 commits

Author SHA1 Message Date
fanquake
7b79e54474
doc: update release notes for 26.x 2024-01-04 16:21:37 +00:00
MarcoFalke
ccf00b1e6e
wallet: Fix use-after-free in WalletBatch::EraseRecords
Github-Pull: #29176
Rebased-From: faebf1df2a
2024-01-04 16:21:37 +00:00
Hennadii Stepanov
40252e184e
ci: Set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK to avoid failures
Homebrew attempts to check for outdated dependents or those with broken
linkage. Such behavior might lead to failures when Homebrew updates them
on old macOS images.

This change prevents such behavior.

Github-Pull: #29080
Rebased-From: 43c3246af7
2024-01-04 16:21:37 +00:00
furszy
b06b14e68d
rpc: getwalletinfo, return wallet 'birthtime'
And add coverage for it

Github-Pull: #28920
Rebased-From: 1ce45baed7
2024-01-04 16:21:37 +00:00
furszy
12834012c2
test: coverage for wallet birth time interaction with -reindex
Verifying the wallet updates the birth time accordingly when it
detects a transaction with a time older than the oldest descriptor
timestamp.
This could happen when the user blindly imports a descriptor with
'timestamp=now'.

Github-Pull: #28920
Rebased-From: 83c66444d0
2024-01-04 16:21:37 +00:00
furszy
0fa47e2569
wallet: fix legacy spkm default birth time
To avoid scanning blocks, as assumed by a wallet with no
generated keys or imported scripts, the default value for
the birth time needs to be set to the maximum int64_t value.

Once the first key is generated or the first script is imported,
the legacy SPKM will update the birth time automatically.

Github-Pull: #28920
Rebased-From: 6f497377aa
2024-01-04 16:21:37 +00:00
furszy
84f4a6c145
wallet: birth time update during tx scanning
As the user could have imported a descriptor with
a newer timestamp (by blindly setting 'timestamp=now'),
the wallet needs to update the birth time when it detects
a transaction older than the oldest descriptor timestamp.

Github-Pull: #28920
Rebased-From: 75fbf444c1
2024-01-04 16:21:37 +00:00
furszy
074296dd60
refactor: rename FirstKeyTimeChanged to MaybeUpdateBirthTime
In the following-up commit, the wallet birth time will also
be modified by the transactions scanning process. When a tx
older than all descriptor's timestamp is detected.

Github-Pull: #28920
Rebased-From: b4306e3c8d
2024-01-04 16:21:37 +00:00
furszy
35039ac3cc
fuzz: disable BnB when SFFO is enabled
Github-Pull: #28994
Rebased-From: 576bee88fd
2024-01-04 16:21:36 +00:00
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