Commit Graph

39228 Commits

Author SHA1 Message Date
Luke Dashjr
6681ad8ae5 doc/zmq: Add detailed descriptions for {hash,raw}wallettx topics 2024-03-14 18:38:11 +00:00
Doron Somech
22ae5a8bb9 ZMQ: add publishers of wallet tx
Topic will indicate if transaction came from mempool or block so developers can handle the transaction accordingly without a RPC round trip to bitcoind.

(includes ZMQ: Making CWallet::TransactionAddedToWallet static)
2024-03-14 18:38:11 +00:00
Luke Dashjr
3e8c26eb05 Merge branch 'zmq_optimise_duplread-26+k' into zmq_wtx-26+knots 2024-03-14 18:38:02 +00:00
Luke Dashjr
9aa46570fa QA: bitcoin_test/validation_block_tests: Check sanity of CBlock cache, but not behaviour/when it is present 2024-03-14 18:31:06 +00:00
Luke Dashjr
7aabdde13c Ensure new_tip_block cache gets cleared when pindexNewTip is updated 2024-03-13 14:31:18 +00:00
Luke Dashjr
7171792034 Merge branch 'wallet_warn_reuse_gui-26' into zmq_wtx-26+knots 2024-02-22 16:58:35 +00:00
Luke Dashjr
4bb5504838 GUI: Add a warning prompt when sending to an already-used address 2024-02-21 17:51:38 +00:00
Luke Dashjr
2ac588e660 GUI: Use warning indicator for send coins entries with reused addresses 2024-02-21 17:51:38 +00:00
Luke Dashjr
807b6346b1 GUI: Implement BitcoinAddressUnusedInWalletValidator 2024-02-21 17:51:38 +00:00
Luke Dashjr
75a60eaac5 GUI: QValidatedLineEdit: Add support for a warning-but-valid state 2024-02-21 17:51:38 +00:00
Luke Dashjr
178605b413 GUI: WalletModel: Wrap checkAddressForUsage and findAddressUsage 2024-02-21 17:51:38 +00:00
Luke Dashjr
cd213eca16 GUI: SendConfirmationDialog: Enable changing the actual buttons used
Both buttons can be replaced with other standard buttons
2024-02-21 17:51:38 +00:00
Luke Dashjr
a81d410277 GUI: SendConfirmationDialog: Defer button setup until exec 2024-02-21 17:51:38 +00:00
Luke Dashjr
02df3527d2 GUI: Add GUIUtil::dateStr 2024-02-21 17:51:38 +00:00
Luke Dashjr
3f8f717235 interfaces/wallet: Add checkAddressForUsage and findAddressUsage 2024-02-21 17:51:38 +00:00
Luke Dashjr
07d57bcf04 Merge branch 'getaddressinfo_txids-26' into wallet_warn_reuse_gui 2024-02-21 17:51:30 +00:00
Luke Dashjr
06aafaaa85 RPC/Wallet: Add "use_txids" to output of getaddressinfo
Github-Pull: #22693
Rebased-From: a00bc6f395
2024-02-21 15:58:47 +00:00
Luke Dashjr
559a93d167 Wallet: Add fairly-efficient [negative] check that an address is not known to be used
Github-Pull: #22693
Rebased-From: 022887d933
2024-02-21 15:58:46 +00:00
Luke Dashjr
b58acfcd11 Wallet: Keep track of what addresses are used in wallet transactions (memory only)
Github-Pull: #22693
Rebased-From: fc7954a148
2024-02-21 15:58:43 +00:00
fanquake
a4690485d1
Merge bitcoin/bitcoin#29440: [26.1] final changes for 26.1rc1
1e7fb270d3 [doc] add release notes for 26.1rc1 (glozow)
0ffeaf237a [doc] update manual pages for 26.1rc1 (glozow)
d4aeb4a5a0 [build] bump version to 26.1rc1 (glozow)
c27793891a qt: 26.1rc1 translations update (Hennadii Stepanov)
40e7693fa1 ci: Switch native macOS CI job to Xcode 15.0 (Hennadii Stepanov)
72eab1ca64 build: Fix `-Xclang -internal-isystem` option (Hennadii Stepanov)

Pull request description:

  Final changes to tag a 26.1rc1.
  Bumps version numbers, man pages, adds release notes etc.

ACKs for top commit:
  hebasto:
    re-ACK 1e7fb270d3
  fanquake:
    ACK 1e7fb270d3

