0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/script
Andrew Chow 7edce77ff3
Merge bitcoin/bitcoin#28067: descriptors: do not return top-level only funcs as sub descriptors
dd9633b516 test: wallet, add coverage for watch-only raw sh script migration (furszy)
cc781a2180 descriptor: InferScript, do not return top-level only func as sub descriptor (furszy)
286e0c7d5e wallet: loading, log descriptor parsing error details (furszy)

Pull request description:

  Linked to #28057.

  Currently, the `InferScript` function returns an invalid descriptor when it tries to infer a p2sh-p2pkh script whose pubkey is not known by the wallet.

  This behavior occurs because the inference process bypasses the `pkh` subscript when the pubkey is not contained by the wallet (no pubkey provider), interpreting it as a `sh(addr(ADDR))` descriptor. Then, the failure arises because the `addr()` function is restricted to being used only at the top level.

  For reviewers, would recommend to start by examining the functional test to understand the context and the circumstances on which this can result in a fatal error (e.g. during the migration process).

ACKs for top commit:
  achow101:
    ACK dd9633b516
  darosior:
    utACK dd9633b516

Tree-SHA512: 61e763206c604c372019d2c36e31684f3dddf81f8b154eb9aba5cd66d8d61bda457ed4e591613eb6ce6c76cf7c3f11764abc6cd727a7c2b6414f1065783be032
2023-07-20 11:16:45 -04:00
..
bitcoinconsensus.cpp Merge bitcoin/bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-01-13 09:40:57 +00:00
bitcoinconsensus.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
descriptor.cpp Merge bitcoin/bitcoin#28067: descriptors: do not return top-level only funcs as sub descriptors 2023-07-20 11:16:45 -04:00
descriptor.h wallet: bugfix, always use apostrophe for spkm descriptor ID 2023-06-28 09:37:16 -03:00
interpreter.cpp BIP341 txdata cannot be precomputed without spent outputs 2023-02-17 16:29:49 -05:00
interpreter.h Merge bitcoin/bitcoin#25877: refactor: Do not use CScript for tapleaf scripts until the tapleaf version is known 2023-01-19 17:51:21 -05:00
keyorigin.h Implement operator< for KeyOriginInfo and CExtPubKey 2021-12-10 08:29:47 -05:00
miniscript.cpp Merge bitcoin/bitcoin#24149: Signing support for Miniscript Descriptors 2023-02-16 10:01:33 +00:00
miniscript.h descriptor: refuse to parse unspendable miniscript descriptors 2023-07-01 12:02:06 +02:00
script.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
script.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
script_error.cpp Implement Tapscript script validation rules (BIP 342) 2020-10-12 17:18:24 -07:00
script_error.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
sigcache.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
sigcache.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
sign.cpp Merge bitcoin/bitcoin#24149: Signing support for Miniscript Descriptors 2023-02-16 10:01:33 +00:00
sign.h Fixed a couple of typos in comments to make linter happy 2023-03-03 19:06:02 -03:00
signingprovider.cpp refactor: Move error() from util/system.h to logging.h 2023-03-13 17:09:54 +01:00
signingprovider.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
standard.cpp Merge bitcoin/bitcoin#25877: refactor: Do not use CScript for tapleaf scripts until the tapleaf version is known 2023-01-19 17:51:21 -05:00
standard.h Merge bitcoin/bitcoin#25877: refactor: Do not use CScript for tapleaf scripts until the tapleaf version is known 2023-01-19 17:51:21 -05:00