lightning-dev
Lightning, the death of BIP62, and Segregated Witness
Posted on: November 19, 2015 19:12 UTC
The Lightning Network, a proposed implementation of micropayment channels to scale Bitcoin transactions, requires an upgrade to the current protocol for reliable spending from unconfirmed transactions.
While BIP62 addresses many vectors for txid malleability, it is not helpful in the context of lightning channel creation since ECDSA sigs are inherently malleable. For this purpose, sighash_noinput can provide a solution as input txids are not signed, and if they change, the spending transaction can be modified while leaving counterparty signatures intact. A new "testnet-L" is being planned to test malleability mitigation out. The soft-fork plan involves having the scriptPubKey as just the 20-byte hash of the redeem script and the scriptSig of the spending input empty, with the actual scriptSig, containing the redeem script and signatures, contained in a separate Merkle tree committed elsewhere in the block. Meanwhile, the hardfork variant involves sticking the signatures in another parallel merkle tree, allowing for the validation of everything else without downloading the signatures.