Tree-SHA512: 0f4146590d61f4f9322f3147f672ff2af48fc1d85c708b959adcbdb50b8f280570cb732d9f4a424c014046d07e9aa6e408fc3a0337dbaf8cbaea5283697da35a
2024-02-19 15:31:06 +00:00
glozow
1e7fb270d3 [doc] add release notes for 26.1rc1 2024-02-16 17:30:26 +00:00
glozow
0ffeaf237a [doc] update manual pages for 26.1rc1 2024-02-16 17:29:46 +00:00
glozow
d4aeb4a5a0 [build] bump version to 26.1rc1 2024-02-16 17:29:46 +00:00
Hennadii Stepanov
c27793891a qt: 26.1rc1 translations update
This change is a result if pulling the recent translations
from the Transifex website using the
bitcoin-maintainer-tools/update-translations.py tool.

A few manual adjustments were made:
- skipped removing of `bitcoin_af.ts`
- skipped removing of `bitcoin_ar.ts`
- skipped adding of `bitcoin_ru_RU.ts` (`bitcoin_ru.ts` is already
present)
2024-02-16 17:29:46 +00:00
Hennadii Stepanov
40e7693fa1 ci: Switch native macOS CI job to Xcode 15.0
Github-Pull: #29195
Rebased-From: d742be3d3f
2024-02-16 17:29:31 +00:00
Hennadii Stepanov
72eab1ca64 build: Fix -Xclang -internal-isystem option
LLVM Clang >=16.0 and Apple Clang >=15.0 do not recognize
`-Xclang -internal-isystem/usr/local/include` anymore.

For example, see: cbbe1d4454

Github-Pull: #29195
Rebased-From: 8decc5c726
2024-02-16 17:28:33 +00:00
fanquake
74df372750
Merge bitcoin/bitcoin#29209: [26.x] more backports
11f3a7e6ba Use hardened runtime on macOS release builds. (Mark Friedenbach)
ac1b9a51db [test] import descriptor wallet with reorged parent + IsFromMe child in mempool (glozow)
ecb8ebc660 [test] rescan legacy wallet with reorged parent + IsFromMe child in mempool (Gloria Zhao)
438ac2947d snapshots: don't core dump when running -checkblockindex after `loadtxoutset` (Mark Friedenbach)
7ec34554af [log] mempool loading (glozow)
fe0f8fe8aa net: create I2P sessions with both ECIES-X25519 and ElGamal encryption (Jon Atack)
fc62271015 [refactor] Add helper for iterating through mempool entries (stickies-v)

Pull request description:

  Backports for 26.x. Includes:
  - 453b481 from #28391
    - #29179
  - #29200
  - #29227
  - #28791
  - #29127

ACKs for top commit:
  stickies-v:
    ACK 11f3a7e6ba

Tree-SHA512: 20ef871ec768f2328056d83f958e595b36ae9b8baa8a6e8b0e1f02c3df4b16965a8e05dcb4323afbcc9ecc4bdde10931232512022c39ee7e12baf9795bf25bf1
2024-02-16 13:37:21 +00:00
Mark Friedenbach
11f3a7e6ba
Use hardened runtime on macOS release builds.
The Apple notary service requires submitted app bundles to be configured to use the hardened runtime libraries.  This is configured at signing time, and supported by the signapple tool Bitcoin Core uses for reproduceable signed binaries.  We simply need to pass "--hardened-runtime" when the signature is created.  Once attached to the bundle, the resulting codesigned binary can be successfully submitted to the Apple binary notarization service by any Apple Developer.

Github-Pull: #29127
Rebased-From: 4fdd836db9
2024-01-19 16:14:36 +00:00
glozow
ac1b9a51db
[test] import descriptor wallet with reorged parent + IsFromMe child in mempool
Test that wallet rescans process transactions topologically, even if a
parent's entry into the mempool is later than that of its child.
This behavior is important because IsFromMe requires the ability to look
up a transaction's inputs.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>

Github-Pull: #29179
Rebased-From: df30247705
2024-01-19 16:13:22 +00:00
Gloria Zhao
ecb8ebc660
[test] rescan legacy wallet with reorged parent + IsFromMe child in mempool
Test that wallet rescans process transactions topologically, even if a
parent's entry into the mempool is later than that of its child.
This behavior is important because IsFromMe requires the ability to look
up a transaction's inputs.

