lightning-dev

OP_Expire and Coinbase-Like Behavior: Making HTLCs Safer by Letting Transactions Expire Safely

OP_Expire and Coinbase-Like Behavior: Making HTLCs Safer by Letting Transactions Expire Safely

Original Postby Peter Todd

Posted on: October 23, 2023 15:45 UTC

In the email, the sender suggests using "nExpiryHeight" instead of time-based expiration for a specific reason.

They argue that time-based expiration could potentially incentivize miners to manipulate the current time in the nTime field. Thus, they believe that making expiration conditional on a given height would be a better approach.

The sender also points out that the ability to use time-based expiration in nLockTime was a design mistake. They propose redefining an opcode, such as OP_Expire or OP_CheckExpiryTime, without the need for _Verify behavior. This would allow for the production of a true/false stack element.

Additionally, the sender acknowledges their previous proposal of an explicit field but realizes it may not be necessary due to the taproot annex. They suggest reusing part of nVersion for this purpose. They also mention that having nExpiryHeight could be beneficial in cases where a signature covering the field is sufficient.

Furthermore, the sender includes a link to Peter Todd's website (https://petertodd.org) and provides an email address: 'peter'[:-1]@petertodd.org.