-
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
During mutual close negotiation, Eclair might not send last closing_signed
msg
#1742
Comments
Why is that a problem? As the spec says, it's only a |
Well, sure, it is not a critical issue. Still it is a Clearly whoever wrote the code agrees too. That is, if you believe there is no point for Bob to send a eclair/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala Lines 1223 to 1231 in c37eb1a
I've found this issue while using Electrum as there currently the GUI only gives positive feedback to the user that the mutual close worked when receiving the final |
I agree, it would be nice to fix this, but it's quite low priority. |
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
As described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742.
Add `closing_signed` `fee_range` TLV as described in lightning/bolts#847 We also refactor the negotiating state, add many tests and fix #1742. Add new fields to the `close` API to let users configure their preferred fees for mutual close.
During mutual close negotiation, Eclair sometimes does not send the last
closing_signed
msg.Specifically I am talking about this part of BOLT-02:
https://github.com/lightningnetwork/lightning-rfc/blob/b201efe0546120c14bf154ce5f4e18da7243fe7a/02-peer-protocol.md#requirements-6
Consider a channel between Alice and Bob, with Bob running Eclair.
If Alice sends a
closing_signed
with afee_satoshis
Bob agrees with,I've found that
closing_signed
with the samefee_satoshis
value,I am looking at this part of the code:
eclair/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala
Lines 1223 to 1227 in c37eb1a
eclair/eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala
Line 443 in c37eb1a
Consider scenario1:
closing_signed
withfee_satoshis = 504
,closing_signed
withfee_satoshis = 500
,closing_signed
withfee_satoshis = 503
,nextClosingFee
to be(500 + 503) // 4 * 2 == 500
,which matches what he sent last, and will not reply, just broadcast the tx (with
fee_satoshis = 503
).Ideally, Bob should send a final
closing_signed
withfee_satoshis = 503
,as this is what BOLT-02 says he should do.
Consider scenario2:
closing_signed
withfee_satoshis = 508
,closing_signed
withfee_satoshis = 500
,closing_signed
withfee_satoshis = 502
,nextClosingFee
to be(500 + 504) // 4 * 2 == 502
,so Bob enters the "we have converged!" branch,
replies with a
closing_signed
withfee_satoshis = 502
,and broadcast the tx (with
fee_satoshis = 502
)(so scenario2 works out as expected)
So my issue is that - like the comment in the code suggests - due to rounding errors, to an outside observer Eclair behaves probabilistically: sometimes it sends the last
closing_signed
messages, sometimes it does not.The text was updated successfully, but these errors were encountered: