bitcoin/src
merge-script d7f56cc5d9
Merge bitcoin/bitcoin#31590: descriptors: Try pubkeys of both parities when retrieving the private keys for an xonly pubkey in a descriptor
c0045e6cee Add test for multipath miniscript expression (David Gumberg)
b4ac48090f descriptor: Use InferXOnlyPubkey for miniscript XOnly pubkey from script (Ava Chow)
4c50c21f6b tests: Check ExpandPrivate matches for both parsed descriptors (Ava Chow)
092569e858 descriptor: Try the other parity in ConstPubkeyProvider::GetPrivKey() (Ava Chow)

Pull request description:

  When a `ConstPubkeyProvider` is xonly, the stored pubkey does not necessarily have the correct parity bit. `ToPrivateString()` is correctly handling this by looking up the keys for both parity bits, but `GetPrivKey` does not. This results in not finding the private key when it is actually available if its pubkey has the other parity bit value.

  To fix this, this key finding is refactored into `GetPrivKey()` so that its behavior is corrected, and `ToPrivateString()` is changed to use `GetPrivKey()` as well.

  Additionally, the descriptor test checks are updated to include a check for `ExpandPrivate()` to verify that both the parsed public and private descriptors produce `SigningProvider`s with the same contents.

  Fixes #31589

ACKs for top commit:
  Pttn:
    ACK c0045e6cee
  davidgumberg:
    utACK c0045e6cee
  kevkevinpal:
    Concept and Code review ACK [c0045e6](c0045e6cee)
  furszy:
    ACK c0045e6cee
  theStack:
    re-ACK c0045e6cee
  rkrux:
    Concept ACK c0045e6cee

