[WIP] support new multisig template in wallet for Solver, signing, and signature combining#13449
[WIP] support new multisig template in wallet for Solver, signing, and signature combining#13449instagibbs wants to merge 1 commit into
Conversation
4188a7e to
af3ae0a
Compare
|
Concept ACK, though a significant part of the sign/combine logic is being changed in #13425. One possibility is only supporting these large multisig using PSBT, and not through the existing partial raw transactions interface. That should be very simple to write, but more restrictive. Otherwise, the code for extracting existing signatures from a partial raw transaction into a key/sig map will need to be combined with this. |
Note to reviewers: This pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| Needs rebase |
|
I'll rebase once #13557 is merged, making it PSBT-only. |
|
Is there a reason for |
|
@luke-jr had no idea there was a BIP. I used a stack overflow answer. Will investigate. |
|
@luke-jr Interesting! Reading that BIP, I believe the n-of-n template suggested there is incorrect. In case all signatures are valid, it will leave the stack empty, which is interpreted as failure. |
|
Closing in favor of Future Work with descriptor language stuff |
…ature combining
Currently the wallet can only sign/understand up to n-of-16 checkmultisig templates. Some efforts are being taken to expand this to n-of-20: #13348 . Rather than try to increase the number of possible signatures marginally this template is based on https://bitcoin.stackexchange.com/a/51653 which allows signing/combining of up to n-of-67, constrained by the non-push opcode limit.
Wallet code currently disallows import of any redeem/witnessscript beyond 520 bytes(n-of-15), so no safety is lost due to the possible mixture of segwit/non-segwit scripts.
Looking for concept ACKs before I go write tests and attempt code de-duplication, but manual testing worked.