Commit Graph

39616 Commits

Author SHA1 Message Date
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
Anthony Towns
c247609a9d p2p: Increase tx relay rate
In the presence of smaller transactions on the network, blocks can sustain a
higher relay rate than 7tx/second. In this event, the per-peer inventory queues
can grow too large.

This commit bumps the rate up to 14 tx/s (for inbound peers), increasing the
safety margin by a factor of 2.

Outbound peers continue to receive relayed transactions at 2.5x the rate of
inbound peers, for a rate of 35tx/second.

Co-Authored-By: Suhas Daftuar <sdaftuar@gmail.com>

Github-Pull: #28592
Rebased-From: 22c2b52c12
2024-02-21 03:58:18 +00:00
Hennadii Stepanov
2f72aab31f qt, test: Recognize dialog object by name
Github-Pull: gui#797
Rebased-From: 4c9db9b587
2024-02-21 03:54:10 +00:00
MarcoFalke
1d9d47c497 doc: Clarify maxfeerate help
Github-Pull: #29434
Rebased-From: dddd7be9bf
2024-02-21 03:51:14 +00:00
MarcoFalke
2d35cc3995 rpc: Fixed signed integer overflow for large feerates
Github-Pull: #29434
Rebased-From: fa2a4fdef7
2024-02-21 03:51:14 +00:00
MarcoFalke
ea064f73bb rpc: Add ParseFeeRate helper
Github-Pull: #29434
Rebased-From: fade94d11a
2024-02-21 03:51:14 +00:00
MarcoFalke
c46bd008ae rpc: Implement RPCHelpMan::ArgValue<> for UniValue
Github-Pull: #29434
Rebased-From: fa0ff66109
2024-02-21 03:51:14 +00:00
Ava Chow
66d1d242a1 tests: Test that descriptors flag is set for migrated blank wallets
Github-Pull: #29367
Rebased-From: 3904123da9
2024-02-21 00:49:06 +00:00
Ava Chow
b7e41dda70 wallet: Make sure that the descriptors flag is set for blank wallets
Github-Pull: #29367
Rebased-From: 072d506240
2024-02-21 00:49:05 +00:00
Andrew Chow
c0560fccf3 tests: Test migration of blank wallets
Github-Pull: #28976
Rebased-From: c11c404281
2024-02-21 00:47:29 +00:00
Andrew Chow
271511b281 wallet: Better error message when missing LegacySPKM during migration
Github-Pull: #28976
Rebased-From: 563b2a60d6
2024-02-21 00:47:29 +00:00
Andrew Chow
0adcf3e1c8 wallet: Check for descriptors flag before migration
Previously we would check that there is no LegacySPKM in order to
determine whether a wallet is already a descriptor wallet and doesn't
need to be migrated. However blank legacy wallets will also not have a
LegacySPKM, so we need to be checking for the descriptors flag instead.

Github-Pull: #28976
Rebased-From: b1d2c771d4
2024-02-21 00:47:29 +00:00
Andrew Chow
c9ff1e8fc6 wallet: Skip key and script migration for blank wallets
Blank wallets don't have any keys or scripts to migrate

Github-Pull: #28976
Rebased-From: 8c127ff1ed
2024-02-21 00:47:29 +00:00
Hennadii Stepanov
d1e11766c5 build: Add missed definition for AM_OBJCXXFLAGS
Github-Pull: #29362
Rebased-From: 0620a663bd8f536191543e10fdbeb31935b7334f
2024-02-21 00:41:24 +00:00
Hennadii Stepanov
6ee87eb0f5 ci: Add -Wno-error flags for macOS jobs
Github-Pull: #29362
Rebased-From: 17861b9cd594bcccff47c4105bdc9da97f8ec001
2024-02-21 00:41:24 +00:00
Luke Dashjr
de43101fbc Diff-minimise 2024-02-21 00:27:35 +00:00
Vasil Dimov
70403c5bb7 util: check for error after reading from a file
`fread(3)` does not distinguish between end-of-file and error,
and callers must use `feof(3)` and `ferror(3)` to determine which
occurred.

Github-Pull: #29307
Rebased-From: 55439903212dcee6af09da7393a41e3754501b37
2024-02-21 00:27:35 +00:00
Vasil Dimov
f54c172ffe util: check for error from fclose(3) in explicit calls
Explicit callers of `AutoFile::fclose()` should check whether
`fclose(3)` failed because this may be due to a failure to
flush written data to disk. Such failures after writing to
a file should be treated as failures to `fwrite(3)`.

Github-Pull: #29307
Rebased-From: e9abf95ab52f1f2d6f73ecca63133c29c253b7d9
2024-02-21 00:27:35 +00:00
marco
fc80446964 wallet: clarify replaced_by_txid and replaces_txid in help output
Github-Pull: #29302
Rebased-From: ff54314d4a
2024-02-20 22:55:57 +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
Torkel Rogstad
cfd1c957a5 rpc: validate conf_target is set alongside estimate_mode
Github-Pull: #29175
Rebased-From: be8ae64b82
2024-01-26 16:10:45 +00:00
Torkel Rogstad
b8e4d0a26a rpc: validate fee estimation mode case insensitive
Github-Pull: #29175
Rebased-From: 8d40addbd2
2024-01-26 16:10:44 +00:00
Marnix
55a074203f gui: debugwindow: update session ID tooltip
remove "if any"

Github-Pull: gui#788
Rebased-From: 3bf00e1360
2024-01-24 17:50:07 +00:00
MarcoFalke
0aa26d600e test: Use blocks_path where possible
Github-Pull: #29262
Rebased-From: 5555d8db33
2024-01-24 03:44:58 +00:00
MarcoFalke
efbedc001b rpc: Fix race in loadtxoutset
The tip may have advanced, also if it did not, there is no reason to
have two variables point to the same block.

Github-Pull: #29262
Rebased-From: fa9108941f
2024-01-24 03:44:58 +00:00
fanquake
b606458929 depends: add NM output to gen_id
Github-Pull: #29249
Rebased-From: 6ec2813cd8
2024-01-24 03:37:24 +00:00
Ava Chow
ffe6847063 wallet: Reset chain notifications handler if AttachChain fails
AttachChain will create the chain notifications handler which contains a
reference to the wallet's shared_ptr. If AttachChain fails, the wallet
needs to be unloaded, and this is expected to happen with its custom
deleter ReleaseWallet. However, if the chain notifications handler is
still set, then the shared_ptr is still referenced by something, so the
wallet is never actually released.

Github-Pull: #29243
Rebased-From: ea2551e55d
2024-01-24 03:28:52 +00:00
Mark Friedenbach
58a667b9dc [depends] Allow PATH with spaces in directory names.
added test and update code based on feedback

Github-Pull: #29237
Rebased-From: 4756114e50
2024-01-24 03:20:32 +00:00
Hennadii Stepanov
f996e6e6b6 build: Fix check whether -latomic needed
Github-Pull: #29177
Rebased-From: f8ca1357c8
2024-01-23 19:47:28 +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
Luke Dashjr
84afd82ac5 Bugfix: devtools/symbol-check: Check PE libraries case-insensitively 2024-01-07 01:39:29 +00:00
Luke Dashjr
5779010ed7 RPC/Blockchain: scanblocks: Accept named param for filter_false_positives 2024-01-04 21:22:15 +00:00