[Lightning-dev] Return to the Layered Commit Transactions?

Anthony Towns aj at erisian.com.au
Mon Nov 30 01:25:54 UTC 2015

On Sat, Nov 28, 2015 at 07:27:42AM +1000, Anthony Towns wrote:
> (You might want to add further constraints on the timeout based on fees,
> of course -- the above is what you need to avoid being left holding
> the bag)

You might also want to batch the timeouts, so if you have 1000 concurrent
HTLCs on a channel at any point in time [0] and expect 10% of them
to timeout, you'd be better off expiring them in five batches of 20,
rather than individually.

That way you can spend them all to a single output, saving you both
19*34 bytes in that transaction, but also something like 19*130 bytes
when you want to actually spend the outputs. (With 40 satoshi/byte fees @
$350/BTC, that's an overall saving of 2c or more per batched HTLC)


[0] I think the 100kB standardness limit on transactions means you can
    have at most about 3000 concurrent committed HTLCs on a channel,
    assuming your anchor is a single multisig transaction, and your
    outputs are all P2SH.

More information about the Lightning-dev mailing list