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

Deprecate dust-threshold config value #9182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ziggie1984
Copy link
Collaborator

@ziggie1984 ziggie1984 commented Oct 13, 2024

Introduced a more clear config value and deprecated the old dust-threshold value. The new setting is called channel-max-fee-exposure. Nothing has changed code wise, the new value behaves as the old one but is way clearer and removes the ambiguity

@lightningnetwork lightningnetwork deleted a comment from yyforyongyu Oct 14, 2024
@saubyk saubyk changed the title Deprecate dust-treshold config value Deprecate dust-threshold config value Oct 18, 2024
@ziggie1984 ziggie1984 force-pushed the fix-feebuffer branch 2 times, most recently from f8ce024 to c0f0f04 Compare October 18, 2024 23:32
@ziggie1984 ziggie1984 marked this pull request as ready for review October 18, 2024 23:35
@ziggie1984 ziggie1984 changed the title Deprecate dust-threshold config value Deprecate dust-treshold config value Oct 18, 2024
@ziggie1984 ziggie1984 changed the title Deprecate dust-treshold config value Deprecate dust-threshold config value Oct 18, 2024
@ziggie1984 ziggie1984 force-pushed the fix-feebuffer branch 2 times, most recently from 7514a69 to 4c395e8 Compare October 19, 2024 07:19
@ziggie1984 ziggie1984 self-assigned this Oct 19, 2024
@ziggie1984 ziggie1984 added the config Parameters/arguments/config file related issues/PRs label Oct 19, 2024
@ziggie1984 ziggie1984 added this to the v0.19.0 milestone Oct 19, 2024
htlcswitch/link.go Show resolved Hide resolved
config.go Outdated Show resolved Hide resolved
sample-lnd.conf Outdated Show resolved Hide resolved
sample-lnd.conf Outdated Show resolved Hide resolved
sample-lnd.conf Outdated Show resolved Hide resolved
sample-lnd.conf Outdated
; Setting this value too low might cause force closes because the lightning
; protocol has no way to roll back a channel state when your peer proposes a
; channel update which exceeds this limit there are only two options to resolve
; the situation. You can either increase the limit and the channel should be
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused here about how the sequence of events can transpire here for the user to address the situation.

  1. Peer proposes an update which exceeds the limit
  2. Would the channel become inactive?
  3. User inspects the log statement and realizes that exposure limit needs to be increased
  4. After increasing the limit, LND needs to be restarted for new config setting to become effective
  5. LND is restarted and the channel is active again?

What I am also unsure about is, can the channel be really "saved" by prompt user action or is the channel's fate sealed after the peer proposes an update exceeding the threshold value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it short to not explain the whole lightning state protocol here but regarding your questions:

  1. Yes the channel would become inactive because the channel partner which exceeds the fee here will fail the channel with an internal error, depending on the lightning implementations some might already force close the channel if they receive an internal state maschine error from us, LND does not and there is a chance to bring this channel up again, if the limit is increased and the node restarted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not something we can address here:

But there is a UX problem in discovering that the channel has become inactive and then inspecting the log to find out what might have happened. Log might get cycled if the user is too late in inspecting and may lose this critical piece of info.
I was wondering if we can create a TODO or an issue to persist the reason for channel becoming inactive in the DB, so that discoverability of the issue is easier

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are making a very good point here, we should at least record a channel state failure when reporting the channel to the user, will create an issue.

@saubyk saubyk added the size/nano trivial move, refactor, renames label Oct 22, 2024
Replace ambigious config value "dust-treshold" with a more clear
"channel-max-fee-exposure" exposure value. The old value is
deprecated and will be removed in the near future.
Copy link
Collaborator

@saubyk saubyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎚️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Parameters/arguments/config file related issues/PRs size/nano trivial move, refactor, renames
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants