mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 09:41:52 +01:00
c7db88af71descriptor: assert we never parse a sane miniscript with no pubkey (Antoine Poinsot)a49402a9ecqa: make sure we don't let unspendable Miniscript descriptors be imported (Antoine Poinsot)639e3b6c97descriptor: refuse to parse unspendable miniscript descriptors (Antoine Poinsot)e3280eae1bminiscript: 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: utACKc7db88af71achow101: ACKc7db88af71Tree-SHA512: e79bc9f7842e98a4e8f358f05811fca51b15b4b80a171c0d2b17cf4bb1f578a18e4397bc2ece9817d392e0de0196ee6a054b7318441fd3566dd22e1f03eb64a5