1

The current Lightning implementations use P2WSH script format for multisig in the funding transaction. But it is also possible to use the CHECKMULTISIG opcode "natively", i.e., without P2WSH (see Mastering Bitcoin, Chapter 7). Can it be used for channel establishment? What would be the pros and cons? Was multisig used in Lightning at some point, or did Lightning go straight to P2WSH?

10
  • Possible duplicate of Why SHOULD the funding tx consume BIP 141 inputs? Commented May 8, 2019 at 14:04
  • Potential duplicate question to bitcoin.stackexchange.com/questions/84967/… could you please comment if the other question / answers help? Commented May 8, 2019 at 14:05
  • That question is interesting by itself but not exactly what I'm asking. I'm wondering whether one can or did use in the "plaintext" scripts (without P2WSH) with OP_CHECKMULTISIG in Lightning (very early versions perhaps?). Commented May 8, 2019 at 14:17
  • I think that didn't happen because of the malleability issues connected to non segwit transactions. If that does not answer your question I will dig a little deeper or wait for other lightning devs to help out. I am no segwit expert but I think that should be the reason (: Commented May 8, 2019 at 14:23
  • 1
    In my understanding it must produce segwit outputs. What it consumes should not matter Commented May 8, 2019 at 16:52

1 Answer 1

3

The main issue about using a non-segwit inputs in the funding transaction or a p2sh output as the channel anchor is the transaction malleability.

The recovery guarantee before a channel is funded relies on the commitment transaction building on top of the funding transaction. If the funding transactions txid were to be malleated, the commitment transaction becomes invalid and the funder becomes beholden to their channel partner for recovery.

In the case of using a p2sh output as the channel anchor, malleation of a unilateral force-close could be used to prohibit the counterparty from punishing the publication of an outdated channel state.

Therefore the funding transaction must be non-malleable and the channel anchor must be held in a script that is not malleable upon spending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.