What do transactions creating LN payment channels and resolving them look like? Are Lightning Network transactions distinguishable from other multisignature transactions? Would it be possible for miners to discriminate against LN transactions?
The most distinguishing feature of a LN channel-opening transaction would be an
OP_OR in the
scriptPubKey of the channel-funding UTXO, where one side of the
OP_OR requires two signatures, and the other side a single signature with an
A closing transaction can be recognized simply based on the fact that it spends a channel-funding UTXO. If miners were attempting to detect lightning channels, they would need to detect funding transactions. Once detected, they could either choose to block the funding transaction, itself, or transactions that attempt to spend the funding transactions and close the channel.
Remember, however, that lightning channels will not be the only smart contract that will use UTXOs like described above. Miners would have to boycott all kinds of smart contracts in order to keep lightning channels off the blockchain. Also, P2SH would be used, so that miners would not know what the
scriptPubKey contains until after the closing transaction is published. This means they would lose the ability to prevent opening a channel. In addition, MAST could be used to hide the complexity of a smart contract, even after the contract is fully executed. This would prevent miners from being able to stop a channel from closing as well.
On the whole, lightning channels would be difficult for miners to discriminate against.