Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: uneconomical anchor sweeps #9191

Open
feelancer21 opened this issue Oct 15, 2024 · 1 comment
Open

[bug]: uneconomical anchor sweeps #9191

feelancer21 opened this issue Oct 15, 2024 · 1 comment
Labels
bug Unintended code behaviour fees Related to the fees paid for transactions (both LN and funding/commitment transactions) utxo sweeping

Comments

@feelancer21
Copy link
Contributor

Background

lnd seems to sweep anchors even though the FC was already confirmed one block before and there was no economic reason for a CPFP. The anchor sweep was also totally uneconomical with 6727 sats.

https://mempool.space/tx/fb86828847e7d742c7736d80bbce4026737e90953850ab8193f26a2c1543a8e2

That was not from my node. But I have observed the same one week ago with lnd 0.18.3. But the overpayment was not such high.

@feelancer21 feelancer21 added bug Unintended code behaviour needs triage labels Oct 15, 2024
@yyforyongyu
Copy link
Member

It looks like the force closing tx itself used a much higher feerate, 59.5 vb/sat, as shown here, which got itself confirmed quickly after one block.

This speaks of a few things to fix/improve here,

  1. the fee updating logic may need to be updated to make sure a) we only update the commitment fee to be the min_relay_fee and b) we need to send out the updates frequently (think we do hourly already).
  2. the current CPFP begins immediately once the commitment tx is broadcast, which we could instead wait for one block, tho I prefer not and instead make sure only min relay feerate is used, which would also make it easier to implement the upcoming zero-fee-commit.

I'll double-check the first item - note that if you are not the channel initiator and the peer doesn't send an update fee while the current feerate is low, the FC will use the old feerate.

@ziggie1984 ziggie1984 added utxo sweeping fees Related to the fees paid for transactions (both LN and funding/commitment transactions) and removed needs triage labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour fees Related to the fees paid for transactions (both LN and funding/commitment transactions) utxo sweeping
Projects
None yet
Development

No branches or pull requests

3 participants