bitcoin-dev
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.