Commit graph

35574 commits

Author SHA1 Message Date
fanquake
47c4903923
Merge bitcoin/bitcoin#27251: [24.x] qt: 24.1rc1 translations update
a2f8a839d9 qt: 24.1rc1 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 `v24.1rc1` tagging (#27247).

  Will keep this PR updated regularly until merging.

  The Dutch translation `bitcoin_nl.ts` has been damaged, therefore its changes were rejected manually.

ACKs for top commit:
  stickies-v:
    I'm not familiar with the translations process and I couldn't verify that `bitcoin_nl.ts` is damaged, but if this constitutes sufficient review then ACK a2f8a839d9

Tree-SHA512: d914d158c4a4b62a2c37040f5cc0602ef749a7bf658af0e364a0d2cb52b802a00863496751cf3db42d74e8950c49969ee9dd03c5c3fee79860113389f36ee483
2023-03-13 15:33:20 +01:00
Hennadii Stepanov
a2f8a839d9
qt: 24.1rc1 translations update 2023-03-13 10:00:47 +00:00
fanquake
932a609312
doc: add initial release notes for v24.1
Move historical 24.0.1 to doc/release-notes.
2023-03-12 17:21:49 +01:00
fanquake
cc4e3158c9
doc: update manual pages for v24.1rc1 2023-03-12 16:55:21 +01:00
fanquake
787affb9ea
doc: update version in bips.md to v24.1 2023-03-12 16:50:51 +01:00
fanquake
5077e02263
build: bump version to v24.1rc1 2023-03-12 16:50:46 +01:00
glozow
c8c85ca16e
Merge bitcoin/bitcoin#26878: [24.x] Backports
784a754aa4 wallet, rpc: Update migratewallet help text for encrypted wallets (Andrew Chow)
debcfe313a tests: Tests for migrating wallets by name, and providing passphrase (Andrew Chow)
ccc72fecd7 wallet: Be able to unlock the wallet for migration (Andrew Chow)
50dd8b13df rpc: Allow users to specify wallet name for migratewallet (Andrew Chow)
648b06256d wallet: Allow MigrateLegacyToDescriptor to take a wallet name (Andrew Chow)
ab3bd457cd i2p: use consistent number of tunnels with i2pd and Java I2P (Vasil Dimov)
29cdf42226 i2p: lower the number of tunnels for transient sessions (Vasil Dimov)
5027e93b6a i2p: reuse created I2P sessions if not used (Vasil Dimov)
a62c541ae8 wallet: reuse change dest when recreating TX with avoidpartialspends (Matthew Zipkin)
64e7db6f4f Zero out wallet master key upon lock (John Moffett)
b7e242ecb3 Correctly limit overview transaction list (John Moffett)
cff67180b3 depends: fix systemtap download URL (fanquake)
7cf73dfed5 Add missing includes to fix gcc-13 compile error (MarcoFalke)
07397cdede addrdb: Only call Serialize() once (Martin Zumsande)
91f83dbeb1 hash: add HashedSourceWriter (Martin Zumsande)
5c824ac5e1 For feebump, ignore abandoned descendant spends (John Moffett)
428dcd51e6 wallet: Skip rescanning if wallet is more recent than tip (Andrew Chow)
cbcdafa471 test: wallet: check that labels are migrated to watchonly wallet (Sebastian Falbesoner)
342abfb3f4 wallet: fully migrate address book entries for watchonly/solvable wallets (Sebastian Falbesoner)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/26595
  * https://github.com/bitcoin/bitcoin/pull/26675
  * https://github.com/bitcoin/bitcoin/pull/26679
  * https://github.com/bitcoin/bitcoin/pull/26761
  * https://github.com/bitcoin/bitcoin/pull/26837
  * https://github.com/bitcoin/bitcoin/pull/26909
  * https://github.com/bitcoin/bitcoin/pull/26924
  * https://github.com/bitcoin/bitcoin/pull/26944
  * https://github.com/bitcoin-core/gui/pull/704
  * https://github.com/bitcoin/bitcoin/pull/27053
  * https://github.com/bitcoin/bitcoin/pull/27080

ACKs for top commit:
  instagibbs:
    ACK 784a754aa4
  achow101:
    ACK 784a754aa4
  hebasto:
    ACK 784a754aa4, I've made backporting locally and got a diff between my branch and this PR as follows:

Tree-SHA512: 8ea84aa02d7907ff1e202e1302b441ce9ed2198bf383620ad40056a5d7e8ea88e1047abef0b92d85648016bf9b3195c974be3806ccebd85bef4f85c326869e43
2023-02-27 18:09:31 +00:00
Andrew Chow
784a754aa4
wallet, rpc: Update migratewallet help text for encrypted wallets
Github-Pull: #26595
Rebased-From: 9486509be6
2023-02-27 14:15:15 +00:00
Andrew Chow
debcfe313a
tests: Tests for migrating wallets by name, and providing passphrase
Github-Pull: #26595
Rebased-From: aaf02b5721
2023-02-27 14:14:46 +00:00
Andrew Chow
ccc72fecd7
wallet: Be able to unlock the wallet for migration
Since migration reloads the wallet, the wallet will always be locked
unless the passphrase is given. migratewallet can now take the
passphrase in order to unlock the wallet for migration.

Github-Pull: #26595
Rebased-From: 7fd125b27d
2023-02-27 14:14:14 +00:00
Andrew Chow
50dd8b13df
rpc: Allow users to specify wallet name for migratewallet
Github-Pull: #26595
Rebased-From: 6bdbc5ff59
2023-02-27 14:13:46 +00:00
Andrew Chow
648b06256d
wallet: Allow MigrateLegacyToDescriptor to take a wallet name
An overload of MigrateLegacyToDescriptor is added which takes the wallet
name. The original that took a wallet pointer is still available, it
just gets the name, closes the wallet, and calls the new overload.

Github-Pull: #26595
Reabsed-From: dbfa345403
2023-02-27 14:13:13 +00:00
Vasil Dimov
ab3bd457cd
i2p: use consistent number of tunnels with i2pd and Java I2P
The default number of tunnels in the Java implementation is 2 and in the
C++ i2pd it is 5. Pick a mid-number (3) and explicitly set it in order
to get a consistent behavior with both routers. Do this for persistent
sessions which are created once at startup and can be used to open up
to ~10 outbound connections and can accept up to ~125 incoming
connections. Transient sessions already set number of tunnels to 1.

Suggested in:
https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1367356129
https://geti2p.net/en/docs/api/samv3

Alleviates: https://github.com/bitcoin/bitcoin/issues/26754

Github-Pull: #26837
Rebased-From: 3c1de032de
2023-02-27 14:01:24 +00:00
Vasil Dimov
29cdf42226
i2p: lower the number of tunnels for transient sessions
This will lower the load on the I2P network. Since we use one transient
session for connecting to just one peer, a higher number of tunnels is
unnecessary.

This was suggested in:
https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1365449401
https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1367356129

The options are documented in:
https://geti2p.net/en/docs/protocol/i2cp#options

A tunnel is unidirectional, so even if we make a single outbound
connection we still need an inbound tunnel to receive the messages sent
to us over that connection.

Alleviates: https://github.com/bitcoin/bitcoin/issues/26754

Github-Pull: #26837
Rebased-From: 801b405f85
2023-02-27 14:00:28 +00:00
Vasil Dimov
5027e93b6a
i2p: reuse created I2P sessions if not used
In the case of `i2pacceptincoming=0` we use transient addresses
(destinations) for ourselves for each outbound connection. It may
happen that we
* create the session (and thus our address/destination too)
* fail to connect to the particular peer (e.g. if they are offline)
* dispose the unused session.

This puts unnecessary load on the I2P network because session creation
is not cheap. Is exaggerated if `onlynet=i2p` is used in which case we
will be trying to connect to I2P peers more often.

To help with this, save the created but unused sessions and pick them
later instead of creating new ones.

Alleviates: https://github.com/bitcoin/bitcoin/issues/26754

Github-Pull: #26837
Rebased-From: b906b64eb7
2023-02-27 13:59:51 +00:00
Matthew Zipkin
a62c541ae8
wallet: reuse change dest when recreating TX with avoidpartialspends
Github-Pull: #27053
Rebased-From: 14b4921a91
2023-02-22 09:12:50 +00:00
John Moffett
64e7db6f4f
Zero out wallet master key upon lock
When an encrypted wallet is locked (for instance via the
RPC `walletlock`), the docs indicate that the key is
removed from memory. However, the vector (with a secure
allocator) is merely cleared. This allows the key to persist
indefinitely in memory. Instead, manually fill the bytes with
zeroes before clearing.

Github-Pull: #27080
Rebased-From: 3a11adc700
2023-02-20 17:15:38 +00:00
John Moffett
b7e242ecb3
Correctly limit overview transaction list
The way that the main overview page limits the number
of transactions displayed (currently 5) is not
an appropriate use of Qt. If it's run with a DEBUG
build of Qt, it'll result in a segfault in certain
relatively common situations. Instead of artificially
limiting the rowCount() in the subclassed proxy
filter, we hide/unhide the rows in the displaying
QListView upon any changes in the sorted proxy filter.

Github-Pull: bitcoin-core/gui/pull/704
Rebased-From: 08209c039f
2023-02-20 17:15:38 +00:00
fanquake
cff67180b3
depends: fix systemtap download URL
Github-Pull: #26944
Rebased-From: d81ca6619a
2023-02-20 17:15:38 +00:00
MarcoFalke
7cf73dfed5
Add missing includes to fix gcc-13 compile error
Github-Pull: #26924
Rebased-From: fadeb6b103
2023-02-20 17:15:38 +00:00
Martin Zumsande
07397cdede
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-02-20 17:15:37 +00:00
Martin Zumsande
91f83dbeb1
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-02-20 17:15:37 +00:00
John Moffett
5c824ac5e1
For feebump, ignore abandoned descendant spends
To be eligible for fee-bumping, a transaction must not have any
of its outputs (eg - change) spent in other unconfirmed transactions
in the wallet. However, this check should not apply to abandoned
transactions.

A new test case is added to cover this case.

Github-Pull: #26675
Rebased-From: f9ce0eadf4
2023-02-20 17:15:37 +00:00
Andrew Chow
428dcd51e6
wallet: Skip rescanning if wallet is more recent than tip
If a wallet has key birthdates that are more recent than the currrent
chain tip, or a bestblock height higher than the current tip, we should
not attempt to rescan as there is nothing to scan for.

Github-Pull: #26679
Rebased-From: 3784009534
2023-02-20 17:15:37 +00:00
Sebastian Falbesoner
cbcdafa471
test: wallet: check that labels are migrated to watchonly wallet
Github-Pull: #26761
Rebased-From: 730e14a317
2023-02-20 17:15:37 +00:00
Sebastian Falbesoner
342abfb3f4
wallet: fully migrate address book entries for watchonly/solvable wallets
Currently `migratewallet` migrates the address book (i.e. labels and
purposes) for watchonly and solvable wallets only in RAM, but doesn't
persist them on disk. Fix this by adding another loop for both of the
special wallet types after which writes the corresponding NAME and
PURPOSE entries to the database in a single batch.

Github-Pull: #26761
Rebased-From: d5f4ae7fac
2023-02-20 17:15:36 +00:00
fanquake
2b87e90585
Merge bitcoin/bitcoin#26457: [24.x] backport rpc: skip getpeerinfo for a peer without CNodeStateStats
e72313e6b3 rpc: Require NodeStateStats object in getpeerinfo (Martin Zumsande)

Pull request description:

  Backports #26515.

ACKs for top commit:
  fanquake:
    ACK e72313e6b3

Tree-SHA512: 28e885ea299fe8a3a7538628d413c434bc42c251a2c1ae238bca0652709f5bd781eb157675171ab538f6e2f6f720f1c184200ac3857f6c78f48858949eed49da
2023-01-20 11:34:12 +00:00
MarcoFalke
5148145b35
Merge bitcoin/bitcoin#26880: [24.x] ci: replace Intel macOS CI job
95ec9604a4 ci: Use `macos-ventura-xcode:14.1` image for "macOS native" task (Hennadii Stepanov)
50ad39d9d0 ci: Make `getopt` path architecture agnostic (Hennadii Stepanov)
ce2a072ba8 ci: Allow PIP_PACKAGES on centos (MacroFake)
644c0304f5 ci: Remove unused package (MacroFake)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 95ec9604a4 did the same for 23.x & in #26878.

Tree-SHA512: 086fbe2f2a39e210cc41076d42fb911abdd720a2824fcaaacfaf50345c90d23b9f9f8b0a06e4f85cced0a8fdf0e5f5a7a3a00a05edbc267574893975dfc7c061
2023-01-12 13:14:04 +01:00
Hennadii Stepanov
95ec9604a4 ci: Use macos-ventura-xcode:14.1 image for "macOS native" task
Github-Pull: #26388
Rebased-From: da16893474
2023-01-12 11:52:49 +01:00
Hennadii Stepanov
50ad39d9d0 ci: Make getopt path architecture agnostic
Github-Pull: #26388
Rebased-From: 702836530f
2023-01-12 11:52:48 +01:00
MacroFake
ce2a072ba8 ci: Allow PIP_PACKAGES on centos
This was added in 7fc5e865b9 but I can't
see a reason why this should be forbidden.

Github-Pull: #26234
Rebased-From: fa6054e952
2023-01-12 11:52:47 +01:00
MacroFake
644c0304f5 ci: Remove unused package
Address feedback from https://github.com/bitcoin/bitcoin/pull/24561/files#r985719812

Github-Pull: #26234
Rebased-From: fac085a05c
2023-01-12 11:52:46 +01:00
Martin Zumsande
e72313e6b3 rpc: Require NodeStateStats object in getpeerinfo
There is no situation in which CNodeStateStats could be
missing for a legitimate reason - this can only happen if
there is a race condition between peer disconnection and
the getpeerinfo call, in which case the disconnected peer
doesn't need to be included in the response.

Github-Pull: bitcoin#26515
Rebased-From: 6fefd49
2023-01-11 09:18:32 -08:00
fanquake
0da38b6b0e
Merge bitcoin/bitcoin#26735: [24.x] qt: Load PSBTs using istreambuf_iterator rather than istream_iterator
0662105e88 qt: Load PSBTs using istreambuf_iterator rather than istream_iterator (Andrew Chow)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 0662105e88

Tree-SHA512: 6a2ee4d2150bf3d90e95325966d4f73b05f8cb1a5af1db6a64c891880b9f3a0846d59eb6896fee80a63b05f2084bfadc64cf9a9029598c3b31ce104715a0ca81
2022-12-23 13:02:22 +00:00
Andrew Chow
0662105e88 qt: Load PSBTs using istreambuf_iterator rather than istream_iterator
istream_iterator eats whitespace charactesr which causes parsing
failures for PSBTs that contain the bytes corresponding to those
characters.

Github-Pull: bitcoin-core/gui#687
Rebased-From: bb5ea1d9a9
2022-12-21 09:52:40 +01:00
MarcoFalke
b3f866a8df
Merge bitcoin/bitcoin#26647: 24.0.1 final changes
a9ea715835 doc: adjust release notes for 24.0.1 (fanquake)
c119b0a176 doc: generate manual pages for 24.0.1 final (fanquake)
1b19c894a2 build: bump version to 24.0.1 final (fanquake)

Pull request description:

  Changes for 24.0.1.

  At this stage, I don't think an rc is necessary here, and would just add another 5-x days delay to fixing these issues.

  This will be accompanied by a pull request to master to add a note in the 24.0.md that already exists there. Similar to what was done with 0.19.0.1.

ACKs for top commit:
  gruve-p:
    ACK a9ea715835
  instagibbs:
    ACK a9ea715835
  hebasto:
    ACK a9ea715835, I have reviewed the changes and they look OK.
  josibake:
    ACK a9ea715835
  w0xlt:
    ACK a9ea715835

Tree-SHA512: 2e0d81ef91d947c9d55dcadcb6168fbb5251a5e613642c6250075add6a4f14f54cbb452934fa46aec035decb339e611fe721f5e9d9156e47a0341c3be26f5aa9
2022-12-06 16:54:10 +01:00
fanquake
a9ea715835
doc: adjust release notes for 24.0.1
This will be accompianied by a change to release-notes-24.0.md on
master.
2022-12-06 12:39:24 +00:00
fanquake
c119b0a176
doc: generate manual pages for 24.0.1 final 2022-12-06 12:23:26 +00:00
fanquake
1b19c894a2
build: bump version to 24.0.1 final 2022-12-06 12:13:42 +00:00
MarcoFalke
3afbc7d67d
Merge bitcoin/bitcoin#26616: [24.x] Backports for 24.0.1
8b726bf556 test: Coin Selection, duplicated preset inputs selection (furszy)
9d73176d00 test: wallet, coverage for CoinsResult::Erase function (furszy)
195f0dfd0e wallet: bugfix, 'CoinsResult::Erase' is erasing only one output of the set (furszy)
e5d097b639 [test] Add p2p_tx_privacy.py (dergoegge)
c8426706de [net processing] Assume that TxRelay::m_tx_inventory_to_send is empty pre-verack (dergoegge)
e15b306017 [net processing] Ensure transaction announcements are only queued for fully connected peers (dergoegge)
95fded1069 wallet: Explicitly say migratewallet on encrypted wallets is unsupported (Andrew Chow)
d464b2af30 tests: Test for migrating encrypted wallets (Andrew Chow)
7a97a56ffb wallet: Avoid null pointer deref when cleaning up migratewallet (Andrew Chow)

Pull request description:

  Backports remaining changes on the 24.0.1 milestone.

  Currently backports:
  * https://github.com/bitcoin/bitcoin/pull/26594
  * https://github.com/bitcoin/bitcoin/pull/26569
  * https://github.com/bitcoin/bitcoin/pull/26560

ACKs for top commit:
  josibake:
    ACK 8b726bf556

Tree-SHA512: db77ec1a63a7b6a4412750a0f4c0645681fc346a5df0a7cd38d5d27384e1d0fa95f3953af90042afe131ddbd4b6a6e009527095f13e9f58c0190cd378738a9e5
2022-12-06 12:35:55 +01:00
furszy
8b726bf556
test: Coin Selection, duplicated preset inputs selection
This exercises the bug inside CoinsResult::Erase that
ends up on (1) a wallet crash or (2) a created and
broadcasted tx that contains a reduced recipient's amount.

This is covered by making the wallet selects the preset
inputs twice during the coin selection process.

Making the wallet think that the selection process result covers
the entire tx target when it does not. It's actually creating
a tx that sends more coins than what inputs are covering for.

Which, combined with the SFFO option, makes the wallet
incorrectly reduce the recipient's amount by the difference
between the original target and the wrongly counted inputs.
Which means, a created and relayed tx sending less coins to
the destination than what the user inputted.

Github-Pull: #26560
Rebased-From: cf79384697
2022-12-05 17:43:46 +00:00
furszy
9d73176d00
test: wallet, coverage for CoinsResult::Erase function
Github-Pull: #26560
Rebased-From: 341ba7ffd8
2022-12-05 17:43:31 +00:00
furszy
195f0dfd0e
wallet: bugfix, 'CoinsResult::Erase' is erasing only one output of the set
The loop break shouldn't have being there.

Github-Pull: #26560
Rebased-From: f930aefff9
2022-12-05 17:40:54 +00:00
dergoegge
e5d097b639
[test] Add p2p_tx_privacy.py
Github-Pull: #26569
Rebased-From: 8f2dac5409
2022-12-02 16:04:27 +00:00
dergoegge
c8426706de
[net processing] Assume that TxRelay::m_tx_inventory_to_send is empty pre-verack
This commit documents our assumption about
TxRelay::m_tx_inventory_to_send being empty prior to version handshake
completion.

The added Assume acts as testing oracle for our fuzzing tests to
potentially detect if the assumption is violated.

Github-Pull: #26569
Rebased-From: ce63fca13e
2022-12-02 16:04:13 +00:00
dergoegge
e15b306017
[net processing] Ensure transaction announcements are only queued for fully connected peers
Github-Pull: #26569
Rebased-From: 845e3a34c4
2022-12-02 15:58:24 +00:00
Andrew Chow
95fded1069
wallet: Explicitly say migratewallet on encrypted wallets is unsupported
Github-Pull: #26594
Rebased-From: 5e65a216d1
2022-12-01 10:22:14 +00:00
Andrew Chow
d464b2af30
tests: Test for migrating encrypted wallets
Due to an oversight, we cannot currently migrate encrypted wallets,
regardless of whether they are unlocked. Migrating such wallets will
trigger an error, and result in the cleanup being run. This conveniently
allows us to check some parts of the cleanup code.

Github-Pull: #26594
Rebased-From: 88afc73ae0
2022-12-01 10:21:37 +00:00
Andrew Chow
7a97a56ffb
wallet: Avoid null pointer deref when cleaning up migratewallet
If migratewallet fails, we do a cleanup which removes the watchonly and
solvables wallets if they were created. However, if they were not, their
pointers are nullptr and we don't check for that, which causes a
segfault during the cleanup. So check that they aren't nullptr before
cleaning them up.

Github-Pull: #26594
Rebased-From: 86ef7b3c7b
2022-12-01 10:21:00 +00:00
MarcoFalke
f668a3a859
Merge bitcoin/bitcoin#26591: [24.x] ci: Skip COMMIT_RANGE if no CIRRUS_PR
fad1c55301 lint: Skip COMMIT_RANGE if no CIRRUS_PR (MarcoFalke)

Pull request description:

  Identical commit from https://github.com/bitcoin/bitcoin/pull/26588

  Untested, but this may fix the red-ness in https://cirrus-ci.com/github/bitcoin/bitcoin/24.x, e.g. https://cirrus-ci.com/task/4697153604419584:

  Backport requested in https://github.com/bitcoin/bitcoin/pull/26588#issuecomment-1328916876

ACKs for top commit:
  hebasto:
    ACK fad1c55301, the same commit as in #26588.

Tree-SHA512: 8d8a735e25bc1f774f8cbf058b95b7019941138ab78fb7819852755c7a416a783ee116457b97031d447639002353d7bf12ee8445275b7b5eec4abc7421cc171d
2022-11-28 17:27:34 +01:00