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

Prevent force closing channels with fee rate/conf target #3074

Closed
LNBIG-COM opened this issue May 13, 2019 · 3 comments · Fixed by #3227
Closed

Prevent force closing channels with fee rate/conf target #3074

LNBIG-COM opened this issue May 13, 2019 · 3 comments · Fixed by #3227
Labels
beginner Issues suitable for new developers channel closing Related to the closing of channels cooperatively and uncooperatively good first issue Issues suitable for first time contributors to LND P3 might get fixed, nice to have rpc Related to the RPC interface

Comments

@LNBIG-COM
Copy link

LNBIG-COM commented May 13, 2019

Background

When i use lnd API for force-closing of channel with target_conf: 36 i see that LND makes transaction with big fee (as target_conf would be 1-2 only).

Your environment

  • version of lnd 0.6.1-beta commit=v0.6.1-beta-rc2
  • which operating system (uname -a on *Nix) CentOS
  • version of btcd, bitcoind, or other backend - 0.17.1

Actual behaviour

For example i do (node.js):

CloseChannel({ channel_point: { funding_txid_str: 'cfcf31ce231918fb69b36c64345b424cd3aa9b2ef38e32160ffa7ed1b58a1082', output_index: 1 }, force: true, target_conf: 36 })

In that time at target bitcoin node i have a fee for 36 blocks as:

$ bitcoin-cli estimatesmartfee 36
{
  "feerate": 0.00011096,
  "blocks": 36
}

So it's about 11 sat/byte

But after the LND does this transaction:

https://www.smartbit.com.au/tx/ee9cac6a8cfed7a37f8929794fe3b21daf781d06b7541b093a399d9a4a66e549

There is 133 sat/byte. I’m sure that in this case the LND does not explicitly follow the target_conf

And i see many same cases now (i did some force closings and checked them)

@wpaulino
Copy link
Contributor

This is the expected behavior. Force closed channels have pre-negotiated closing fees that happen every so often to ensure it can get into the chain at any given point. This will change in the protocol with lightning/bolts#513.

@cfromknecht
Copy link
Contributor

@wpaulino given that this mixup has happened previously, perhaps we should reopen the issue with the goal of having lncli return an immediate failure when trying to force close with a non-zero conf target or fee rate

@wpaulino wpaulino changed the title The lnd doesn't follow target_conf for force closing Prevent force closing channels with fee rate/conf target May 13, 2019
@wpaulino
Copy link
Contributor

SGTM.

@wpaulino wpaulino reopened this May 13, 2019
@wpaulino wpaulino added channel closing Related to the closing of channels cooperatively and uncooperatively P3 might get fixed, nice to have rpc Related to the RPC interface labels May 13, 2019
@cfromknecht cfromknecht added beginner Issues suitable for new developers good first issue Issues suitable for first time contributors to LND labels May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issues suitable for new developers channel closing Related to the closing of channels cooperatively and uncooperatively good first issue Issues suitable for first time contributors to LND P3 might get fixed, nice to have rpc Related to the RPC interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants