I'm using an LN node based on Eclair, connected to https://explorer.acinq.co/#/n/025685ded18090d2d60120f8c2a0069c8972ce3672f9ee37684895a798038bf1c4
Local dust limit is set to 2730 Satoshi
Remote (lnd) dust limit is set to 573 Satoshi
On trying to send an HTLC of 1700 Satoshi I get a remote CommitSig from lnd which contains 1 signature for that HTLC while my local commit contains 0 signatures since that HTLC has been filtered out.
This error does not occur when I connect and send HTLC via Eclair-based nodes like https://explorer.acinq.co/#/n/03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 even though their dust levels are similar to lnd (546 Satoshi).
It seems like lnd uses local dust limit when it sends an outgoing CommitSig while it should use a remote dust limit.
Nope we properly use the remote dust limit for outgoing commit sigs:
https://github.com/lightningnetwork/lnd/blob/master/lnwallet/channel.go#L2332
What was the fee rate for the channel?
Will see if I can reproduce this myself.
About 500 Satoshi per kw.
FWIW this issue has disappeared once I started using 573 Satoshi as local dust limit.
Looking into this now, thanks for reporting! Occasionally I see a few dangling HTLC's on the faucet, and I think this might be the culprit.
I have tested this setup to my best ability, and have not been able to reproduce. Is this something you still see occasionally? @btcontract
One change that could have been the reason here is https://github.com/lightningnetwork/lnd/commit/4bec706b11b79be93bae29fa363eb90cb9390994
Before this was merged, the calculated value of the HTLC (value+fee) was a bit off for the remote transaction, which could have led lnd and eclair to prune the outputs differently. However, this was merged on December 1st, but could've been the reason if your lnd instance didn't have this commit.
Closing this for now based on @halseth's report and also the recent bug related fixes around the channel state machine.
Indeed I have not seen this bug for a long time now.
馃憤
It's back. The reason this was not manifesting itself lately is because I've set a local dust limit to 546 SAT months ago precisely to avoid this.
The following scenarios have been tested on both local B+L wallet and Eclair when connected to remote 039cc950286a8fa99218283d1adc2456e0d5e81be558da77dd6e85ba9a1fff5ad3 (yalls):
Scenario 1:
local/remote feeratePerKw = 53760 SAT
local dustLimit = 30000 SAT
remote dustLimit = 573 SAT
When sending a 21000 SAT HTLC commit, yalls replies with a commit which contains 0 signatures, everything is fine.
Scenario 2:
local/remote feeratePerKw = 10240 SAT
local dustLimit = 30000 SAT
remote dustLimit = 573 SAT
When sending a 21000 SAT HTLC commit, yalls replies with a commit which contains 1 signature while 0 is expected.
Scenario 3:
local/remote feeratePerKw = does not seem to matter
local dustLimit = 546 SAT
remote dustLimit = 573 SAT
When sending a 21000 SAT HTLC commit, yalls replies with a commit which contains 0 signatures, everything is fine.
Attached an eclair.conf which can be used to reproduce this.
Relevant changes in file are:
default-feerates {
delay-blocks {
1 = 40 // instead for 210 to change 53760 SAT to 10240 SAT
2 = 180
6 = 150
12 = 110
36 = 50
72 = 20
}
}
dust-limit-satoshis = 30000 // Instead of 546
Thanks, will look into this!
@alexbosworth Do you know what commit Yalls is/was running at this point in time?
@halseth 7abdd30a878efb3673ce4dfe0070570a6c9444c8
@btcontract Thank you for the detailed report that helped us track this down!
Fix is up here: #920
Most helpful comment
Indeed I have not seen this bug for a long time now.