ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.24k stars 266 forks source link

Feature request: Allow higher than 144 block target for claim-main and mutual-close #1486

Closed viaj3ro closed 4 years ago

viaj3ro commented 4 years ago

I just had to pay 42 s/vB for a claim-main tx. More than the 38 s/vB for the force closure itself. I assume this was partly due to a >24h full block period. Should still be much less since the former has a 6 block target while the latter has a 144 block target. So might be worth looking into that as well. Can provide logs if needed.

force closure: https://blockstream.info/tx/6a764119b4a52d01a794733c14b793e311183ac8acef1634513a8de207360e41 claim-main: https://blockstream.info/tx/9614abf33ae1db74316629a396362ab7ea80ea5b10faf8cfea145fee43c8e4e0

If targets of up to 2016 blocks were possible, one could always make use of cheap weekend fees to save money.

Worst case, those tx can be CPFPed in case they get stuck for too long.

t-bast commented 4 years ago

The highest target bitcoind provides is 1008 blocks, which we could add. In a full RBF/CPFP world, there's a lot of cool stuff that we'll be able to do, but we have preliminary work to do to setup the infrastructure for that.

viaj3ro commented 4 years ago

If you could add 1008 blocks, would already help quite a bit. Very excited for a future with full RBF/CPFP world.

Any Idea why the claim-main ended up paying more than the force closure itself?

t-bast commented 4 years ago

It looks like you're not the one who broadcast the force-close, right? It's the remote side of the channel that broadcast its version of the commitment tx?

In that case they broadcast with the latest agreed-upon channel feerate (which is either estimated by them or by you depending on who is funder), whereas when you broadcast your claim-main you used your local estimation (from your bitcoin core node) which may be more conservative than theirs.

viaj3ro commented 4 years ago

ah, yeah of course. that makes sense. thanks for explaining it.

viaj3ro commented 4 years ago

any progress? Not having the option of a 1008 block target is costing me hundreds of thousands of satoshis on a regular basis.

what I also noticed is that LND nodes negotiate much harder in channel closure negotiations. The end result is always MUCH closer to what the LND node initially proposed. This is good for the rare cases where a peer is proposing less than my node but very costly in every other case.

would you consider negotiating harder as well? Preferably only for when peer is proposing a higher fee. (with a 1008 block target this should almost always be the case anyway though)

t-bast commented 4 years ago

As you can see a PR is ready that implements this. It should be merged soon.