t-bast/lightning-docs

question about ptlc second stage tx

antonilol opened this issue · 1 comments

from https://github.com/t-bast/lightning-docs/blob/master/taproot-updates.md:

claiming successful PTLCs from the remote peer's commitment now requires using RBF and sighash flags similar to anchor outputs HTLC transactions (sighash_single | sighash_anyonecanpay trick)

in the case where the funds from a ptlc success/timeout are not sent to the local delayed pubkey (claiming from the remote commitment), a sighash none | anyone can pay can be used on the adaptor, of course the local signature will use sighash all to prevent malleability
with this, all n ptlcs can be swept in one transaction with n inputs and 1 output

is this right or am i missing something?

Using sighash_none is generally quite dangerous, so it's likely not a good idea (I haven't looked into it in details though). Especially considering that sweeping multiple htlcs or ptlcs in a single transaction is generally not a good idea (it's more dangerous than sweeping them independently), I don't think this change would be useful. But take this with a grain of salt, I haven't looked into it much, as again this isn't the goal of this article, this discussion will make sense on the bolts repo when taproot gets specified.