elements/src/script
Andrew Chow bc88f3ab90
Merge bitcoin/bitcoin#27997: Descriptors: rule out unspendable miniscript descriptors
c7db88af71 descriptor: assert we never parse a sane miniscript with no pubkey (Antoine Poinsot)
a49402a9ec qa: make sure we don't let unspendable Miniscript descriptors be imported (Antoine Poinsot)
639e3b6c97 descriptor: refuse to parse unspendable miniscript descriptors (Antoine Poinsot)
e3280eae1b miniscript: make GetStackSize() and GetOps() return optionals (Antoine Poinsot)

Pull request description:

  `IsSane()` in Miniscript does not ensure a Script is actually spendable. This is an issue as we would accept any sane Miniscript when parsing a descriptor. Fix this by explicitly checking a Miniscript descriptor is both sane and spendable when parsing it.

  This bug was exposed due to a check added in #22838 (https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1226859880) that triggered a fuzz crash (https://github.com/bitcoin/bitcoin/pull/22838#issuecomment-1612510057).

ACKs for top commit:
  sipa:
    utACK c7db88af71
  achow101:
    ACK c7db88af71

Tree-SHA512: e79bc9f7842e98a4e8f358f05811fca51b15b4b80a171c0d2b17cf4bb1f578a18e4397bc2ece9817d392e0de0196ee6a054b7318441fd3566dd22e1f03eb64a5
2023-07-17 19:16:09 -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#27997: Descriptors: rule out unspendable miniscript descriptors 2023-07-17 19:16:09 -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