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 ZmnSCPxj

Posted on: October 23, 2023 11:10 UTC

The email discusses an alternate design proposal for the taproot annex.

The proposed design includes the addition of an "nExpiryTime" field, which indicates that a transaction must not exist in a block at or above the specified height. The mempool is suggested to organize transactions into buckets based on their "nExpiryTime", and if a block is reached, all buckets with "nExpiryTime" less than that block height should be dropped.

Additionally, the proposal suggests the addition of an "OP_CHECKEXPIRYTIMEVERIFY" opcode, which would check if the "nExpiryTime" exists and has a value equal to or less than the top of the stack. This opcode is similar in behavior to the "OP_EXPIRE" proposed by Peter Todd, but with the primary difference being that this proposal suggests an explicit field for "nExpiryTime" in the taproot annex.

The author highlights the belief that an explicit field is better than an implicit one and that the proposed design may be better implemented by non-Bitcoin-core implementations due to the explicit treatment of the "nExpiryTime" field.

Overall, the email presents an alternate design proposal for the taproot annex, introducing the "nExpiryTime" field and suggesting the use of tx buckets for organization. The proposal also includes the addition of the "OP_CHECKEXPIRYTIMEVERIFY" opcode for checking the "nExpiryTime" value.