Commit graph

348 commits

Author SHA1 Message Date
ivanlele
d4117b96b3
Merge a0abcbd382 into merged_master (Bitcoin PR bitcoin/bitcoin#22838) 2026-03-23 11:21:19 +00:00
ivanlele
cd6ec40d0f
Merge 2aff9a36c3 into merged_master (Bitcoin PR bitcoin/bitcoin#30352) 2026-03-11 09:41:57 +00:00
ikripaka
055b97a616
Merge d9aa7b23e4 into merged_master (Bitcoin PR bitcoin/bitcoin#26596) 2026-03-05 18:34:53 +00:00
ikripaka
006073614d
Merge 011a895a82 into merged_master (Bitcoin PR bitcoin/bitcoin#29015) 2026-02-27 22:51:31 +00:00
ivanlele
a27285a8be
Merge eaf186d1ee into merged_master (Bitcoin PR bitcoin/bitcoin#29690) 2026-02-17 18:43:21 +00:00
ivanlele
d585152878
Merge 4373414d26 into merged_master (Bitcoin PR bitcoin/bitcoin#29130) 2026-02-17 10:07:57 +00:00
Byron Hambly
1bc20d7011
Merge b1a46b212f into merged_master (Bitcoin PR bitcoin/bitcoin#26008) 2025-12-04 09:07:39 +02:00
Byron Hambly
9b0f8670fe
Merge 592e01398e into merged_master (Bitcoin PR bitcoin/bitcoin#28833) 2025-11-30 15:54:28 +02:00
Byron Hambly
cf0043f303
Merge 03d95cc630 into merged_master (Bitcoin PR bitcoin/bitcoin#29375) 2025-11-30 15:49:58 +02:00
Byron Hambly
5f14b5796a
Merge 6f732ffc3c into merged_master (Bitcoin PR bitcoin/bitcoin#28774) 2025-11-18 14:54:48 +02:00
Byron Hambly
1c37230da9
Merge 514268170b into merged_master (Bitcoin PR bitcoin/bitcoin#29133) 2025-11-18 13:27:06 +02:00
Byron Hambly
e2aa52246d
Merge 265250687b into merged_master (Bitcoin PR bitcoin/bitcoin#28455) 2025-11-17 21:16:45 +02:00
Byron Hambly
51196515b4
Merge 08e6aaabef into merged_master (Bitcoin PR bitcoin/bitcoin#28920) 2025-11-17 17:27:30 +02:00
Byron Hambly
9d86c53a22
Merge a7f4f1a09c into merged_master (Bitcoin PR bitcoin/bitcoin#28894) 2025-11-11 15:26:24 +02:00
Byron Hambly
08d0c71ed2
Merge 0f5e31ce7d into merged_master (Bitcoin PR bitcoin/bitcoin#28799) 2025-11-06 09:11:17 +02:00
Byron Hambly
69492d27da
Merge 08ea835220 into merged_master (Bitcoin PR bitcoin/bitcoin#28583) 2025-08-07 10:05:15 +02:00
Byron Hambly
52015faa34
Merge abe4fedab7 into merged_master (Bitcoin PR bitcoin/bitcoin#28125) 2025-08-01 12:55:18 +02:00
Byron Hambly
6c55760a2d Merge 7ef2d4ee4d into merged_master (Bitcoin PR bitcoin/bitcoin#28244) 2025-07-04 17:24:18 +02:00
Byron Hambly
bc6f151cb8 Merge f08d914a67 into merged_master (Bitcoin PR bitcoin/bitcoin#27920) 2025-06-30 15:29:17 +02:00
Byron Hambly
c8c3ee099d Merge 6663c802fe into merged_master (Bitcoin PR bitcoin/bitcoin#25634) 2025-06-27 14:40:19 +02:00
Byron Hambly
c590a01aff Merge 10c4a4613f into merged_master (Bitcoin PR bitcoin/bitcoin#27469) 2025-06-25 09:17:16 +02:00
Byron Hambly
5b856b6f5f Merge fa53611cf1 into merged_master (Bitcoin PR bitcoin/bitcoin#26076) 2025-05-16 11:10:32 +02:00
Byron Hambly
dfd55ffa24 Merge a0d37d1d23 into merged_master (Bitcoin PR bitcoin/bitcoin#27274) 2025-04-12 11:40:50 +02:00
Byron Hambly
e04de3e652 Merge 3963067555 into merged_master (Bitcoin PR bitcoin/bitcoin#26642) 2025-04-11 22:28:06 +02:00
Byron Hambly
d7c9767c01 Merge 710cab1d43 into merged_master (Bitcoin PR bitcoin/bitcoin#26032)
Moved the implementations of DummySignTx and DummySignInput from
spend.cpp to wallet.cpp, to more closely match upstream
2025-04-09 12:04:43 +02:00
Byron Hambly
9fdd02a17b Merge 27772d8009 into merged_master (Bitcoin PR bitcoin/bitcoin#26889) 2025-04-07 08:11:43 +02:00
Byron Hambly
2ba842104d Merge 550e6bd227 into merged_master (Bitcoin PR bitcoin/bitcoin#26935) 2025-04-05 10:57:32 +02:00
Tom Trevethan
0761b58003 Merge 1c8b80f440 into merged_master (Bitcoin PR bitcoin/bitcoin#15294) 2025-04-04 14:37:56 +00:00
Tom Trevethan
694c51a39f Merge 3212d104f4 into merged_master (Bitcoin PR bitcoin/bitcoin#23829) 2025-04-01 15:23:27 +00:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
7ea69ff0d8
Merge UP TO 48174c0f28 into merged_master (UP TO Bitcoin PR bitcoin/bitcoin#26240)
FIXME in wallet_taproot.py functional test

1668424146 2022-11-14T12:09:06+01:00 48174c0f28 Bitcoin Merge bitcoin/bitcoin#26240: rpc: Adjust RPCTypeCheckObj error string
1668417474 2022-11-14T10:17:54+01:00 59e00c7e03 Bitcoin Merge bitcoin/bitcoin#25714: univalue: Avoid std::string copies
1668111238 2022-11-10T15:13:58-05:00 7ef730ca84 Bitcoin Merge bitcoin/bitcoin#26483: test: Don't pass add_to_wallet option to walletcreatefundedpsbt
1668004459 2022-11-09T15:34:19+01:00 9dce30194b Bitcoin Merge bitcoin/bitcoin#26472: test: add missing bech32m / BIP86 test-cases to wallet_descriptor.py
1667992471 2022-11-09T12:14:31+01:00 44ca5d5e87 Bitcoin Merge bitcoin/bitcoin#26473: test: Avoid collision with valid path names in `getarg_tests/logargs`
1667640759 2022-11-05T10:32:39+01:00 50422b770a Bitcoin Merge bitcoin/bitcoin#26419: log: mempool: log removal reason in validation interface
1667636699 2022-11-05T09:24:59+01:00 ce57dbac90 Bitcoin Merge bitcoin/bitcoin#26449: rpc: doc: add missing option "bech32m" for `change_type` parameters
1667577253 2022-11-04T15:54:13+00:00 ae6bb6e71e Bitcoin Merge bitcoin/bitcoin#26418: Fix signing of multi_a and rawtr scripts with wallets that only have corresponding keys
2025-02-27 15:15:49 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
e1e241d410 Merge 7921026a24 into merged_master (Bitcoin PR bitcoin/bitcoin#19602)
FIXME for test_other_watchonly in the new wallet migration test
2024-11-26 11:21:27 +02:00
Byron Hambly
1006327a13 Merge 9eaef10801 into merged_master (Bitcoin PR bitcoin/bitcoin#25707) 2024-11-04 11:26:40 +02:00
Byron Hambly
06009b9841 Merge a8f69541ad into merged_master (Bitcoin PR bitcoin/bitcoin#25748) 2024-11-03 16:54:57 +02:00
Byron Hambly
ee6cc528c6 Merge 64f7a1940d into merged_master (Bitcoin PR bitcoin/bitcoin#25734) 2024-11-03 14:28:09 +02:00
Byron Hambly
52699c29d7 Merge e078ee9d9d into merged_master (Bitcoin PR bitcoin/bitcoin#25664) 2024-11-01 15:14:19 +02:00
Byron Hambly
5104b4635b Merge 93999a5fbe into merged_master (Bitcoin PR bitcoin/bitcoin#25642) 2024-11-01 13:41:41 +02:00
Byron Hambly
a33b20f0ff Merge a6fc293c0a into merged_master (Bitcoin PR bitcoin/bitcoin#25656)
ReserveDestination::SetBlindingPubKey was removed since it was only used
in one place (in Wallet::GetNewChangeDestination), and after this change
it was silently breaking blinded change addresses by somehow replacing
the destination with CNoDestination...
2024-11-01 12:36:42 +02:00
Byron Hambly
a4fa9c6ada
Merge 59bd6b6d37 into merged_master (Bitcoin PR bitcoin/bitcoin#24699) 2024-10-29 14:19:22 +02:00
Byron Hambly
49d368ea6b Merge 006740b6f6 into merged_master (Bitcoin PR bitcoin/bitcoin#25721) 2024-10-25 13:33:19 +02:00
James Dorfman
e22bfb3011 Merge 316afb1eca into merged_master (Bitcoin PR bitcoin/bitcoin#25218) 2024-10-16 04:56:53 +00:00
Byron Hambly
2d07ef8fc1
Merge 5bf65ec66e into merged_master (Bitcoin PR bitcoin/bitcoin#22558) 2024-09-19 13:24:19 +02:00
glozow
f93d5553d1
Merge bitcoin/bitcoin#22838: descriptors: Be able to specify change and receiving in a single descriptor string
a0abcbd382 doc: Mention multipath specifier (Ava Chow)
0019f61fc5 tests: Test importing of multipath descriptors (Ava Chow)
f97d5c137d wallet, rpc: Allow importdescriptors to import multipath descriptors (Ava Chow)
32dcbca3fb rpc: Allow importmulti to import multipath descriptors correctly (Ava Chow)
64dfe3ce4b wallet: Move internal to be per key when importing (Ava Chow)
1692245525 tests: Multipath descriptors for scantxoutset and deriveaddresses (Ava Chow)
cddc0ba9a9 rpc: Have deriveaddresses derive receiving and change (Ava Chow)
360456cd22 tests: Multipath descriptors for getdescriptorinfo (Ava Chow)
a90eee444c tests: Add unit tests for multipath descriptors (Ava Chow)
1bbf46e2da descriptors: Change Parse to return vector of descriptors (Ava Chow)
0d640c6f02 descriptors: Have ParseKeypath handle multipath specifiers (Ava Chow)
a5f39b1034 descriptors: Change ParseScript to return vector of descriptors (Ava Chow)
0d55deae15 descriptors: Add DescriptorImpl::Clone (Ava Chow)
7e86541f72 descriptors: Add PubkeyProvider::Clone (Ava Chow)

Pull request description:

  It is convenient to have a descriptor which specifies both receiving and change addresses in a single string. However, as discussed in https://github.com/bitcoin/bitcoin/issues/17190#issuecomment-895515768, it is not feasible to use a generic multipath specification like BIP 88 due to combinatorial blow up and that it would result in unexpected descriptors.

  To resolve that problem, this PR proposes a targeted solution which allows only a single pair of 2 derivation indexes to be inserted in the place of a single derivation index. So instead of two descriptor `wpkh(xpub.../0/0/*)` and `wpkh(xpub.../0/1/*)` to represent receive and change addresses, this could be written as `wpkh(xpub.../0/<0;1>/*)`. The multipath specifier is of the form `<NUM;NUM>`. Each `NUM` can have its own hardened specifier, e.g. `<0;1h>` is valid. The multipath specifier can also only appear in one path index in the derivation path.

  This results in the parser returning two descriptors. The first descriptor uses the first `NUM` in all pairs present, and the second uses the second `NUM`. In our implementation, if a multipath descriptor is not provided, a pair is still returned, but the second element is just `nullptr`.

  The wallet will not output the multipath descriptors (yet). Furthermore, when a multipath descriptor is imported, it is expanded to the two descriptors and each imported on its own, with the second descriptor being implicitly for internal (change) addresses. There is no change to how the wallet stores or outputs descriptors (yet).

  Note that the path specifier is different from what was proposed. It uses angle brackets and the semicolon because these are unused characters available in the character set and I wanted to avoid conflicts with characters already in use in descriptors.

  Closes #17190

ACKs for top commit:
  darosior:
    re-ACK a0abcbd382
  mjdietzx:
    reACK a0abcbd382
  pythcoiner:
    reACK a0abcbd
  furszy:
    Code review ACK a0abcbd
  glozow:
    light code review ACK a0abcbd382

Tree-SHA512: 84ea40b3fd1b762194acd021cae018c2f09b98e595f5e87de5c832c265cfe8a6d0bc4dae25785392fa90db0f6301ddf9aea787980a29c74f81d04b711ac446c2
2024-08-28 15:56:15 +01:00
Ava Chow
64dfe3ce4b wallet: Move internal to be per key when importing
Instead of applying internal-ness to all keys being imported at the same
time, apply it on a per key basis. So each key that is imported will
carry with it whether it is for the change keypool.
2024-08-08 12:47:38 -04:00
Ava Chow
1bbf46e2da descriptors: Change Parse to return vector of descriptors
When given a descriptor which contins a multipath derivation specifier,
a vector of descriptors will be returned.
2024-08-08 12:47:22 -04:00
Greg Sanders
455fca86cf policy: Add OP_1 <0x4e73> as a standard output type
These outputs are called anchors, and allow
key-less anchor spends which are vsize-minimized
versus keyed anchors which require larger outputs
when creating and inputs when spending.
2024-07-30 14:06:58 -04:00
glozow
d9aa7b23e4
Merge bitcoin/bitcoin#26596: wallet: Migrate legacy wallets to descriptor wallets without requiring BDB
8ce3739edb test: verify wallet is still active post-migration failure (furszy)
771bc60f13 wallet: Use LegacyDataSPKM when loading (Ava Chow)
61d872f1b3 wallet: Move MigrateToDescriptor and DeleteRecords to LegacyDataSPKM (Ava Chow)
b231f4d556 wallet: Move LegacyScriptPubKeyMan::IsMine to LegacyDataSPKM (Ava Chow)
7461d0c006 wallet: Move LegacySPKM data storage and handling to LegacyDataSPKM (Ava Chow)
517e204bac Change MigrateLegacyToDescriptor to reopen wallet as BERKELEY_RO (Ava Chow)

Pull request description:

  #26606 introduced `BerkeleyRODatabase` which is an independent parser for BDB files. This PR uses this in legacy wallet migration so that migration will continue to work once the legacy wallet and BDB are removed. `LegacyDataSPKM` is introduced to have the minimum data and functions necessary for a legacy wallet to be loaded for migration.

ACKs for top commit:
  cbergqvist:
    ACK 8ce3739edb
  theStack:
    Code-review ACK 8ce3739edb
  furszy:
    Code review ACK 8ce3739edb

Tree-SHA512: dccea12d6c597de15e3e42f97ab483cfd069e103611200279a177e021e8e9c4e74387c4f45d2e58b3a1e7e2bdb32a1d2d2060b1f8086c03eeaa0c68579d9d54e
2024-07-11 16:47:02 +01:00
Ava Chow
61d872f1b3 wallet: Move MigrateToDescriptor and DeleteRecords to LegacyDataSPKM 2024-07-01 14:25:54 -04:00