Tree-SHA512: 3dcf2a802b996e0680a3f819075e5a689eb22e484c81ea79b40ec04197ee4ba3f6b9c87c45dfe8a847c9b805b2fd0fad77ffb92a93e65dc3aad74d69d9e3d97f
2025-01-21 10:20:13 +00:00
..
bench test: drop scriptPubKeyIn arg from CreateNewBlock 2024-12-04 12:46:33 +07:00
common args: Catch directories in place of config files 2024-12-03 11:04:10 +01:00
compat netbase: refactor CreateSock() to accept sa_family_t 2024-03-01 13:13:07 -05:00
consensus Check leaves size maximum in MerkleComputation 2024-12-17 10:12:31 +07:00
crc32c Update crc32c subtree to latest upstream master 2024-02-27 18:28:19 +00:00
crypto refactor: Avoid UB in SHA3_256::Write 2025-01-14 19:09:30 +01:00
index scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
init scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
interfaces Remove processNewBlock() from mining interface 2024-12-18 09:20:26 +07:00
ipc Remove processNewBlock() from mining interface 2024-12-18 09:20:26 +07:00
kernel Merge bitcoin/bitcoin#31483: kernel: Move kernel-related cache constants to kernel cache 2025-01-16 15:04:58 +00:00
leveldb Update leveldb-subtree subtree to latest upstream 2024-06-13 13:17:57 +01:00
logging scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
minisketch Update minisketch subtree to latest master 2024-06-12 14:38:39 +01:00
node Merge bitcoin/bitcoin#31483: kernel: Move kernel-related cache constants to kernel cache 2025-01-16 15:04:58 +00:00
policy Merge bitcoin/bitcoin#31596: doc: Clarify comments about endianness after #30526 2025-01-06 18:52:59 -05:00
primitives tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
qt Merge bitcoin/bitcoin#31483: kernel: Move kernel-related cache constants to kernel cache 2025-01-16 15:04:58 +00:00
rpc Merge bitcoin/bitcoin#31397: p2p: track and use all potential peers for orphan resolution 2025-01-16 13:42:26 +00:00
script Merge bitcoin/bitcoin#31590: descriptors: Try pubkeys of both parities when retrieving the private keys for an xonly pubkey in a descriptor 2025-01-21 10:20:13 +00:00
secp256k1 Update secp256k1 subtree to v0.6.0 2024-11-04 14:59:46 -05:00
support util: Add missing types in make_secure_unique 2024-12-10 21:51:48 +01:00
test Merge bitcoin/bitcoin#31590: descriptors: Try pubkeys of both parities when retrieving the private keys for an xonly pubkey in a descriptor 2025-01-21 10:20:13 +00:00
univalue test: clang-format -i src/univalue/test/unitester.cpp 2024-12-20 15:01:44 +01:00
util util: fix compiler warning about deprecated space before _MiB 2025-01-20 14:32:20 +01:00
wallet Merge bitcoin/bitcoin#31242: wallet, desc spkm: Return SigningProvider only if we have the privkey 2025-01-16 17:30:36 +00:00
zmq cmake: Add FindZeroMQ module 2024-10-25 18:09:36 +01:00
.clang-format refactor: Print verbose serialize compiler error messages 2023-12-15 15:20:54 +01:00
.clang-tidy tidy: add clang-tidy modernize-use-starts-ends-with check 2024-09-14 20:33:32 +03:00
addrdb.cpp scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
addrdb.h Use serialization parameters for CAddress serialization 2023-09-05 10:13:25 +02:00
addresstype.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addresstype.h policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addrman.cpp addrman: cap the max_pct to not exceed the maximum number of addresses 2024-11-11 12:47:53 -03:00
addrman.h addrman: cap the max_pct to not exceed the maximum number of addresses 2024-11-11 12:47:53 -03:00
addrman_impl.h Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t 2024-09-20 12:55:22 -04:00
arith_uint256.cpp refactor: Remove unused and fragile string interface from arith_uint256 2023-11-21 17:37:25 +01:00
arith_uint256.h doc: Clarify comments about endianness after #30526 2025-01-03 09:19:53 -05:00
attributes.h Introduce platform-agnostic ALWAYS_INLINE macro 2023-05-04 20:57:51 +01:00
banman.cpp refactor: Delay translation of _() literals 2025-01-14 19:21:37 +01:00
banman.h net_processing: remove Misbehavior score and increments 2024-05-30 08:35:18 -04:00
base58.cpp refactor: Avoid needless, unsafe c-style cast 2024-12-19 13:46:31 +01:00
base58.h
bech32.cpp fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bech32.h fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bip324.cpp net: merge V2Transport constructors, move key gen 2023-09-10 16:11:52 -04:00
bip324.h net: merge V2Transport constructors, move key gen 2023-09-10 16:11:52 -04:00
bitcoin-chainstate.cpp init: Use size_t consistently for cache sizes 2025-01-15 15:44:56 +01:00
bitcoin-cli-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-cli.cpp refactor: Use TranslateFn type consistently 2025-01-15 12:15:40 +01:00
bitcoin-tx-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-tx.cpp refactor: Use TranslateFn type consistently 2025-01-15 12:15:40 +01:00
bitcoin-util-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-util.cpp refactor: Use TranslateFn type consistently 2025-01-15 12:15:40 +01:00
bitcoin-wallet-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-wallet.cpp refactor: Use TranslateFn type consistently 2025-01-15 12:15:40 +01:00
bitcoind-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoind.cpp refactor: Use TranslateFn type consistently 2025-01-15 12:15:40 +01:00
blockencodings.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
blockencodings.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
blockfilter.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
blockfilter.h Remove unused includes from blockfilter.h 2023-08-17 18:28:15 +02:00
chain.cpp
chain.h doc: update NeedsRedownload() comment 2024-09-17 09:54:18 +02:00
chainparams.cpp test: Don't enforce BIP94 on regtest unless specified by arg 2024-10-28 11:38:38 -04:00
chainparams.h test: Throw error when -signetchallenge is non-hex 2023-05-25 19:24:05 +02:00
chainparamsbase.cpp net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
chainparamsbase.h net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
chainparamsseeds.h seeds: Regenerate mainnet seeds 2024-08-27 07:00:27 +02:00
checkqueue.h Merge bitcoin/bitcoin#31313: refactor: Clamp worker threads in ChainstateManager constructor 2024-12-03 18:02:37 -05:00
clientversion.cpp refactor: Delay translation of _() literals 2025-01-14 19:21:37 +01:00
clientversion.h scripted-diff: Clarify "user agent" variable name 2024-10-28 12:35:49 +00:00
cluster_linearize.h doc: correct typos 2024-11-11 14:14:39 +00:00
CMakeLists.txt cmake: Build secp256k1 only when required 2024-11-23 15:31:39 +00:00
coins.cpp Merge bitcoin/bitcoin#30906: refactor: prohibit direct flags access in CCoinsCacheEntry and remove invalid tests 2024-12-04 14:09:05 -05:00
coins.h coins, refactor: Remove direct GetFlags access 2024-12-02 13:52:34 +01:00
compressor.cpp Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
compressor.h refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
core_io.h rpc: add getdescriptoractivity 2024-11-26 20:47:08 -05:00
core_memusage.h
core_read.cpp ci: Update Clang in "tidy" job 2024-12-05 14:37:47 +00:00
core_write.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
cuckoocache.h validation: Don't error if maxsigcachesize exceeds uint32::max 2024-07-04 22:35:29 +02:00
dbwrapper.cpp dbwrapper: Bump max file size to 32 MiB 2024-11-30 20:19:08 +01:00
dbwrapper.h dbwrapper: Bump max file size to 32 MiB 2024-11-30 20:19:08 +01:00
deploymentinfo.cpp Decouple RegTestChainParams from ArgsManager 2023-03-15 16:42:42 +01:00
deploymentinfo.h Decouple RegTestChainParams from ArgsManager 2023-03-15 16:42:42 +01:00
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp wallet, test: Be able to always swap BDB endianness 2024-05-16 15:03:13 -04:00
external_signer.cpp refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
external_signer.h refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
flatfile.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
flatfile.h refactor: Add FlatFileSeq member variables in BlockManager 2024-07-24 09:39:35 +02:00
hash.cpp crypto, hash: replace custom rotl32 with std::rotl 2024-01-05 17:12:38 +01:00
hash.h Squashed 'src/secp256k1/' changes from 2f2ccc46954..0cdc758a563 2024-11-04 14:59:46 -05:00
headerssync.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
headerssync.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
httprpc.cpp args: Support -norpccookiefile for bitcoind and bitcoin-cli 2024-12-03 10:38:21 +01:00
httprpc.h
httpserver.cpp scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
httpserver.h rpc: increase the defaults for -rpcthreads and -rpcworkqueue 2024-11-04 17:08:21 +01:00
i2p.cpp Merge bitcoin/bitcoin#29833: i2p: fix and improve logs 2024-06-26 15:28:26 -04:00
i2p.h i2p: log errors properly according to their severity 2024-06-12 16:19:50 -03:00
indirectmap.h
init.cpp Merge bitcoin/bitcoin#31483: kernel: Move kernel-related cache constants to kernel cache 2025-01-16 15:04:58 +00:00
init.h multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
key.cpp refactor: remove un-tested early returns 2024-08-04 08:52:22 +02:00
key.h refactor: move SignSchnorr to KeyPair 2024-08-04 08:51:36 +02:00
key_io.cpp key: clear out secret data in DecodeExtKey 2024-10-27 15:38:54 +01:00
key_io.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
logging.cpp log: Enforce trailing newline, Remove redundant m_started_new_line 2024-10-01 11:31:39 +02:00
logging.h log: Enforce trailing newline, Remove redundant m_started_new_line 2024-10-01 11:31:39 +02:00
mapport.cpp mapport: remove dead code in DispatchMapPort 2024-10-25 15:02:07 -04:00
mapport.h interfaces: remove now unused 'use_upnp' arg from 'mapPort' 2024-10-24 18:23:30 +02:00
memusage.h memusage: Add DynamicUsage for std::string 2024-11-04 18:46:40 +01:00
merkleblock.cpp [clang-tidy] Enable the misc-no-recursion check 2024-04-07 14:04:45 +01:00
merkleblock.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
net.cpp refactor: Delay translation of _() literals 2025-01-14 19:21:37 +01:00
net.h net: add LogIP() helper, use in net_processing 2024-11-26 13:22:55 +01:00
net_permissions.cpp util: move fees.h and error.h to common/messages.h 2024-05-16 10:16:08 -05:00
net_permissions.h Accept "in" and "out" flags to -whitelist to allow whitelisting manual connections 2024-02-28 10:05:56 -03:00
net_processing.cpp Merge bitcoin/bitcoin#31397: p2p: track and use all potential peers for orphan resolution 2025-01-16 13:42:26 +00:00
net_processing.h net: add GetOrphanTransactions() to PeerManager 2024-10-01 21:55:18 -04:00
net_types.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
net_types.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
netaddress.cpp refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
netaddress.h random: get rid of GetRand by inlining 2024-07-01 12:39:53 -04:00
netbase.cpp scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
netbase.h net: add All() in ReachableNets 2024-09-10 11:20:40 -03:00
netgroup.cpp Merge bitcoin/bitcoin#27581: net: Continuous ASMap health check 2023-12-06 11:22:42 -05:00
netgroup.h net: Add continuous ASMap health check logging 2023-12-02 22:03:08 +01:00
netmessagemaker.h refactor: NetMsg::Make() without nVersion 2023-11-20 14:02:27 +01:00
noui.cpp node: Use log levels in noui_ThreadSafeMessageBox 2024-03-21 16:41:16 +01:00
noui.h
outputtype.cpp fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
outputtype.h fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
pow.cpp doc: correct typos 2024-11-11 14:14:39 +00:00
pow.h Add FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION in PoW check 2024-09-02 15:43:33 +01:00
prevector.h prevector: avoid GCC bogus warnings in insert method 2024-09-11 17:41:26 +02:00
protocol.cpp scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp} 2024-10-26 23:44:15 +02:00
protocol.h scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp} 2024-10-26 23:44:15 +02:00
psbt.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
psbt.h Merge bitcoin/bitcoin#30406: refactor: modernize-use-equals-default 2024-07-11 19:08:46 +01:00
pubkey.cpp refactor: Use immediate lambda to work around GCC bug 117966 2024-12-16 10:39:28 +01:00
pubkey.h refactor: Make XOnlyPubKey tolerate constexpr std::arrays 2024-08-28 19:09:51 +02:00
random.cpp fuzz: Abort when using global PRNG without re-seed 2024-12-16 15:23:56 +01:00
random.h refactor: Drop unused UCharCast 2025-01-14 19:01:53 +01:00
randomenv.cpp util: Remove RandAddSeedPerfmon 2024-10-21 23:24:17 +02:00
randomenv.h
rest.cpp scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
rest.h
scheduler.cpp scripted-diff: Rename SingleThreadedSchedulerClient to SerialTaskRunner 2024-02-15 14:43:14 +01:00
scheduler.h kernel: Remove dependency on CScheduler 2024-02-16 17:12:52 +01:00
serialize.h Allow std::span in stream serialization 2024-12-19 14:41:21 +01:00
signet.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
signet.h
span.h refactor: Simplify SpanPopBack 2024-12-19 13:46:52 +01:00
streams.cpp streams: add DataStream::GetMemoryUsage 2024-11-04 18:46:40 +01:00
streams.h refactor: Avoid passing span iterators when data pointers are expected 2024-12-19 14:39:55 +01:00
sync.cpp util: avoid using thread_local variable that has a destructor 2024-05-16 18:16:46 +02:00
sync.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
threadsafety.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
tinyformat.h refactor: Introduce struct to hold a runtime format string 2025-01-15 12:16:08 +01:00
torcontrol.cpp Merge bitcoin/bitcoin#31223: net, init: derive default onion port if a user specified a -port 2024-12-13 18:56:37 -05:00
torcontrol.h net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
txdb.cpp refactor: Rely on returned value of GetCoin instead of parameter 2024-09-18 20:03:47 +02:00
txdb.h kernel: Move default cache constants to caches 2025-01-15 15:44:55 +01:00
txmempool.cpp txmempool: fix typos in comments 2024-12-31 00:04:20 -03:00
txmempool.h txmempool: fix typos in comments 2024-12-31 00:04:20 -03:00
txorphanage.cpp doc: fix typos 2025-01-16 17:36:16 +02:00
txorphanage.h [p2p] only attempt 1p1c when both txns provided by the same peer 2025-01-06 09:02:05 -05:00
txrequest.cpp [txrequest] GetCandidatePeers 2025-01-06 09:02:05 -05:00
txrequest.h [txrequest] GetCandidatePeers 2025-01-06 09:02:05 -05:00
uint256.cpp scripted-diff: Rename SetHex to SetHexDeprecated 2024-07-24 09:15:34 +02:00
uint256.h doc: Clarify comments about endianness after #30526 2025-01-03 09:19:53 -05:00
undo.h Include version.h in fewer places 2023-11-16 11:36:22 +10:00
validation.cpp Merge bitcoin/bitcoin#31556: validation: Send correct notification during snapshot completion 2024-12-30 14:40:27 -05:00
validation.h Merge bitcoin/bitcoin#31483: kernel: Move kernel-related cache constants to kernel cache 2025-01-16 15:04:58 +00:00
validationinterface.cpp refactor: include the proper header rather than forward-declaring RemovalReasonToString 2024-10-08 15:25:47 +00:00
validationinterface.h [refactor] change ActiveTipChange to use CBlockIndex ref instead of ptr 2024-07-25 11:01:22 +01:00
versionbits.cpp
versionbits.h
walletinitinterface.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00