-
Notifications
You must be signed in to change notification settings - Fork 267
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
Configure dust in flight threshold #1985
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-bast
force-pushed
the
dust-in-flight-threshold
branch
from
October 4, 2021 07:28
5d42a8b
to
5d4ed76
Compare
This configuration field lets node operators decide on the amount of dust htlcs that can be in-flight in each channel. In case the channel is force-closed, up to this amount may be lost in miner fees. When sending and receiving htlcs, we check whether they would overflow our configured dust exposure, and fail them instantly if they do.
A large `update_fee` may overflow our dust exposure by removing from the commit tx htlcs that were previously untrimmed. Node operators can choose to automatically force-close when that happens, to avoid risking losing large dust amounts to miner fees.
t-bast
force-pushed
the
dust-in-flight-threshold
branch
from
October 5, 2021 08:27
5d4ed76
to
155f2bb
Compare
sstone
reviewed
Oct 5, 2021
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1985 +/- ##
==========================================
+ Coverage 87.60% 87.63% +0.03%
==========================================
Files 159 160 +1
Lines 12445 12531 +86
Branches 529 537 +8
==========================================
+ Hits 10902 10982 +80
- Misses 1543 1549 +6
|
pm47
reviewed
Oct 6, 2021
eclair-core/src/main/scala/fr/acinq/eclair/transactions/CommitmentSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala
Outdated
Show resolved
Hide resolved
sstone
reviewed
Oct 6, 2021
eclair-core/src/main/scala/fr/acinq/eclair/transactions/CommitmentSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/transactions/CommitmentSpec.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
sstone
previously approved these changes
Oct 6, 2021
pm47
reviewed
Oct 6, 2021
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala
Outdated
Show resolved
Hide resolved
And add many tests for the corresponding scenarios.
pm47
previously approved these changes
Oct 7, 2021
pm47
approved these changes
Oct 7, 2021
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This configuration field lets node operators decide on the amount of dust htlcs that can be in-flight in each channel.
In case the channel is force-closed, up to this amount may be lost in miner fees.
When sending and receiving htlcs, we check whether they would overflow our configured dust exposure, and fail them instantly if they do.
A large
update_fee
may overflow our dust exposure by removing from the commit tx htlcs that were previously untrimmed.Node operators can choose to automatically force-close when that happens, to avoid risking losing large dust amounts to miner fees.
This is disabled by default.