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

Configure dust in flight threshold #1985

Merged
merged 18 commits into from
Oct 8, 2021
Merged

Configure dust in flight threshold #1985

merged 18 commits into from
Oct 8, 2021

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Oct 4, 2021

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.

@t-bast t-bast requested a review from pm47 October 4, 2021 07:02
@t-bast t-bast force-pushed the dust-in-flight-threshold branch from 5d42a8b to 5d4ed76 Compare October 4, 2021 07:28
t-bast added 3 commits October 5, 2021 10:27
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 t-bast force-pushed the dust-in-flight-threshold branch from 5d4ed76 to 155f2bb Compare October 5, 2021 08:27
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #1985 (ca5acf3) into master (d6b46ae) will increase coverage by 0.03%.
The diff coverage is 94.44%.

@@            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     
Impacted Files Coverage Δ
.../fr/acinq/eclair/blockchain/fee/FeeEstimator.scala 100.00% <ø> (ø)
.../fr/acinq/eclair/transactions/CommitmentSpec.scala 83.72% <ø> (ø)
...c/main/scala/fr/acinq/eclair/channel/Channel.scala 88.13% <75.00%> (-0.20%) ⬇️
...n/scala/fr/acinq/eclair/channel/DustExposure.scala 96.96% <96.96%> (ø)
...in/scala/fr/acinq/eclair/channel/Commitments.scala 94.51% <97.95%> (+0.61%) ⬆️
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 91.85% <100.00%> (+0.22%) ⬆️
...la/fr/acinq/eclair/transactions/Transactions.scala 96.80% <100.00%> (+0.01%) ⬆️
.../acinq/eclair/blockchain/bitcoind/ZmqWatcher.scala 88.13% <0.00%> (-1.87%) ⬇️
...clair/channel/publish/ReplaceableTxPublisher.scala 86.20% <0.00%> (-1.15%) ⬇️
... and 2 more

sstone
sstone previously approved these changes Oct 6, 2021
pm47
pm47 previously approved these changes Oct 7, 2021
@t-bast t-bast merged commit 75eafd0 into master Oct 8, 2021
@t-bast t-bast deleted the dust-in-flight-threshold branch October 8, 2021 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants