bitcoin-dev

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

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

The discussion addresses technical challenges within the Lightning Network, such as managing outdated states and transaction fees.

It is recognized that while security could be improved, keeping transaction fees to a minimum relative to the channel's total value is essential for economic viability.

Miners benefit from the increase in feerate over discarded transactions when mining HTLC commitment transactions. Consequently, the need to minimize the proportion of channel value allocated to fees is highlighted, with suggestions to amend implementations that currently do not follow this principle.

The conversation also touches on Replace-by-Fee (RBF) mechanics, suggesting that increased channel fees could be extracted from the party broadcasting the commitment transaction to alleviate substantial fees upon closing channels.

SIGHASH_NOINPUT is proposed as a solution to sign HTLC refund transactions, which could simplify handling multiple fee rates. However, LN-Symmetry is considered insecure without a degree of trust between parties.

Package relay version 3 is introduced, changing how zero-value outputs are managed to prevent UTXO set growth. Anchor outputs must now be spent within the same package, impacting defensive strategies against double-spend attacks.

OP_Expire is presented, ensuring timely revelation of preimages in blockchain transactions and making them useless if not revealed promptly. This mechanism is critiqued for potentially enabling RBF without anchor outputs, leading to more efficient use of block space compared to CPFP with package relay.

Antoine's email highlights vulnerabilities in single-input commitment transactions and suggests pre-signing these with zero fees and using CPFP for necessary fee adjustments. However, there's a risk that replacement by CPFP could lead to eviction from the mempool.

An HTLC scenario explains how OP_EXPIRE can secure funds against potential attacks by enforcing timelocks. The ability of OP_Expire to prevent adversarial tactics like replacement cycling is questioned, indicating the need for further evaluation.

Overall, these discussions explore enhancements to the Lightning Network and smart contract scripting to improve security and efficiency. They address HTLCs and propose significant changes, such as introducing the OP_Expire opcode and considering soft fork upgrades for better transaction management and protection against attacks.

Discussion History

0
Peter ToddOriginal Post
October 21, 2023 00:09 UTC
1
October 21, 2023 00:09 UTC
2
October 21, 2023 08:58 UTC
3
October 21, 2023 08:58 UTC
4
October 21, 2023 10:31 UTC
5
October 21, 2023 10:31 UTC
6
October 22, 2023 08:30 UTC
7
October 22, 2023 08:30 UTC
8
October 23, 2023 11:10 UTC
9
October 23, 2023 11:10 UTC
10
October 23, 2023 15:45 UTC
11
October 23, 2023 15:45 UTC
12
November 2, 2023 05:24 UTC
13
November 2, 2023 06:26 UTC
14
November 2, 2023 17:07 UTC
15
November 3, 2023 05:25 UTC
16
November 3, 2023 05:27 UTC
17
November 4, 2023 07:26 UTC
18
November 6, 2023 18:45 UTC
19
November 7, 2023 11:11 UTC
20
November 7, 2023 15:44 UTC
21
November 8, 2023 00:51 UTC
22
November 8, 2023 02:06 UTC
23
November 13, 2023 02:18 UTC
24
November 14, 2023 19:50 UTC