Assuming that the funding transaction uses a P2WSH output, can we open a channel by providing that standard 2-of-2 multisig as the coinbase output?
1 Answer
After thinking some more about it: it would be impractical to open a channel with a coinbase output.
For one, there is the maturation period for coinbase outputs. Since coinbase outputs can only be spent after 100 confirmations, any attempts to close the channel would be delayed accordingly.
The bigger issue is that the channel opener's capability to refund themselves depends on a transaction presigned by the channel partner. As the refund is a child of the coinbase transaction, the channel opener would need to renegotiate the channel open with the channel partner every single time the coinbase transaction's hash changes. This happens for example every time the extranonce is incremented or the transactions included in the block are updated, because of the witness commitment stored in an output of the coinbase transaction.
This would lead to the channel needing to be renegotiated multiple times per second even with a small mining operation, unless the miner used special strategies to minimize coinbase transaction updates (e.g. time-rolling, overt ASICBOOST) in lieu of updating the extranonce in the coinbase which would only reduce the frequency but not mitigate the problem entirely.
-
So assuming the 100 confirmation maturity issue is acceptable to both channel parties... the further impracticality is that for each failed attempt at mining the block containing the coinbase channel open (someone else mines that block first), you would need to reacquire a refund transaction after recreating a new funding transaction that recommits to a new set of wtxids (due to the BIP141 commitment structure requirement)– oz21mOct 15, 2022 at 17:05
-
Yeah exactly. Every time the coinbase transaction is updated, the refund transaction would need to get resigned by the channel partner.– Murch ♦Oct 16, 2022 at 16:25