mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
10546a569cwallet: accurately account for the size of the witness stack (Antoine Poinsot)9b7ec393b8wallet: use descriptor satisfaction size to estimate inputs size (Antoine Poinsot)8d870a9873script/signingprovider: introduce a MultiSigningProvider (Antoine Poinsot)fa7c46b503descriptor: introduce a method to get the satisfaction size (Antoine Poinsot)bdba7667d2miniscript: introduce a helper to get the maximum witness size (Antoine Poinsot)4ab382c2cdminiscript: make GetStackSize independent of P2WSH context (Antoine Poinsot) Pull request description: The wallet currently estimates the size of a signed input by doing a dry run of the signing logic. This is unnecessary since all outputs we can sign for can be represented by a descriptor, and we can derive the size of a satisfaction ("signature") directly from the descriptor itself. In addition, the current approach does not generalize well: dry runs of the signing logic are only possible for the most basic scripts. See for instance the discussion in #24149 around that. This introduces a method to get the maximum size of a satisfaction from a descriptor, and makes the wallet use that instead of the dry-run. ACKs for top commit: sipa: utACK10546a569cachow101: re-ACK10546a569cTree-SHA512: 43ed1529fbd30af709d903c8c5063235e8c6a03b500bc8f144273d6184e23a53edf0fea9ef898ed57d8a40d73208b5d935cc73b94a24fad3ad3c63b3b2027174