What is Nostr?
Rusty Russell [ARCHIVE] /
npub1zw7…khpx
2023-06-09 12:53:02
in reply to nevent1q…g3sp

Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2018-11-22 📝 Original message: Matt Corallo <lf-lists at ...

📅 Original date posted:2018-11-22
📝 Original message:
Matt Corallo <lf-lists at mattcorallo.com> writes:
> Ah, oops, indeed, that is much cleaner :). Still need a CSV of 1, though :(.

OK, let's walk through this:

Locally offered HTLC:
- Local HTLC-Timeout tx is CLTV delayed, but remote can fulfill without delay.
Remote offered HTLC:
- Local HTLC-Success tx can be done without delay, but remote timeout is CLTV.

IOW:
- HTLC output scripts get a `1 OP_CSV OP_DROP` in the non-revoked branch:

OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
OP_IF
OP_CHECKSIG
OP_ELSE
+ 1 OP_CHECKSEQUENCEVERIFY OP_DROP
...
- HTLC-Success tx needs nSequence = 1.
- Similarly any self-generated fulfullment tx needs nSequence = 1.

Yech.

I still want a new RBF rule where if you pay twice the current package
*feerate* your tx is accepted, overriding RBF rules 3, 4 & 5. Probably
need to increase the effective minrelay feerate for any txs adding to
that package, similarly (using that double-previous-package-feerate).

That would mean we're back to a single P2WSH(OP_TRUE) with less
blockchain spam, and life is simple. But I'll debate this on
bitcoin-dev :)

Cheers,
Rusty.
Author Public Key
npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx