lightning-dev

CheckTemplateVerify Does Not Scale Due to UTXO's Required For Fee Payment

CheckTemplateVerify Does Not Scale Due to UTXO's Required For Fee Payment

Original Postby Anthony Towns

Posted on: January 30, 2024 05:55 UTC

The email provides an overview of a proposed change in Bitcoin Improvement Proposal 118 (BIP 118) as of March 2021, which is a modification of the transaction digest algorithm defined by BIP 143.

In the original BIP 143, a new transaction digest algorithm was introduced that specifically applies to version 0 witness program sigops and involves the double SHA256 serialization of various components, including hashPrevouts, hashSequence, outpoint, scriptCode of the input, and nSequence of the input.

In contrast, BIP 118 suggests alterations to this digest algorithm when verifying a SIGHASH_NOINPUT signature. The modifications include setting hashPrevouts and hashSequence to 32 bytes of zeros, the outpoint to 36 bytes of zeros, and the scriptCode of the input to an empty script. These changes effectively eliminate the commitment to previous outputs and other inputs' sequences within the transaction, focusing solely on the input being signed without reference to the rest of the transaction.

This approach simplifies certain types of transactions, particularly those involving off-chain contract protocols, by not committing to the specific outputs or other inputs being spent by the transaction. This could potentially streamline certain use cases but also alters how transactions are verified in a fundamental way. The sender's note ends with a casual sign-off reflecting their engagement in the technical discourse around this proposal.