-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure dust in flight threshold (#1985)
Add config fields for max dust htlc exposure. These configuration fields let 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.
- Loading branch information
Showing
18 changed files
with
1,065 additions
and
103 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,16 @@ eclair { | |
// when using anchor outputs, we only need to use a commitment feerate that allows the tx to propagate: we will use CPFP to speed up confirmation if needed. | ||
// the following value is the maximum feerate we'll use for our commit tx (in sat/byte) | ||
anchor-output-max-commit-feerate = 10 | ||
// the following section lets you configure your tolerance to dust outputs | ||
dust-tolerance { | ||
// dust htlcs cannot be claimed on-chain and will instead go to miners if the channel is force-closed | ||
// a malicious peer may want to abuse that, so we limit the value of pending dust htlcs in a channel | ||
// this value cannot be lowered too much if you plan to relay a lot of htlcs | ||
max-exposure-satoshis = 50000 | ||
// when we receive an update_fee, it could increase our dust exposure and overflow max-exposure-satoshis | ||
// this parameter should be set to true if you want to force-close the channel when that happens | ||
close-on-update-fee-overflow = false | ||
} | ||
} | ||
override-feerate-tolerance = [ // optional per-node feerate tolerance | ||
# { | ||
|
@@ -150,6 +160,10 @@ eclair { | |
# ratio-low = 0.1 | ||
# ratio-high = 20.0 | ||
# anchor-output-max-commit-feerate = 10 | ||
# dust-tolerance { | ||
# max-exposure-satoshis = 25000 | ||
# close-on-update-fee-overflow = true | ||
# } | ||
# } | ||
# } | ||
] | ||
|
@@ -388,6 +402,6 @@ akka { | |
backend.min-nr-of-members = 1 | ||
frontend.min-nr-of-members = 0 | ||
} | ||
seed-nodes = [ "akka://[email protected]:25520" ] | ||
seed-nodes = ["akka://[email protected]:25520"] | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.