Github-Pull: #29179
Rebased-From: c3d02be536
2024-01-19 16:13:14 +00:00
Mark Friedenbach
438ac2947d
snapshots: don't core dump when running -checkblockindex after loadtxoutset
Github-Pull: #28791
Rebased-From: cdc6ac4126
2024-01-19 16:13:05 +00:00
glozow
7ec34554af
[log] mempool loading
Log at the top before incrementing so that this log isn't printed when
there's only 1 tx.

Github-Pull: #29227
Rebased-From: eb78ea4eeb
2024-01-19 16:12:57 +00:00
Jon Atack
fe0f8fe8aa
net: create I2P sessions with both ECIES-X25519 and ElGamal encryption
A Bitcoin Core node may only connect to a peer destination via I2P if both sides
have sessions with the same encryption type.  The encryption type is a property
of the session, not the destination.  Sessions may support multiple encryption
types.

As Bitcoin Core is not currently setting the I2P encryption type when creating
sessions, it is using the older default, ElGamal (type 0).

This pull updates Bitcoin Core to use both ECIES-X25519 and ElGamal (types 4 and
0, respectively).  This allows to connect to I2P peers with either type, and the
newer, faster ECIES-X25519 will be preferred.

See also the recently updated section "Signature and Encryption Types" in
https://geti2p.net/en/docs/api/samv3

Thanks and credit to zzzi2p (https://github.com/zzzi2p) for reporting.

Closes https://github.com/bitcoin/bitcoin/issues/29197.

Github-Pull: #29200
Rebased-From: 9d728916b2
2024-01-19 16:12:47 +00:00
stickies-v
fc62271015
[refactor] Add helper for iterating through mempool entries
Instead of reaching into the mapTx data structure, use a helper method
that provides the required vector of CTxMemPoolEntry pointers.

Github-Pull: #28391
Rebased-From: 453b4813eb
2024-01-19 16:12:23 +00:00
glozow
04edf9f586
Merge bitcoin/bitcoin#29011: [26.x] Backports
7b79e54474 doc: update release notes for 26.x (fanquake)
ccf00b1e6e wallet: Fix use-after-free in WalletBatch::EraseRecords (MarcoFalke)
40252e184e ci: Set `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` to avoid failures (Hennadii Stepanov)
b06b14e68d rpc: getwalletinfo, return wallet 'birthtime' (furszy)
12834012c2 test: coverage for wallet birth time interaction with -reindex (furszy)
0fa47e2569 wallet: fix legacy spkm default birth time (furszy)
84f4a6c145 wallet: birth time update during tx scanning (furszy)
074296dd60 refactor: rename FirstKeyTimeChanged to MaybeUpdateBirthTime (furszy)
35039ac3cc fuzz: disable BnB when SFFO is enabled (furszy)
903b4623d3 test: add coverage for BnB-SFFO restriction (furszy)
05d0576d3c wallet: create tx, log resulting coin selection info (furszy)
5493ebbe74 wallet: skip BnB when SFFO is active (Murch)
b15e2e2cec test: add regression test for the getrawtransaction segfault (Martin Zumsande)
5097bb3389 rpc: fix getrawtransaction segfault (Martin Zumsande)
81e744a9a6 ci: Use Ubuntu 24.04 Noble for asan (MarcoFalke)
69e53d1e47 ci: Use Ubuntu 24.04 Noble for tsan,tidy,fuzz (MarcoFalke)
d2c80b6f52 doc: Missing additions to 26.0 release notes (fanquake)
8dc2c753ff doc: add historical release notes for 26.0 (fanquake)

Pull request description:

  Backports for `26.x`. Currently:
  * https://github.com/bitcoin/bitcoin/pull/28920
  * https://github.com/bitcoin/bitcoin/pull/28992
  * https://github.com/bitcoin/bitcoin/pull/28994
  * https://github.com/bitcoin/bitcoin/pull/29003
  * https://github.com/bitcoin/bitcoin/pull/29023
  * https://github.com/bitcoin/bitcoin/pull/29080
  * https://github.com/bitcoin/bitcoin/pull/29176

ACKs for top commit:
  TheCharlatan:
    ACK 7b79e54474
  glozow:
    ACK 7b79e54474, matches mine

Tree-SHA512: 898aec76ed3ad35e0edd0980af5bcc21bd60003bbf69e0b4f473ed2aa38c4e3b360b930bc3747cf798195906a8f9fe66417524f5e5ef40fa68f1c1aaceebdeb0
2024-01-09 15:39:19 +00:00
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