[WIP] support new multisig template in wallet for Solver, signing, and signature combining #13449

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:largemultisig changing 3 files +168 −0
  1. instagibbs commented at 6:13 pm on June 12, 2018: member

    …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.

    0+/* Script of the form:
    1+ *
    2+ * <pubkey1> OP_CHECKSIG
    3+ * OP_SWAP <pubkey2> OP_CHECKSIG OP_ADD
    4+ * OP_SWAP <pubkey3> OP_CHECKSIG OP_ADD
    5+ * ...
    6+ * OP_SWAP <pubkey67> OP_CHECKSIG OP_ADD
    7+ * <m> OP_NUMEQUAL
    8+ */
    

    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.

  2. support new multisig template in wallet for Solver, signing, and signature combining af3ae0a252
  3. instagibbs force-pushed on Jun 12, 2018
  4. laanwj renamed this:
    [WIP] support new multisig template in wallet for Solver, signing, and sign…
    [WIP] support new multisig template in wallet for Solver, signing, and signature combining
    on Jun 12, 2018
  5. laanwj added the label Wallet on Jun 12, 2018
  6. sipa commented at 6:30 pm on June 12, 2018: member

    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.

  7. DrahtBot commented at 8:15 pm on June 14, 2018: member
    • #13557 (BIP 174 PSBT Serializations and RPCs by achow101)
    • #13425 (Moving final scriptSig construction from CombineSignatures to ProduceSignature (PSBT signer logic) by achow101)

    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.

  8. DrahtBot added the label Needs rebase on Jul 7, 2018
  9. DrahtBot commented at 8:37 am on July 7, 2018: member
  10. instagibbs commented at 4:16 pm on July 9, 2018: member
    I’ll rebase once #13557 is merged, making it PSBT-only.
  11. luke-jr commented at 12:37 pm on July 30, 2018: member
    Is there a reason for OP_NUMEQUAL rather than OP_EQUAL per BIP 19?
  12. instagibbs commented at 6:53 pm on August 3, 2018: member
    @luke-jr had no idea there was a BIP. I used a stack overflow answer. Will investigate.
  13. sipa commented at 0:23 am on August 4, 2018: member
    @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.
  14. instagibbs commented at 12:40 pm on August 31, 2018: member
    Closing in favor of Future Work with descriptor language stuff
  15. instagibbs closed this on Aug 31, 2018

  16. laanwj removed the label Needs rebase on Oct 24, 2019
  17. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 04:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me